User Tag List

Results 1 to 6 of 6

Thread: MooApi: Using Bezier Curves for dead reckoning

  1. #1
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MooApi: Using Bezier Curves for dead reckoning

    [color:#993399][size:17pt]MOO[size:14pt]OOOOOO[/size][/size][/color]
    [size:11pt][color:#FF0000]Article Level:[/color][/size] Beginner, Moderate, Advanced, Extreme
    I really don't have a name for this except "Moo". Yes, I gave up on MooApi for a year or so due to the large number of headaches I received but I had an idea. This is a better way of sending those evil packets without using much.

    I like to save things and hate wasting stuff, Electricity, food, water, memory (Computer), internet usage etc. But when it comes to Moo it has to be packets. This example lets us send the X and Y position of an object using as little packets as possible PLUS makes the movement very smooth.

    [color:#009900]Note:[/color] [color:#000099]Their are no examples or any events/conditions in this article. It is for you to do and test. Also note, this is for top view MMORPG's not platform. [/color]

    [color:#009900][size:14pt]The Concept[/size][/color]
    Bézier curves is the answer! Before we begin. let me give you a picture to see what I mean:

    This is important so stay focused. Remove everything from the picture except the [color:#3333FF]blue[/color] diamonds. Those are the markers your player leaves every second or so when it is walking. The position of the markers are sent through the server. Now remove the blue diamonds in the picture and leave the [color:#CC6600]orange[/color] squares and the [color:#33CC00]green[/color] diamond. When we receive the markers, create a bézier curve and make the user object follow the curve. Simple!

    [color:#009900][size:14pt]Step by step[/size][/color]

    [size:14pt]Step 1.[/size]

    This is the player moving. It moves up and turns to the left. This movement consist of 2 angles, Up and Down. The markers are the orange dots.

    [size:14pt]Step 2.[/size]

    The markers positions have been sent to all the other computers. When we receive it we make the user object follow through the markers using bézier curves.


    [color:#009900][size:14pt]Other uses[/size][/color]
    This method will be excellent for online drawing games, online top-view racing games, MMORPG's, and all sorts of top-view online games

    [color:#009900][size:14pt]Credits[/size][/color]
    Images produced with example in "MMF/examples/bezier/bezierSimpleDemo".
    The bezier object can be found here.

    Thats all there is to it! If someone creates an example post it here

  2. #2
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Location
    Stockholm, Sweden
    Posts
    1,529
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MOO

    I guess this is a type of dead reckoning, on how to predict on how the player moved between the 2 points. I've been speculating alot on how a method like this can be implemented on an online engine on the best way.
    One way (and possibly the most best) is to setup the whole map in different cells, when the Player reach a new cell, send its position (to the server .....), and then make a smooth move between the current Player position and the new position, using one of the Dead Reckoning algoritms.

    I'll try to start (and finish) to make Engine that uses one of the methods. But there're some downfalls which I need to take a bigger look at.

    My 3.14159 cents ...

    Edit: Just noticed that "Move by Beizer" can be in perfect use for a such engine! Will look more into this later.

  3. #3
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MOO

    I have changed the Article level to 'Moderate'.
    Quote Originally Posted by Cocodrilo
    One way (and possibly the most best) is to setup the whole map in different cells, when the Player reach a new cell, send its position (to the server .....)
    Using arrays will be helpful.

    Quote Originally Posted by Cocodrilo
    Edit: Just noticed that "Move by Beizer" can be in perfect use for a such engine! Will look more into this later.
    Good thing I could help you out Yes as I said, the bezier object is the best object to use in this sort of article.
    Coco, maybe we can both work together on an engine. I'll pm you.

    Edit: I changed the name of the article.

  4. #4
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MOO

    This is an effective style to reduce packeting; however it also introduces alot of latiency for example your first example would need to wait untill it getts all 4 'Markers' before it generates and executes the curve and if each marker is as you said sent around once a second, then this will leave the player 4 - 5 seconds behind.


    A fusion of this dead reakoning and 'SOME' precognition would work well... maybe you cauld discuss this in upcomming articles? :grin:

  5. #5
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Location
    Stockholm, Sweden
    Posts
    1,529
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MOO

    Quote Originally Posted by SEELE
    however it also introduces alot of latiency for example your first example would need to wait untill it getts all 4 'Markers' before it generates and executes the curve and if each marker is as you said sent around once a second
    Not neccessarily SEELE.
    Make up the game frame in cells, 48x48 or less/more... Send Movement data everytime the player passes a cell, and the ones who receives the message should setup a marker at the position, and then use Beizer curve to move to the position.
    The curve in the example is a cubic curve... We do not neccesarily need to use cubic curves... But custom curves (explaining more later in test)! We might not know how many markes we got!!

    I'll try to explain this in the best way: I mean, if an user send its cellposition and then continues move and sends 2 more cellpositions as every new cell collision. Let's say that some positions gets delayed, and on the other clients game, the player who sended 3 cellpositions haven't yet reach the first marker! To make to its final destination on the best way, is to make use of every marker, and move to the destination marker... We use a quadric curve move trought all the markers!

    Simply queue a custom movement to the new markes position everytime a new position gets received

  6. #6
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MOO

    Lets say the character stops between 2 cells, this will mean that the player's position is different to it's user position. To solve this we can create a marker not only on each cells but when it stops.

    Just a little suggestion there

    Quote Originally Posted by Cocodrilo
    The curve in the example is a cubic curve... We do not neccesarily need to use cubic curves... But custom curves.
    Yes we use custom curves. The pictures where just examples of simple movements, I didn't want to get complicated.

Similar Threads

  1. Dead Reckoning
    By RickyRombo in forum Lacewing
    Replies: 14
    Last Post: 28th February 2010, 03:13 AM
  2. Movement Prediction using bezier curves
    By The_Alee in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st October 2009, 01:42 AM
  3. Need some dead reckoning help
    By SEELE in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 27th August 2008, 02:07 PM
  4. Bézier Curves for Dummies (TDC version)
    By Dines in forum Articles
    Replies: 17
    Last Post: 10th June 2008, 01:09 PM
  5. Bezier Curves in MMF
    By dustingunn in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th February 2007, 12:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •