Sign in to follow this  

Creating movement like Terraria, Warcraft ?

This topic is 2381 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys,

I'm working with the Slick2D game library for Java and I was wondering how I would go about writing a multiplayer engine that would update a player smoothly, If you haven't heard about Terraria you should check it out at http://www.terraria.org/ !

I bet everyone here knows a little about World of Warcraft... I need to know how to program that style of movement in Java. I have a TCP/UDP server which is fairly stable for the moment.

If you have a any questions please, ask.

Thanks, Gods Fear

Share this post


Link to post
Share on other sites
[quote name='Gods Fear' timestamp='1306721968' post='4817333']
I need to know how to program that style of movement in Java. I have a TCP/UDP server which is fairly stable for the moment.
[/quote]


Did you try the FAQ?

Share this post


Link to post
Share on other sites
[quote name='Butabee' timestamp='1306725731' post='4817342']
So are you looking for something like client side prediction or do you want smooth animations?
[/quote]

Well, we are capable of making movement animations and the character moving itself its just that we need to tell the server and then tell other clients where this player has walked and their direction kinda thing... Thanks for your reply!

Share this post


Link to post
Share on other sites
[quote name='Gods Fear' timestamp='1306727297' post='4817356']
[quote name='Butabee' timestamp='1306725731' post='4817342']
So are you looking for something like client side prediction or do you want smooth animations?
[/quote]

Well, we are capable of making movement animations and the character moving itself its just that we need to tell the server and then tell other clients where this player has walked and their direction kinda thing... Thanks for your reply!
[/quote]


The FAQ links to the [url="http://www.mindcontrol.org/~hplus/epic/"]Entity Position Interpolation Code library[/url], which shows how to smoothly interpolate and extrapolate position data over time, to avoid objects "jumping" when you receive a new update.

Share this post


Link to post
Share on other sites
[quote name='hplus0603' timestamp='1306777294' post='4817584']
[quote name='Gods Fear' timestamp='1306727297' post='4817356']
[quote name='Butabee' timestamp='1306725731' post='4817342']
So are you looking for something like client side prediction or do you want smooth animations?
[/quote]

Well, we are capable of making movement animations and the character moving itself its just that we need to tell the server and then tell other clients where this player has walked and their direction kinda thing... Thanks for your reply!
[/quote]


The FAQ links to the [url="http://www.mindcontrol.org/%7Ehplus/epic/"]Entity Position Interpolation Code library[/url], which shows how to smoothly interpolate and extrapolate position data over time, to avoid objects "jumping" when you receive a new update.
[/quote]

Thanks this is almost exactally what i've been looking for. Only thing is... thats not Java. I will take a look at the source of that program and see if i cant try to interpret it into Java... Thanks again!

Share this post


Link to post
Share on other sites
[quote name='Gods Fear' timestamp='1306854583' post='4817894']
[quote name='hplus0603' timestamp='1306777294' post='4817584']
The FAQ links to the [url="http://www.mindcontrol.org/%7Ehplus/epic/"]Entity Position Interpolation Code library[/url], which shows how to smoothly interpolate and extrapolate position data over time, to avoid objects "jumping" when you receive a new update.
[/quote]

Thanks this is almost exactally what i've been looking for. Only thing is... thats not Java. I will take a look at the source of that program and see if i cant try to interpret it into Java... Thanks again!
[/quote]

Yeah, but most of it is just code, so you can probably port it pretty easily!
Let us know how it goes.

Share this post


Link to post
Share on other sites
I don't want to claim to know too much, I only dabble in networking. What type of movement will you have though? WASD or point and click? Do you want there to be collisions between players? These are things you need to consider first. Primarily though you have a few options. You can have a player send a packet tot he server saying "hey I'm moving" and include some other information ( velocity, current pos etc) using this, you can have the player move on all the other clients. This will be choppy though. Well depending on the strength of your connection. From here what you want to do is prediction calculations. So Imagine you can only see the object moving once you receive a packet. So it pops up for a second and all you know is where it started (current pos) and where it is going (velocity) use this to update the player consistently between packets being received. Man I hope that makes sense, it can be a pain to explain this stuff. There is no set way to implement something like this, for every setup it will be different, but look around and you'll be able to find something.

Share this post


Link to post
Share on other sites

This topic is 2381 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this