taking a closer look at .raw files used as heightmaps

Started by
11 comments, last by fireking 20 years, 5 months ago
Should be from 0-1023, for a 1024x1024 array.
-Ostsol
Advertisement
fireking, a good engine also needs good data. In theory, it should handle bad data gracefully (not core-dump, for instance), but it doesn''t have to fix bad data. It seems like it would be easier to fix your data once, than try to do fixes real-time everytime it runs. Just my thoughts, do other people agree?
well, the whole idea is that everything is supposed to be based off of even numbers, plus, i made this huge world map, and it would take tons and tons and tons of work to make each map (256 of them) have shared borders with its neighbors

so i wrote a neighbor function, but it still doesnt render the last strip

i finally decided on just letting it not render the last strip, then when the next heightmap is connected to it, its lined up at 1024-step_size, matching edges with the averageneighbor function. it works, but the texture is still 1 step_size bigger on two edges, so i modified texture coordinates so that the texture is shrunken just a bit to fit the 1008x1008 terrain (originally 1024x1024 now - step_Size which is 16)

it works pretty good, and since each block is scaled by 100, the fact that the last strip missing and being ignored doesnt really matter, cuz the terrains connect to each other anyways.

the only thing i have to worry about, which i hope doesnt happen, is situations where that last strip contains a terrain transition that is important to the game world. im pretty sure i wont come across any areas like that.

terrain programming was fun though! im not done yet, i think i wanna do procedural textures now, so that i dont have these crappy looking textures stretched over the surface making the gamer''s puke.

my next adventure, after this, will be making and rendering simple dungeon maps. You know, the good ole tile based dnd type stuff, just in 3d. I believe it will be much easier than the terrain, but i dont want to jinx my self

thanks for all the help though guys, i keep telling my self to get the open gl programming book, but i just cant break down and do it, cuz i bought that programming role playing games in direct x book, hoping that id find it fairly easy, but direct x makes me puke... i like open gl and im just gonna ignore the fact that i purchased that book for now (putting off reading it) and work on open gl.
--FirekingOwner/LeaderFiregames Development &Blackdragon Studios

This topic is closed to new replies.

Advertisement