This is my second Pico-8 game, a demake of asteroids...with a small twist.
That is, when you thrust, the ship stays centered and the viewport moves around a 256x256 play area.


Controls
L/R to rotate the ship
O is fire
X is thrust
note: there is no hyperspace in this game
Rules
Destroy all rocks!
Watch out for saucers - they can shoot you and become more frequent the longer you take to clear the rocks.
As time goes on the small saucer is more likely to appear - this one is more accurate - beware!
Free ship every 10000 points.
Behind the scenes
The idea for keeping the ship central came to me after first learning about the camera command.
The biggest challenge was the 'infinite' play area - that is, you have to draw the objects when they are off screen left/right/top/bottom which was achieved by drawing at +/- 256 pixels, so long as the object is close enough to be seen beyond the edges of the 256x256 play area.
I really found that the camera seriously messed with my head and had lots of challenges to get things to appear where they should appear.
Credits
I did need help from ChatGPT for an algorithm to determine if two lines intersect and whether a point is inside a closed polygon.
I also reused the particle explosion (with some tweaks) as found at https://www.lexaloffle.com/bbs/?tid=43946.
So many thanks to @SquidLight for sharing this.
Big thanks to LazyDevs academy ( @Krystman), I learned so much from Kristian - it got me started in Pico-8. Your videos are SO good.
Here is a link to my first game - Sky Soldiers - a Paratrooper demake:
https://www.lexaloffle.com/bbs/?tid=148599
[Please log in to post a comment]