About Store Forum Documentation Contact



Post Reply 
Drawing Roads and Footpaths
Author Message
fatcoder Offline
Member

Post: #1
Drawing Roads and Footpaths
Hi,

Just wondering if anyone has any suggestions on the best way to draw roads and footpaths on the terrain at run-time (i.e. not in the World Editor) but actually in-game.

I want to allow the player to click on the terrain and then drag out a road or footpath on the terrain. The user should be able to connect the together in order to create a network of footpaths for example.

Thanks.
04-25-2010 04:50 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #2
RE: Drawing Roads and Footpaths
Just to clarify a bit more, I'm looking for more of a tile approach rather than a spline approach. Actually placing the tiles for a footpath in a grid over the terrain is the easy part.

i.e.
player clicks on terrain
covert screen coord to terrain position
locate tile in array at this terrain position
flag tile as footpath
Draw footpath tiles on terrain each frame

It is the last step that I'm stuck with. The footpath tiles are square. Should I place a square object (like a mesh) on the terrain for each tile or should I draw the footpath texture directly on the terrain for each tile (using a decal perhaps)?

If I used the mesh object approach, how would I conform the mesh to the terrain's contour, so that the footpath can smoothly appear over slopes in the terrain?

Should I be using some other solution, perhaps custom geometry?

I've tried using decals and they appear to work ok, but I'm concerned about performance. Are decals designed to have thousands on the terrain at once or should they be used sparingly?
04-26-2010 01:39 AM
Find all posts by this user Quote this message in a reply
Post Reply