Space Rocks 3D!

I think yes

The built-in menu already has volume control. Just press the Menu button, then A twice to mute the sounds.

I guess it’s fitting that I need a bugfix release:

  • Bugfix: Tilt yaw was accidentally staying enabled for other control modes, making it unusable on a smartphone emulator.
  • The world size (available space for asteroids) is now configurable, default is medium to increase the challenge a bit.
  • Add a distance-dimming effect to avoid pop-in for asteroids that teleport at the boundary of the universe. (This is more extreme for smaller world sizes.)

I’ve also moved the game logic to a new AsteroidInstance class in the main.ts file to keep it separate from the more generic 3D renderer code in triangle.ts, this makes things a bit more self contained in case you want to make gameplay tweaks.


True, but the setting doesn’t persist long. Once you lose all lives or turn the MeowBit off and on, volume is all the way up again.

But you’re right it would be better to fix this globally than per game :slight_smile:
Does it work better on the PyGamer?


I’ve added a volume setting, does this one work for you? I’m a bit confused since I thought the system volume was supposed to be saved to persistent storage, but my PyGamer also returns to a default volume when restarting the game. Maybe worth filing a bug?


  • Slightly larger collision radius. (I had forgotten to add an offset for the ship’s own size.)
  • Made the distance fade effect less dark. (Quadratic falloff instead of linear.)
  • The menu button now opens/closes the setup screen while in-game. Most changes take effect immediately. For example, it’s possible to raise the wave number while playing, but lowering it doesn’t take effect until the game is reset.
  • New menu options:
    • Volume control, including low-volume settings that are less loud than the system menu’s lowest setting
    • Change number of stars
    • Reset game (use this to start over, or in case the game is confused)
    • Open system menu
  • The setting screen now scrolls (I guess I’m adding too many options?)

In case you’re wondering about all the menu related changes, I wasn’t aware that it’s possible to use the Menu button for game actions until I saw it used in the latest horticulture game. I think it’s a bit unfriendly to make the system menu inaccessible, so the “show system menu” entry calls scene.systemMenu.showSystemMenu().

Out of curiosity, is there a way to use the PyGamer’s fourth button (bottom right of the screen) in an application? I think that this was intended to be a Select button, but it doesn’t seem to be hooked up for Arcade. (Of course, if other hardware doesn’t have such a button, it wouldn’t be a good idea to rely on it.)

My daughter asked me if it would be possible to add two-player support. I think this would be doable on the gameplay/rendering side (though I’d need to add a ship model), but last I checked the direct cable jacdac communication wasn’t ready for general use yet. Maybe in the future?


Thanks for adding volume control.

Everything runs great now on the MeowBit. I just lost my last live on level 8 and the game over screen appeared without a crash.
That’s amazing considering that 80% of the games published on the forum and even a lot that are published on the arcade website don’t run on MeowBit.


Wait @kwx, does that mean that the simulator is ok for the biggest game?

what if you added different types of meteors/asteroids in the game, like a big asteroid that takes more hits to defeat, or a breaking asteroid, that turns into small asteroids once hit.

1 Like

I have been thinking about this, it would be similar to the old Asteroids arcade game where big rocks split into smaller rocks. I worry though that it might be annoying if small fast asteroids end up being too hard to hit. The accelerometer controls on hardware can be quite precise, but a digital joystick isn’t well suited for precise aiming.

No promises, but I am thinking about making a new version at some point with enemy spaceships that shoot back. I have updated the 3D renderer to draw more complex shapes with correct depth handling which is necessary for ships that aren’t just simple block shapes, but I haven’t started on the enemy movement and AI yet.

okay. also the small rocks could be the normal speed of the asteroids.

@gusiscute64 How are we supposed to say your username.

Here’s a sneak peek showing the upgraded 3D rendering:


It can now handle overlapping surfaces by using a BSP tree to draw them in the correct order. On hardware, it’s getting about 25fps which still seems tolerable.


tie fighters

Even though it’s tempting, I’d prefer to avoid antagonizing Disney’s fearsome team of intellectual property lawyers. They are much more scary than Titan squadron or Sith lords…

(Yes, I know they are unlikely to care about a tiny project like this, but I kind of like making my own ship designs anyway. That also avoids having to resolve the infamous 22.5 degree cockpit angle inconsistency for TIE fighters.)

1 Like

Gus is cute sixty four

1 Like

Okay thanks.

Can you make it where we need it press the up arrow then the plane will look up and do one of the down arrow and press than the plane will look down

1 Like

Sure, here you go:


  • Added a “Joystick Y: inverted / normal” option. (I think non-inverted feels weird for a spaceship, but I guess opinions differ here, and I’m grumpy myself if FPS games don’t include an “invert Y” option.)
  • Updated the starting wave choice. That now applies immediately for a new game, or to the next game if trying to skip backwards from a game in progress. (You can use “Reset game” to start over at any point.)

This release also includes various performance improvements from renderer changes I’ve been working on recently. It’s only lightly tested as far as gameplay is concerned, so let me know in case of any regressions.

Dithered shading is now roughly as fast as flat shading, so I removed the setting for that. Wave 20 now runs at ~20fps on a PyGamer, up from ~10fps in the previous release. This involved tracking down a bunch of performance-eating floating point calculations, logic errors and other bottlenecks. I left the performance tracing option I used for this in the menu for anyone curious, but it’s unlikely to be useful unless you’re studying the internals. It’s similar in spirit to, but works on hardware also without needing special debugging tools.


I really like this game can you make a fps game thats not with planes

It doesn’t have to be right now but this is the only fps game right now

Here’s v0.16:

It now includes analog joystick control on compatible hardware such as the PyGamer. This is on by default but can be disabled in the menu in case it’s causing issues, please let me know if it’s misbehaving. It uses Button::pressureLevel() which is new to me, but it seems to be working well on my device.

@Purp13 - I don’t have any current plans for a non-spaceship 3D game, sorry. I’ve started early work for a sequel to Space Rocks 3D which will likely keep me busy for a while.