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


.x creation, textures

Recommended Posts

Extreme newbie here, both to this site and games programming. I only recently struggled my way into understanding ANYTHING about windows programming, even. I have blundered around a bit in direct3d, made something pretty cool by my standards- a bunch of differently textured squares twisting around on the screen. But I used a vertex buffer, and for squares that''s fine, but for anything much more complex its painful. I have looked at the meshes example and think I get the general concept of loading and rendering a .x - but I can''t make a .x in the first place. Is there something freeware that makes it really, really easy? Second question relates to textures. My too-ambitious-for-a-newbie-project is a game engine / creator. It will be 2d. This might be better done in directdraw, but for experience''s sake, I''m planning to do it in direct3d. (besides which it might make some pretty cool effects easier to incorporate) It''ll be something like rm2k, which you may know of- The user draws tiles (which are all part of one bigger image), and then pieces them together to form the overall game map. This could be potentially easy to do if I make one square per tile, and then just give appropriate texture coordinates to the squares'' vertices. I could render the whole map all at once, and direct3d will minimize the cost of such a thing by not wasting much time on poly''s outside the cameras viewport. But I think I would like the engine to allow the camera to either move back or just widen it''s field of vision so that the whole map can be viewed- and I think that in such a case a large map could have a crapload of polys. (I''d like to keep the count as low as possible) So I''d like to either be able to reduce the complexity of the geometry dynamically as they zoom out- or have it less in the first place, ie, more than one tile per square even on standard, close shots. Considering my lack of skill I lean towards the second. This, unless I am overlooking something, requires the ability to do two things- 1) to take a square out of the larger bitmap and turn it into a texture of its own- I could avoid this by saving and loading each tile separately. But I''d like to know how to break up a texture as I described anyways, since at some point I''d like to be able to Import rm2k style chips, charas, etc. (BMP format will do) 2) recombine those smaller pieces into larger textures for wrapping onto bigger polys. So, could anyone tell me how to do these two things, or point me to existing information? Are there any libraries that do this automatically and do it fast enough to make it reasonable for real time?

Share this post

Link to post
Share on other sites