Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Terrain making

Author
Message
shang tsung
16
Years of Service
User Offline
Joined: 19th Dec 2007
Location:
Posted: 19th Dec 2007 13:38
i wanna make terrain from a 2d picture of grass tiles
i wanna set the height of the corners of the terrain tiles using an integer array



so the Integer in the array index 1 has the height of the 1 corner of the tiles

and so on with all the tile corners
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th Dec 2007 15:16 Edited at: 19th Dec 2007 15:32
I just managed that - kind of - I used a height Map - But the question for you that will dictate HOW is "What will it be made of?"

1: A "DarkMatrix" - Easiest to me - Limited in size - not the fastest way to go from a "Execution" perspective. Allows Texturing Tiles I Think - I don't think you have to have a "Stretched SuperTexture - but I'd double check.

2: "Terrain" Object (Think advanced Terrain) - A bit cumbersome until you get used to it - Needs a "SuperTexture" that it au-jo-magically Stretches over the entire terrain - then it overlays this "color blur" with a "see through" "Detail" tile so it looks more like ground with rocks - bumps etc. Execution Speed? Fast - it does some Background work for you to make it "play Nice - and Fast" - Sometimes - (more in DarkGDK than DBPro - probably my fault to - I have seen anomallies with BIG BIG ones.)

3: Homemade Mesh? (Where you create each Poly - Lay them out - then adjust "heights" or whatever?) - Hardest - Most Rewarding - You need to plan for your own "Speed-Up" system (See Frustrum Limb Culling) - Careful - I read DBPro/DarkGDK do better with a few limbed objects than a ton of "Object Tiles" - as the less "Object Id's" the better. The other enemy is poly count. More = Nicer Looking = Slower FPS - So you need to manage. Also, You need to think a bit differently about it all. Setting Verts (Heights) requires adjusting multiple "Poly" Verts that share the same "Vert" space. That can get tricky. I can give you some source - It works - but its a "Test" app I'm using to make my terrain. I uploaded Some Source Here: http://forum.thegamecreators.com/?m=forum_view&t=120102&b=22&p=0

[edit]I also Recommend you start your Arrays at ZERO. It makes locating "Tiles" Easier.

See my loops in the Thread I posted - you'll probably see what I mean. In Short - imagine two loops - for a grid. X,Y Coords - Look at how I would plot them:



Beter than this kind of non-sense:


[/edit[

shang tsung
16
Years of Service
User Offline
Joined: 19th Dec 2007
Location:
Posted: 20th Dec 2007 07:20
i also wanna be able to raise or lower the land at any time in the client at a certain point
Pharoseer
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: Right behind you
Posted: 20th Dec 2007 09:17
Hey Shang,

I'm just elaborating on Jason's answer. As far as the matrix commands, they're easy but SUPER slow. And like Jason said, they use a tiled texture for the whole matrix as opposed to a super-texture. It also takes some work to make them seem smooth.

Terrain objects are a lot better, but they are still only a stepping stone towards a decent terrain system -- which one of us will eventually build.

-Frank
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th Dec 2007 16:08
Quote: "Terrain objects are a lot better, but they are still only a stepping stone towards a decent terrain system -- which one of us will eventually build."


I'm TRYING I'M TRYING!

Login to post a reply

Server time is: 2024-10-08 18:20:54
Your offset time is: 2024-10-08 18:20:54