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.

Program Announcements / Fool's Level Editor

Author
Message
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 29th Jun 2009 22:36 Edited at: 2nd Jul 2009 20:55
Ever since I started using Dark GDK I've been sick of having to go through my level and manually position objects such as health packs, enemies, ammo pick ups, etc. So I finally got around to making a program that will make this process a whole lot easier! I hope you find this tool just as useful as I do!

How this program works:
1. All commands in the program are done using what I call the command prompt, which can be accessed by clicking enter.
2. In the command prompt you can save your map, load a previous map, import a new model, or update the settings in the program if you edited the settings.txt file.
3. If you want to import a model you open the command prompt, then type "Import" then type the name of the model including the extension.
4. After the model loads you can click on the model and then move it around, rotate it, and delete it. To delete it click the delete button then type Yes or No in the prompt. To move it use WASD keys and to rotate it, right click the model then use WASD.
5. After you are satisfied with your map you can save it by typing in "Save" in the command prompt, and it will automatically save the code to "Map.txt".
6. Then simply copy and paste the code from "Map.txt" to the Visual C++ editor and you got a nice looking level!

To Come:
-Scaling models
-Other language support (DBPRO, DBC)

SOURCE RELEASED! CHECK POST 8


Use Google first... it's not rocket surgery!

Attachments

Login to view attachments
Softwizz
13
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 2nd Jul 2009 14:42
look forward to this ported to DBRO.
I tried out this version on winXP pro but it wouldnt start, got this error:
'this application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem'

Nothing to see here, move along please.
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 2nd Jul 2009 17:59
Hmm, I have Windows XP Pro too and it works lol. Well there are a couple other files that I'll include in the download (I didn't think they were necessary because it loaded fine without them on my computer) And I'll port it to DBPRO once I know the proper coding for it so any help on that is appreciated! Thanks!


Use Google first... it's not rocket surgery!
Diggsey
16
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Jul 2009 19:32
You need to compile in release mode

AndrewT
15
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 2nd Jul 2009 20:02
I don't think that exporting the map as DGDK code is a good idea, because then not only are your levels hard-coded into the game, but you have to recompile every time you want to add a level. That's not very convenient if you want your game to be moddable, because if the modders don't have access to the full source they won't be able to add levels.

I say you export the position of each object, light etc. as well as their properties to a text file, then to load the level you just read each position and set it up accordingly. This is much more useful because it can be loaded into any game engine and the level can be edited without having to recompile the game.

i like orange
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 2nd Jul 2009 20:03 Edited at: 2nd Jul 2009 20:08
I'm pretty sure I did, but after I know the syntax for DBPro I'll release it with the DBPro option.

@AndrewT I'll think about it but I wasn't really making it for modders just to make level editing easier... Actually the way I do the level loading into my editor uses that same concept. Here is what the level loading code looks like:

So if you really want to you can just use that code for loading from a text file to make modding easier and to not have to recompile each time. But, you will obviously have to make some changes such as variables, but assuming you would know a bit of Dark GDK it shouldn't be too hard.


Use Google first... it's not rocket surgery!
AndrewT
15
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 2nd Jul 2009 20:10
Quote: "@AndrewT I'll think about it but I wasn't really making it for modders just to make level editing easier"


I know, but if someone were to use your level editor for your game, then they would have to recompile their (potentially lengthy = long compile times) game code every single time they want to make a change to a level! Furthermore if they wanted to allow players to make their own levels or edit levels they wouldn't be able to, because they wouldn't have access to the source. And lastly with the way you have it set up now it's only usable with DGDK. If you made the change I suggested then it would be usable with any 3D game engine with the use of one LoadMap() function designed specifically for that engine.

i like orange
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 2nd Jul 2009 20:14 Edited at: 2nd Jul 2009 20:53
Ok, ok I see your point lol. I guess I never thought about the compile times because I never really notice it when compiling my games. Any way I posted the code I used to load a map into the editor from a text file (look below for the code again and a sample of the text file). I don't know DBPro or any other language for that matter so if someone would be so kind to change that to DBPro or something that would be appreciated!

