Staredit Network

Staredit Network -> Concepts -> Realistic Ammo System
Report, edit, etc...Posted by fishgold on 2005-08-24 at 20:19:52
Assuming that you know how to detect unit's speed. It is quite easy to detect whether unit is attacking or not. Refresh the conditions which units need to be able to attack. Except air units or some particular units with turrets, almost every unit in starcraft can not attack while it's moving. At least they can't move immediatly after they attack. So the idea is to apply speed detector to this ammo system.

But first of all, you have to know the attack range of unit that you want this ammo system to be active. Once you know the attack range, second job is to use 2 or 3 locations to represent that attack range.

For example, if goliath's attack range is 6, then you could make 2 locations with size 12x8 and 8x12.

(note: Just multiply 2/3 to get the other length of side.)


Now all you need to do is, set the cooldown time for sequent attack and decrease the ammo when player unit is not moving and enemy unit is in either one of locations (attack range). If you have done all the steps then you will see your ammo decreases as your unit attacks.



Reloading

It's pretty easy. Just subtract 1 from clip amount and reset bullet amount. You could turn player unit into melee unit when reloading. Attacking enemy unit by gun itself biggrin.gif



Pitfalls on this ammo system

- If player press stop button continously, then ammo will decrease even though unit is not shooting.

- If player unit is trapped in somewhere and tries to move to somewhere else. For example, surrounded by melee units such as zerglings, then same thing will happen as above.

- If there is a unit on higher layer of terrain and player can't see it, then ammo will decrease without attacking.



Comment

I think this system is more realistic than the ammo system used in 'Zombie Hotel', because if the enemy unit's HP is like 99999999 and your unit's attack damage is 1, then you have to shoot him for like 99999999 times to kill him and only 1 bullet will be decreased.. I'd say 'Zombie Hotel' may have no pitfalls like this ammo system, but it become very unrealistic when there are huge difference between target's HP and shooter's damage.
Report, edit, etc...Posted by MapUnprotector on 2005-08-24 at 20:23:40
I don't think this is a very good ammo system. Too much work for such a not good result and it has too many pitfalls to be worthwhile. Detecting a unit's speed and taking it's cooldown speed and range is too much of a hassle, especially getting it to work right. The main problem is you still aren't even directly detecting the unit attacking. You are just detecting it not moving closedeyes.gif

Er... nevermind about it being too complicated, I see it could easily be accomplished, but as I said before the pitfalls just ruin it smile.gif It's not reliable enough.
Report, edit, etc...Posted by HeRtZ on 2005-08-24 at 20:41:22
i don't like this either, the normal ammo system is better, and just....blah you know.
Report, edit, etc...Posted by Mini Moose 2707 on 2005-08-24 at 21:32:30
http://www.staredit.net/index.php?showtopic=16818

You can do better.
Report, edit, etc...Posted by fishgold on 2005-08-24 at 21:43:28
QUOTE(Mini Moose 2707 @ Aug 25 2005, 01:32 PM)
http://www.staredit.net/index.php?showtopic=16818

You can do better.
[right][snapback]297666[/snapback][/right]


I can actually fix the pitfalls by little bit of hard work. But I'm not gonna tell you here beacuse I haven't figued it out yet. biggrin.gif
Report, edit, etc...Posted by DaMiNaToR on 2005-08-24 at 21:59:34
I can fix two of them, but the player would have to be pretty stupid to deliberately censored.gif up his ammo by pressing stop over and over.

2.)If player unit is trapped in somewhere and tries to move to somewhere else. For example, surrounded by melee units such as zerglings, then same thing will happen as above.

Solution: Prevent it from subtracting ammo while the unit is moving, since if the zerglings are stacked ontop of the unit, it will be moving slightly, but if they're just surrounding it, you'll be attacking anyway.

3.)If there is a unit on higher layer of terrain and player can't see it, then ammo will decrease without attacking.

Solution: Make a blanket Location for each level of elevation, and set up seperate systems for each elevation level, then make it only subtract ammo for units on the same level or below the target unit.

I WIN!! biggrin.gif

Report, edit, etc...Posted by Vibrator on 2005-08-24 at 22:46:07
QUOTE(DaMiNaToR @ Aug 24 2005, 09:59 PM)
2.)If player unit is trapped in somewhere and tries to move to somewhere else. For example, surrounded by melee units such as zerglings, then same thing will happen as above.

Solution: Prevent it from subtracting ammo while the unit is moving, since if the zerglings are stacked ontop of the unit, it will be moving slightly, but if they're just surrounding it, you'll be attacking anyway.
[right][snapback]297687[/snapback][/right]


What happens if you try to run and then get surrounded? Your unit will be trying to move but can't and your ammo will decrease.
Report, edit, etc...Posted by AFL-InuYasha on 2005-08-25 at 14:25:34
hm, big problem with this concept, depends on how smart player is and how many enemies there are...

