Log In  

BBS > Superblog
Posts: All | Following    GIFs: All | Postcarts    Off-site: Accounts

I am receiving this:

I suspect this means I will not be able to post my game Online. Any ideas ?

0 comments


Just came across another nasty little thing about PICO. When referring to an array, it does not round down to the nearest integer when you make a regular array. Try the following:

cls()
a={}

for i=0,7 do
  a[i]=i+1
end

for i=0,7,.5 do
  print(a[i])
end

The results are:
1 NIL 2 NIL 3 NIL 4 NIL 5 NIL 6 NIL 7 NIL 8

Let's try the same thing in BlitzMAX:

Strict
Local i#,a[8] ' must be +1 of total (0-7)

For i#=0 To 7
  a#[i]=i+1
Next

For i#=0 To 7 Step .5
  Print a#[i]
Next

The # represents that this is a floating point variable.

Results in this case are:
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8

Which is the standard reply from this and many other BASIC programming languages.

Now apparently this does mean that it is possible to have fractional arrays. Something I've never seen until now.

14 comments


Many programming languages allow you to make direct changes to arrays at a memory level using a command called VARPTR.

https://www.youtube.com/watch?v=sdZahXk-e9Y

What I would like to do is:

a=""
for i=0,8191 do
  a=a.."*"
end

memcpy(24576,varptr(a),8192)
repeat
  flip()
until forever

Is this possible to do in PICO ?

10 comments


In trying to optimize my code, I was working on this:

cls()
a=254
c=0
b=band(a,2^c)
print(b)

Results are: 0, which is correct. There are no #1 (zero) bits in the number 254.

Now try this:

cls()
a=254
c=0
b=sgn(band(a,2^c))
print(b)

The result is: 1, which is INCORRECT. There are no #1 (zero) bits in the number 254.

With problems like these, it's no wonder we're constantly fighting code - as in this case - it's not my fault for this particular calculation coming up wrong.

2 comments


I can see how to have a string linked to another thus:

cls()
a=[[apple
juice]]
print(a)

apple
juice

However, how do you link a string to another on 2-lines that does not put a CR (#10) inside the text between code lines ?

cls()
print[[apple;;
juice]])

applejuice

How do you do it ?

2 comments


Every programmer worth their salt knows the difference between LOCAL and GLOBAL variables.

But I was wondering, what if you could reverse that ?

That is, when you define a function, you have the option of saying GLOBAL in there, either to define a global variable, or just to make a flag change.

Because by doing so ANY variables at that point which are not issued as GLOBAL automatically default to LOCAL.

For programs that do not use too many global variables, this might be an easier way to code as you would not have to assign each and every local variable for each and every function.

Thoughts ?

2 comments


[8x8]

Well guys, if I can pull you from your projects for just a short moment. I =WOULD= like to wish each and every one of you a very safe and Happy Halloween.

http://www.writerscafe.org/writing/dw817/1838331/

