Has anyone looked at how the commercial games do this?

I'd basically imagine you want to shrink the sleep time to be short enough to correspond for each pixel the object will move.

In that way, each time the objects move, you check to see if it is too close to another.

Thus, two players approaching, you'd check really every 1/32 tick to see if they are too close. Every half tick I think still has the issue of spacing.

The other issue is that while underlying, you may want to keep the spaces for knowing what is near what, when checking spaces, you need check the objects on the space for their relative position.

Eg, if a monster is 40% off his space, then another creature can move up to 40% onto that space.

This greatly complicates logic - you just cant check the properties of the space, you need to look at all the objects on the space. This could perhaps be optimized by keeping just a linked list of objects of interest on the space, since in most cases, the vast majority of objects are not interesting. But either way, that does impose some additional performance hit.

I'd imagine for display itself, you probably want to do something like 'object ABC is at x,y moving in direction Z at speed S'. Then, the client just keeps moving that object in that direction until told otherwise. You don't want to send the map update everytime an object moves a pixel.

but this then imposes additional logic on the server - it basically needs to know what objects it has transmitted to the server (someone killed this orc, need to tell client not to display it anymore). This would be a bit more complicated than the current watch what face.

Also, if you're going to do this, you now open up the can of worms that I should be able to move in any of the 360° circle, not just the 8 ordinal directions (presumably, this could be done by either mouse or joystick input, or by changing input such that you basically rotate your characters facing through keyboard input and move in that direction).

But if you're going to do that, now get the issue of server should basically look for client input all the time - after all, if partial movement is allowed, I should be able to stop my character halfway between squares and start in some new direction. That'd be a pretty major change.

That said, in theory, all this is doable (commercial games obviously do do it). If info is available, it may make sense to look at other opensource games (if any exist) that have this smooth movement, or info is available on method that the commercial games use.



_______________________________________________
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire

Reply via email to