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 Discussion / RTS Map Editor WIP

Author
Message
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 08:07 Edited at: 7th Sep 2007 05:02
Since the work in progress board is mostly DBP stuff now and I'm really only looking for feedback on my map editor, I thought I should post this in the DBC thread if thats OK?

It's the map editor for an RTS game i've been working on off and on for awhile and I want to know what everyone thinks. so here are some screenshots.

Editor Features:
User can create maps of any size with up to 50 tiles in each direction and edit the landscape in a nice, user freindly GUI.

There are various tools for landscape editing including smoothing, flattening,texturing, etc. (Texture maps are 512x512 and have 16 different tiles each 128x128 the user can otionally add their own textures to the programs texture subfolder and use them in their maps).

Update: I've now decided to adopt the texture method TDK uses in his MatEdit program so that when designing maps, a texture is automatically generated that uses only the tiles the user selects for use in the map. This keeps the texture bitmap size down for maps that use only a few tiles and also gives more freedom of choice when choosing how to texture a map.

User can place unit models in the programs subfolders for the editor along with a data file with information on the units stats and add that unit into their custom maps along with any units that are in the campaign. If they wish for the new unit to be constructed at certain buildings they only have to add the units name to the list included with each buildings model in the buildings subfolder. Other units include structures, natural features, special shading devices etc...

Note: I'm now going to redo my unit placement routines to load the data for the units as you place them so you can click the test map option and execute the main program executable and test your map without having to save it and then run the game and go to scenario > play map > the map you want to play

Map is exported with all the data for the pathfinding systems so the user optionally use block objects to block off extra squares on the map they dont want the units to walk through. Squares below water level are automatically unwalkable.

Terrain heightmaps are exported as shaded bitmaps so the user can otionally edit their landscape from a grayscale heightmap.

A trigger system to be added later that allows the user to set events to occur based on conditions in the game.

only about 85% of this stuff is done completely

Credits:
To Underware Design @ www.underwaredesign.com
for the matrix selection routine by Kevin Picone. (Used with permission)

And to Phaelax for his tutorial that used a scaled 3d object as a selection square. (Saved a few FPS in the actual game)

The normalizing routine is from TDK's golfcourse entry in the DBC challenge thread Which i think came from the DB tutorials and is actually by lee bamber. If im wrong please correct me, im a bit confused on where it came from. I'm not using the same one in the completed version.

The snowman model came with the DB boxed version and the grass and water textures are just placeholder textures and from freeware sources.

Here are some Pics:



luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 08:09 Edited at: 5th Aug 2007 18:31
Pic 1:

Screenshot of a snowman being placed on the map. The second menu on the right is the object placement menu.

Attachments

Login to view attachments
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 08:10 Edited at: 5th Aug 2007 18:45
Pic 2:

Smoothing the landscape using the Smooth tool and the largest available brush.

Attachments

Login to view attachments
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 08:11 Edited at: 5th Aug 2007 18:46
Pic 3:

Setting up a new map in the new map window.

Attachments

Login to view attachments
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 08:14 Edited at: 5th Aug 2007 18:47
Pic 4

Using a selection box for multiple unit selection.

Sorry they look a bit bad but i didnt want the images to be too large and the editor only runs at a 1024x768 screen resolution.

Attachments

Login to view attachments
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 08:20
Ok thats all of them. If anyone has the time I would appreciate feedback on ways to improve the editor: Addition features and all that. Also, just to give you an idea of how it runs, I get around 45 to 55 frames per second most of the time, though it drops to 40-45 when you are editing the landscape with a large brush size because the terrain has to be renormalize and the appropriate changes have to be made to the landscape. (This is for the 30x30 tile maps)

The only request I have for information regarding something specific is a method of smoothing the matrix at a slower rate than averaging out the height of all the points around an area. Right now when you click to smooth it almost flattens the terrain in about a second.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 5th Aug 2007 15:48
Save the pics as JPG then upload them, then we can view them without having to download.

Your signature has been erased by a mod because it was rubbish.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 17:23
Sorry about that it was really late at night and I wasn't thinking straight
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 5th Aug 2007 17:51 Edited at: 5th Aug 2007 18:57
Looks pretty good, can you give some explanation of what's going on in the pics.
Personally I don't like the brown colour of the GUI I think I light pale blue would look better