I =WILL= be writing a Halloween themed game in PICO-8 based on an old Apple ][ classic. How about you, are you going to write any Halloween or Haunted House themed games this holiday season for others to try out and enjoy ?

1
2 comments


Simple question. Difficult answer likely. Is there any way to FORCE the mouse to a position ?

That is, I can select MOVEMOUSE(0,0) and the mouse cursor will suddenly appear at the top. It's not an X/Y adjustment either, it TRULY moves the mouse pointer there so that if I pick up the mouse and move it slightly up, it will be out of the application.

If I just do a mathematical adjustment, I'll quickly be off the edge of the screen with a mouse that is off-center in reading.

I want to do this for my input routine as I want it to be intuitive when it already knows where the player is moving it to.

0 comments


Picoscope2016 is coming in April 2017

Hi,

We are organising a PICO-8 coding party in France.
You are welcome to join us in the workshops.

=> Website (near 30 places remaining)
=> Follow us on facebook and/or twitter

jihem (@wdwave)

1
7 comments


So, in between lunch breaks, I've made tiny-but-significant progress in my level generation code. It's part of a "bigger picture" thing, and meant to be useful across multiple projects; since I'm kind of digging into proc-gen core gaming. Even this little project is a proof-of-concept of a major undertaking, depending on if I can squish this into tokens available.

The idea here is to take a number of levels "LV" and make each one a 15-plus-one table - the first 15 being a kind of "perlin noise" function used to script "rooms" into the level, and the last being a control variable "BIOME" which influences the level's colors, themed elements, etc. I'm planning on coupling this with horizontal and vertical "targets" - ones to collect, ones to avoid, ones to attack, etc. Well, a "target" can be oriented both vertically and horizontally, and in varying speeds (more on this after my next WIP major chunk of code, "MAKETARGET()").

So MAKELEVEL(3) would generate 3 "output" tables:

LVL1={n1,n2...n15,biome}
LVL2={n1,n2...n15,biome}
LVL3={n1,n2...n15,biome}

...and then these tables will define the 5x3 screen map of each level.

I'll have to add "biome control" in later scripting, depending on the kind of game it generates, after the level generation. The "doorway" table definition occurs BEFORE it runs... for instance, it makes sense for a platformer to limit "doorways" to being {0,4,5,9,10,14}, where in top-down adventure or RPG games, it could be anywhere.

That said... still checking this for proper P8 syntax, and to see if it can be simplified. Being intermediate-level at best, I have the suspicion this can be streamlined a little bit still. Maybe even a lot.

function makelevel(lv or 15)
 if (lv>15) lv=15
 winlevel=lv
 for lv>0, do
  "lvl"lv={}
  level={scr1=0,scr2=0,scr3=0,scr4=0,scr5=0,scr6=0,scr7=0,scr8=0,scr9=0,scr10=0,scr11=0,scr12=0,scr13=0,scr14=0,scr15=0,biome}
-- create sequence of 16 doors
-- we don't have to use them all
 doorshuf={rnd(1,6),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5),rnd(1,5)}
 ezpath={}
 hdpath={}
 d=0
 n=1
 for n=1 to lv do
  d+=doorshuf(n)
  add doorlist (return doorways,d)
  n+=1
  end
--each exit makes a short,
--high-risk way, then a long
--low-risk alternative
 for n=1 to lv do
  stdoor=doorlist(n)
  endoor=doorlist(n+1)
--vertical paths?
  vstep=(stdoor/5)-(endoor/5)
  if (vstep<0) vstep*=-1
--horizontal paths?
  hstep=(stdoor\5)-(endoor\5)
  if (hstep<0) hstep*=-1
