This repository was archived by the owner on May 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on May 25, 2025. It is now read-only.
[FEATURE REQUEST] Collisions with weight of units #148
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Collisions
but with more strategy
general idea
- each unit has a weight
- the heavier a unit is the harder it is to push
- when a unit with weight 100 tries to push a unit with a weight of 200 it doesnt work and the other unit just stays in place
- to fight against a heavier unit you need to either destroy it or use 2 units or more that their combined weight is heavier than the one from the heavy unit
- when spawning they dont get pushed yet so there has to be be better spawning logic implemented which for collisions in mandatory either way
Pros
- you can build walls of some kind of unit
- if you push in groups you dont nessecarily need to destroy other units because you can just push an break through the enemy lines
- generally there is more logic instead of just running trough and being pushed around by any other unit
Cons
- How is the pushing handled?
- Do the units that want to push have all to touch the unit they want to push away?
- when a unit runs and another unit with the same or higher speed runs straight behind the front unit gets some of the base weight of the other unit and is so able to push more and the other unit behind looses some of their actual weight
Example config
UnitConfig {
name: String::from("Warrior"),
type_id: 1,
cost: ?,
hp: ?,
dmg_core: ?,
dmg_unit: ?,
dmg_resource: ?,
max_range: ?,
min_range: ?,
speed: ?,
base_weight: 50,
actual_weight: 55, // the worker is pushing from behind so this unit gets some weight bonus to push other units
},
UnitConfig {
name: String::from("Worker"),
type_id: 2,
cost: ?,
hp: ?,
dmg_core: ?,
dmg_unit: ?,
dmg_resource: ?,
max_range: ?,
min_range: ?,
speed: ?,
base_weight: 30,
actual_weight: 25, // its lower than the base weight because it lend the weight to in this case the warrior
},
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request