A week and a half later, and I’m pretty happy with what I’ve gotten working. The basic “player” and “enemy” units can move around, fight, and defeat one another in-game. These base classes will be used as the archetypes for all of the units added in-game. Instead of having to rebuild functionality for each one, they all inherit from one parent, with statistical differences (health, strength, speed, fire rate) and visual assets being the only differences. This would quickly speed up production for prototyping and adding new unit types into the game.
This shot shows the sandbox I’m using to test functionality. It contains a player, an enemy, an open level, and a few objects to test collisions against a variety of object types. Those bubbles seen in the right are actually a part of the base player/enemy class. The inner, red sphere is checking for obstacles to avoid. The outer, green sphere is checking for enemies (or player units) to attack.
I took the basic sphere shape provided by Unreal and set two of them up as triggers to detect nearby obstacles and enemies. I then added a glass material to make them transparent, and a little color so I could tell the two triggers apart. When an object begins to overlap with one of the spheres, it checks whether the unit needs to avoid or attack based on the object’s given type. They are easily adjustable in terms of size if I want a particular unit to have a different attack range or avoid distance. In addition, visibility of these spheres is toggled on and off with a single mouse click.
Here you can see how the units would look in-game. I am more or less playing in debug mode, so obstacle and enemy detections spheres are active right now. Characters are nothing more than blocks with placeholder textures.
This is how the game would look without them. Also missing is the small icon that represents the player’s “god” unit. This unit moves around the level allowing the player to see different sections of the map and interact with specific units.
With this working, I move onto the next phases of the project; creating specific units and each of their AI patterns. I’ve written a more detailed plan for the rest of the project, and will prepare another update once a few more milestones have been completed.
PlayerUnit and EnemyUnit functionality, built out of TestUnitCombat between units- Unit types (Currently eight planned)
- Artillery
- Helicopter
- Humvee
- Lt. Infantry (Rifle)
- Infantry (Bazooka)
- Hvy. Infantry (Flamethrower)
- Tank
- Turret
- Enemy unit AI
- Artillery
- Helicopter
- Humvee
- Lt. Infantry (Rifle)
- Infantry (Bazooka)
- Hvy. Infantry (Flamethrower)
- Tank
- Turret
- UI
- Player Info
- Enemy Info
- HUD
- Level Design (Currently five planned)
- Level 1
- Level 2
- Level 3
- Level 4
- Level 5
- Menus
- Pause
- Main Menu
- Level Select
- Misc
- Visual Effect to show active units
- Playable Demo Released