Log In  


Cart #go_figure_03-1 | 2024-08-27 | Code ▽ | Embed ▽ | No License
7

Go Figure

It's a glitchy little sokoban game, made for LOWREZJAM 2024.

There were several themes but i think the ones I managed to implement here the most were "Frick Around And Find Out" and also "All Systems Have Broken". The theme "Peaceful" is also there, but unintentionally.

https://itch.io/jam/lowrezjam-2024/rate/2897595

How to play

Well... go figure!

In case you don't want to, here's a little manual:

  • Use arrows to move around

  • Move the heads around and merge identical ones. Heads are "crates" in this sokoban and you can move several of them at a time.
  • So far there are two win states in this game:

  • if there are no panels in the level, then you just need to merge all the heads that can be merged and then leave the level through the door, which will open after the win state is accomplished.

  • if there are panels in the level, then you need to merge the heads but then also place the remaining ones on the unoccupied panels and then leave.
  • Press Z to cancel move

  • By pressing Enter you can access the main menu that has some options such as:

  • restart level

  • skip level

  • clear progress

  • select level

Levels

Levels were the biggest challenge for me in this game and even though i managed to do 24 of them I'm not so happy. Right now I'm working on a decent level editor, which I'm planning to make public. I really hope there will be more incredible levels in the future. Until then this game will be for browser play only. Please stay tuned and also consider to support this project.

Update 1:

  • the game now has cancel move feature!

Credits:

Big thanks to @kozm0naut for helping me figuring out the Glitches!

And also big thanks to @RealShadowCaster for helping me with move cancel!

You guys are the best!โค๏ธ

I would not make it in this game development journey without this wonderful pico 8 community, thank you all so much!

Also big thanks to my mom and my friends for game testing and for overall support!

Please!

7


1

Always love your style, very nice lowrez entry!


1

Oh Thank you so much @kozm0naut! So glad to hear that from you! I actually still owe it to you for helping me figuring out how to reset pico 8 back in a day! Otherwise there wouldn't be no glitches in this game)


1

Can’t @ you because of the space in your name, but I guess you’ll check your games as always.
A neat trick : the 32Kb of upper memory also stays untouched upon reset, so plenty of room to poke the move history, or even quite a big sequence of full board states.

Edit:
game was very nice, especially liked the grow mechanics. Skipped level 20, I'll come back to it later.
When finishing level 24, you get a level 25 glitch ? for a fraction of a second and then back to level select.
Is it because I skipped a level, or you simply can't win because everything is broken thematically ?


Oh wow!!! @RealShadowCaster I never knew there was so much space!!! I think now it's really possible to make cancel move feature. Thank you so much as always! I'll try to add it asap and also hope to release a level editor soon enough.
Also thank you for playing, I appreciate the feedback. There are only 24 levels so far and I guess its just a consequence of how everything works in there that you can see 25th for a moment. There's still a lot of work to be done.


1

>> lvl 20: Not so easy

You ain't kiddin ๐Ÿ˜† took me a day but I finally got it.


@ Peter Mosevitch

You're dealing with a lot of data stored in memory.
Usually, it is used a way to pass a lot of data between carts.
In your case, it is used in the same spirit, except you're resettin to get a glitch
instead of changing carts.
Nevertheless there are 2 classic approches :

1)data stays in the pco-8 memory and is peeked and poked.
2)data is peeked into LUA objects at _init, maipulated as LUA, then poked back in pico memory before transfer/glitch.

There's a 3rd option that is seldom used because there's a CPU and token price to pay that is my favorite :
memory_map objects

  --memory map metatable by RealShadowCaster
  mt={}
  function mt.__index(t,i)   
    assert(i>=t.s and i<=t.f)
    return peek(t.a+i-t.s)
  end
  function mt.__newindex(t,i,v)   
    assert(i>=t.s and i<=t.f)
    return poke(t.a+i-t.s,v)
  end
function memory_map(addr,idx_min,idx_max)
   local m={}
   m.a=addr
   m.s=idx_min
   m.f=idx_max
   setmetatable(m,mt)
   return m
end

No need to fully grasp the dark magic of metatables to use it :
Simple example :

-- in _init
  pal1=memory_map(0x5f10,0,15)
  pal2=memory_map(0x5f60,0,15)

--during game
  pal2[j],pal1[i]=pal1[i],pal2[j]