I think you should use photobucket.com or imageshack to upload your images and then you can display them all in the same post
Also gives TGC file hosting a break.

Your signature has been erased by a mod because it was rubbish.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 5th Aug 2007 18:57 Edited at: 4th Sep 2007 06:57
There are a couple different color options for the GUI right now. One of them is blue, another brown and the last one a dark yellow color. Later on I might make a routine that recolers the GUI to a color specied by the user in a color picker, but its not really that important so I haven't done anything with it yet.

Has anyone besides Obese taken a look at the pics? I'd like some feedback on everything. I'm trying to finish up with the editor so I can get to work on the game's campaign.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 4th Sep 2007 06:55
Nobody seemed interested in this so I stopped working on it for awhile but I've started again and I just finished the new texturing tools. They let you add textures to your folder while you're editing the matrix and automatically generate a new texture map for the matrix. It also adds the texture to a list so you can just click on it and texture away, and if you dont want them on the map anymore or you accidently put them in your texture map and you dont want them you can remove them to save space (Each map can only use 64 tiles and they add up quick)

Here is a screeny:

Attachments

Login to view attachments
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Sep 2007 08:33
Looks like a good start. I started one in DBC a long time ago, never quite finished. I had a simple menu and object placement, I think that's about it. Not even sure if it saved maps.


Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 4th Sep 2007 21:55
Wow, that is nice. I agree with OBese87 about the color though.

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 5th Sep 2007 22:59
That is nice I love RTSes!
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 6th Sep 2007 04:12
Quote: "Wow, that is nice. I agree with OBese87 about the color though."


I don't think anyone besides myself does. lol

But I'm still working on the gui recolor thing using a color picker. Most of the menu is just a texture so I have to recolor the bitmaps in the program and it's going to be boring putting that together so I keep putting it off.
Not_Maindric
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 6th Sep 2007 04:27
I personally like this program, also with the color wround it, I may not like the color, but it fits. I hate brown, but like it when it is used correctly, like now.

luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 6th Sep 2007 04:51
Quote: "I hate brown, but like it when it is used correctly, like now."


Thank you. I thought the other colors looked strange in comparison to this one so its the one I use. It's not like the color of the GUI for the map editor in the WIP screenshots is a big deal, despite the fact that half the posts have been about that.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Sep 2007 20:36
I didn't notice the normal shading, did you make that yourself?
Looks nice

In programming, nothing exists
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 6th Sep 2007 23:32
No thats the one by Lee Bamber.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 7th Sep 2007 01:49
Quote: "{I} like it when it is used correctly, like now"


I think the brown suits it too...

http://jamesmason01.googlepages.com/index.htm
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 7th Sep 2007 05:01
Here is another screenshot editing the textures with some street textures from Raptor Productions. I can't draw so I don't have any actual textures for the game yet that I can use.

Attachments

Login to view attachments
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 7th Sep 2007 12:43
starting to look very sexy man

although the corners of the dirt by the road do look a little weird... could you put an option in where you can have square corners instead of rounded ones on those dirt things because although it looked better on the first screen, where you have the dirt meeting the road you have that little patch of grass in between the corners...

http://jamesmason01.googlepages.com/index.htm
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 7th Sep 2007 23:47
You already can. I just used rounded ones in both the screenies.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 11th Sep 2007 07:23 Edited at: 13th Oct 2007 07:54
Sorry to double post but here is a compiled version of what I have now for the editor. I didnt include alot of (* everything except a stone mine and a gold mine ) the media because they were from the dark basic files and not included in the executable and anyone could just take them out. I'm also working on the GUI thing now so sorry Obese, there is no blue or yellow GUI option anymore.

Some of the features may not work, I've been trying to optimize the code as its pretty sloppy and inefficient, and in the process some things may have gotten mixed up( I know I messed the grid array for the unit loading stuff). The executable also runs at about half the framerate in the exe than in the editor so I don't know why that happens either. I left the source code in but you may not want to look at it, again its pretty sloppy and not really the greatest.

DO NOT USE THE NEW MAP BUTTON. There is a serious problem that crashes the program for reasons yet undiscovered.

