Log In  


Cart #oatmealadventure-1 | 2022-03-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

(Part of the ooooggll box game pack):
https://scratch.mit.edu/projects/639317807/

Controls:
Arrow keys - Walk
X - Inventory
C - Pull box

Technically this is my "first" PICO-8 game. It's the one I started on first, and I finally finished it. Mostly it was for me to learn how to use PICO-8 but I ended up making it into a full game thing. Just don't look into the code though, it's pretty bad.

Story:
You need to acquire the Oatmeal Amulet from the dungeon to heal your sick brother, but there's no way to get into the dungeon without a key! You need the Old Man to help you get in the dungeon... then escape unharmed!

Thanks to Dylan Bennett for the tutorial, but I went quite a bit beyond that.

4


1

I had a picnic. :)
The puzzles with the shadow self following were pretty good. Nice job.


1

Found a secret?


@thePixelXb_ , @ooooggll Why fix the tricky diagonal related bugs when you can just pretend it was an intended secret all along ?

A simple way to fix this is to only move in direction x if btn(x) and x==frame_counter%4

A sligtly better way is to also set a flag if btn(x) and x!=frame_counter%4, and move and reset the flag if flag[x] and x==frame_counter%4.

You can also handle a queue of key presses if you're using btnp, and change the function by one that reports one direction press per frame at most :

-- btnp, but doesn't report multiple
-- keys on the same frame
function custom_btnp()
 local true_btnp=btnp
 local last_time=0
 local buffer={}
 return 
 function(b)
  if time() !=last_time then
   last_time=time()
   if (#buffer>0) deli(buffer,1)
   local i
   for i=0,5 do
    if (true_btnp(i)) add(buffer,i)
   end
  end
  return #buffer>0 and b==buffer[1]  
 end
end
btnp=custom_btnp()

1

@RealShadowCaster I'm aware of how to fix the problem but I think it's funny the way it is. This being my "real" first game, it's a bit unserious. Also, I made it over 2 years ago and have gotten quite a bit better with programming since.



[Please log in to post a comment]