Log In  

Cart #sphero_a1-0 | 2021-05-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
29

Sphero

Version a1

Rescue Blocklandia from the evil clutches of Duke Cube. Find the nine golden keys to unlock the gate to the magic portal and recover the crown.

Instructions

--Move the Sphero with the arrow keys
--Interact with special blocks by rolling over them
--Collect keys to open locked doors
--Collect floating coins
--Grab the crown to win the game!

If you beat the game, please post a picture!

Implementation Notes

There are some tidbits in this cart that might be interesting/useful to other pico8 programmers.

Level Storage

8X8 rooms are stored in a compressed format within a long string contained at the end of the P8 file. Blocks are stored in a manner that is closer to a drawing format-- e.g. change current tile, place tile at location x or fill a given region with tile. These instructions are tightly bit packed and then saved a single line of hex for each room.
This allowed for 117 unique rooms in the game with a reasonable level of detail before hitting the code compression limit. (15438/15616 in the end!)

I have tool to allow for rooms to also be stored in the cart data as well, but it didn't end up being necessary. (I got tired of designing rooms before I got ran out of space.)

I have a level editor (also made in pico8), which outputs levels to a text file, that I can share.

Sprite Packing

This game uses two sprite sheets worth of a sprites by mashing them together-- e.g. the first 2 bits code for sprite sheet one and the second 2 bits code for sprite sheet 2. I posted a demo cart of this earlier, and there are a couple of other carts on the bbs that explain this in more detail.

Physics

Collisions are handled using signed distance fields for the blocks in the local area of the ball, which make it really easy to check for where and when the sphere of the ball hits something--or multiple somethings. As a bonus, they also make it easy to find the normal at the intersection point, so bouncing type collisions are pretty straight forward.

I can do more of a write-up for these things if folks want.

-ElectricGryphon

P#92323 2021-05-22 00:57

amazing!!!!!!! now playing

P#92410 2021-05-22 22:17

Yeah, really excited to learn more about how you did the collisions using the signed distance field stuff.

P#92489 2021-05-24 05:12

Weird and strangely hard game, I really like the idea of the sphere! Great game, I give it a very large number out of the total deaths by water I had (Which is also quite high)

P#92497 2021-05-24 13:46

very nice world!

Could you add mouse input (with lock)? that would make the game much more enjoyable than guessing correct input with keyboard (imho)

bug report: collision detection is solid except with overhangs - the ball keeps jumping and shadow is not correctly displayed

P#92503 2021-05-24 15:29 ( Edited 2021-05-24 17:14)

oop! freds72!?

P#92505 2021-05-24 17:04

Loved this game. I've recorded a video review/playthrough and actually managed to beat the game in the video (which I was not expecting). Yeah, 31 minutes, not going to be challenging for any world records any time soon :)

P#92738 2021-05-28 18:49

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2022-11-30 17:20:01 | 0.016s | Q:27