Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Materials - Abstract Interface

edited 2008 Jun 27 in Developers
<i>This post was originally made by <b>danij</b> on the dengDevs blog. It was posted under the categories: Beta 6, Engine, Games, Version 1.9.</i>

Recently commited to svn are the final changes in the transition to an abstract interface for referencing textures, flats, sprites etc called materials. All world-renderable surfaces will ultimately use this interface (model skins and sky textures still to go) to allow all types of texture to be used interchangeably (flats on walls, sprites on planes etc).

Publicly, materials are referenced by a continuous range of unique (eternal) identifiers. These identifiers are also used within net packets but currently there is no mechanism to ensure that the client-side identifiers match those server-side.

What should we do here? I guess upon handshake (and before the client is added to the game) the server should send it's material dictionary to the client which it can then store locally for matching server to local idents.



  • This sounds good. I think we should definitely send the material dictionary from the server to the clients, but we should consider this in the larger context of allowing clients to run on server provided data. Ultimately and ideally, the server should be able to provide <b>all</b> the data to the clients, including the map and the graphics. The main IWAD and full resource packs may be out of the question, but any addon WADs and relatively small things like that should be downloadable from the server and cached in files on clientside.

    Have you been thinking about savegames? The material dictionary probably needs to be saved there as well.
  • I'm of the opinion that data resources (sprites, textures etc) originating from an IWAD should NOT be sent to clients under any circumstance (as this is copyrighted material after all).

    Also worth considering is the prospect of client/server map editing. Now that maps are being (re)built entirely within the engine, we are not a million miles away from allowing any logged in client to change the server-side map and have those changes automatically sent out to other clients via the existing net code.

    Due to the savegames still being handled completely game-side, I have simply adapted the code in common/p_svtexarc.c to deal with the material dictionary for now. I think its been too long since the beta5 release to start messing with the savegame code now :)
Sign In or Register to comment.