Jump to content

Geodata And Movement Synchronization


Recommended Posts

Hello! its not really lineage question but im sure it fits best into that section.

Im currently developing some simple lineage like mmo but i wonder how can i replicate the movement on server, how do geodata work in l2? I got obstacles in my map but right now server does not know the map and simply moves the character to the destination place with sraight line.

SO thats question for someone who digged in geodata, how does it really work? How do server side confirm paths and keep the synchronization with all clients?

Link to comment
Share on other sites

Well thats not what i was asking for :D
I know that client requests XYZ location but server has to analyze it, find obstacles or find out if someone tries to move through a wall and thats role of geodata. I rather wanted to know how server analyzes the obstacles, ramps etc to find a path for requesting client, how is geodata implemented internally

Edited by Szakalaka
Link to comment
Share on other sites

Well thats not what i was asking for :D

I know that client requests XYZ location but server has to analyze it, find obstacles or find out if someone tries to move through a wall and thats role of geodata. I rather wanted to know how server analyzes the obstacles, ramps etc to find a path for requesting client, how is geodata implemented internally

You need to look in geoengine, it makes the character to move over the obstacle if it appears on the path. But regarding the clientitself - without server, every static object(like walls, house's, doors,etc) and poly objects(Like floor, roof, some walls) have implimented collision - that creates from the import and is handled by the engine(so that if the object has collision - actor(Player or NPC) cant move trough it, its very simple).

I suggest you to look on public unreal engine source, code - to get better view on this, thats not so hard t all if you know more then just java...

Edited by LightFusion
Link to comment
Share on other sites

Client handles it well, i was rather worried about server side ;)

Then why is your server handling player movement ? Orginaly geo engine/geodata maded only to correct client/server(relations) that means - if on client(your game) doesnt allowing to move trough object, same thing need to apply to server side.

Here is an example 

of how server correct movement of player, the author of this is a scammer so...

Link to comment
Share on other sites

But look from my perspective. I have code it from zero. So i got working client module which sends XYZ. Now i have to somehow have all map vertices saved on server to know if someone is tryin to walk through wall. I have to check it and thats what im asking for - for the most optimal way to do it and i ws thinkin of geodata implementation in L2

Link to comment
Share on other sites

If you're developing a small l2-like MMO, you should know better than to stay away from L2's model of maps. Any other engine out there has greater/better/newer mapping methods than the crap Unreal Engine2 since 10 years ago.

Link to comment
Share on other sites

But look from my perspective. I have code it from zero. So i got working client module which sends XYZ. Now i have to somehow have all map vertices saved on server to know if someone is tryin to walk through wall. I have to check it and thats what im asking for - for the most optimal way to do it and i ws thinkin of geodata implementation in L2

man you dont read what i say or what ? if on client side  player deletes his static model(object) that reprisent some wall, and he will be able to pass it - he should be returned where he was, according to geo map, but these whole work is making damn geo engine, can you just look on source, or what you expecting to get from here ?

Edited by LightFusion
Link to comment
Share on other sites

man you dont read what i say or what ? if on client side  player deletes his static model(object) that reprisent some wall, and he will be able to pass it - he should be returned where he was, according to geo map, but these whole work is making damn geo engine, can you just look on source, or what you expecting to get from here ?

 

 

I can confirm that, this work must happen server side. There are rare cases tho where MMORPGs do the work client side but they have great protections too. In l2 everything is byppassable

Link to comment
Share on other sites

Geodata is data like any other data, it is stored on arrays and you refer to it. Regarding pathfinding, you iterate until you find the good road (it's a A* approach, but could be reworked using JPS). Each node got 4 values, NWSE related, the point is the 4 sides of a node got a specific value, and you calculate the path using the shortest amount (Counter Strike got a similar pathfinding system, you place nodes for bots, corner nodes got different colors than walking nodes to make bots camp, etc).

 

On L2J / L2OFF (as Counter Strike), this data is static, and related to regions. Which means if you want to add a rock, and that rock must have a LoS/movement restriction, you must rework the geodata related to that region.

 

Nowadays the geo stuff is often dynamic, items can directly interact with each other.

 

About movement, you got a infinite task which keeps updated values and send info to others clients (on L2J it's mixed with GameTimeController).

 

L2J geodata is layered to fit with Z. Meaning you can have numerous layers on a similar portions of X/Y (ToI for example).

 

If that can give you an idea :

 

 

Edited by Tryskell
Link to comment
Share on other sites

if i understand right then that code(GAME) i will give you its a nice example of how to path finding.(CODE ITS NOT MINE I JUST GOOGLE IT) 

 

debug it and run it.

 

Code: http://pastebin.com/vLeBz5gh

Youtube: 

Edited by AbSoLuTePoWeR
Link to comment
Share on other sites

if i understand right then that code(GAME) i will give you its a nice example of how to path finding.(CODE ITS NOT MINE I JUST GOOGLE IT) 

 

debug it and run it.

 

Code: http://pastebin.com/vLeBz5gh

Youtube: 

 

eisai panivlakas kai esu kai aftos pou egrapse to code

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...