The Daily Click ::. Forums ::. Klik Coding Help ::. follow the leader
 

Post Reply  Post Oekaki 
 

Posted By Message

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
16th November, 2006 at 19:30:52 -

I was just wondering if anyone knew how to make code where a bunch of guys follows a player controled character. Now, I'm not talking about:

-always
- set direction of follower to look at leader
- set speed = 10

i'm talking about a system where the follower will always follow the leader's path exactly. Anyone who's played cannon fodder or secret of mana should know what I'm talking about. I believe those apple eating snake games uses the same type of logic.

any insight would be appreciated.

Zi-Xiao

 
n/a

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
16th November, 2006 at 19:39:05 -

while i'm at it, may as well ask whats a nice filter effect to use for blood. I want something transparent but don't want the ink effect to overlap on top of itself (like the semi-transparent effect).

Zi-Xiao

 
n/a

Retired Kliker Lazarus

The Ed Wood JR of TDC

Registered
  18/07/2003
Points
  7363
16th November, 2006 at 19:57:17 -

You mean like a Lemmings engine?

 
Fine Garbage since 2003.
CURRENT PROJECT:
-Paying off a massive amount of debt in college loans.
-Working in television.

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
16th November, 2006 at 20:09:55 -

I can help with the blood effect thing, use the AND ink effect, with the original graphic being fully red, i.e. R255,G00 0,B000. You'll find it just tints the whole area dark red and doesn't show any seams where objects overlap.

 
Image

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
16th November, 2006 at 20:22:50 -

lemmings is side scrolling. Secret of mana and cannon fodder are both overhead... so is snake.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th November, 2006 at 20:34:21 -

The only real ways are to have advanced methods of movement for the followers, or a cheap trick.

The cheap trick would be to have the leader leave behind an active object every "x" milliseconds, and the follower would look at the current object in line, then when it reaches it, add 1 to the # of which object its looking for, if you catch what I'm saying.

The problem with that is that it would take massive amounts of active objects, which is a very bad thing. Instead, you could have your follower record its X/Y position onto a string every "x" milliseconds, and use a string parser to extract the current destination for your follower; have it move to the next one after it reaches those X/Y coordinates.


In other words, theres no simple and effective way to do it. Only one or the other.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Fragasnap



Registered
  27/07/2005
Points
  423
16th November, 2006 at 20:39:27 -

You want an engine where the followers will follow the leader as he moves and go exactly where he did, right?

Here:
http://zaurros.sitesled.com/Games/FollowMe.zip

Pixel thief's method's probably better, but still...

Image Edited by the Author.

Image Edited by the Author.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th November, 2006 at 20:47:18 -

I'm sure I've seen some pretty good examples floating around TDC, but can't recall any right now. Frag's is pretty much the active object method. Works with 1 waypoint / follower ratio, and still has a decent effect. Probably the best idea unless you're very familiar with string parsing and game saving/loading techniques.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
16th November, 2006 at 21:21:38 -

Hmmm... I'd rather use a more complex way to get better results. I'm searching through DC for examples now actually ... haven't come across anything yet.

Zi-Xiao

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
16th November, 2006 at 21:23:57 -

Don't forget I gone answered your blood question bro.

 
Image

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
16th November, 2006 at 22:27:28 -

ah yes, the blood effect worked beautifully - thank you Trevor of the Asparagus . Now all I need is a follow the leader system and I'll be happy as a clam.

Zi-Xiao

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
16th November, 2006 at 22:30:47 -

I'd try to answer that also, but I'm quite drunk and it sounds a bunch more complicated. Maybe tomorrow when I can think/see straight.

 
Image

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
18th November, 2006 at 07:53:17 -

Image

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
18th November, 2006 at 08:27:06 -

If you want the second player to follow exactly the same path, I would store the first object's coordinates every so often as Pixel Thief said. Store them in an array or something.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click