well for the human player part, i guess if there stupid enough to mess up the system, they deserve to lose ammo.

for how many enemies there are, well to me id think its just about impossible

my idea for a bullet system similar to this one is in non-existence
Report, edit, etc...Posted by MapUnprotector on 2005-08-25 at 15:26:21
I think we shouldn't be calling this an "ammo system". We can treat it like one, but instead we could call it like an "attack meter" or something like that. So that way it doesn't have to be precise like an actual ammo system which measures the shots, but the name "attack meter" would actually fit what this system actually does.
Report, edit, etc...Posted by Sniper on 2005-08-25 at 16:10:02
Personally, I don't like this very much. Not because it sucks but because your assuming things instead of calculating. If the player stands still, you assume they are attacking but they might not be.
Report, edit, etc...Posted by fishgold on 2005-08-25 at 18:47:43
QUOTE(Mp)Sniper @ Aug 26 2005, 08:10 AM)
Personally, I don't like this very much. Not because it sucks but because your assuming things instead of calculating. If the player stands still, you assume they are attacking but they might not be.
[right][snapback]298147[/snapback][/right]


For the best of my knowledge, there is no ammo system that counts exactly how many shots you fired. Like I said, ammo system in "Zombie Hotel" isn't accurate as well if enemy isn't gonna die in one shot. Do you wanna set all enemies HP lower than shooter's attack damage? That brings restriction to the game.



Shall we compare two ammo systems.

"Zombie Hotel" - Effective only if all enemies are gonna die in one shot. Can't have anything that doesn't die in one shot.

My Ammo system - Effective only if player isn't stupid enough to press stop button or tries to escape when surrounded.


Solutions?

"Zombie Hotel" - If enemy dies in 3 shots, then when it is killed, subtract 3 from ammo. So subtraction of ammo must be set by mapmaker.

My Ammo System - When surrounded by enemy, then automatically change weapon to melee type. And if player doesn't kill any unit even system assumed he was shooting for a while, then return lost ammo. This means system again assumes player was not firing at anything, but was close to enemy.



Problems?

"Zombie Hotel" - If player hits the enemy with 2/3 HP then system will miscalculate. If player is able to change weapon then mapmaker should code lots of triggers according to weapon's damage and enemy unit's HP.

My Ammo System - If player, intentionally, changes the target and tries not to kill any enemy unit then player won't lose any ammo.


Final

It's pretty subjective as to which ammo system is more realistic. I think it depends on what kind of map you wish to make. If you want harder work then I recommend "Zombie Hotel" Ammo System. (I actually don't get any advantage of using "Zombie Hotel" Ammo System.) And if you think player isn't stupid enough to try anything that will ruin ammo system, then use mine.
Report, edit, etc...Posted by SacredElf on 2005-08-25 at 19:28:14
what about if a player goes to the bathroom or is afk for a while? his unit will stop and he will lose bullets whit out even firing and when he comes back he will b like WTF?! I CANT SHOOT! "Zombie Hotel" is a very good bullet sistem but just for one unit, i think yours is good for multiple units, but a lil fixes would b great
Report, edit, etc...Posted by Mr.Kirbycode774 on 2005-09-11 at 20:37:37
How come a few people keep missing this sentence:
QUOTE
Now all you need to do is, set the cooldown time for sequent attack and decrease the ammo when player unit is not moving and enemy unit is in either one of locations (attack range).


It seems to be a good system, but I suggest you use it with slower attacking ranged units.
Report, edit, etc...Posted by RedNara on 2005-09-11 at 23:51:08
Well only thing i gotta say is.. You can always attack even without ammo or the best thing you can do is give them a warnning every time they attack without ammo so like if you get 3 warnning they die.. its kinda like follow the rule thing Thats my best guess

Becuase what we have as ammo system works well and just make everything 1 hit kill and everything will be cool.

But add the warnning system like if you do 3 more kills without ammo you die i think thats a good idea i like it im gonna add it in a map smile.gif


I like fishgold a lot also smile.gif
Report, edit, etc...Posted by Staredit.Net Essence on 2005-09-23 at 02:54:25
Or you could ya know... make a map that'll actually be fun.
Report, edit, etc...Posted by fishgold on 2005-09-25 at 00:51:18
QUOTE(Befree_omfg-noobs @ Sep 23 2005, 06:54 PM)
Or you could ya know... make a map that'll actually be fun.
[right][snapback]320135[/snapback][/right]


You know, even if I want to provide a sample version of this ammo system, I can't. Because, in order to achieve this, other systems are required first.

Here is the hierachy of core systems.

Micro Scan -> Coordinate Detection -> Velocity Detection -> Ammo System.
Although, I already made those super-systems, Velocity Detection doesn't work accurately enough.
Next Page (1)