Author Topic: Question about maps - client/server side?  (Read 2824 times)

Kukanani

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Question about maps - client/server side?
« on: June 02, 2010, 06:10:30 am »
Hi,

First off let me say you have a cool game, and the music is great =)

I'm a lurker on these boards, and I also do a fair bit of C++ programming, so naturally I felt the need to take a peek at your code =)

I was looking around and frankly I'm having a hard time figuring out how maps are loaded.  There's common/bgloader/parser.cpp, which loads a map, but is that client or server side?

Basically what I'm trying to figure out is this: are maps loaded on the server and then transferred to the client, or does the client do all the loading itself?  If the latter, then it seems easily hackable, but I can't find any code that suggests server-side map loading.

Thanks,
Kukanani

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: Question about maps - client/server side?
« Reply #1 on: June 02, 2010, 03:14:39 pm »
actually both. there is a set of maps on the client side. and there is a set of maps server side. the client side maps are to minimize the amount of data that has to be pushed around. the server maps are so it can check to see if you are in a valid position. in theory you could hack the client to load one map while yuo are else where, but i think you'd be colliding with a whole bunch of invisible walls.
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Sen

  • Hydlaa Notable
  • *
  • Posts: 746
    • View Profile
Re: Question about maps - client/server side?
« Reply #2 on: June 02, 2010, 03:46:10 pm »
The checking of the valid position on the server side might be worth investigating. Right now is it possible to get to any position on a map (valid or not) to what the player decides that he wants to go.

Sen
.....also a saddle that won't pinch the tail. One day!

Kukanani

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: Question about maps - client/server side?
« Reply #3 on: June 02, 2010, 04:29:40 pm »
It makes sense not to have the entire map come over from the server (i.e., the location of every mesh on the map), but it does make sense to run at least the physics simulation on the server to avoid cheating.

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: Question about maps - client/server side?
« Reply #4 on: June 02, 2010, 04:54:39 pm »
there are checks done server side, both speed and position. for any deepoer info you will have to check in with the people who look after the code. me i panic compilers on the "hello world" code.

and yes it is possible for a player to get anywhere on a map. for a given value of player of course.
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

RlyDontKnow

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 403
    • View Profile
Re: Question about maps - client/server side?
« Reply #5 on: June 02, 2010, 05:24:32 pm »
The checking of the valid position on the server side might be worth investigating. Right now is it possible to get to any position on a map (valid or not) to what the player decides that he wants to go.

Sen

the checking is already implemented, however it's disabled atm due to performance issues as in order to validate the correctness of the position of the player, the server would have to load all meshes of all maps in memory in order to be able to use hitbeams, etc.
however this'd need a great amount of ram (right now I think having all maps loaded is ~3GB memory, probably more), so this is quite an issue.

Kukanani

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: Question about maps - client/server side?
« Reply #6 on: June 03, 2010, 05:31:41 am »
So maps are stored in some sort of special binary format so as to be more un-hackable, right?  Since they're packaged with the client, map hacking has to be a major issue.

kaerli2

  • Hydlaa Resident
  • *
  • Posts: 163
    • View Profile
Re: Question about maps - client/server side?
« Reply #7 on: June 03, 2010, 07:18:28 am »
So maps are stored in some sort of special binary format so as to be more un-hackable, right?  Since they're packaged with the client, map hacking has to be a major issue.

Stop and think about it: what's the reward for map hacking in PS?  Pretty much nil!

Kukanani

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: Question about maps - client/server side?
« Reply #8 on: June 03, 2010, 06:25:35 pm »
Quote
Stop and think about it: what's the reward for map hacking in PS?

Walking through walls? Dodging guards/monsters?

verden

  • Hydlaa Notable
  • *
  • Posts: 716
    • View Profile
Re: Question about maps - client/server side?
« Reply #9 on: June 03, 2010, 06:28:01 pm »
I can think of a bunch of specifics, but I won't list them.
« Last Edit: June 03, 2010, 07:20:42 pm by verden »

kaerli2

  • Hydlaa Resident
  • *
  • Posts: 163
    • View Profile
Re: Question about maps - client/server side?
« Reply #10 on: June 04, 2010, 12:28:48 am »
Quote
Stop and think about it: what's the reward for map hacking in PS?

Walking through walls? Dodging guards/monsters?

As far as the former, I'd bet that you'd just walk your self straight into the abyss below the map, and promptly get booted back to the map spawn point by the game.  As for the "dodging NPCs" thing...at the moment, that's kind of useless too: NPC guards don't do much, and aggro's off too.  So...I guess we can just flip the switch to turn hitbeam checking on if/when needed.

Kukanani

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: Question about maps - client/server side?
« Reply #11 on: June 04, 2010, 05:51:22 am »
Well, if you could decipher the maps, you could do a lot more than just removing walls, you could actually add/change stuff too, like a path that crosses a canyon or that makes it possible to walk thru walls without falling into eternity  :lol:

But yeah, great discussion, and great to know how you guys do it.  Anyone know how big-time commercial MMOs (i.e. WoW) do their maps?

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Question about maps - client/server side?
« Reply #12 on: June 04, 2010, 10:46:48 am »
Once the world files were ASCII XML, I was able to re-texture one specific building.



As there is a tool which converts between the ASCII XML format and the CrystalSpace Binary format, I would possibly still be able; but I won't make such efforts again...
__

Changing the heightfield maps for cheating would be much easier, but also be a much worse advantage - erasing hills in a straight line between portals, for example, to travel without climbing or taking turns in valley curves...

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: Question about maps - client/server side?
« Reply #13 on: June 04, 2010, 02:50:21 pm »
Well, if you could decipher the maps, you could do a lot more than just removing walls, you could actually add/change stuff too, like a path that crosses a canyon or that makes it possible to walk thru walls without falling into eternity  :lol:
but then you have to get those maps back up to the server. which is the tricky part. the server is the final arbiter of position. so you could hack in a bridge over nasty gulch. you might even get part way across depending on lag. but then when the server catches up you'll either rubber band back to the start of the bridge or to under it.

the easy to way to prove this is to modify the world.zip. try renameing all the akkaio files to gugtrontid, including the abbreviations. and see what happens. you will want to back it up first though.
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

verden

  • Hydlaa Notable
  • *
  • Posts: 716
    • View Profile
Re: Question about maps - client/server side?
« Reply #14 on: June 04, 2010, 04:25:54 pm »
Quote
but then you have to get those maps back up to the server. which is the tricky part. the server is the final arbiter of position. so you could hack in a bridge over nasty gulch. you might even get part way across depending on lag. but then when the server catches up you'll either rubber band back to the start of the bridge or to under it.

That wasn't always true. If that is so now, then a round of applause!