Load Map Code (Use this to load your map directly from a text file):


This is a sample of a text file that was exported from the map editor and can be loaded using the above code (you can find this exported code in the MapSave.txt file after you save your map):



EDIT: I currently have the DBPro saving working but I just noticed a very stupid error I made... I forgot to put quotes around the filename of models. And I don't know how to save to the file with quotes. So for now I suggest using the above code and loading the map from the MapSave.txt file.

EDIT2: It seems that people would want to use this there own way so, I'm releasing the source So then you can edit how you want and make it very efficient for your own use.


Use Google first... it's not rocket surgery!

Attachments

Login to view attachments
Softwizz
13
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 3rd Jul 2009 18:46
Hey, thanks so much for giving out the source code, now to see if I can get it coded in DBPro.
Thanks again

Nothing to see here, move along please.
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 3rd Jul 2009 18:53
No problem In the source the DBPro should be coded but the only problem is, is that you can't write quotes to a text file. So, you would have to manually go through and add quotes to each dbLoadObject or Load Object commands. So I suggest just using the Load ( ) function in the source and put that into your game and then use the text file called MapSave.txt to load your levels.


Use Google first... it's not rocket surgery!
AndrewT
15
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 6th Jul 2009 18:06
Quote: "In the source the DBPro should be coded but the only problem is, is that you can't write quotes to a text file."


Yes you can!



i like orange
Brick Break
User Banned
Posted: 7th Jul 2009 01:33
I'm working hard to port the loader code to DBC. Once that's done, it should work with DBP as well. By the way, model scaling is essential. Why didn't you have that in the first place?

Permanoobs are awesome.
Dark Dragon
15
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 7th Jul 2009 03:30 Edited at: 7th Jul 2009 03:32
Whoa. If this gets to Dbc/DBpro, this is a must have for me.
Nice, dude!

@ Everyone else....
I got it to run fine......

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 7th Jul 2009 18:00 Edited at: 7th Jul 2009 18:04
@AndrewT - Thanks for the code! I'm personally just using the text file that has a long list of values and just using code to load it, instead of copying and pasting the Load Object code.

@Brick Break - I didn't have it because... well I'm not sure why but I did put it in my editor.

@Dark Dragon - Thanks! Although I think this will be more useful for Dark GDK/DBC now because of the Visual DBPro Editor that's being made

I attached the source again with scaling, and I put the code I'm using in my game to load the text file called "MapSave.txt" into my game.

Level Loading Code:


EDIT: I also added an extra option that asks what type of object the model you loaded is. 1 = Level Object (anything that you can't interact with), 2 = Enemy, and 3 will be lights but I have yet to put that in.


Use Google first... it's not rocket surgery!

Attachments

Login to view attachments
Brick Break
User Banned
Posted: 8th Jul 2009 03:33 Edited at: 13th Jul 2009 03:52
OK, I made the DarkBASIC version of the loader code, retaining as much of the original structure as possible. The only thing stopping it from working with DBPro is setupComplexObjectDBC(), so just change that to the DBP equivalent.


WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 8th Jul 2009 19:39
Thanks for the code translation! I'm sure that will help a lot of other people out .


Use Google first... it's not rocket surgery!
Brick Break
User Banned
Posted: 8th Jul 2009 20:36
@heyufool1- You're welcome! Only problem is- I tested it and I couldn't get it to work.

Permanoobs are awesome.
heyufool1
13
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 9th Jul 2009 03:01
oh... well what is the error when testing it?


Use Google first... it's not rocket surgery!
Brick Break
User Banned
Posted: 9th Jul 2009 05:02
@heyufool1- I don't know, it just doesn't seem to work. There are no errors (except for the Sparky's one of course), but it doesn't seem to load the level. It just gets stuck.

Permanoobs are awesome.
Brick Break
User Banned
Posted: 13th Jul 2009 03:51
I fixed it! The DBC level-loading code should work now.


WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!

Login to post a reply

Server time is: 2023-02-08 23:37:41
Your offset time is: 2023-02-08 23:37:41