Proxy Wars: Independence Trieurm
So here’s my idea for a simple arcade-ish game. Proxy Wars: Independence Trieurm.
Its a 2d top-down up-scrolling strategic shooter. The player controls a commander of a squad in Trieurm. The goal is to have a simple map based on somewhere in Trieurm with a number of mission map locations. To start off, I will only have a few different mission locations, say a forest road, small town, and small industrial area like a wood. The map will be a screen-width and arbitrary height, where the player starts at the bottom and works their way up to the top.
The player controls the commander of a squad, where other members of the squad are semi-autonomous and can be commanded using simple commands. This squad starts off with bare minimum military equipment, and through killing opponents can pick up their relatively advanced weapons.
maps
When a game loads, enemies will be placed across the map randomly alongside objectives. The player’s squad has to kill enemies first to get their weapons, which they can then use to complete the rest of the mission easier. They will only be able to carry a small amount of ammunition for weapons they pick up, meaning they have to consistently find new weapons in the field.
small village
The small village map will start with an open field approaching a set of buildings with doors and windows, then it will fizzle out back into open fields. Missions here will be prisoner rescue, liberation, and defence.
forest
The forest map will follow a central road with trees on the side. It will have fallen trees as barricades, as well as a road block fortification in the centre. Missions here will be roadblock raid, convoy ambush, and recon run.
industrial
The industrial area map will start outside of a building, then the inside of the building will have log cutting saws and other workstations, then it will turn into a courtyard, and then a storehouse with lots of log clusters as cover. Then, after the storehouse, it will have a bit of forest. Missions here will be capture factory, sabotage and escape, and supply theft.
Weapons
Weapons are the same whether or not the enemy has them or the player. Their “damage” depends on their cartridge, so other weapons being better or worse depends solely on other aspects. Here are all of the aspects of a weapon:
- Damage, defined by the bullet type. Older guns have special ammo, but modern weapons generally share a cartridge.
- Rate of Fire, which is the speed a non-manual weapon can fire each second. This interacts with recoil and skill to determine how fast AI actually shoots the weapons.
- Accuracy, a base spread value a weapon has. Generally depends on barrel length and ammo type. Range is linear with this value, but generally weapons have a near infinite range but will find it impossible to hit targets a certain distance away.
- Recoil, a value that increases spread per shot fired, and how fast this increased value returns to normal. A soldiers skill will affect its impact and how fast it returns to normal.
- Magazine Capacity, how many bullets a magazine or other ammo grouping holds. The player and their ai can only hold 1 in the gun and 2 in their pockets, but enemies usually have 4-8.
- Reload speed, how fast a weapon reloads. This is a maximum reduced by skill.
- Mobility. Affects aiming times. I won’t have soldiers slowed down by weapons since missions are small to not fatigue soldiers.
- Reliability. Some infamous weapons are known to be a little unreliable, especially in the harshly cold conditions of Trieurm. Weapons with a poor reliability will have a guaranteed number of successful rounds before having a small chance to malfunction, where the player or an enemy would have to drop the weapon. I might remove this if players don’t like it, but it will be reserved for only a few weapons.
- Sound. How loud a weapon is. Pretty much every weapon is equally as loud, but the game has one silent pistol. I can’t design specific values until I have a game working, then I can tweak these. When I come to define the weapons, I will give a relational value (such as high, good, low, or bad) for these.
damage model
For now, I think it makes sense for everyone to have very few hit points, but they would sorta act like save points in that they’re a metaphysical thing showing the units taking non-lethal hits before they get hit out of combat for good. Bullet damage should also be used when calculating penetration.
I want bullets to be projectiles but also have a realistic speed. This means i’ll probably rayast a bullet’s full trajectory and then find out how far along that trajectory the bullet would be at any given frame. If the ray hits an object, i’ll cast another ray on its trajectory from the start of the surface to the end, and use this to calculate the length for penetration. I’ll tweak penetration specifics, but it’ll decrease damage until the bullet stops.
Weapons Companies
The game is set on Xeiat, so you know I have to do some worldbuilding!
AmderLiye
AmderLiye is an older arms company that had a lot of success in the 1840s and 1850s but is now in a bit of a pit. It is most notable for producing lots of the modern army surplus and backstock. Based on ArmaLite and Smith and Wesson
AmderLiye M1
An old semi-automatic rifle still in use by garrisons and colonial militia. Cartridge: 8x52. Medium-high damage RoF: low-medium Accuracy: medium Recoil: medium Magazine Capacity: 5 Reload speed: medium-slow Mobility: low Reliability: medium (might fail in last few rounds)
AmderLiye O-18
A bolt action rifle used exclusively by the Trieurm colonial militia, as leftover surplus that no-one else could use. Cartridge: 8x52 ROF: manual Accuracy: medium-high Recoil: medium Magazine Capacity: 5, manually loaded Reload speed: slow Mobility: low Reliability: good (no chance to fail)
AmderLiye Arc-8
A basic revolver that’s an outdated model but the modern version is keeping the company afloat. Cartridge: 7.65x23-Arc, low damage RoF: medium Accuracy: low Recoil: low Magazine Capacity: 6 Reload Speed: slow Mobility: high Reliability: good
AmderLiye 1831 Grenade
This is a stock of old grenades produced by AmderLiye back in its good days. They deal less damage and have a worse radius than the M4 frag grenade
Aradei Arms
Aradei Arms is the standard manufacturer of Userian arms. Its battle rifle is the standard issue rifle in the Userian Military, and it is a very well off and modern arms company. Based on Browning
Aradei 55 AR (A-55 AR)
The standard-issue rifle for the Userian army. Balanced, but somewhat unreliable in Trieurm’s cold. Cartrige: 5.50x45, medium damage RoF: high Accuracy: medium Recoil: medium Magazine Capacity: 20 Reload Speed: medium Mobility: medium Reliability: bad (Has a chance to fail after first magazine)
Aradei 35 Precision (A-35P)
standard-issue long-range rifle for precision shooting. A bit old, but the updated “P” variant keeps it relevant. Cartridge: 11.5x54, high damage RoF: low Accuracy: high Recoil: high Magazine Capacity: 5 Reload Speed: medium Mobility: bad Reliability: good
Aradei 41 LMG (A-41 LMG)
A light machine gun designed for rapid deployment and suppressive fire. Cartridge: 5.50x45, medium damage RoF: very high Accuracy: medium Recoil: very bad unless deployed Magazine Capacity: 50 Reload Speed: low Mobility: abysmal Reliability: medium (might fail in last magazine)
Aradei 29 SMG (A-29 SMG)
An older model for a submachine gun used by militias. Cartridge: 8x18, low damage RoF: high Accuracy: low Recoil: medium Magazine Capacity: 20 Reload Speed: medium Mobility: medium Reliability: good
Aradei 29 Revised SMG (A-29R SMG)
An updated version of the old submachine gun that the army gets to use for close quarters combat. Cartridge: 8x18, low damage RoF: high Accuracy: low Recoil: good Magazine Capacity: 20 Reload Speed: good Mobility: medium Reliability: good
Aradei 12 MH Pistol, (A-12MH)
A modernised version of an early Aradei pistol design Cartridge: 8x18, low damage RoF: medium Accuracy: medium Recoil: exceptional Magazine Capacity: 8 Reload Speed: good Mobility: good Reliability: good
Aradei Smoke Grenade
The only smoke in the game
Aradei Model 4 Fragmentation Grenade (M4 Grenade)
The standard grenade with a higher radius and better damage than the 1831
Aradei 53 HE-FRAG RPG Launcher (A-53HE)
A specialist weapon that fires a HE-FRAG RPG that’s very powerful and can penetrate cover like high damage cartridges. It is reloadable, and is a somewhat modern-ish version of a bazooka.
Younes Group
Younes Group is a company heavily subsidised by the Userian government to produce good, state-of-the-art military equipment
Younes M5 AR
A modern and versatile rifle with integrated optics, customisable attachments, good range and a high rate of fire. Cartridge: 5.50x45, medium damage RoF: high Accuracy: high Recoil: good Magazie Capacity: 20 Reload Speed: good Mobility: good Reliability: good
Younes AMR 1
A high-power anti-material rifle used to shoot through light cover and vehicles. Cartridge: 16x120 AMR, exceptional damage RoF: bad, needs manual adjustment randomly Accuracy: high Recoil: bad Magazine Capacity: 3 Reload Speed: bad Mobility: bad Reliability: good, apart from manual adjustment of semi-automatic mechanisms sometimes.
Younes SMG 1
A compact and reliable submachine gun perfect for close ranges Cartridge: 9x20, low damage RoF: high Accuracy: medium Recoil: good Magazine Capacity: 20 Reload Speed: good Mobility: good Reliability: good
Younes Grenade Launcher
A versatile grenade launcher capable of firing HE and smoke rounds Cartridge: uses special grenades RoF: manual Accuracy: medium Recoil: good Magazine Capacity: 1 Reload Speed: bad Mobility: good Reliability: good
Younes Subsonic Pistol
A silenced pistol for stealth operations. Cartridge: 9x20 Subsonic RoF: Medium Accuracy: Medium Recoil: good Magazine Capacity: 10 Reload Speed: good Mobility: good Reliability: good6
Kau Manufacturing Group
Kau is a massively popular Articuitan arms manufacturer. They produced very successful small arms back in the day, and produce the most modern of Articuita’s military equipment nowadays. Based on Colt
Vicvia Manufacturing
Vicvia Manufacturing built a bunch of old rifles for the Articuitan military. Their manufactories have been incorporated and produce Kau’s weapons, but they made the Augvust rifle which is a highly reliable and mass-manufactured bolt action rifle from the 1830s. This company is based on Winchester.
Vicvia Augest “Sentinel” m1830
The starting bolt-action rifle for the player. Part of really old military surplus. Cartridge: 7.8x42, medium-low damage ROF: manual Accuracy: medium Recoil: medium Magazine Capacity: 40 rounds stored in player reserve Reload speed: slow Mobility: low Reliability: good
Enemies
The antagonistic force of the game is Userian colonial troopers. There are three tiers of enemy, each of which are equipped with different weaponry.
Militia
The local colonial militia are lightly armed force used by the colonial administration as a police force. They are equipped with outdated Userian surplus, which are only minor upgrades to the bolt-action Articuitan rifles that the player starts with.
Militia will be equipped with a random selection of AmderLiye M1, AmderLiye O-18, Aradei 29 SMG, and will also have a Arc-8 and up to 2 AmderLiye grenades. There is a small chance they will also have a smoke grenade, or have a Aradei 35 Precision. They do not have body armour.
Army
The Army is the Userian army stationed in the area because of the unrest generated by the independence fighters of Trieurm. They are equipped with the regular equipment of Userior, which is significantly better than the starting equipment and quite a bit better than the militia’s equipment. The army also has some specialist troopers equipped with machine guns and other specialist equipment, which players have to distribute among their squad deciding on specialisations for each soldier.
The Army will come in a few different squads that will spawn together and cooperate internally. These squads are made up of certain types of soldiers with defined equipment. They also have medium body armour
Standard Soldier
- A-55 AR
- A-12MH
- 2 M4 grenade
Sniper
- A-35P
- A-12MH
Heavy Weapons
- A-41 LMG
- A-12MH
Assault Soldier
- A-29R SMG
- 2 Smoke grenade
- 2 M4 grenade
- a small chance to have the A-29R replaced with the SMG1
Explosive Specialist
- A-53HE
- A-29R SMG
- 4 M4 grenade
- Potentially any other fun explosives I add in the future
Squads have 2 standard soldiers, one of which is the commander, and 2 random specialist soldiers (including assault). There is also an assault squad, where there are 3 asssault soldiers and 1 random specialist. These squads coordinate amongst themselves, but if the commander dies then the coordination is dropped.
A team is a larger squad of 8 members, which has 7 soldiers randomly either standard soldier or assault soldier, and then one of each of the specialists.
Special Forces
The Userian Special Forces are a QRF of highly trained and well equipped soldiers. They have the most modern of Userian arms, as well as advanced specialist equipment such as modern LMGs and grenade launchers (as well as other support equipment).
the main special forces squad is 4 people, all of which have a random selection of M5 AR or SMG1, then one might have an AMR1 and another might have a grenade launcher. They all have 2 smokes and 1 M4 grenade. This squad has very good armour.
There’s also a stealth special forces that has a low chance to appear and fuck up your game who are only equipped with 2 smokes and and the subsonic pistol. This squad tries to sneak and stay out of sightlines to attack the player squad from the front or the back.
Enemy AI
AI is probably the most important part of this entire game, where I want to create complex and realistic behaviour for AI so that they can strategically approach killing the player.
First, there is already a skills system, but I might abstract this into a general veterancy level, which defines an aptitude for all skills (which at this point primarily affects recoil reduction, reaction speeds, reload, and enemy AI).
So there will be different “skills” to the enemy AI. This can very immediately reflect the differing levels of cooperation and aptitude that the militia, army, and special forces would have.
Tactics and Mistakes
Ideally, I code a perfect tactical AI system for individuals, as well as a perfect strategic system for squad commanders. The idea, then, is that for lesser skilled individuals and commanders certain options of strategy or tactic would be unavailable. Another important aspect would be tactical and strategic mistakes, where certain tactical and strategic mistakes are purposefully made by the AI to reflect the shortcomings of individual and commander logic. This could be things like throwing bad grenades, peeking and crossing known enemy sightlines or unchecked sightlines in combat. Since there are three enemy types, each of them should have their own behaviours
Militia
When unalarmed, the militia will just hang in one spot and maybe wander about a bit, usually always with a buddy. When alarmed or in combat, they act independently and without any strategic coordination, trying their best to keep save and behind cover. If they witness enough death, they might even loose morale and begin to flee.
Army
The army, in squads of 4 or 8, are coordinated. Individuals will be confident in executing their own tactics, while commanders will try their best to coordinate soldiers and effectively deploy grenades, suppressive fire, and establish sniper sightlines to advance or get better defensive positions. I think its useful distinguishing between stationed army soldiers and reinforcement army, where stationed army would prioritise survival and defence, whereas reinforcement army would prioritise eliminating the player threat. The army will make significantly fewer tactical mistakes, but strategic mistakes will be quite present.
Special Forces
The special forces in groups of 4 are highly coordinated and flawlessly tactical, but group strategies might end up failing in some aspect. There is also a special stealth squad with a rare chance of spawning, which will prioritise being unseen by the player’s team and will try to go past holes in the player’s sightlines to attack them from the side or even behind. Their main goal is to only engage when they aren’t seen.
Player
The player group is a squad of 4 soldiers with one leader, which the player controls. If this leader dies, then the player controls another one of the soldiers. If a soldier dies, they are dead permanently (or for the rest of the mission).
Weapons
The player is playing as a independence guerrilla in Trieurm who has the goal of liberating Trieurm. They only get the Vicvia Augest “Sentinel” m1830, which is an old mass manufactured bolt-action rifle they get from Articuita. In the future, one of the main updates I will do is making the map actually have a progression, where the player manages their group’s resources and manpower, where missions will contribute to this. But for now, every mission is entirely independent, and the player always starts with this shitty gun.
Team members have 2 grenade slots, 1 main armament slot, and a secondary weapon slot. Main armament can fit any weapon, and here’s the list of secondary weapons:
- Arc-8
- A-12MH
- Subsonic Pistol
- grenades This is a little unfair as the enemy can hold a lot more weaponry, but they also have equipment that can hold this weaponry when the player’s team has to rely on simple weapon straps.
Weapons will also have an ammo. The player should start with plenty of ammo for the starter weapon, but any picked up weapons they can only hold two extra magazines for. Enemies track their ammo too, and drop whatever they have left when they die. The player’s team can only hold onto two of these magazines though, this way they are forced to think about ammo management, and might have to backtrack if they run out and haven’t got any dead bodies nearby. I might add a “find a weapon” command for AI so the player doesn’t have to go back with the whole squad, but i’ll only do this if players complain.
Commands
The player can command the ai soldiers of their squad, giving them simple commands:
- “regroup” returns the AI to its default behaviour, following the player while being aware of sightlines and cover
- “hold here” where the player selects a position for the ai member to go to and stay. If they’re shot at, the ai will find their own cover and fire back.
- “Push forwards”, “Push Left”, “Push Right”, where the ai will move carefully from cover to cover independently, stopping to engage with enemies.
- “Use weapon” a multi-option command with subcommands based on what weapons a soldier has. This is use grenades, provide suppressing fire with an automatic weapon or LMG, use launchers. This also includes a special “snipe” command, where the player selects a location and the ai will watch the area in front and shoot at targets.
- “Pick up weapon” targeting a weapon dropped by an enemy, the ai character picks up or swaps their weapon with the targeted weapon
- “Hide here” probably only useful for stealthy operations, hide here will have ai units find somewhere they can hide and try to avoid enemy sightlines. They will not engage targets, only shooting if they are shot at or seen, or if their command changes to anything else. Since it has a similar behaviour to hold here, but with specific fire rules, a player could switch from hide here to hold here to make the ai engage with spotted targets
Voice text
To convey things that are going on in the game, soldiers will have little text bubbles that pop up from time to time. Initially, I’m just going to have these bubbles always visible, but later on i might implement a more proper proximity-based system
Any time an enemy communicates with another enemy this needs to be represented by a text bubble that pops up. This, most importantly, means that the player can see what tactics the enemy is using. This will also happen for the player, visually indicating that the enemy can also hear them.
Other information is important to convey. Certain weapons will be effective in ranges further than the game map scrolls up, so having a squad member of the player team saying “I see a sniper!” and then finding cover would let the player know that there is a far away sniper watching that sightline. Having player-controlled AI also say things like “I see an enemy!” or “I’m being shot at!” lets the player know that the soldier is in immediate danger without the player needing to visually realise the enemy soldier or visually realise the danger.
Progression
This depends on the mission, but generally players will first encounter militia, and then the army closer to the centre of the map, before having to face off against the special forces as they escape from the other side of the map. The easier enemies will still be present as more difficult enemies are introduced, letting players use better picked up equipment against old enemies, which will help solidify the progression of the game.
Agent AI Design
DefaultAgent
Default Agent is basically my test agent, to get behaviours down. In the future, I will probably implement a “tactical planner” class for a node that agents can pass a state into, which will probably contain all gathered information about a scenario, and then the planner will choose the actual action state the agent needs to be in. When that action state is disrupted, either because of new information or disrupted actions, the agent will probably ask the planner again what to do.
But for now, I need to design a default agent to showcase how enemy AI might work.
Aspects of DefaultAgent
Identifier
Agents have a unique identifier, like a face.
Other agents list
An agent must keep track of a list that maintains the status of other agents it knows of. This will have to be its own class. For each other agent in this list, the agent will keep track of:
Name
This will keep track of the other agent as an individual
Alert Status
How alert that agent is, if it is known at all. -1 if not known, 0-9 if known, and 10 if they are dead.
Location Status
The status of the other agent’s location. It’s either:
- seen. The agent can physically see where the agent is, so the location information is literal.
- Thought. This is the location the agent thinks the other agent is in. If the agent sees the location where the other agent is supposed to be, but it is not there, then the agent might take actions to correct this information like calling out, radio, or searching.
- Moving. This agent is known to be moving out of vision, and this is the target location of the agent. After a while, the moving status will move to thought, indicating that the agent expects the other agent to have arrived at the location.
Location
This is the location stored for the other agent, it is to be interpreted in the lens of location status
Communication
Communication is an important aspect between agents. I will have text boxes to show to the player every verbal communication agents do. Some of them also have radios, which might be everyone, a few people, or difficulty-dependent.
Home region
Home spot is a location on the map, ideally a region, that the agent likes to stay in. This will be used for militia agents and stationed army agents when not alerted, so that they can wander around the map without ending up in the middle of the forest.
Alert Status
Every agent will keep a tracker on how much it thinks it is in danger. This will heavily affect decisions on what it does. I might make this a number from 0-9, integers would be easy to work with for defining the exact level of danger the agent is in. These alert statuses are designed for all the agents, where the actual behaviour of an agent in an alert level will depend on their personality and profession.
Alert 0 - Safe
The agent perceives no danger at all. It will prioritize idle and patrol behaviours. It may also perform non-essential tasks like looking around casually, interacting with the environment, or conversing with nearby friendly agents.
Alert 1 - mildly intrigued
The agent notices something unusual but not threatening, like a missing friendly agent or an out-of-place object. It will start exploring its immediate area to rectify this information, but still operates in a relatively calm state.
Alert 2 - curious
The agent suspects a minor irregularity. It might have heard a faint noise or seen a flicker of movement in its peripherals. The agent will start investigating with more focus, moving cautiously and paying more attention to its surroundings. The agent will still be cautious rather than aggressive.
Alert 3 - suspicious
At this level, the agent has more reason to believe that something is not right. For instance, it may have found a misplaced object or heard a clearer noise. The agent will enter a more defensive posture, move carefully from cover to cover, and keep its weapon ready, slowing down its exploration to scan for threats more thoroughly.
Alert 4 - cautious
The agent is now certain that there is a potential threat nearby, such as an unidentified sound close by or a suspicious event (e.g., seeing a door left open that should have been closed). It will move more deliberately, avoiding open spaces, and frequently checking its back. The agent might signal nearby allies to stay alert.
Alert 5 - concerned
At alert level 5, the agent has perceived a medium threat, such as spotting a distant enemy or hearing gunshots nearby. It will adopt a combat-ready stance, seek cover, and potentially call out to other agents or coordinate with them. Its movements will be tactical, prioritizing safety and recon.
Alert 6 - on guard
The agent has identified an enemy or a credible danger nearby. It will likely aim its weapon in the direction of the threat, scan aggressively, and use voice commands or signals to communicate the presence of an enemy. The agent will actively take defensive positions and may fire suppressive shots to deter the enemy from advancing.
Alert 7 - threatened
At this level, the agent is in immediate danger but not directly under attack. It could be due to a hostile being in close proximity or seeing an enemy taking aim. The agent will retreat to a safer location or more secure cover. It will keep its weapon aimed at the perceived threat and prepare to engage or retreat depending on the situation.
Alert 8 - under fire
The agent is under active fire or immediate threat of being engaged by multiple enemies. The agent will take rapid evasive action to avoid being hit, such as running for better cover, dodging, or laying down suppressive fire. The agent will communicate with allies urgently and may call for reinforcements or backup.
Alert 9 - imminent death
This is the panic state, where the agent believes it is about to be killed imminently. Actions may include sprinting away from the threat, performing last-ditch maneuvers (like diving behind cover), freezing up, or screaming to alert others of its situation.
States of DefaultAgent
Idle
Idle is the agent doing nothing but standing. It is the default, and should be used when thinking. agents should always be doing something though.
Explore Home Region
Explore Home Region is a behaviour that I’m making to showcase defaultAgent. When I make the militia and stationed army agents, I will make sure that the map is already revealed to them, meaning this behaviour wouldn’t be useful. But, the Explore Home Region state will be issued to the defaultAgent if seenTiles in its home region are false.
Actions when the agent wants to explore the home region include intelligently looking around and moving with the aim to see unseen tiles. This is ultimately a goal-oriented task.
The agent maintains a number on how far it can see. It’ll select the closest unseen tile in the home area, and the goal then is to see it. The agent will turn its head (and body) towards that tile, and if the tile is not seen, it will move towards the closest tile it has seen, using pathfinding, maintaining its head looking in the direction of the tile it wants to see.