Hello folks, Itīs me Fredrik who made the GOTW War of Antarctica and i have started on a new project.
Itīs still a RTS but in a fantasy world.
Well well, im having problems with the the detection of the units (For my units to auto-attack the enemy).
Im not going to use the same system as War of antarctica since it was quite buggy (And took lots of memory, there were big invisible objects that worked as detectors for all units)
This is how far i can get. But it doesnt work if i have multiple enemies, they dont know which to choose and just ignore them..
You need to find a way to select the enemy nearest to the friendly unit. This can be done to advanced direction object, dunno how though.
With your current engine, you only test the how far the last created unit is from the last created enemy.
I also think you need to give every friendly unit a ID and fastloop through them, testing them individually.
Yeah, I myself am developing a RTS in MMF2, love the idea of more people making RTS:es at the moment. Great to be able to bounce ideas
Although I will try to recreate cooperative A* movement like the one used in Ages Of Empires, its nice to see how efficiently a simpler method runs. please post if it is any more problem! After all, best way of learning is by teaching (Right next to google your ass off)
Damn your game seems really cool,Retainer !
Looking forward to it !
I havent been able to work on my game since ive been working 12 hours passes since 10 days back but i gave the game a little time and i noticed a problem that i have encountered with all my games.
The units stack on each other ( I use "soldier1" colides with " soldier1" - Bounce )
Is there any easy way to do this ?
Distance between soldier 1 and soldier 1 < 30
-bounce
or something like that, Also you can make the soldiers to bounce much further away or making system so the selected group walks in formation (I think this is the best way).
I have proven new mathematic formula to be true...
I think one way of doing with and it would be simple...
Use active object and when selecting sertain amount of troops and then you just always put them on sertain position. And in collision they move out of the collision (also in attack) and after its over, then again back in formation when moved.
Edited by the Author.
I have proven new mathematic formula to be true...
Hello!
Well, overlapping enemys are well known to me.
Commands like
enemy1 collides with enemy1
->bounce
are looking crappy.
Also, you cant say
x-pos of enemy1 < x-pos of enemy1
This wont work, because you compare the x-position with the same object.
I solved it this way:
1. Via fastloop, every enemy needs a little detector that always follows it. The detector must have the same ID as its enemy.
2. now you can say (again by using a fastloop):
x-pos of enemy1 < x-pos of detector_of_an_enemy (only, if the detector has a different ID as the enemy, otherwise the enemy would push itself aound)
-> set x-pos of enemy -1
The effect ist, that if enemys come to close to each other, they are pushed away from each other very smoothly.
I made this for 4 directions, so for example if an enemy comes in the upper right quarter of another one, he will be pushed 1 pixel up and 1 pixel to the right.
Sorry for my english, i hope, this is understandable.