Generic Battle System - early version available

Community Forums/Showcase/Generic Battle System - early version available

Matty(Posted 2004) [#1]
Hi,

If you wish to test out the single player and/or 2 player (over network or internet) game then download from the following locations.

http://home.swiftdsl.com.au/~gezeder/lloyd/GBS.zip
http://home.swiftdsl.com.au/~gezeder/lloyd/GBS_Patch.zip

From
Matt


eBusiness(Posted 2004) [#2]
Ah, first AI. Well, it seems to hard for some of my units to fire, I think you should make them attack, if there are anything within range (they don't always do so now, it might be a bug). They seem to be blocked by each other very often, and they ain't good at coming around it, try making smaller collision areas for a start. The animations still look like crap. The enemy AI probably needs to be more objective orienteered. I'm not shure about the unit balance yet, but it should be so that tanks are good vs infantry, infantry vs large robots, and large robots vs tanks, right?

I won my first game, and the second one was simply too easy, but keep it up, the game could get good some day :)


eBusiness(Posted 2004) [#3]
Ah, it seems like you havn't balanced the grass level 12 a strikes and 18 units for yellow player, but only 6 and 12 for red. The tanks often get stuck in the trees.


Michael Reitzenstein(Posted 2004) [#4]
tanks are good vs infantry, infantry vs large robots, and large robots vs tanks, right?

I think that infantry vs tanks, tanks vs large robots and large robots vs infantry makes more sense.


eBusiness(Posted 2004) [#5]
A little update on the balancing, I think the large robots are slightly better than infantry, and tanks sucks. I think you should win when you hold all of the objectives, not 4 turns after. Mark the visible area, so you know where enemies might hide. Try to make the AI not bomb itself with the artillery strikes. Move the camera further up, and make it look down on the field, just a suggestion.


Matty(Posted 2004) [#6]
Thanks for the feedback.
The regions which are visible for the player are now represented by lightening the terrain at those regions and shading it at the other regions.

I will attempt to improve the speed with which units select targets. Currently they cycle through all the enemy units at a rate of about 8 units per frame, which means it can take some time for it to pick a target - I will see what I can do about that. UPDATE - Have increased it to 12 units per frame that the units cycle through so should be 1.5 times quicker at targeting. Note though that infantry will not target tanks unless they have a chance of killing them - ie when another tank or robot has damaged them already.


Not too sure what to do about the pathfinding. The units are able to find their way around obstacles like buildings and rocks but trees are a huge problem for tanks at the moment.

I agree that the animations are pretty bad...


eBusiness(Posted 2004) [#7]
I think you will need to precalculate the entire route to fix the bad collision problems. Is the targetting really such a heavyweighter?


Matty(Posted 2004) [#8]
I think I can speed up the targeting in a few other ways...but I have designed the game to run on my old system..a 500 Mhz AMD K-6. Perchance my algorithm should be changed for selecting the targets. Currently each unit that does not have a target will iterate through all enemy units (over the course of a few frames) in order to find any targets within range. If I increase the number of targets cycled through per frame then the game really slows down. I would be more than happy to find out about a better targeting algorithm. However because of the way that multiplayer works (recently uploaded a patch which fixes a problem when playing against someone with a slow internet connection - MAV occurred due to one PC going ahead with something before it was ready..) it is essential that each player's simulation runs exactly the same on both PCs which I manage by writing the code in such a way that the same path is taken through the code on both PCs...and therefore if I were to adjust the "targets per frame" variable based on game frame rates then the simulations would differ.

If you can let me know a better way I would be interested to hear.


eBusiness(Posted 2004) [#9]
I think there is an easy way to ensure that the same things happen: Let all the calculations be done on one computer, and then just stream targeting info, unit deaths etc. to the other computer(s), remember that as long as it is a turnbased game, you do not need to show the action on both computers at the exact same time. Just delay the action on the client side.

And by the way, there is somthing you haven't taken into account about the sprite infantry, when they are close to the edge of the screen they will appear to be turned, so they basically don't face the way they walk.


Matty(Posted 2004) [#10]
Yes, I have thought of precalculating the action on one PC and then sending the results across to the other PC. Previously when I thought of this I thought it would take too much effort on my part to do so, but I think now I could probably work it out much better. Initially the game was going to be real time, and I was having too much trouble with the synchronizing issues so made it turn based, but I think I could precalc everything now.

Also - yes I should fix the sprites when they are near the edge of the screen.

I am going to make some major changes I think - such as precalculating the turn.

Thanks


Matty(Posted 2004) [#11]
Yes I have decided, I definitely will pre calculate the turn. That would mean that pathfinding, targeting, AI, Line of Sight would all be able to be calculated exactly rather than using the fudges and kludges I currently use to do it all.


Matty(Posted 2004) [#12]
Targeting has been fixed. It required that I calculate the turn in advance and then play it out on both PCs. If you wish to test it then download the two files listed in the first post above.


Jager(Posted 2004) [#13]
I maybe interested in the Generic battle engine for my ancient wargame.

What sort of functionality does it offer?

Thanks


Matty(Posted 2004) [#14]
I don't know if I would call it an engine as such. While it is fairly modular it was not written with the intention for other people than myself to use it. In other words I am saying my commenting is pretty bad and the code can be hard to follow at times.

If you want I will write a short text file outlining what the software does, what the various modules are - which of these can easily be reused. So give me a little while and I will have something for you to read.

http://home.swiftdsl.com.au/~gezeder/lloyd/SwarmSystem.txt

@Jager - While the current version of the game is based slightly more on a SciFi/Modern setting with projectile weapons I had considered also doing a Fantasy/Medieval version with some changes to the code - which would not be too different to an Ancients system I guess. I really like the look of your Fields Of Mars game (although I doubt my machine could run it with all those reasonably detailed meshes.) I suggest that you download my early version of the game at the top of the post and if you think it would be worthwhile I would be quite eager to assist you with Fields of Mars.