Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Fluid/Free/Pixel Character Movement?


Rei
 Share

Recommended Posts

I was wondering if it was possible to do a 2D Zelda like character movement else than tile-based movement.
For an example, Nin Online, the fluidity on the character movement is amazing, and wondering if it a hard thing to code.

Thank you for your time to answer :P
Link to comment
Share on other sites

Suppose I should write a follow up to http://www.freemmorpgmaker.com/thread-85435-post-942385.html#pid942385

So, since then, I've worked out generally better (and easier) ways to handle things, but https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking will remain probably the most accurate well documented theoretical implementation available.

* The server stores a remote position and the velocity. The remote position sent out to all clients.
* The client stores a remote position and a local position. Upon receiving the remote position, the client interpolates movement between the current local position to the remote position provided. When moving, the client sends this indication to the server, and likewise for when it's stopped, forcing the server to update its remote position.

That's it for fluid movement. It won't be pixel-perfect exact (and most definitely will not follow the exact path in high latency situations), but it will not be jumpy at all provided you interpolate between the remote and local position. 

**I'd argue that fluid movement is more important than getting whether somebody else is walking in strange arc motions is more important. **

As for combat, most people will disagree with this, and rightly so as there are better ways, but I find it works for the movement technique described above. For the best experience, hit detection should be done client-side, with the server to confirm that this is the case (here's where the stored velocity comes into play, you can extrapolate where the player will be and where they were in a previous state). This means that the clients will hit what _they_ see. In reality, they were probably a few pixels off, but there's only so much that can be done.

I won't say that it's extremely hard to code, frankly, it's basic 16-year-old level maths and fairly decent logic to follow. It's just a hassle to get working properly.

Alternatively, you could just set your tile sizes really small (say, 8x8) and work with that to simulate better detail.

As for providing code, I have no intentions of touching VB6\. I'd be glad to explain any concept in further detail if you ask.
Link to comment
Share on other sites

The Zelda games and Nin have entirely different movement systems, despite simulating fluid/pixel-based movements Nin is still very much tilebased. They just sped up the gap between movement triggers and smoothed out the rest with animation and other effects.

It'll take a good bit of effort to get it to work either way, be it fluid-looking or actual pixel-based movement. Just reducing the grid on which players can walk does not instantly make it appear more natural. It might actually get worse before it gets better with some polish.
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...