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.

DarkBASIC Professional Discussion / Blitzterrain painting in real time with textures

Author
Message
Flamertor
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 13th Apr 2013 23:50
Hi,

I'm trying to draw the paths and roads in real time as I edit were my buildings are in real time and wondering if anyone knows how to use a texture kinda like it was in empire earth map editor (e.g. it fades the texture more the further out it is from the center)
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 14th Apr 2013 13:26
Just throwing one or two ideas in the hat here; I've not created an empire earth style game but do like those kinds of games and I know a little about terrains.

One way is to use a procedural texture; simply paint the the road grid tile onto the texture of the terrain when something changes.

Another way, or a something that could be used in combination is to use the Lego principle. Create seamless tile meshes and plot them along the ground. Use bones to distort the Y bend to conform to the terrain height.

Flamertor
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 14th Apr 2013 13:39
Could you provide a bit of code for me to let me get the gist and know were to start of how to do it. It doesn't need to 100% perfect because I could edit it.
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Apr 2013 15:19
The full version of Blitzwerks terrain has this command. The free version does not.

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
Flamertor
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location:
Posted: 14th Apr 2013 15:22 Edited at: 14th Apr 2013 17:13
I do have the full version but I don't know how to do it with a texture. I can do it with a colour though.


do you know the command?
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 14th Apr 2013 17:17 Edited at: 14th Apr 2013 17:18
I can't really code the whole thing for you at the moment, I'll explain it instead.

Create a 2D array of UDT entries storing details of the terrain tiles.
Create a bitmap using native commands or an image using Image Kit.

Do something like the following when something changes on the map

You may want to store an additional dimension to store tiles in more than one terrain object. Also, ask the creator for any tips.

Login to post a reply

Server time is: 2025-05-17 23:44:00
Your offset time is: 2025-05-17 23:44:00