Newbie question

Hi



I like the total war game series e.g. shogun total war and am interested in learning to create (programme) such kind of game. If I create such kind of game, I would like to focus on its battle system. For instance, a player involves in a battle where the player can maneuver using military formation to win the battle. So my question is - in order to create such kind of game, what knowledge, skills do I need to have/ learn? Or is there any open source project that provide similar concept?



I have experience on programming e.g. Java/ C several years. But I understand that is not enough if I want to programme such kind of game. Therefore, would anyone be able to give some advice on what else I need to learn in order to achieve my goal?



I appreciate any suggestion.



Thank you very much.

You may want to browse gamasutra.com. They may have articles that will answer some if not all of your questions. You may also want to but books on Java Game Programming (for example, Pro Java 6 3D Game Development) to get some ideas on how to write 3D Games using Java.

That will be a challenging game to write.

One of the big challenges will be displaying  a large number of animated soldiers without killing performance. Pre-Rome Total war games used sprites instead of 3D models because of this and making them 3D was one of the major accomplishments of RTW (which was the same engine used for MTW2).  Even then, there were some limitations.



Another will be AI. You will have to to code both commander AI and AI for each soldier. Soldier AI should be very simple, mostly just basic pathing - but you will need it to be extremely well optimized.



So for research I'd say, all the fundamentals of 3D game development, and pay close attention to working with animated meshes, and pathing.



For diving in head first and checking stuff out, try looking at some of the Total War mod sites. There are (or used to be) some excellent tutorials on working with the models including an extractor which would transform the models in to conventional formats so you can load them in to jME.

As Alric mentioned, AI will be some major issue. I also think yoou will have to create two types of AI: The first thing would be a "simple" reactive AI for your soldiers. Even reactive AIs can be tricky to code, because you will need to program a behavior-scheduler that works on the basis of predefined behaviors that have to have priorities which you have to puzzle out. Also, your soldiers probably will need to communicate via some communication-protocol to keep an eye on the other soldiers, f.e. for making them walk through a narrow pass while obtaining their formation.

The second big AI probably has to be a reasoning one. For this you will have to implement a knowledge-database and an interpreter that can do logical conclusions. Most common way is to use PL1 there. This AI would be the enemy general who commands his troups. He has to know formations, strategies and the forth and has to conclude, which one strategy (or move) would be the best one to do in a given situation.

If I told totally cryptic things to you, you totally have to read literature about that. I know a book called "Multiagentsystems" that was pretty cool and which we read at the university in AI. But don't ask me who the author was…



And the most big issue is performance. You will have to deal with some hundred agents that have to act in realtime while a big gaming-engine also does its work. I programmed once a reactive multiagentsystem only whithout any 3D-engine and with a population of one- to fivethousand agents in Java and it was pretty slow. I didn't tweaked the performance, so there would be some further speed to get, but my AI also was much more simple than the one you would have to implement.

JimSlade said:

As Alric mentioned, AI will be some major issue. I also think yoou will have to create two types of AI: The first thing would be a "simple" reactive AI for your soldiers. Even reactive AIs can be tricky to code, because you will need to program a behavior-scheduler that works on the basis of predefined behaviors that have to have priorities which you have to puzzle out. Also, your soldiers probably will need to communicate via some communication-protocol to keep an eye on the other soldiers, f.e. for making them walk through a narrow pass while obtaining their formation.
...


Considering AI issue, it looks like this can be done by GOAP (http://web.media.mit.edu/~jorkin/goap.html), which seemingly already has been implemented in Empire: Total War.

Unfortunately, based on my limited knowledge, there are still many missing parts which I am not aware of. For instance, as Alric states that massive units on the battlefield, it might requires using sprites, instead of 3d models (though I've heard that seemingly Medieval 2 Total War already applies 3d model, not sprites anymore). Also, though I've read resource on that website, I still have no concrete idea how GOAP is implemented.

Indeed, I think I may never finish it, but that would be an interesting thing to learn. : )