EOSERV Forum > EOSERV > Hiding tilespecs from player's clients?
Page: << 1 2 3 >>
Hiding tilespecs from player's clients?
Author Message
Post #197873 Hiding tilespecs from player's clients?

I'm working on a very interesting project at the moment. This project calls for the use of 2 new tilespecs, which we'll refer to as TileSpec X and TileSpec Y.

The only problem is that, when these tilespecs are used on the map, the client can "see" them. That is to say, the map file being sent to the clients contains the TileSpecs (Naturally) and these TileSpecs then proceed to show up on the MiniMap in this fashion.

<-- Ugly blue squares, y dis.

I would like to avoid that, and simply not send tilespec X and tilespec Y to the client when it requests the map file. Does anyone have any ideas as to how I could do this? All of my ideas for it seem terribly bloated for such a minor problem.

---
Want to learn to pixel?
Pixelsource.org
8 years, 29 weeks ago
Post #197874 Re: Hiding tilespecs from player's clients?

You are not describing what you really want it to do.

If you are talking about having the special tile on the map but have it show as "nothing" on the minimap, just the same as tiles where there's nothing, you won't be able to succeed in what you're doing as the client handles all this stuff on its own.
So without disassembling the game and writing your own function to do this, which will be VERY hard, if not impossible, you can't do what you are trying to achieve.

8 years, 29 weeks ago
Post #197875 Re: Hiding tilespecs from player's clients?

The least you could do to avoid this is disable the mini map in the map settings of ur map editor. Other than that I don't think it's possible to hide it unless you use X and Y locations instead of using TileSpecs.

8 years, 29 weeks ago
Post #197876 Re: Hiding tilespecs from player's clients?

Oh actually, what Hollow said :)

Instead of using special tiles which for your task is impossible to do what you want to do, you can say check if whatever action you want done is done on X Y on that map, then that would be invisible in the minimap like Hollow said.

Nice thinking Hollow.

8 years, 29 weeks ago
Post #197877 Re: Hiding tilespecs from player's clients?
matiasmunk posted: (14th Sep 2015, 07:52 am)

You are not describing what you really want it to do.

If you are talking about having the special tile on the map but have it show as "nothing" on the minimap, just the same as tiles where there's nothing, you won't be able to succeed in what you're doing as the client handles all this stuff on its own.
So without disassembling the game and writing your own function to do this, which will be VERY hard, if not impossible, you can't do what you are trying to achieve.


Well, let me elaborate.

Server reads emf file -> Takes in information piece by piece and constructs a Map internally which is then pushed back into World->maps. Right?

Client requests emf file -> Server sends client the map that it saved and constructed itself from the World->maps vector, using the GetMap() function.

The client only knows what the server tells it. If the server sends the client a Map file which has been constructed without Tilespec X and Tilespec Y, then the client will see the map however the server sent it. In other words, the client doesn't handle all this on its own, because the client can't know what it doesn't know.


So now, bearing this in mind, perhaps a solution would be giving each Map a new variable called "Map playermap" which is automatically constructed without the special tilespecs if Tilespec X or Tilespec Y is detected while the server is loading the map initially.

Then, if (map->playermap) Send that shit to the client instead of the "real" map, essentially spoofing the map to the client.

---
Want to learn to pixel?
Pixelsource.org
8 years, 29 weeks ago
Post #197878 Re: Hiding tilespecs from player's clients?

When the server sends the map file it sends it as a whole encrypted file.decrypt the real map file then encrypt it into a new file after changing what u want.

---
Remember when is not an organization nor a fucking group , it's simply an idea that we believe in
and live for.
The priority of Remember when should come before oxygen , as oxygen is cosmetic even life itself is
cosmetic,that's why offer our worthless lives to The "Remember when"
8 years, 29 weeks ago
Post #197879 Re: Hiding tilespecs from player's clients?

-sits and waits for Apollo or Sausage's reply for no reason other than being interested in the solution-

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
8 years, 29 weeks ago
Post #197880 Re: Hiding tilespecs from player's clients?

In general EOSERV just serves the EMF file right from the disk, so the obvious solution is to create a separate folder with the second copy of the maps that get sent to the client, and have some process strip all the information the client doesn't need from them (or if you wanted to keep it simple, a copy of the maps where you delete those specific tiles).

There is code there to support modifying the map file as it is sent though (used to adjust the map revision ID and PK flag). It's not completely straight-forwards but it's doable to record the location for those tile spec bytes, and then have it updated in the same way to replace them with a more harmless tile spec that the client won't render.

