Log In  

Cart #58080 | 2018-10-18 | Code ▽ | Embed ▽ | No License
4

Picked something simple for my first PICO-8 game. Also first time coding in Lua so the code is probably horrid.

It's basically this. I've only managed 1024 myself and I don't know what happens after 8192 because there's no more sprites after that.

Changes:

  • Using sspr() instead of spr() to draw parts of blocks, so they appear to flow into each other when merging
  • Animation cycle now skips if there's nothing to change, speeding up response time.
  • Added instructions
  • Added game over screen with restart button
  • Added persistent high score (thanks tobiasvl)
  • Quick fix to high score because I'm bad at variable names

To do:

  • Add sounds maybe (how do you make a sliding sound in PICO-8?)
  • Some sort of fanfare when you reach 2048? Fireworks?

I doubt I'll come back to this. It has reached my mental "close enough".

P#57462 2018-10-03 09:15 ( Edited 2018-10-18 10:37)

Good conversion! My high score was 6948.

P#57484 2018-10-03 14:37 ( Edited 2018-10-04 15:34)

Nice! Always a good time-killer.

Persistent local high score is very easy! Put it on your to do list instead of your later list. You really only need to add two lines to your code. One call to 'cartdata("zach_2048")' (or something) in '_init()', and when you get a game over, add something like 'if (score > dget(1)) dset(1, score)'. Boom, persistent.

Of course you probably want to display the high score somewhere too.

P#57487 2018-10-03 15:23 ( Edited 2018-10-03 19:23)

Thanks, that actually looks far easier than the docs made it appear. High score can probably go where the direction indicator is. That started as a debug thing that I left in because I liked the arrows. It really serves no purpose.

P#57489 2018-10-03 15:49 ( Edited 2018-10-03 19:49)

Great job on your first game. I have never gotten to 2048 before.

P#57491 2018-10-03 17:01 ( Edited 2018-10-03 21:01)

Score: 1404.

At first I thought this was an addition kind of game so I avoided it. Now I see its more of an interesting polymorphic match-up.

Well done, Zach_Attakk !

Here's a star
and favorited.

P#57957 2018-10-14 19:47 ( Edited 2018-10-14 23:50)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 09:21:28 | 0.012s | Q:22