Advantages are :

  • no copy back and forth, the real data is only in pico memory
  • LUA array syntax
  • boundary checks

Oh wow @RealShadowCaster!!! Too bad I saw it only now!๐Ÿ™ˆ Was struggling with it for some time, but actually came up with a solution. I'm counting moves every turn and poke 64 screen slots to 0x8000 and adding moves count multiplied by 64 to this address. If i want to cancel a move i just subtract 1 from number of moves and peek the screen from the address with this move number. Hope you got what i mean here. Anyway this solution will be temporary i think and i will dig into yours because it looks much neater. Also have a problem now that i'm saving moves count to the memory and it affords only 255 moves, which is enough of course but i would like it to be more. Anyway thank you so much for your help as always๐Ÿ™


1

If you use poke2 to save the history length, you won’t have the 255 limit.
With 32K and 64 bytes per grid state, that’s 512 history length.
If you use a nibble per tile, that’s 1024 history length which should be plenty.

Edit :
If you need some code so you can access the map history with
Grids[hl][y][x], or maybe just
Grid[y][x] for current grid
And
New_grid[y][x] for the one after the current one,feel free to ask.


@RealShadowCaster Thank you! I used poke2 as you said and now it has 510 moves, which i think should be enough. I've just uploaded the update, so please check it out.
I'd love to see the code you're talking about because I feel like I'll need to rewrite this game a bit smarter. Some solutions I've created feel too made up and I'm not so happy with them. Also as in most of my projects so far I used almost all the tokens.))


1

Undo seem to work fine, except when you pause with X after some undos, as the grid shown after unpausing is the one before the undos.
Unless you need the tokens for missing functionalities , there’s no reason not to reach the limit.
If the game does exactly what you want, why rewrite it ?
I’m mostly talking to myself; I’ve spent a lot of time rewriting « ugly » code that was working, only to create and fix new bugs, and finally get to where I started from, only written in a cleaner way. Unless the code is ment to be shared with co-workers or if the rewriting taught you a better way to do things , then it’s worth it. Otherwise, refactoring mania is a developer’s trap.


3

I noticed that the level select view of the game was in 5x5 per tile screen resolution, that is conveniently the standard resolution of vanilla puzzlescript games, so I took this opportunity to un-rust my puzzlescript skills, since the graphics and the levels were already there.
Here's the link to the remake of your game
https://www.puzzlescript.net/play.html?p=2b29dd11db87972c0c30f54f9bc3ad2c

No glitch or level select :(

You can click on the hack link to view the code.
There's a hidden level skip activated by pressing X when near the closed door. As is standard for puzzlescripts, z to undo and r to restart.
If you want to share the link or add a standalone version on your web page, no problem.
If you want me to edit the credits or remove the game, just tell me.

I'm not 100% sure the teleport mechanics are exactly the same, but the logic solve path of levels containing teleporters stayed the same, so good enough for me.


@RealShadowCaster Wow!!! This is really incredible! I was actually wondering if its possible to make something like that in puzzle script and was going to investigate it myself! It will definitely help me learning puzzle script, especially because it already has all the mechanics i'm interested in!! Great job! Thank you so much for that and for overall interest in my game!)
Btw i really liked the sound you chose for 'grow')))
P.S. Thanks for noticing the undo issue. I'm going to update the cart now with that and some other bugs fixed!


1

Puzzle script is a special beast, and a lot of simple things like counting or assigning a value to a variable are hard to emulate.
There’s another subtle limitation : each objet belongs to a unique layer, and each game cell contains zero or one object in each layer.
Concrete example : if you try to do “baba is you” in puzzle script, it will start well, until you try to implement levels with multiple tiles that can be moved simultaneously on the same square.
You start to put every objet on a different layer, and implement some more levels… and then you have a level where the player has the ability to create new copies of game objects without limit… and now it’s game over. You simply can’t handle an arbitrarily big number of identical objects on the same square in puzzle script. There’s no room for two babas on the same square. If you know the max number of babas per square, you can have invisible objects on other layers to keep the info, but it has to have a hard limit.

Oh, when you don’t understand why a rule or part of a rule is necessary in PS, just break it, play, and you’ll usually learn something from the results.
The three phases of a turn (normal, move and late) are confusing at first, especially the move phase that is implicit, rules that look strange are often related to that.



[Please log in to post a comment]