[java] Beginner at java mmorpg

Started by
4 comments, last by kordova 22 years, 5 months ago
I am learning java (and am competent in c++) and have decided to make a little multiuser rpg. My only concern is that of keeping track of the player''s, creatures and "doodads" for path-finding and collision purposes. If a typical player has a 2d ''face'' of 2x2 (feet) (a square) and creatures can have nearly any size from .3x.3 to 20x10, AND ''doodads'' such as trees can be nearly any size rectangle, would it not be a poor decision to have all these little squares (representing perhaps .1x.1 feet?) constantly updating as to being unwalkable or walkable while people/creatures move and transmitting this data to each user? (perhaps only send updated tiles but even then with a lot of motion may be laggy) Any ideas etc are appreciated. Many thanks.
Advertisement
don''t constantly update the walkability of each square... just have the client ask if a spot is walkable when the player tries to move there.

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
My only concern with this is that it is in a 2d world showing roughly 20x20 squares (being 5'x5' in size). I need to update the sprites onscreen as well.....(as well as worrying about collisions etc.)

on second thought never mind the dimensions but you get the idea (have a 3'x3' "face" and move about 1' each action-on timer)

Edited by - Kordova on October 23, 2001 8:34:10 PM
well, again, most of the sprites will not have to be updated all the time... any map squares (the ground/grass/water/whatever, and any buildings, trees, other stationary objects) only have to be updated when the player moves, and even then you only have to send them on row of tiles (for example, if they move east, you must slide everything left and add one column of tiles to the right side)...
with anything that moves (other players, monsters if you can see them, NPCs, etc) the server will have to update everyone within range (that is, anyone who could see this moving thing on their screen) would need to be notified...
if you are using smooth movement (like in zelda, rather than most RPGs; the players can move around freely instead of being constrained to moveing between grid squares), which i think you are by what you describe, this will be more complicated, and may involve lag in very active areas, but it still should work if you optimize it. what it boils down to is how fast your server can calculate this stuff and then transmit it to the clients...

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Thank you very much, i had an idea along these lines but i really needed someone to state (not ramble about) it (like i do).
I am going to be using relative free movement (each player covers 3x3 but each square made up of .1x.1 appx.) and there shouldnt be too many players at once as this is more a pet project for a couple of friends. Thanks for your input.
Thank you very much, i had an idea along these lines but i really needed someone to state (not ramble about) it (like i do).
I am going to be using relative free movement (each player covers 3x3 but each square made up of .1x.1 appx.) and there shouldnt be too many players at once as this is more a pet project for a couple of friends. Thanks for your input.

This topic is closed to new replies.

Advertisement