We did it, I shipped, in like, the loosest, broadest, most technical way possible.
The 10/60 project was meant for that though, to throw a bunch of basic, simple games together and force myself to post them online as a trick to make my brain actually finish them. Well, first one is done. Is it messy? Yeah. Are there bugs? Almost certainly. Is it "done?", within the bounds of the 10/60 project it is, though I have ideas.
Attack from Beyond the Atmosphere is a dumb, free Shmup I made as part of my 10/60 project. This is obviously a legally distinct Space-Invaders, or at least it was initially. I eventually broke from the inspiration with the way enemies are spawned which pushed me closer to something like Galaga. Either way, it's done, everything in it from sprites to code is hand-made, and I feel damn good having done
These posts are going to be a sort of port-mortem on these microgames wherein I use the power of writing shit down to solidify the principles I learned from a game project. And if you want to read them, I hope you glean something from them too!
Attack from Beyond was made to play with extensibility, and in the process I learned a lot about how to build a proper Object Pool, and the fundamentals of AI construction (the kind that runs gameobjects, not the kind that spits out images that are subtly cursed.)
From the ground up I wanted Attack from Beyond to be as extensible as possible. While there are still some things I would change I think I accomplish that to a good-enough degree that I am satisfied with it as a first draft.
I chose the Shoot-em-up (hereafter known as Shmup) genre because it was a good platform to build extendible object systems. You have really three object classes in any given Shmup.
Enemies - Ships to shoot.
Weapons - The means of Shooting.
Bullets - The product of shooting.
Shmups, and more specifically Bullet Hells, take these basic ideas and do a lot with them. From attack patterns to exotic weapons and bullet patterns, the genre takes a few simple tools and builds on them through sheer variety. A great genre to work on Extensibility.
In Attack from Beyond, this extensibility was build on a simple pattern: Factories. The three primary objects listed above are built out of essentially two objects.
Details Scriptable Objects: A small scriptable object that contains data, and a "Create" method.
Concrete Object: The actual thing itself, which performs the logic.
Below is the "WeaponDetails" class, which demonstrates this relationship. It takes in some details, such as a prefab for what kind of bullet it will fire, how many bullets, if it fires at a consistent or variable speed, and if it has a warmup period. There are other things that could be added here to extend this even further but these are the basic building blocks of what a weapon does.
The most important part is the "Create" method, which is a factory for the concrete object. An entity can hold a reference to the details object, and whenever necessary, instantiate their own working Weapon script without actually knowing what it does or how it works. Just that it is a Weapon.
The Weapon Monobehaviour itself is where the magic happens. The weapon has a "Fire Weapon" method which takes in a direction and a transform and then pulls a bullet out of the associated Object Pool and hurls it into space based on the transform from which it is hurling.
This allows for a few different kinds of weapon, all working on the same framework. For example, scout-saucers simply move to a location, and after a short delay, fire a bullet straight down. They aren't necessarily aiming for the player, just shooting their shot as the kids say.
While the Corvette can use the same methods and logic to attack using rotating, targeting turrets.
This kind of architecture was a great basis for design on all fronts, from ships which are largely built the same way, to bullets themselves. They are abstract enough that ships can come in a variety of forms and act in a variety of ways. All three core ships in Attack from Beyond are essentially built from the same pattern, the waves that spawn these ships, the bullets that they spawn, etc.
If I were to come back to this game, which I still might I have some ideas floating around in my brain, it would be fairly trivial to add everything from a system of power-ups for the player, to a slew of enemies and bosses.
While only the first game in the 10/60 series, I already feel more confident having built it. And the need to post it and keep to a timeline (with posting on Bluesky to encourage me to stay honest) I am finding it much easier to control scope creep. Like, don't get me wrong, there is a goblin who lives in my brain who has already mapped out how this could be extended into a Starfox-64-like Roguelike where you Shmup on a level and progress through a network of other levels based on performance and I may come back to that idea.
For now though, it's been a great experience just digging into a smaller game with a very specific problem to tackle. I hope every game in this series is equally as effective.
Speaking of other games, I need to get this show on the road. 10/60 game 2 has a release date of April 12, which was three days ago. So I have some catching up to do!
Thanks, and have a good one.
Matt.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.