The Daily Click ::. Forums ::. Klik Coding Help ::. Dead Reckoning
 

Post Reply  Post Oekaki 
 

Posted By Message

Aptennap



Registered
  23/04/2004
Points
  916
13th January, 2007 at 17:58:17 -

I need help creating a dead reckoning engine in tgf, I now have this:
i created 3 counters : x, y and dir

+start of level
-add delimeter ","

+counter(x) <> x(player)
-send x(player)+","+y(player)+","dir(player)
-set counter(x) to x(player) on subchannel 0

+counter <> y(player)
-send x(player)+","+y(player)+","dir(player)
-set counter to y(player) on subchannel 0

+counter(dir) <> dir(player)
-send x(player)+","+y(player)+","dir(player)
-set counter(dir) to dir(player) on subchannel 0

+playern message
+OnMessage_GetSubchannel = 0
+value a(other player)=PCU_GetID
-set x(otherplayer) to GetList(1)
-set y(otherplayer) to GetList(2)
-set dir(otherplayer) to GetList(3)

but this works very slow please help...


 
Oh sweet mary.

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
13th January, 2007 at 19:15:50 -

Maybe it's slow because it's not dead reckoning..

That's the most basic way of making an online movement.

 
n/a

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
13th January, 2007 at 22:39:50 -

Dead reckoning means that you predict the players movement by using the information that you have. In effect it means that you have to send very little information. I have posted some lengty explanations about online games and dead reckoning the other week:
http://www.create-games.com/forum_post.asp?id=177315&show=all

 
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

Aptennap



Registered
  23/04/2004
Points
  916
14th January, 2007 at 01:37:32 -

ok thanks

 
Oh sweet mary.

Reno



Registered
  11/01/2005
Points
  906
16th January, 2007 at 06:11:14 -

if you need help, contact me thanks

 
Reborn Again

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
17th January, 2007 at 04:39:40 -

basically it means you send info on what buttons the players press, not their position. If player 3 is at position 50,45 and his computer sends a packet explaining that he now started press Right Arrow, the other players will just have their Player3 char move right until they receive a packet from player3 saying that he stopped pressing the button.

that way you dont spam people for every little pixel of a movement.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click