The Daily Click ::. Forums ::. Klik Coding Help ::. How do we make A.I. in a RTS using TGF???
 

Post Reply  Post Oekaki 
 

Posted By Message

RPG Player 2003



Registered
  27/06/2003
Points
  248
27th June, 2003 at 13:58:48 -

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?

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
27th June, 2003 at 14:07:54 -

Ive never coded an RTS game before, so the only advice I can give you is to check the articles and downlaods (for open source).

 
My signature is never too big!!!

RPG Player 2003



Registered
  27/06/2003
Points
  248
27th June, 2003 at 14:32:37 -

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...

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Pkeod

Oontz Oontz Oontz

Registered
  19/11/2002
Points
  93

VIP Member
27th June, 2003 at 14:45:23 -

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...

 
Faerie Solitaire - Get it now:

http://www.create-games.com/download.asp?id=7792

Pyro



Registered
  22/05/2003
Points
  110
27th June, 2003 at 22:39:51 -

Hmmm? What exactly does RTS stand for?

 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
27th June, 2003 at 22:55:41 -

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.

Image

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
27th June, 2003 at 23:25:36 -

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.

Image

RPG Player 2003



Registered
  27/06/2003
Points
  248
28th June, 2003 at 12:43:37 -

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...

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
28th June, 2003 at 16:24:43 -

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.

 
Craps, I'm an old man!

Pkeod

Oontz Oontz Oontz

Registered
  19/11/2002
Points
  93

VIP Member
28th June, 2003 at 16:59:01 -

RTS is also a slang term for 'Rule the screen'

 
Faerie Solitaire - Get it now:

http://www.create-games.com/download.asp?id=7792

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
29th June, 2003 at 07:02:53 -

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.

 
Image jenswa.neocities.org

RPG Player 2003



Registered
  27/06/2003
Points
  248
29th June, 2003 at 07:15:35 -

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...


 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Pkeod

Oontz Oontz Oontz

Registered
  19/11/2002
Points
  93

VIP Member
29th June, 2003 at 11:20:45 -

I have a hex one...

 
Faerie Solitaire - Get it now:

http://www.create-games.com/download.asp?id=7792

Mr Saturn



Registered
  14/05/2002
Points
  357
29th June, 2003 at 11:37:35 -

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.

 
n/a

Mr Saturn



Registered
  14/05/2002
Points
  357
29th June, 2003 at 11:44:11 -

Actually, the hardest game to make with MMF would probably be a massively multiplayer game, similar to Everquest.

 
n/a

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
29th June, 2003 at 13:38:04 -

One thing harder: true 3d in tgf?
With polygons, don't say klik-openGL plugin helps a bit.

Well yeah turn based is a little hard in tgf,
but creating a group of events for the player
and one for the ai, simply shut off ai and turn
on player and vice versa. But you need to keep track
of how many steps a character can do etc.

