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

Post Reply  Post Oekaki 
 

Posted By Message

Adrian Silea



Registered
  28/03/2005
Points
  88
24th September, 2005 at 04:58:32 -

Well, guys, so far so good. I've come up with something that pretty much resembles a self-maintaining multiplayer engine. There are some minor details I've to take care of if I'm going to reach my goals, BUT anyway.

I was wondering, does Dead Reckoning work, even if your object's movement's a custom 360, which I came up with by using Angle Calculator? I mean, I'm either a dumbass and can't figure this whole DR thing out, or Dead Reckoning simply doesn't work for me. So far, my best bet would be of using a system that "reads" the current state of the keys you're pressing, then have this data sent through the net and the client solves the movement itself.

Either way, can someone solve this? At least have a screenshot taken over the Events List Editor (not the Event Editor itself), so as to show me how Dead Reckoning must be used.

Anyway, thanks in advance, hope you've got my problem.

 
In every moment, pretious life is drained from our souls. It's shame that, upon the point of acknowledging this, there's nothing much left of us anymore... (Saadi Golestam)

clwe



Registered
  17/12/2002
Points
  702
24th September, 2005 at 05:51:59 -

Dead reckoning will work no matter what kind of movement you're using. There's no set way of doing dead-reckoning - it's simply any method that tries to predict where a player will move next (based on recent movements) and save some bandwidth.

I'm no expert at this =P but I did try it once myself, with reasonably good results. Basically, every so many frames you'll want to send a 'key' update - one with the X/Y position of the other players and their recent movements. You'll want to use the string parser 2 object so you can bung all these values into a single string. By recent movements, I mean their speed values and their movement angle for every frame leading to the key update. If your game is a fast one (like a Sonic game), you'll want key updates more often - every three or four frames, say. Slow games probably wont need as many. It also depends on the kind of movement your game has.

All those frames between the key updates will be where your DR system gets in gear. First, get the player's recent movements fron the string parser 2 object. Then, use these in some kind of calculation to predict where the player may go next. For example...let's say that in the last three frames, the player's angle was 90 and their speed was 3, then 5, then 6. This suggests that they're moving right and accelerating, though not smoothly. One way of predicting movement might be to get the acceleration rates (5 - 3 = 2, 6 - 5 = 1) then working out the average acceleration (2 + 1 = 3 / 2 = 1.5) The next three frames of movement would then be 7.5, 9 and 10.5 (adding 1.5 each time). It's far from perfect (just an example), but it's a prediction nonetheless.

There's lots of other factors to consider (i.e. maximum speeds, slowing down/speeding up, constant movement), but that should give you an idea. However...if you don't feel like doing that, you could just modify your 'read the key press' system a bit (assuming you haven't done this). Make it so that a key update is only sent when there is a change - if the player releases a key, or starts pressing one. There's no need to continually send values saying that the key's still held down, or is still untouched.

 
n/a

Adrian Silea



Registered
  28/03/2005
Points
  88
24th September, 2005 at 06:44:56 -

Well, my system is exactly that, but I'm getting weird de-syncs and stuff. Tell you what. My brain's caught up in a weird no-neuron-at-work-web. Meaning I'm gonna PM you, send you the source, ask of you to help and tell me if you're gonna use it (when fixed) for a game of yours. Ok? Right .

EDIT: Actually, later on. I'll try and solve the problems. If this gets solved, then my MMORPG will start taking some shape .

Image Edited by the Author.

EDIT 2: http://www.roketx.bubhost.com/AdrianS/MMF/ShipEngine.zip
That's the link to the three sources. First one has that engine I told you about. Second one works fine, but it involves packets every 0.01 second, so it's nasty. Third one tries to use Dead Reckoning but fails . Please, if you fix them, don't reuse these sources for your own projects just yet, ok?

Image Edited by the Author.

 
In every moment, pretious life is drained from our souls. It's shame that, upon the point of acknowledging this, there's nothing much left of us anymore... (Saadi Golestam)

clwe



Registered
  17/12/2002
Points
  702
25th September, 2005 at 18:56:52 -

Alright - I basically put myself in the firing line =P, so I'll download that and see what I can do for you in the next couple of days.

 
n/a

clwe



Registered
  17/12/2002
Points
  702
26th September, 2005 at 15:15:21 -

Hmm...I don't mean to be nasty, but since you're a new user and you're talking about making a MMORPG, let me ask one thing - are you *honestly* prepared for this? My guess is that you might not be, seeing as you're using Tigerwork's moogame example. If this is your first online game attempt, I would recommend that you try a simple one with only a few players (or even two). Besides, you're going to need a top-notch server to support lots of players. If there isn't a reasonable chance of that happening, then I for one would not attempt a MMORPG.

Also...to be perfectly honest, I'm not entirely sure how to go about what you're asking - not for potentially unlimited players, anyway. Sorry. I imagine it would involve arrays and fastloops, but it's still a daunting task. You would probably be better off using Moogame's built-in dead-reckoning - in which case, 3EE should have a help guide explaining how to use it.

 
n/a

Adrian Silea



Registered
  28/03/2005
Points
  88
26th September, 2005 at 15:31:16 -

Hahah! Well screw this society , I don't know what you're basing your premises on, but I'm not new on TGF/MMF. The Daily Click ain't the sole click forum out there, you know. I'm still experimenting with MOO, yeah, that might be right, but I was generally asking for help.

As a matter of fact, the movement engine, hardpoint system, trading system, huge universe, everything kinda' finished but I need the multiplayer system. And I assure you, it's gonna turn out to be a nice MMORPG.

 
In every moment, pretious life is drained from our souls. It's shame that, upon the point of acknowledging this, there's nothing much left of us anymore... (Saadi Golestam)

clwe



Registered
  17/12/2002
Points
  702
26th September, 2005 at 17:40:58 -

I apologise for making assumptions. I just wondered how much you knew from those example files you posted - bearing in mind that that's all I saw of your work. Well anyway...I don't have the knowledge to help for a MMORPG, though i'm sure a few people here would know.

PS - I wouldn't make an assumption on the whole TDC society just because of me. Don't make the same mistake I just did on you =P

 
n/a

Adrian Silea



Registered
  28/03/2005
Points
  88
27th September, 2005 at 04:25:21 -

Funny, I thought you would go swearing at me , as would've the rest of this community, I presume. Nah, it's ok, man, it goes with my apology aswell.

About the MMORPG, that's ok, but I still understand zero (niet, cucu, kaput, kaniz, nema) outta that SnD online article Kingston put up.

Well, this means I gotta solve it on myself , thanks for the help anyway!

 
In every moment, pretious life is drained from our souls. It's shame that, upon the point of acknowledging this, there's nothing much left of us anymore... (Saadi Golestam)
   

Post Reply



 



Advertisement

Worth A Click