I know, this is hard! First, TGF isn't very good at A.I. Programming, then the fact that I am an average TGF user, makes this nearly impossible to me. Someone here knows how to help me?
Well, there are ALL WEAPONS YOU CAN IMAGINE AND ALSO THAT YOU CAN'T IMAGINE!!! I mean, there will be from bare hands to mega laser rifles, passing through muskets, repeater rifles, stealth bombers, crossbowmen, etc. I just want to know how to make the enemies harvest, send units to attack, send them back to defend, and the other basic actions, because I can code units well...
It went from RTS to RPG???? What?
anyways its not that hard... the first thing you need is a little thing that is called structure... and this means that you have to actaully design the game FIRST... Can your units follow your directions? Can you make them kill each other yet? If not do this and all other aspects that do not have to protain to the computer haveing to think for its self... then you can ask how to do ai...
ok ill tell you an easy ai... later... first you have to do the first part...
Dude, I've made AI for RTS games in KNP... TGF with all it's extra features shouldn't be too much of a prob. I wrote a FAQ on it a long, long time ago... but it disappeared along with my old HDD and my old Crosswinds site.
AI is easy. Just make the comp do what you would do . However, it's not easy to tell what should be done. Let's take a look at the game first...
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Oh, and Pyro, RTS stands for Real Time Strategy. They're probably the hardest to make in klik. OK, well, some RPG and wrestling games may be hardest, but RTS rates real high on the difficulty list. Creating an RTS in TGF is highly unrecommended, but then again, a friend of mine made one in KNP about 4 years ago.
Muz mumbles something about an edit feature in DC.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
First things first : I've made the engine of my game some time ago (it's still a beta), and it has 5 buildings and 2 units (I said it was a beta), and it's still in the stone age (first of about 15 ages). I just need range detection (tool age and above) and AI.
The AI system should do what I would do? But I need to know him WHEN and HOW to do! Plus, I'm not a good tactic creator, and the max I can do is make them do a heavy assault using 5 divisions of militia (the game's military units are composed of divisions instead of separate units) each time he has 8 divisions of militia or more...
The units are : MILITIA (20 units), SETTLER (1 unit).
The buildings are : RESIDENCE (supports 3000 pop units), BARRACKS (creates units), FARM (produces food), MINING BUILDING (mines any minerals near their action area), TOWN HALL (creates settlers and holds resources).
I think this explains it all for you...
Range detection ain't hard it's (X position of base unit - X position of target unit) + (Y position of base unit - Y Position on target unit) all divided by 2.
Yeah i tried some stuff,
making a unit walking with the mouse isn't
that hard, but when there are obstacles in play,
it's a different story. Because you need a good
AI to get a unit from point a to b, without getting
stuck in an obstacle.
My suggestion, start with a turn-based strategy game.
That way, it's easy to tell where the unit can go to,
or not. Simply, you can step or not and if not, choose another way.
And income can be earned by caputering a resource and
with a resource gatherer in it and then at the
end of the turn give some income.
Pkoed : RTS = Rule The Screen shows the reality of our gaming world
Jenswa : Are you crazy? TBS is harder than RTS. Actually, RTS is the third hardest to do, TBS is the second and RPG is the first... And I don't know how to do an engine to TBS games...
You can't make the AI for the computer opponent until the whole game is finished. The best way to make an opponent AI for this kind of game is to have the AI actually select units and attack with them in the same way that you do. So the AI actually uses the same units that you do (you don't have seperate "AI unit" Active Objects). Depending on how complex your RTS is making the AI for it could be very easy or very hard.