You want a RTS-game. For the ai of the units,
you should have some kind of guidance system?
Detectors around the unit (that's too many) or
detectors in the field which tell units, i can go there,
no i can't go left/right whatever.

Or di you mean the ai of the computer player? how it should act? On enemy attacks, building bases etc..

 
Image jenswa.neocities.org

LegendaryMMSX



Registered
  05/07/2002
Points
  165
29th June, 2003 at 23:57:15 -

Massive multiplayer games really aren't hard att all anymore....with the MOO API and stuff (which I need to get.....tired of MOO2)

 
Im the RTS and TBS coder. Expect some games to come out from me later after I finish my Engine tests.
PS: Dont expect the best graphics.

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
30th June, 2003 at 00:38:02 -

MMorpgs are easy, as Legendary MMSX said. The only prob is lag, but that's easily sorted if you take a look at all mmorpgs.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Jack Galilee



Registered
  02/12/2002
Points
  990

VIP Member
30th June, 2003 at 06:45:47 -

Just do what i do makea Changable nav point whicih is all the Ai units run around the Players base when they get there shooting this and havea arandom creation and a waypoint on the Players base thats it

 
The only thing better than winning gold in the paralympics is not being retarted

RPG Player 2003



Registered
  27/06/2003
Points
  248
30th June, 2003 at 18:04:39 -

Cool, we have units circling around a waypoint... Considering there are only 1 melee attack unit and 1 melee builder, it would be at most fun to try

We have more AI than that! I want AI to send them to attack and make them use great tactics like (sórry about the names, I'm a bad namer) Flank Attack, Frontal Assault, Starvation Seige (stand outside the enemy base and dont let them get resources), Strike in Retreat (available when ranged units enter, shoot while running), etc.
I need to know how to make the computer almost "think by itself", making it choose its own tactics depending on the situation...

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
1st July, 2003 at 02:44:34 -

"true" 3D in TGF isn't much harder to do than it is in any other 2D programming ['game making'] tool

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
1st July, 2003 at 06:27:23 -

Well the fact is:

everything what you do as a player,
is computer controlled so the computer knows
what you are doing.
The only thing you need to program is that
what the computer knows will be passed on to
the computer player. You can expand this with
can the computer player see the units coming?
Or can't it? if it can't don't react on it,
if it can react on it.

 
Image jenswa.neocities.org

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
1st July, 2003 at 07:29:41 -

um... not exactly.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Mr Saturn



Registered
  14/05/2002
Points
  357
1st July, 2003 at 12:21:45 -

If MMORPG's are so easy, then why are they one of the only game types that I have not seen done with MMF or TGF? Making a MMORPG is like making a single player RPG, plus having to deal with all of the other issues that multiplayer games create.

 
n/a

Pkeod

Oontz Oontz Oontz

Registered
  19/11/2002
Points
  93

VIP Member
1st July, 2003 at 14:30:02 -

Like andy said, mmorpgs are actually quite easy!
In a way you could say they are easier then non liner rpgs! It is mostly getting the lag out of the game that makes it a pain in the.

 
Faerie Solitaire - Get it now:

http://www.create-games.com/download.asp?id=7792

RPG Player 2003



Registered
  27/06/2003
Points
  248
1st July, 2003 at 16:48:34 -

Start Subject : RTS Intelligence
Actual Subject : MMORPGs and Tactics

I should try it... sometime. I'll come here to say if it worked...

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
2nd July, 2003 at 13:13:20 -

just make waypoints on strategic places and move units towards them when the comp are attacking etc. ...and the comp should calculate the defending forces to see if its worth to kill the defending force or just try to destroy as many buildings as possible

 
Beware of life ...so far noone have survived it.......

LegendaryMMSX



Registered
  05/07/2002
Points
  165
2nd July, 2003 at 21:39:50 -

You don't goto the 3ee site do you. MMORPG are easy....the reason you probably don't see that much is because you have to buy the extension MooAPI(which i'll be doing later).

 
Im the RTS and TBS coder. Expect some games to come out from me later after I finish my Engine tests.
PS: Dont expect the best graphics.

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
2nd July, 2003 at 22:18:57 -

O you will see. MMORPGS are easy, all you need is mooclick/moogame and two active objects. The reason they are never put into production is people want to host them themselves, which invloves a server so they can stall all the accounts. That costs cash. Other wise you could use Imis/inis on the players hard drive or no saving at all. But what's a mmorpg without saving?

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Jack Galilee



Registered
  02/12/2002
Points
  990

VIP Member
4th July, 2003 at 06:11:56 -

You guys need to learn ok the only way to make a good RTS with TGF is by using active objects due to the limitations adv maths just wont cut it for TGF you will need other applications / subapps to tell eachother whats going on and reacto to certain messages beetween the two of them OK! so your just gonna have to cope

 
The only thing better than winning gold in the paralympics is not being retarted

LegendaryMMSX



Registered
  05/07/2002
Points
  165
4th July, 2003 at 16:08:50 -

tsk tsk......you could put a limit on how many units you can build so the limitation shouldn't be a problem. If you want a game where you can build over hundreds of units on screen....you have a problem just like .ToTaL. said. yep......sure do....problem.

 
Im the RTS and TBS coder. Expect some games to come out from me later after I finish my Engine tests.
PS: Dont expect the best graphics.

RPG Player 2003



Registered
  27/06/2003
Points
  248
4th July, 2003 at 17:41:49 -

And I have. You may build only 75 divisions of units. I solved two problems at the same time : limitations of TGF and having too few units in the screen.
Each division has 20, 30 units, a high attack and defense power, and a HIGH, VERY HIGH cost. Well, I changed projects from a historical game passing from Prehistory to Space Exploration to a crazy RTS about cheese. The AI is now much easier to do, as there are less unit types and less tactics (actually, you will use the same tactics as the computer).

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!
   

Post Reply



 



Advertisement

Worth A Click