Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Simon Couture, posted on December 15, 2004




Image Description, by Simon Couture



Here are some screenshots from my custom heightmap editor. It is written in Delphi 6 and has a pretty good feature list. It uses a simple quadtree for culling. The texture is just a generated image stretched on the map.

The top image shows the main window with an island map, with a bunch of entities with bounding boxes loaded. You can see the toolbar with 6 tools (raise, dig, equalize, smooth, get and set height) to edit in realtime the heightmap and import/export options for the heightmap and the main texture. There's also a property window to edit entities.

Entities are defined by a simple script (middle left) to allow a great integration with the game engine. You can link your data to the position, orientation, boundingbox and model used in the editor. Data types supported are int, float, string and choice (a kind of combobox). All data is stored as binary (choice is stored as an index).

The editor has a lot a subwindows to manage different things like memory usage (middle center), configuration (middle center, bottom left) for everything in the editor (repertories used, clipping distance, quadtree's leaf size, texture filter, color, etc), lightmap generation with self-shadowing (bottom center), texture generation based on slope (bottom right), texture blending with alpha layer or separated alphamap, entity report with filter for fast finding, map properties and many more. All expensive operations are in a seperated thread and have a progress bar for better response.

It obviously has all common file operations: new, open, save, export. A single map is divided into 3 files (heightmap, texture and entities) to be able, for example, to use the same heightmap and same entities with a different texture (summer/winter theme) or different entities on the same heightmap.

If someone is interested to use this editor in their project feel free to contact me: nouse at gibbering dot net
http://legion.gibbering.net/nouse

Simon Couture


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Michel Stol

December 15, 2004, 04:28 PM

Hehe, another heightmap editor :) Guess what I'm writing for a school project... :)
Yours looks waaaay better though, keep up the good work!

EDIT: By the way, I chose C# as my programming language for the project, so far I really like it.

 
bananaboy

December 15, 2004, 06:04 PM

That looks pretty nice!

Does it generate a random heightmap for you or does it only load existing heightmaps? How do you generate the water/land? What I mean is: I see you have water, then beachy area, then land; how do you blend those together like that? Do you have a facility to blend a bunch of base textures together?

Keep up the good work!

sam.

 
gaiaap

December 16, 2004, 06:04 AM

Not to be a killjoy, but are you sure that the ressources for that map take up 12.601.912 Mb? :)

 
TMBG

December 16, 2004, 07:46 AM

Great to see that Delphi is still being used for game related stuff. It looks like a great app!

If there is anyone else that is interested in Delphi or more generically, Pascal Game Development, then be sure to check out http://www.DelphiGamer.com which has just relauched itself to cover all aspect of game development using Pascal, from Win32 to Solaris and also hand held devices. There are even some boffins working on providing an SDK for GBA development using Pascal.

 
Simon Couture

December 16, 2004, 10:54 AM

Thanks for the good comments everyone

bananaboy:
-Does it generate a random heightmap for you or does it only load existing heightmaps?

It doesn't generate random heightmaps by itself but there is an import/export from/to TGA option. So you can use your favorite paint package to create random terrain easily using some filters. Sure it would be easier to just have this option in the editor but.. c'est la vie (;


-How do you generate the water/land? What I mean is: I see you have water, then beachy area, then land; how do you blend those together like that? Do you have a facility to blend a bunch of base textures together?

In fact, the water is cheated in this map. The water texture is only a part of the main texture. Real water is represented by a "box entity", it is the game engine's responsibility to handle it. The editor just provides a volume (oriented bounding box) where the water should be. You can have as many water spots as you want on a single map and water types (deep ocean, river, lake) is again the game engine's responsibility. To create the main texture, I first used the texture generation option that blend two textures according to slope (bottom right screenshot). After, I used the export/import texture option to create the blending according to height with photoshop to have the water and sand. I want to add later a "blend according to height" option.


I know this is a bit cheated but when I made this editor, I wanted to create a very flexible entity system to allow any game specific entity to be put on the map (ex: 3D sound, NPC, special fx, trigger, water, etc etc). Because it is only a spare time project I had to cut on other features. Instead of developping lots of option to edit the heightmap and the main texture, I decide to make import/export options to be able to use the power of paint packages.

gaiaap: The main texture is 2048x2048x3 = 12mb... and there are some models loaded.. so the ressources really takes 12.601.912mb (;

TMBG: Long life to delphi!

If you have any question I will be glad to answer them!

 
Rui Martins

December 16, 2004, 11:32 AM

You didn't get the tip right !

12.601.912mb = 12.601 Gigs = 12 Tera Bytes.

Which is impossble to have on RAM on a PC.

And also Mega Byte acronim is "MB" not "mb" (that could be interpreted as Mega Bit, althought it should be "Mb" in that case).

 
Simon Couture

December 16, 2004, 11:42 AM

Sorry, I guest my convention isn't right. What I mean by 12.601.912MB is 12 megabytes 601 kilobytes 912 bytes. I didn't remember that english have thousand separator.

Thank Rui Martins for the hint about mega byte acronim!

 
ViperG

December 26, 2004, 10:58 PM

Man even I forget once in a while about how many kb is in a meg? is that bad?

 
ViperG

December 26, 2004, 11:00 PM

Hey Cool Map editor!!

And be carefull with those textures. If your loading into video memory, some cards can't draw a texture that big. If your doing it your self in ram memory nevermind!

But yeah, just replace the. with ,

12,601,912KB

Or 12.02MB

One way of writing it in 1 line for your editor, would be

12.02MB (12,601,912KB)

Keep up the good work.

 
This thread contains 9 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.