The best solution would be to not use unknown tile specs for custom features, and instead have the editor write the extra data to a secondary configuration file that accompanies the map file.

8 years, 29 weeks ago
Post #197882 Re: Hiding tilespecs from player's clients?

-is satisfied-

---
"Nurd, you're like a fucking swiss army knife" - Necrosis
8 years, 29 weeks ago
Post #197883 Re: Hiding tilespecs from player's clients?

A really horrible solution would be to follow Sausage's method and add a new tile spec ID on every map. Something like tilespec 85 would break Map Editor's view, assuming that you are trying to block that data. This is simply because the way Map Editor works is by trying to assign a gfx for the tile spec which horribly crashes if the tile spec is out of range. By no means will this solve your issues, but could allow you a window of secretive tile spec assigning until someone wants to try to data mine the file to find the oddball tile spec you dropped on the map that utterly broke shit and hex edits it out. That or Sausage fixes the bug or someone else releases a map editor with this bug missing.

8 years, 29 weeks ago
Post #197884 Re: Hiding tilespecs from player's clients?

scratch that, secret exposed

8 years, 29 weeks ago
Post #197885 Re: Hiding tilespecs from player's clients?
Sausage posted: (14th Sep 2015, 02:29 pm)

In general EOSERV just serves the EMF file right from the disk, so the obvious solution is to create a separate folder with the second copy of the maps that get sent to the client, and have some process strip all the information the client doesn't need from them (or if you wanted to keep it simple, a copy of the maps where you delete those specific tiles).

There is code there to support modifying the map file as it is sent though (used to adjust the map revision ID and PK flag). It's not completely straight-forwards but it's doable to record the location for those tile spec bytes, and then have it updated in the same way to replace them with a more harmless tile spec that the client won't render.

The best solution would be to not use unknown tile specs for custom features, and instead have the editor write the extra data to a secondary configuration file that accompanies the map file.


Yeah, I misinterpreted something I saw in the source as being a pull from the maps vector, when really it was just checking if the map existed. (Whoopsies.)

Seems like the best option is to try and modify the file on its way out. It's certainly not straightforward though, I wonder how I'll be able to find specific tilespecs in this.


When I get home tonight I think I'll try and use some manner of hack and slash of the code in the Load() function to modify the tilespecs - I just don't really know the best way to make the jump from reading to writing when it comes to this.


EDIT: Yeah, I'm not sure what course of action to take yet since I'm not actually modifying the file so I don't want to use an fwrite, but I have to locate and modify the chars in what's being sent to the client. Weird. Any ideas on the best way to go about doing this?

---
Want to learn to pixel?
Pixelsource.org
8 years, 29 weeks ago
Post #197893 Re: Hiding tilespecs from player's clients?
Hollows posted: (14th Sep 2015, 09:03 am)

The least you could do to avoid this is disable the mini map in the map settings of ur map editor. Other than that I don't think it's possible to hide it unless you use X and Y locations instead of using TileSpecs.


rite? thats the first thing that came to my mind xD
---
Insomniac:I like how in the lounges forum description sausage says "Bitches go crazy." and that's
exactly what you do!
Pixel artist | Mapping artist | Alternative artist | Heavenly Karma | oldbie | top 50  |
Attention whore | main player |
8 years, 29 weeks ago
Post #197894 Re: Hiding tilespecs from player's clients?
Moonie posted: (15th Sep 2015, 02:58 pm)

Hollows posted: (14th Sep 2015, 09:03 am)

The least you could do to avoid this is disable the mini map in the map settings of ur map editor. Other than that I don't think it's possible to hide it unless you use X and Y locations instead of using TileSpecs.


rite? thats the first thing that came to my mind xD

It would be perfectly valid if I didn't want the players to have minimaps, or it it was practical to use x/y configured locations in this case.  (It is not.)

That's the problem with writing systems that are convenient for everyone. They're inconvenient for me.

---
Want to learn to pixel?
Pixelsource.org
8 years, 29 weeks ago
Post #197895 Re: Hiding tilespecs from player's clients?

What's so inconvenient about writing a small code that checks if the player does something on a certain tile on a certain map?

It's the exact same thing that Tilespecs does, except it reads the map first and checks if the player does it on a certain tile on the certain map.

8 years, 29 weeks ago
Page: << 1 2 3 >>

EOSERV Forum > EOSERV > Hiding tilespecs from player's clients?