Random Asteroids (Unity ECS)
A downloadable game for Windows and Android
Random Asteroids
Introduction:
This is an open space shooter game that was inspired in the legendary Asteroids.
Key Features:
The player has 5 lives to survive in the free space and smash all the metal and rock meteors. But watch... there are also enemies out there that moves linearly and shoot with different weapons.
Weapons can be also be picked by the player along with power ups to provide some assistance. There are standard Laser guns with decent range and firing rate, quickly shooting Machine guns with spread and there are powerful slow laser Railguns.
As power ups, there is an invisibility shield that keeps you untargetable, attack increase (which increase damage and firing rate), speed increase (which increase forward and turn speed) and extra life.
Quests ocassionally spawn and gives the player additional points if completed in certain time. Quests include picking items, weapons, destroying certain types of ships or meteors.
When shooting a big Meteor, two meteor spawn at 120 degree of the impact angle, like this:
Level change with LevelSystem. It takes into account points gained in the level and time passed by. Each level get more difficulty. There may be decrease respawn timers, make more difficult enemies spawn, increase metal meteors or total meteors quantity. To balance there are more power ups and pickable weapons as well.
About Framework:
This game was done using Unity 2021.3.11f1 ECS (Entity package v0.51.1) with Hybrid Renderer v0.51.1, HDRP Rendering Pipeline v12.1.7 and IL2CPP Scripting Backend. As IDE I used Visual Studio 2019 for coding in C# synced with the project with VAssist.
All the assets I used were free to use and I downloadad them.
About Software:
As a starter Game Developer my objective was learning to use Unity DOTS Framework (Entity Component System) so I used Entities instead of Gameobjects as much as I could.
To create Entities, mainly I followed two ways:
Created Gameobjects and then attached the "Convert To Entity" Script to them. Also added the Components I needed to it in the Unity Inspector.
Or Instantiated the Entity using the EntityManager and then using SetComponentData() to add the data to the newly instantiated entities.
I used many tags along the project to filter them with ForEach Lambda expression in the Systems and act accordingly:
I really liked this way of coding "deattachedly" of the processes that involves using the entities themselves. When creating the entity and its components you can think of what this entity needs to function, not the functionallity itself.
As regards systems I created some inherited from SystemBase and ComponentSystem depending what I needed to do. Regarding Physics I used Physics package. First I tried to use raycasting to shoot but I had some difficulties, so instead, I made changes in the projectile PhysicsVelocity and let the Game Engine work for me. As regards Enemy moving system I made Translation changes programatically with a fixed speed.
I created some singleton Spawners to instantiate the different entities. I used some Monobehaviour to manage UI events and an Audio Conversion class to optimize memory when playing sound effects.
I code all by myself with the help of forums and ChatGPT. I think it was a great process in learning on how to use Unity DOTS Framework.
How to play:
In PC press W to move forward, A,D to rotate the ship and S to activate hyperspace. One of the Asteroids main features. Spacebar to shoot.
In Android there is a Joystick available to move. A touch button to shoot and B touch button to activate hyperspace.
Have fun!
Published | 10 days ago |
Status | In development |
Platforms | Windows, Android |
Author | Bandolero Games |
Genre | Shooter |
Tags | 2D, Space, Unity |
Download
Install instructions
For PC:
Download "RandomAsteroids_Vx.xx_Win64.rar" file in an empty folder, unrar it and run the Random Asteroids.exe file.
For Android:
Download apk file and send it to the Android phone. When downloaded install it with Package Installer or similar. Then allow "Install apps from unknown sources" when asked. After scan app if asked. Install. Then open and play.
Leave a comment
Log in with itch.io to leave a comment.