Log In  
Follow
Zeepso

Cart #r56oh-0 | 2020-05-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

A game made in 560 characters for TweetTweetJam 4. The sound effects are generated from the poke commands at the top. The note pattern is random and can be a little unfair at times. I wanted to try a smarter way to generate the notes, but with 560 characters, there's not much room.

Z or C - Top line
X or V - Bottom line

If you're looking for a more readable version of the source code, check the spoiler:

-- The Poke commands generate the music, poke4 creates the first two notes
-- the first poke2 creates the third note (when you miss)
-- the last poke2 sets the speed of the notes (16)
poke4(0x3200,0x5ba4.380c)
poke2(0x3204,0x6911)
poke2(0x3240,0x1001)
c=0  -- combo count.
h=0  -- high score.
t={} -- notes in play.
m={} -- flags if you hit a button and missed a note (for both bars).
o=0p=0 -- delay between note generation, so 40 of them don't stack on top of each other.
_set_fps(60) -- set fps to 60, so the scrolling doesn't look awful
::e:: -- normally, gotos are ugly, but for code golf, they're a necessary evil.
-- clear screen and render the bars. A rectangle generates both lines.
cls()
rect(-1,56,128,72)
circ(15,56,4)
circ(15,72,4)
-- reset and tick down parameters for next frame.
p-=1o-=1m[4]=1m[5]=1
-- generate a note randomly, if it's created, add delay until next note (p and o).
if(rnd(25)<1 and o<0)add(t,{x=127,y=53,b=4})o=12
if(rnd(25)<1 and p<0)add(t,{x=127,y=69,b=5})p=12
-- loop over each note, see if it was correctly played, missed, etc...
for i in all(t)do
i.x-=1 -- come on down, you're the next contestant!
?"♪",i.x,i.y,12 -- draw the note
-- if note was played inside the circle, play the sound, 
-- remove it from play, and signify the player didn't miss,.
if(btnp(i.b)and i.x>=8 and i.x<=20)sfx(0,0,i.b-4,1)del(t,i)c+=1m[i.b]=0
-- if the player missed. remove their combo, play the missed note sound.
if(btnp(i.b)and m[i.b]>0)sfx(0,0,2,1)c=0
-- if the note left the screen, remove it from memory.
if(i.x<0)del(t,i)c=0
end
-- if the current combo is higher then the old one, add it to the high score.
if(c>h)h=c
-- print hud
?"combo: "..c,5,5,6
?"high: "..h,90,5
-- render the crowd, have them dance to the left and right depending on the note hit.
for i=0,4 do
?"웃웃웃웃웃웃",40+m[4]-m[5],100+i*6
end
-- draw to the screen, loop back to the beginning.
flip()goto e

2
0 comments



After trying to debug why my recent game doesn't work on the forms (but works fine in Splore and when exported), I've discovered if you don't include a breadcrumb string parameter in the load function, the cart will never actually load, and will just hang instead.

I'm assuming this isn't intended, since it's marked as an optional parameter, and it behaves fine inside Pico8 itself (or an exported cart).

As a quick example:

load("#cartid")                  -- won't work on forums (but will everywhere else)
load("#cartid", "back to title") -- will work

Also, as a side note, this may or may not be intended, but it seems the "fantasy glitching" when reloading (ctrl+r) effects the general use / work ram. Meaning if you rely on it to pass data to and from carts (like in Picoware), a player doing so may break the game.

2
0 comments



Cart #thyef_title-2 | 2020-04-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12

Point, click, and scamper like a mouse,
for riches untold in a strange house.
As a thief you only have one goal,
The diamond is the ticket to your payroll.

Now Fixed On The Forums!

I've discovered the bug that was causing issues going between rooms, I've reported it here

I've also uploaded a web exported version to itch, if you'd prefer that version.

12
4 comments



Cart #dogrotto-1 | 2019-12-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Controls

  • z - Jump
  • x - Restart Puzzle
  • Down Arrow - Use
  • Left/Right Arrows - Walk left and right

Info

The project started as an experiment for learning Lua (and Pico8 to some extent). I had fun, so, I decided to finish and release it. I hope you like it!

Sorry for the lack of snake casing in the code. I usually use camel casing, but Pico8's editor doesn't support upper case letters :/

Update 1.1:

  • X now restarts the puzzle.
  • Down arrow is now the use key.
  • Hint added on the second puzzle that shows how to restart a level.

Version 1.0:

Cart #dogrotto-0 | 2019-12-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

[ Continue Reading.. ]

5
6 comments