Controls:
- press ctrl to view texture map and click the texture you want
- when you start the paint terrain mode you have to click my textures and then back on textures to update the list correctly. I have to fix that.
- arrow keys to move
- pg up/down to change alteration rate for terrain in shape terrain mode. also, lmb to raise terrain, rmb to lower
- right click to cancel unit placement in unit placement mode
- spacebar to view debug and testing data

Edit: Removed download
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 11th Sep 2007 13:01
Quote: "The executable also runs at about half the framerate in the exe "


I think it has to do with how the interpreter/compiler is coded into the exe. I've been able to squeeze a bit more speed out of my exes by putting them in window mode instead of full screen.

Enjoy your day.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 11th Sep 2007 23:27
Quote: "I've been able to squeeze a bit more speed out of my exes by putting them in window mode instead of full screen."


Ok, thanks Latch. I also heard it runs better if you make the executable using an older version of DBC. Do you know if this is true or not?
black stone
17
Years of Service
User Offline
Joined: 17th Sep 2007
Location:
Posted: 17th Sep 2007 16:36
This looks great. Keep up the good work.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 24th Sep 2007 02:20
Bump

Would anyone be interested in this a map editor program like TDKs MatEdit one? Im pretty much finished with it now and so I could take out the object placement stuff and it would work for that. Its not as good as MatEdit but it might be easier to use for some people.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Sep 2007 03:32
Quote: "I also heard it runs better if you make the executable using an older version of DBC. Do you know if this is true or not?"


I don't really know - only ever used 1.12 and above (1.12 is just like 1.13 from what I can tell).

Quote: "Would anyone be interested in this a map editor program like TDKs MatEdit one? "


Does this mean you are no longer working on finishing the RTS engine?

Did you figure out any combat AI routines? How many units (including buildings and such) can you have at once before fps really start to get hit?

Enjoy your day.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 24th Sep 2007 04:30 Edited at: 24th Sep 2007 04:31
Quote: "Does this mean you are no longer working on finishing the RTS engine?"


No, but because the map editor really just saves the matrix data it wouldn't be a real challenge to change it around.

Quote: "Did you figure out any combat AI routines? How many units (including buildings and such) can you have at once before fps really start to get hit?"


I haven't really gotten the enemy AI routines but it drops pretty fast. Just with the player units and everything setup its only running about 45-50 fps. I think I can get it work at a consistant 30 though by the time I'm done with the AI. You get a maximum of 25-50 units per team though so it might get slow if you bunch them all into on area on the map.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Sep 2007 09:21
You mention underwaredesign (Kevin Picone) in the credits. I remember he had a demo to manage multiple 3d objects in an array - where they would be turned on or off and really save on rendering time the way he managed it. I can't remeber what it is but I thinks it's on the website. Could help to speed things up when multiple units are running around.

There are some sweet matrix to mesh functions in the codebase by Kelebrindae. Perhaps they would come in useful in speeding things up (using a mesh instead of a matrix). You create the mesh just as if you were creating a matrix. It has matrix command functions much like the original ones in DBC. Though you can also manipulate it just like an object with rotations, scaling, etc.

Enjoy your day.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 25th Sep 2007 02:11
Quote: "There are some sweet matrix to mesh functions in the codebase by Kelebrindae."


I've taken a look at those and I might implement them later if the framerate gets too low with a regular matrix or if I have the time.

Quote: "I remember he had a demo to manage multiple 3d objects in an array - where they would be turned on or off and really save on rendering time the way he managed it"


Thanks, I didn't see that before. I'll try and find it on their web page.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Sep 2007 10:14
Quote: " DO NOT USE THE NEW MAP BUTTON. There is a serious problem that crashes the program for reasons yet undiscovered."


What's the error log say?


luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 27th Sep 2007 04:49
I fixed that, but it still occurs in the download. I just got a window that said something like DarkBASIC has encountered a serious problem and must exit. I used an older version of the subroutine and just added what I had added since then and it worked fine so I never looked into it any further.
black stone
17
Years of Service
User Offline
Joined: 17th Sep 2007
Location:
Posted: 29th Sep 2007 21:05
I'm confused, are the maps overhead?
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Oct 2007 04:25
overhead, but slightly angled as with any RTS game to give that isometric look which helps provide more depth. Looking good mate.


Login to post a reply

Server time is: 2025-05-31 21:31:35
Your offset time is: 2025-05-31 21:31:35