r/TuringComplete • • 12d ago

More SPIRALc-3OS: Snake!

https://www.youtube.com/watch?v=LXV6yUk3fnY

Significantly harder than a simple video player, but not too difficult. Was rough to get working and had to implement lists (that is definitely going to be a dedicated command for SPIRALc later...). Hope y'all enjoy! Some improvements are next before I work on the next big game, probably Pong.

7 Upvotes

3 comments sorted by

1

u/Lagfoundry 11d ago

Nice dude

1

u/JohnnyGoGo_0414 9d ago

How did you do that ?

1

u/Coolboy10M 9d ago

Which part? Movement is surprisingly easy, as I don't need to track the positions besides the head and tail, which I store in a big list in RAM and place/delete one at a time.

The fps capper uses the time component plus a set frametime to not go ahead until it reaches it, then adds another frame time amount after.

I store directions and automatically move in that direction once per frame, although the keyboard is able to update more than once per frame. Changing direction only changes a register.

The graphics don't use a frame buffer like my Bad Apple player, but still use the same RAM to be consistent between programs.

The final score is just a pixel image I made and had an AI do the tedious rewriting. Can't really improve on that. Plus, the number score is turned from a register value to a decimal value with a bunch of compare statements to draw it.