Custom Clients - Stockpile Textures (Stone & Ore)

Forum for alternative clients, mods & discussions on the same.

Custom Clients - Stockpile Textures (Stone & Ore)

Postby Sarge » Thu Feb 16, 2017 3:03 pm

Loftar,

Coming from someone who can't code, on behalf of someone who can:

If we were looking to match the stone and ore stockpile textures to those of the stone/ore, or its wall textures prior mining, we run into the problem that in the case of mixed stockpiles, there is no current code that dictates how to handle the differentiation. So if we could code client side, the logic of "If all = same<stone> then <stone texture>, else <texture black>", however that might read in code, we would need the information from the server side.

1. Is the required information sent to the client from the server in order to do the coding client side? If not, is it hard to and would you consider that it is sent?
2. If this is not very hard or time consuming at all, would you consider coding it server side if you prefer not to send this information to the client?

I hope that made sense.
factnfiction101 wrote:^I agree with this guy.
User avatar
Sarge
 
Posts: 2029
Joined: Fri Oct 09, 2009 3:41 am

Re: Custom Clients - Stockpile Textures (Stone & Ore)

Postby APXEOLOG » Thu Feb 16, 2017 5:08 pm

Sarge wrote:1. Is the required information sent to the client from the server in order to do the coding client side?

No
W10 Meme Plot | W9 Mantis Garden | W8 Core | W7 Ofir | W6 the City of Dis | W5 Vitterstad | W4 A.D. | W3 Mirniy
jorb wrote:All your characters will be deleted, and I will level every village any one of them were ever members of.
User avatar
APXEOLOG
 
Posts: 1267
Joined: Fri Apr 23, 2010 7:58 am
Location: Somewhere on Earth

Re: Custom Clients - Stockpile Textures (Stone & Ore)

Postby Granger » Thu Feb 16, 2017 7:38 pm

Sarge wrote:2. If this is not very hard or time consuming at all, would you consider coding it server side if you prefer not to send this information to the client?

@Loftar: Sending the whole list might be a bit on the high side traffic wise (as there could be quite some piles within render range), but maybe it could be possible to send a single byte, useable as an index into a lookup table for materials, that tells the client the material of a single (first or last put in) item within the pile?
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
Granger
 
Posts: 9263
Joined: Mon Mar 22, 2010 2:00 pm

Re: Custom Clients - Stockpile Textures (Stone & Ore)

Postby loftar » Thu Feb 16, 2017 7:51 pm

Granger wrote:send a single byte

Sending the information to the client isn't the problem (I already have a general mechanism where I use 2-byte IDs to identify resources), it's more the matter that:
  • I think it's kind of ugly to just let the first/last inserted item affect the entire stockpile; and
  • I'm concerned what variable materials on stockpiles might do for client performance, as sprites with different materials can't be instantiated in rendering.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 8926
Joined: Fri Apr 03, 2009 7:05 am

Re: Custom Clients - Stockpile Textures (Stone & Ore)

Postby Granger » Thu Feb 16, 2017 7:58 pm

loftar wrote:
Granger wrote:send a single byte

Sending the information to the client isn't the problem (I already have a general mechanism where I use 2-byte IDs to identify resources), it's more the matter that:
  • I think it's kind of ugly to just let the first/last inserted item affect the entire stockpile; and
  • I'm concerned what variable materials on stockpiles might do for client performance, as sprites with different materials can't be instantiated in rendering.

My suggestion would be to send the data then, post the lookup table (or don't in case the client alreads translates it), let the custom client makers work with in and in case it turns out good (performance wise) backport it.
You could also, in case it isn't costly on the server, send the material that has the majority inside the stockpile - but IMHO even one (first or last) would do the trick so we can evaluate the performance impact on rendering.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
Granger
 
Posts: 9263
Joined: Mon Mar 22, 2010 2:00 pm


Return to The Wizards' Tower

Who is online

Users browsing this forum: Yandex [Bot] and 11 guests