In October I will be joining the team in Vegas for a productivity weekend. I am going to work nonstop on Mothership with everyone and we are going to push for an alpha. Woot!
Engine - Construct 2
Construct 2 is a program you can find at Scirra.com. It is similar to Click Team products like The Games Factory and Multimedia Fusion, which is how I got acquainted with it. Similar to Game Maker, it allows you to create games without coding knowledge. It is quite powerful and there is a large community who provide plugins and effects to the program. I have used these types of engines for quite a long time and I felt like I should make a game with Construct 2 before I move on to something a little more complicated like Unity.
If you are familiar with Construct 2 then you know what layouts are. Layouts are basically the "levels" of your game. One can be the title screen, an options menu, ect. For Mothership I only have 3 layouts. The loader (which is the log-in screen), the main menu, and the battle stage. Instead of having multiple levels for each scenario, I opted to put the entire battle sequence of the game in one level this keeps it organized and I do not have to worry about events not carrying over to other levels appropriately. Technically I could have made the loader, mainmenu, and battle all one level but the more you condense everything the more complicated it gets.
This is an early look at the login screen. Maybe we should make it have a galaxy background? As of right now, it is pretty minimal and straight to the point. Not really a bad thing but who knows?
There have been screenshots of the main menu before, but this is what the main menu looks like in the editor with all of the layers showing. Instead of putting each menu on its own layout I put them each on their own layer. Its pretty complicated when everything is showing at once. You can also see the new hexagon background (WIP) made by our graphic artist for hire Lenny.
Another in-editor look this time at the "Battle" layout. All the assets are parked outside the level. Most objects are destroyed at the start of a battle. Objects like the player's ship and turrets are spawned in as needed. A battle's scenario, visual look, type of enemies to spawn and more are all predetermined based off the selected scenario or voted sector in stream mode.
Plugin - Arrays
Every single projectile in the game is the same object. Each projectile has its own animation whether its a single frame or 20. This makes it easier on Construct and the coding becomes simple as well. Each turret the player is using stores its own projectile information, when firing, the projectile is at first invisible. It then immediately sets its appropriate animation/ damage/ effects, ect. Explosions are another object. These tend to be special effects or cosmetic and do not require collision checks, however, if a weapon has splash damage a 3rd non-animated sprite checks for collisions. This is due to a workaround in Constructs collision checking. During testing I noticed that the explosion sprites (typically animated) had offput collisions. I determined during the animation it would check if the explosion was overlapping the enemy during a single frame and register the hitbox for that frame but not for the rest. Using a 3rd object I can resize the explosion appropriately and get a more reliable detection. Another possible shortcut one could take - tint effects. I could have drawn the projectiles one time each with varying shades of white. Then, I could use the tint shader effect to change its color. This would free up more memory but the projectiles would lose detail and makes unique projectiles impossible (projectiles with more than one color for example). Below is an example of the laser projectile when tinted different colors and the hand drawn ones. The sizes are not exact but you can tell the one on the right has more detail but less color variety.
There are so many event sheets to help keep my code organized. I have a bad habit of not commenting my coding but I can usually tell what is what depending on the sheet I am editing. This also allows me to exclude code from a layout. For example, I do not need to include the "LoaderCode" in the battle layout as nothing will be used on it.
Construct 2 is a powerful tool and while it may have its limitations I believe it is a great introduction to making your own game .It can help someone who has never coded before in bringing their dreams to life. The key to game design is to make tons of projects and basic games to learn the principles of how everything works. Mothership is a culmination of what I have learned and I want everyone to learn too. If there is an effect or feature that you see in Mothership and would like to know how it works, feel free to comment or visit us in our discord Mach V.
~ Andrew Barontini - Lead Game Developer - Mach V Gaming