--add values to paths
  for n=vstep to 0 do
   if (stdoor/5)<(endoor/5) 
   then 
   add ezpath "5"
   add hdpath "5"
   else 
   add ezpath "-5"
   add hdpath "-5"
   vstep-=1
   end
  for n=hstep to 0 do
   if (stdoor\5)<(endoor\5)
   then 
   add ezpath "1"
   add hdpath "1"
   else
   add ezpath "-1"
   add hdpath "-1"
   hstep-=1
   end
 end
 add ezpath {"1","-1","5","-5"}
 if (#hdpath<3) add hdpath{"1","-1"}
--shuffle ezpath/hdpath order
 shuf(ezpath)
 shuf(hdpath)
--read paths, edit level table
	local pos=stdoor
	for i=#hdpath,2,-1 do
		local step={
		-1=(makelevel(pos)+=18,makelevel(pos-1)+=4,pos-=1),
		 1=(makelevel(pos)+=20,makelevel(pos+1)+=2,pos+=1),
		-5=(makelevel(pos)+=17,makelevel(pos-5)+=8,pos-=5),
		 5=(makelevel(pos)+=24,makelevel(pos+5)+=1,pos+=5)}
		end
	local pos=stdoor
	for i=#ezpath,2,-1 do
		local step={
		-1=(makelevel(pos)+=2,makelevel(pos-1)+=4,pos-=1),
		 1=(makelevel(pos)+=4,makelevel(pos+1)+=2,pos+=1),
		-5=(makelevel(pos)+=1,makelevel(pos-5)+=8,pos-=5),
		 5=(makelevel(pos)+=8,makelevel(pos+5)+=1,pos+=5)}
		end
	--return generated results as a
	--list of "lvl1,lvl2" tables...
	return "lvl"lv{}=level{}
 end

end

[ Continue Reading.. ]

1 comment


Was using PICO's sound editor and after highlighting a region, pressed CTRL-C. Then ALT-TABBED to a different PICO already open, and pressed CTRL-V. It did not copy.

Isn't it possible to transfer audio from one cart to the next without having to manually look at one screen and type digit values on the next ?

And, for that matter, does anyone know the length of audio in memory ? The instructions say:

0x3200 sfx
0x4300 user data

Is this then saying that sound effects are 4352-bytes in length in toto ? And, does anyone have a schematic for the sound cel ? How many bytes are used to save one sound, for instance ?

2 comments


Just a quick update:

  • I'm still alive. I was uploading updates almost daily at first but now I'm at a point where I needed new enemies and mechanics to expand the level, and I needed an expanded level to showcase the new enemies and mechanics, so I've just added lots and lots of new stuff, to upload all at once.

  • There's now health pickups (not many though)

  • There are 8 (or 10, not yet decided) golden cups to collect throughout the world. These are a kind of side-objective to officially '100%' the game.

  • There are now archers. Lots of archers.

  • There's knights. Knights will destroy you pretty quickly and they take a lot of hits. They're quite easy to kill once you get the hang of it though

  • The world map is almost entirely complete. I've finished 30 out of the maximum 32 screens.

  • There are two new bits of music

  • I'm currently working on the final boss room. After having finished this, the game will basically be complete

  • I'm toying with the idea of having a menu when you die, that shows stuff like how many cups you've collected, how many enemies you've killed and how many map tiles you've visited on that one particular run, then give you a percentage to show a score of how much you've done. This is so that even if you die early on in the game, you can get numerical proof when you get better at the game.

Not going to upload the newest build until the boss is functional, I think.

That's it really :D Taaa

3 comments


DEAR BBS
PLEASE make a PICO-8 version of Android! I can't carry my macbook anywhere.
ANDROID!!! GO LARRY PAGE!!! GO GOOGLE!!! YAY!!!

3 comments


הרי געש. משחק שיוצאים חלקיקי הרי געש מהפה של האיש הזה שתראו ברקע.

Cart #30769 | 2016-10-12 | Embed ▽ | No License

5 comments


Colors are not just pretty, they serve a vital purpose. Our brains can look at one image and be fooled into believing something that is not there.

Take this classic 3-dimensional model to show the difference of tints in locations:

From this clear image, you can see that (A) is darker color than (B).

But now let's start to cut down the colors to see what happens. First off, let's convert it to 256-colors, black and white.

So far so good, only the pillar changed. Let's go further. Now resize it to 128x128, the standard resolution of PICO:

We lost some detail on the text of (A) and (B), but that's fine. The board can still be seen clearly.

Now let's hack it down to 16-colors, here's where problems start to develop:

Ragged edges and clear compression shades. It's not pretty, but it's still there.

Now - keep an eye on the two marks where (A) and (B) are supposed. At this point we are going to simply load IMPORT this image:

[ Continue Reading.. ]

1
5 comments


Finding a rather strange situation. =ALL= BASICS I know would hang this code at 5.

PICO, bless it's strange and awkward self, however, does not.

for i=1,10 do
  i=5
  print(i)
end

This could be a problem as I have oft directly modified a FOR/NEXT loop to skip over values or to return back to older ones. Is there some special argument to put in FOR() that will cause this to hang on 5 ?

16 comments


Yep, I just received my first PICO Magazine, a lovely 47-page magazine dedicated entirely to PICO-8.

Opening the pages, here are the table of contents:

3 ... A Brief History Of PICO-8
We interview ZEP himself ! The founder of PICO-8, and what a tangled tale he weaves ! Telling us not just about the origins of PICO but systems he created prior including POIDO (Pointy Dough), Lex500, and Voxatron.

10 ... Squashy
Your first PICO game ! Introduces you to Command Mode, some command functions, user input, sprites, sound effects, and putting it all together - with full source code and screenshots included.

22 ... Let's Make Some Music
Gives you firsthand experience of the sound and music editor, and how to build effects and songs in them.

30 ... Toy Train
A more advanced look at programming introducing topics such as object-oriented programming, switch states, and having one object follow another through recursion. As SQUASHY is, full-source code and screenshots for all images are included for this game as well.

38 ... Geodezik
A simple program to type, complex in its execution, however. Draws lines out as vectors and creates a type of Spyrograph effect in the center.

39 ... Smoke Particle
Particle effects to me are one of the most exciting features of PICO. With it, you don't just hit a bad guy and flash a single POW sprite. No, you can have particles, hundreds of 'em ! All dashing off with their own properties to give you some serious and true eye candy for the agile player.

The example code demonstrates the ability to create 'smoke.' Complete with source and text on just what is happening and where in the code.

. . .

Between chapters are some niceties, like a truly retro picture of what PICO would look like were it a real console for its time and some lovely vector graphics below.

43 ... Welcome to PICO-8 !
ZEP returns and talks about his wonderchild, CELESTE. Not just your basic platformer but a high-powered one with special moves any super heroine would want.

. . .

What follows are screenshots descriptions, instructions, and download links by the programming author.

Stories At The Dawn
A decidedly darker platformer with tricky puzzles to say the least.

Pat Shooter
A serious topview shooter with lots of particle effects, ship's shielding, and enemy strengths.

Transdimensional Butterfly
A PICO program that explores the beauty and complexity of math to make this mesmerizing and most-colorful animated display.

The Tower Of Archeos
A tricky turn-based puzzle where you must survive by intelligently picking your battles with a large number of critters and enemies. Do well and you are granted the next level of play.

Tempest
A work-in-progress that is still in beta but still holds a few bugs. The premise is amazing for tiny little PICO-8 to run though - a topview adventure game where survival is key, including finding food and shelter.

WormWormWormWorm
Another Screen Teaser, this time a kaleidoscopic worm wanders the screen and computer-generated music plays in the background.

MTRX
You're familiar with the special MATRIX effects of the green characters descending from the top of the screen, right ? Well, in this program they collide from all 4-corners, crashing into each other with a cacophony of sound effects.

Delia Mute In Grave Grotto
An impressive rogue-like game with item pickups, combat, and traveling further underground through a series of descending stairs.

The Adventures Of Jelpi (with Corrupt mode)
A curiously unusual game to say the least. It's your basic platformer but enemies here poke values directly into memory causing your game to glitch. It's up to you to find the exit before PICO crashes !

All programs include an ONLINE LINK to each of the featured carts so you don't have to code them in yourself.

Additional carts mentioned w playable and download links are: Stray Shot, Endless Train, Random Sound Generator, Video Poker, Piano Simulator, Duangle 2015 Intro, Thopter Escape, Bounce, Puzzle Cave, and Sumo Pico.

. . .

While the hardcopy magazines of PICO-8 are now sold out, you can still get the digital version of the magazine to read from Online. And that link can be found right HERE:

http://pico8fanzine.bigcartel.com/product/pico-8-fanzine-1

[ Continue Reading.. ]

1 comment


This is a feature request, and I hope not a lightly dismissed one.

Having tried out some games that keep track of your personal high-score, would it be possible to have a future PICO save not just a unique file but a SHARED online file. Perhaps no bigger than 256-bytes per cart ?

In this, people could play a game, post their high score. And afterwards - see EVERYONE else's high score for who played the same video game written by the same author so they have something to compete over.

This would open up all kinds of interesting new things including MORPG, MUDS, and 2- or more simultaneous player games.

cartdata("rockets_romance")
sharedno=wget(0)

So let's say two people are playing the game at the same time.

The moment wget() or wset() is activated, it retrieves that value from Online.

To prevent a bottleneck, if the system is 'busy' with someone else reading or writing an Online value, it waits until it can have a turn to read or post a value.

And it also uses a method of timeout for everyone else so few to zero bottlenecks would ever be reached. Possibly a 1-second delay to read the same Online value more than once by the same person (which should only occur if you reboot the game).

5 comments


Or perhaps ... that should be Co-Creationism ? :)

I've come across this helpful site with 2 curious pages:

https://neko250.github.io/pico8-api/#coroutines

While these commands are listed in PICO help as part of updates, no information is given as to what they do or how to use them.

The other curious bit from there is a POKE chart. I tried poking numbers into these and plotting sprites and text afterwards in an attempt to get double-size pixels; they all appear at normal size.

https://neko250.github.io/pico8-api/#peekpoke

A fully working example program for either of these would be immensely helpful.

One more thing, perhaps a little simpler. Is there a way to retrieve the current X & Y of where the text cursor is currently in a cart (Prior to PRINT()) ?

2 comments


Likely this question has been asked, but I'll ask it again anyways.

With PICO, you can create games. To run either in Lexaloffle's BBS or with HTM/.JS elsewhere.

Is there a way or is it planned that games might be compiled to true FLASH ? *.SWF.

I just uploaded my notepad cart to Kongregate to check it and, sure enough, it still has staggering issues. I will say ALL PICO programs I have seen since I arrived, all stagger in my Firefox browser.

Is there a way to fix this or is it an inherent trait of Java/LUA ?

What Flash programs I have written in the past - all run top-speed today and have never shown any Online hesitation.

8 comments




Top    Load More Posts ->