A downloadable game for Windows

Use the arrow keys and the [Z] key to fly around a small 2D grid to shoot asteroids with an overhead behind the back view. 

Blow Part the Cubes! is the second game made on the homebrew engine that I called "Myon" as a joke but that's how I make most of my life decisions so I'm sticking to it. Somehow I made this in 5 days!

Gameplay

Use the arrow keys to control the little debug triangle spaceship. It has a bit of inertia when flying around, and when the engine shuts off you'll slide for a bit until coming to a stop. Don't unwittingly slide into an asteroid, because it'll destroy your ship!

There are three weapons available:

  • Laser: Your basic starting weapon. Simple, automatic, and relatively low damage.
  • Spread: Fires a spread of 5 shots for 5 times the damage if every shot hits. The spread fire makes it forgiving with regards to accuracy, and when up close can do huge damage against large asteroids.
  • Vulcan: Super rapid fire gun which does insane damage but has enough recoil to slow you down when firing, or even push you backwards if not thrusting!

There are 6 levels of increasing difficulty. Each introduces a new concept or weapon, with the final level being a huge no holds barred melee!

I Need a Depth Buffer!

Probably the most glaring shortcoming of the Myon renderer is that there's no depth buffer. This effectively means that in order for things to occlude each other correctly (e.g. a near cube obscuring a far cube) they must be drawn back to front. This introduces complexity to the renderer, and is also less efficient.

A lot of little decisions were made on the game because I didn't have time to add a depth buffer. For example the grid being placed below the playing field was because I could avoid weird looking depths from things not overlapping the grid the way you would expect. Everything is rendered in a very deliberate order, taking advantage of the camera to make assumptions that are true 99% of the time. Asteroids were the only thing that required special consideration, where before being rendered, they are sorted based on distance to the camera, then drawn from the furthest to nearest.

A depth buffer is probably the first thing I want to add if I continue with these little Myon engine games. There were just so many little things about the architecture that were influenced by a lack of one and it made it messier than it really should have been.

When in doubt, write it like a Particle System

Writing particle systems is fun, and they have a ton of visual impact, so doing something with them was like, number 1 for things I wanted to do on this game. The spacedust was the prototype, and then it just ballooned from there after one particularly late and sleep-deprived night.

What was especially ironic though, was that there were a couple times when I tried to write something in a "smart" C++ style way with classes and stuff, but it quickly became unwieldy and just created more problems than it solved. The asteroids were the biggest one, where after a first pass that was too smart for its own good, I threw out almost all of the asteroid code and replaced it with what was effectively a particle system and an array and it not only worked way better but it was also far more efficient. 

I forget where I heard this saying, but it went something like "if you need hundreds of something, it's a particle system." I'm starting to believe it.

Looking forward

There are two long-term issues that are driving me crazy, and were especially problematic with this version.

The first is that I still don't have a great way to handle the frame smoothing interpolation. I feel like it necessarily has to be memory expensive (storing many things twice or even three times over!), and computationally expensive (my performance bottleneck is doing the thousands of lerps necessary for particles!).

It's possible that neither of those problems will scale in a way that matters for a more complex game, but the other part of the equation is just how to architect this. I still don't have a comfortable way to do this, other than I liked how my particle systems handled it the most. They handled it internally/themselves and that was nice since they are able to optimize for it better since they know everything about particles.

The other is that my game architecture, as in how the game treats and uses scenes, is clunky in a way that gives me the worst of both the C and C++ worlds. It's not C enough that I can make the entire game/engine "everything is structs and arrays!", and it's not C++ enough that I can really take advantage of RAII to handle a lot of the memory for me. The second point particularly bothers me because it makes a lot of the code more verbose and very boilerplatey whenever I want to add something to a game scene.

Both these issues I really want to address. Both these issues I don't have great answers to, either.

New Myon Engine features added for this game!

I think I might want to keep a running tally of this, because it's been fun organically growing this engine. Though, it's hard to separate what's a game feature from what's an engine feature, so I'm just using my best judgement.

  • "Material" system can be used to change the color of a mesh at runtime
  • Basic particle systems (dots and lines, and untextured triangles and quads)
  • Put a hard cap on frametime (useful for debugging)
  • "Actor" class (which should be renamed Transform probably) with a ton of convenience functions for making 3D things
  • Generic "GameCamera" to make doing camera stuff in 3D easier
  • Audio Channel constants to control the limited 8 audio channels I have access to
  • Lots of useful little functions for 3D math like rotations
  • Separation of render and window resolution to run meme resolutions with much more accuracy and control

Changelog

v1.1 (Jan 15 2024)

  • Removed Vulcan from mission 4 (wasn't meant to be there).
  • Fixed a catastrophically unoptimized mistake that was copying every particle per particle.
  • Added frame time graph to the debug info (accesible with ~).
  • Added a "max frame time" of 10ms per frame. If frame time exceeds 10ms game just runs in slow motion.
  • MUCH more accurate FPS counter.
  • When asteroids break up smaller ones don't spawn outside of the original asteroid.
  • Levels are now unlocked when you first reach them rather than complete them.
  • Added logo to the main menu.
  • Added version number on the bottom right corner of debug info.
  • Changed final mission completion message to be more accurate.
  • Improved impact effect for bullets.
  • Stage music resets on new stage start.
  • Rendering resolution/aspect ratio decoupled from window/final resolution! Fixes lots of little bugs and inconsistent imagery on different computers.
  • Game runs in a permanent 360 pixels high image.
  • Default window size is now 1280x720.
  • If window resized <360 pixels high the resolution will be 1:1.
  • Edited some of the mission intro text for clarity.
  • On respawn, the player has 3 seconds of invulnerability.
  • Text pops up on screen to confirm weapon change.
  • Changed zipped directory so the game can be downloaded on the itch.io launcher.

Download

Download
MyonAsteroid240115.zip 5.7 MB

Install instructions

  1. Extract the "Myon Blow Apart the Cubes" folder from the zip file
  2. Inside the extracted folder, double click MyonAsteroid.exe

Development log

Leave a comment

Log in with itch.io to leave a comment.