The Daily Click ::. Forums ::. Klik Coding Help ::. Strategy Movement Help
 

Post Reply  Post Oekaki 
 

Posted By Message

Johan Hargne (Wartagon)

Lover Of Circys

Registered
  15/06/2003
Points
  1289

Game of the Week WinnerCROBASOFTVIP MemberPS3 OwnerWii OwnerMushroom
25th January, 2004 at 06:08:00 -

I'm in a need of help here...
You know the movement in WarCraft, Age of Empires and in most strategygames i.e. Were you click on a certain unit and the rightclick somewhere on the ground and then the unit walks there.. If someones able to write down the coding for that kind of movement, i would be pleased.

Thanks

 
Music Composer.
http://johan.hargne.se

Crobasoft
www.crobasoft.com

Nuutti



Registered
  26/10/2003
Points
  1364
25th January, 2004 at 06:34:52 -

mmm u mean MMF or something?

 
P.S. sorry for my mangled english.

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
25th January, 2004 at 06:36:48 -

www.tigerworks.co.uk -> MMF/TGF files section -> various RTS examples are there

 
- Tigerworks

Johan Hargne (Wartagon)

Lover Of Circys

Registered
  15/06/2003
Points
  1289

Game of the Week WinnerCROBASOFTVIP MemberPS3 OwnerWii OwnerMushroom
25th January, 2004 at 06:54:24 -

It doesnt matter if its tgf or mmf..

Thanks tigerworks, where can i find those .cox files?

 
Music Composer.
http://johan.hargne.se

Crobasoft
www.crobasoft.com

Jon Chambers



Registered
  25/08/2002
Points
  1071
25th January, 2004 at 07:06:43 -

Ooh, that's a tough ask. Basically, you gotta know what it is you want, before you go off and code it. What you should do, is create a character, and create that characters finish point. You make it so that when you click on the character, the character plays the character selected animation. Then you say that when you click somwhere on the ground, the finish point appears where you've clicked.

Then you gotta program the character to walk to the finish point. You may like to teach your character how to walk around objects. You may like to teach your character to stop walking to the finish and fight a battle if attacked.

Wartagon, what you must understand, is that TGF and MMF can't do the work for you. There are 6 different types of movement, which can actually be written from scratch for a bouncing ball object, or even a static object. Now it took me a while before I was able to program a platform engine from scratch. What you've requested isn't exactly a walk in the park.

Judging by the way you've approached this, I really don't think you're ready for making this type of game. What an expert would've asked is "How can I program AI to walk arround obstacles?" and "Can I make the mouse change colour when an object is selected, or do I have to create a new mouse object?" Those are a couple of questions that take me a while to come up with the answers to. There is no set formulae to make Artificial intelligence. You could make your guys stupid, or you could make them smart. Though there is no way in hell a computer is going use your movement until you have every basic detail written down in a language you understand first. E.g. "If I click the left button on the character, he is selected." "Character always walks towards finish point unless he is in an area near pie." "If character is in an area near pie, character walks towards the pie." "If the character walks into a tree, stop character, play animation "sore head" "If character touches the pie, destroy pie, change animation to "eating pie" "last pie is destroyed, change jump to "Too bad all your pies are eaten. Game Over." screen."

Now I know that might sound like a fair bit of work, but actually, it's a shitload of work. Trust me, you don't sound like the sort of person who is ready for this sort of game. For now, focus on platform shoot'em'ups, and race car shoot'em'ups.

 
Copy this to your hard drive. It will be worth alot when I'm famous.

Notice: Spelling mistakes above left in for people who need to correct others to make their life fulfilled.

Johan Hargne (Wartagon)

Lover Of Circys

Registered
  15/06/2003
Points
  1289

Game of the Week WinnerCROBASOFTVIP MemberPS3 OwnerWii OwnerMushroom
25th January, 2004 at 07:13:07 -

Accually, youre right!
I'm not a coder/programmer, im an artist & a music composer ffs! All i wanted was to see if anybody could just give me an example how to do this. I know it isnt a walk in the park. Almost nothing in the programming world is a walk in the park. I know that, but for once.. Maybe I wanna learn..
Well... thanks anyway

 
Music Composer.
http://johan.hargne.se

Crobasoft
www.crobasoft.com

Jon Chambers



Registered
  25/08/2002
Points
  1071
25th January, 2004 at 07:40:50 -

Oh, there is plenty of stuff to learn. Though you gotta add 2 and 2 before you can work out the gradient of the normal of 6sin(x/3) in terms of x. You see what I mean. You can be the master of Clickteam if you put your mind to it, just don't jump straight into the deep end.

The answer to the example questions BTW are:
4
and
1/-2cos(x/3)
I think

 
Copy this to your hard drive. It will be worth alot when I'm famous.

Notice: Spelling mistakes above left in for people who need to correct others to make their life fulfilled.

cake



Registered
  13/12/2002
Points
  1173
26th January, 2004 at 02:54:08 -

What you are wanting to know is a programming structure called "Pathfinding", where the unit observes the level and 'finds a path' to the point you tell him to go.

Pathfinding therefore varies in how it is programmed depending on how you store the level data. If you are using TGF/MMF conventional "obstacle" and "not an obstacle" background collision mask, you will be in for a very, very, very, very tough time programming in pathfinding.
You gotta understand, WarCraft, AOE and such were not made with MMF, they were coded from a blank screen into a fully fledged game. They store their level data in array like structures (well I know WarCraft II definately does , otherwise correct me on the others ppl, Id actually be very interested to learn). To mimick those kind of systems in MMF takes a hell-of-a-lotta experience and in-depth knowledge of how MMF works.

So in response to your inquiry: no I can't help you , its just way too complex to describe.

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
26th January, 2004 at 08:48:21 -

i imagine you could do it with arrays to a semi-acceptable level. the best solution is to go to tigerworks.co.uk, he's pretty much the only person undertaking a full on RTS in MMF.

 
www.thenatflap.co.uk

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
26th January, 2004 at 09:48:12 -

All the cox files needed can be found at extensions.cyber-gaming.co.uk (where else? that is THE extension list)

A small scale RTS is fairly simple, but it will get nightmarishly complicated later on as you hit problems with speed and have to add optimisations... so, keep it simple and it should be fairly easy.

 
- Tigerworks
   

Post Reply



 



Advertisement

Worth A Click