flyinian
Member
I'm a little ahead of myself in my development road map but, I decided it may be a good idea to have at least a good idea on how I am going to do my combat system.
I just brain stormed a combat system, the partial logic of it anyways.
(The game is a text based simulation game)
Essentially it'll be something like this:
There will be at least 2 sides fighting. Player VS. A.I.
Both will have their own combat units(could be thousands to trillions of units). It doesn't matter what they are for this.
Each unit will have different stats for combat.
The "playing field" will be a static area that displays numbers, timers, etc.
The units won't have any abilities but, the player will have abilities that they can activate.
Here are the combat stats for the units:
Kill amount: is the amount of opposing force units destroyed per Attack Rate.
Attack Rate: The rate that the unit attacks at.(seconds, minutes, hours, etc.)
defense: is the negated destroyed units. Ex: Player is hit with an Attack of 11 but, the player has a defense of 10. 11 - 10 = 1. The player will lose 1 unit for that attack
This is the summarized version of my combat system. How would one code this? I'm not really looking for a complete system for this(unless you'd like to give one) but, more of an idea on ways of doing this. At least one that can get me started.
I'm still a beginner at coding and coding something like this in my head isn't that clear yet. Especially coding it in a way that is easy for a beginner to create, debug and edit it to fit their needs and wants.
Here is a more precise request:
If I were to create variables in a control object that declares the stats for a single unit, how do I make these variables usable for the player to use for a combat system?
Create event in obj_PlayerUnitControl;
I just brain stormed a combat system, the partial logic of it anyways.
(The game is a text based simulation game)
Essentially it'll be something like this:
There will be at least 2 sides fighting. Player VS. A.I.
Both will have their own combat units(could be thousands to trillions of units). It doesn't matter what they are for this.
Each unit will have different stats for combat.
The "playing field" will be a static area that displays numbers, timers, etc.
The units won't have any abilities but, the player will have abilities that they can activate.
Here are the combat stats for the units:
Kill amount: is the amount of opposing force units destroyed per Attack Rate.
Attack Rate: The rate that the unit attacks at.(seconds, minutes, hours, etc.)
defense: is the negated destroyed units. Ex: Player is hit with an Attack of 11 but, the player has a defense of 10. 11 - 10 = 1. The player will lose 1 unit for that attack
This is the summarized version of my combat system. How would one code this? I'm not really looking for a complete system for this(unless you'd like to give one) but, more of an idea on ways of doing this. At least one that can get me started.
I'm still a beginner at coding and coding something like this in my head isn't that clear yet. Especially coding it in a way that is easy for a beginner to create, debug and edit it to fit their needs and wants.
Here is a more precise request:
If I were to create variables in a control object that declares the stats for a single unit, how do I make these variables usable for the player to use for a combat system?
Create event in obj_PlayerUnitControl;
GML:
_PlayerKIll = 0; // Player's kills per attack from all units
_PlayerAttackRate = 0; // Player's attack rate from all units
_PlayerDefense = 0; // Player's total defense from all units
_PlayerTotalUnits = 0; // Player's total owned units
_Unit1Name = "Bomber Plane"; // Name of unit
_Unit1Count = 1,500; // Current count of Unit 1. Lets say the player purchased 1,500 of these.
_Unit1Kill = 100; // Amount of kills per attack
_Unit1AttackRate = 10; // Attack Rate(Per in game day)
_Unit1Defense = 50; // Unit's defense
If the player had 1,500 Bomber Planes, how would I code it so that it can be used in a combat system?
I'm also planning on adding a system to upgrade the units. My game will have several countries which will upgrade their units separately from the player.
I may be adding more over time.
Thank you.
Last edited: