Seizure Warning
This game may potentially trigger seizures for people with photosensitive epilepsy. Viewer discretion is advised.
Controls
- Move: Arrow Keys
- Shoot: X
- Bomb: Z
- Pause: Enter
NOTE: Shoot / Bomb buttons can be swapped in the Pause menu
Instructions
- Destroy 30 waves of space pirates and recover the space doubloons they leave behind.
The more doubloons you collect, the higher your score. The ring around your ship indicates the range of your tractor beam which attracts doubloons. - Destroying space pirates will increase your score multiplier. Letting a space pirate escape the area or taking damage will reset this multiplier to zero.
- Defeating an entire wave of space pirates will increase your level multiplier which will also increase your score.
- Once you take 3 hits your ship will be destroyed.
Powerups
Every 5th wave, a random powerup will appear. Collecting powerups will upgrade your ship. Powerups can only be upgraded 3 times. The type of powerup will be indicated by the letter displayed:
- Power (P): Increases the damage of your ship's weapons. Ideal for taking down enemies quickly.
- Option (O): Options will orbit around your ship, firing additional shots, increasing your shot width. They will also damage enemies on impact allowing for both offensive and defensive play.
- Magnet (M): Increases your pickup range, allowing you to collect doubloons easier. It will also increase the range of any Options that orbit your ship.
- Bomb (B): Bombs will clear all enemies and their projectiles on the screen. You start with 3 bombs, though additional bombs can be picked up after fully upgrading the Power, Option, or Magnet powerups.
Tips
- The closer you are to the top of the screen, the faster you shoot. Use this to your advantage to defeat enemies quickly.
- Bombs can be particularly useful during the final level of the game when things are most intense.
- Defeating enemies quickly will shorten the total play time. See how fast you can beat the game and post your fastest play time in the comments!
Alternate Color Palettes
Choose from 10 different color palettes in the Pause menu, including palettes submitted by content creators who have supported the game during its development. Check them out!
Credits
Design, programming, art, sfx, and music done by me (Dumenglume).
Changelog
Thanks to everyone who checked out the game! Let me know your thoughts on the latest update, or what you'd like to see in the future for Space Ranger!
This is just a small loop I've been working on which I plan to put in one of my games, but thought I'd upload it to see what others think. It doesn't use any custom instruments and so far any additional layers I've attempted to add (drums, other melodies, etc.) haven't really sounded right. I'm curious if folks think this loop stands on its own enough or if it would become annoying to listen to after a while. Any general feedback is welcome.
When I try to run the code listed below, my game freezes because of the while loop. Can anyone shed some light on how I can prevent the while loop in this code snippet from choking? Or if there's a better way all together?
I'm hoping to add additional objects to these functions (though they would be single objects instead of sets of 30 and 15, but I'm not at all an experienced coder.
I was trying to borrow code from the following page: https://level0gamedev.blogspot.com/2016/05/back-to-game-code.html
I'm also having a second issue of all 45 sprites being set to foo's sprite instead of 30 for foo and 15 for bar, but i'll have to tackle that later unless someone can weigh in on that as well.
Any help is greatly appreciated! Thank you :)
function _init() test = 0 for i = 1, 30 do spawn_actor(foo) end for i = 1, 15 do spawn_actor(bar) end function spawn_actor(name) local obj = {} obj.type = name obj.frame = nil obj.x = flr(rnd(right_border) + left_border) obj.y = flr(rnd(bottom_border - top_border) + top_border) obj.w = 8 obj.h = 8 obj.x2 = obj.x + obj.w * 8 obj.y2 = obj.y + obj.h * 8 if obj.name == foo then obj.frame = 16 + flr(rnd(3)) elseif obj.name == bar then obj.frame = 32 end overlapped = true while overlapped do overlapped = false foreach(actors, function(actors) if actors.x <= obj.x + obj.w * 8 + 1 and actors.x + actors.w * 8 >= obj.x - 1 and actors.y <= obj.y + obj.h * 8 + 1 and actors.y + actors.h * 8 >= obj.y - 1 then test += 1 overlapped = true obj.x = flr(rnd(right_border) + left_border) obj.y = flr(rnd(bottom_border - top_border) + top_border) end end) end add(actors, obj) end function _draw() cls() foreach (actors, draw_actor) end function draw_actor(obj) spr(obj.frame, obj.x, obj.y, 1, 1) end |
Hi,
I'm trying to have a sprite move in front of and behind other objects to simulate z-index ordering, but I'm not sure how to do this in PICO-8. I figured it would work something like if object_a.y > object_b.y, move behind that object.
I saw somewhere someone giving each object/sprite a "z" variable that would control what order things were drawn, but that wasn't for PICO-8 so I don't know if that could be recreated here.
After some searching, I see that this has been done in The Lair and Kick Wizards, but I'm very new to Lua/PICO-8 so I'm having a hard time finding how they're doing it. Any help is greatly appreciated.
The Lair: https://www.lexaloffle.com/bbs/?tid=4051
Kick Wizards: https://www.lexaloffle.com/bbs/?tid=27697
Thanks!