Archived

This topic is now archived and is closed to further replies.

NoviceFool

ogl, texture management - dl over network

Recommended Posts

Hi, I'm beginning to create my first game. Some parts of my 3D world will use billboarding techniques (2D texture on a quad that always faces the camera). This is fine, and I'm beginning to master the basics of OpenGL. I basically decided to store these all in one small targa file and just modify the texture coordinates so the right image is displayed on quad. Quick question here, I've seen this done with DirectX games (usually tile-based) so I figured it is more optimized to use one file for textures. Is this true or is there no cost involved in using more than one file? Second question, this is looking far ahead (I haven't started coding) but I would like to have the ability for a user to create his own texture and have the rest of the players download it when that person joins the game. I guess this is something along the lines of Counter Strikes spray images. Right now I have a static texture array with only 5 textures or so, ie: glBindTexture(GL_TEXTURE_2D, texture[tex_index]). Let's say 40 players join the game and they all have custom textures (maybe one 128x128 each). Is there a problem with storing the textures as a dynamic array and having a large amount of them? Is there a limit to the amount of textures OpenGl can handle? Is there a better known method to handle this, like how Counter Strike handles spray images? Thanks sorry had to write this quickly, hopefully I made it clear. I'm basically looking for any info on doing a simple system for managing textures like CS does with sprays. Thanks. --edit Also, I'm thinking about keeping the most frequently seen textures stored on the users system so he doesn't have to download it every time. Maybe have a max size limit (50mb or something variable) before it deletes the least frequently used. Is there a popular file compression tool that most people seem to be using? I'm using targa files with transparency. Thanks [edited by - NoviceFool on March 17, 2004 11:42:11 PM]

Share this post


Link to post
Share on other sites
HL/CS takes very small WAD files (compressed archives) from the client during connect, and send them to all the other clients. It''s basically part of the initial data uploaded during server connection. All the other players get it when you enter. There are strict limits on the file size, to keep your server''s memory from being consumed. You only need as many spaces for textures are there are players who can join. So if the maximum number of players is 16, keep an array of size 16 that holds all the textures.

Share this post


Link to post
Share on other sites
Thanks promit, I just made changes to my post after you posted. I''ll look into the WAD files -- I''ve created my own sprays for CS(is this the standard most use for compression?)

I believe I''ll be able to have a large number of players in my game. Each player shouldn''t require much net traffic at all so I''d say the limit will be over 60. I''ll let you know how it works out (many months from now, haha). Thanks

Share this post


Link to post
Share on other sites