Posted: 18th Jun 2007 13:42
Hi guys, i'm trying to create a level editor similar to CryEngine's Sandbox editor and need some help with making certain features, plus any general level editor stuff. This could be like a community project or something, though it all needs to be made with DarkBasic Pro only.

CryEngine 2 Sandbox editor:


Now we have an idea what the editor will look like, what should I start doing first?
Posted: 18th Jun 2007 13:55
learn to code
Posted: 18th Jun 2007 13:57
First of all you need a gui plug-in like a blueGUI or this free one
http://forum.thegamecreators.com/?m=forum_view&t=97660&b=8

Then you need to create the gui and link the buttons to extensive usage of rotate, position and load object commands. All in all I'd say it will take you at least 2 weeks making it from scratch.
Posted: 18th Jun 2007 14:10
Sasuke - You are at it again, aren't you? XLNT

Of course there are the various elements, their types, and then there are the positions and orientations. All of the scene elements apply, such as lighting and so then shaders.

I can't run any pixel shaders, and only a few vertex shaders, so my experience with shaders is extremely thin.

I'll save Ric the trouble and eternal shame of having to plug GUIStudio himself, it is just the ticket if you want a sexy GUI that doesn't take all of your time to program.
http://www.andromedus.com/
Posted: 18th Jun 2007 14:29
@indi, i'm kind of new to making editors and need help and theres others out there that would like too learn too.

@Vampiric, thats will come in handy, cheers.

Lets start at the beginning, working with windows. This editor need to be in a window that can be resized without scretching or distorting andthing inside the window. I put together bits of code found on the forums to make a render window:
+ Code Snippet
sync on
sync rate 60

set window on
set window title "Level Editor"
set display mode 800,600,32

load dll "user32.dll",1
hwnd = call dll(1,"GetActiveWindow")
make memblock 1,16

global wid#=640.0
global hei#=480.0
global wid
global hei
wid=wid# : hei=hei#
defaspect#=wid#/hei#

set display mode wid,hei,32

make object cube 1,10
move camera -5.0
fov#=65.0

do
    retval=call dll(1,"GetWindowRect",hwnd,get memblock ptr(1))
    posx = memblock word(1,0): posy = memblock word(1,4)
    x2 = memblock word(1,8): y2 = memblock word(1,12)
    If posy > 3000 Then posy = posy - 65536
    If posx > 3000 Then posx = posx - 65536
    sizex = x2 - posx: sizey = y2 - posy

    roll object left 1,1
    pitch object down 1,0.3
    turn object right 1,0.6

    rat#=(sizex*wid#)/(sizey*hei#*defaspect#)
    fov#=164.0-(rat#*100.0)

    if fov#<65.0 then fov#=65.0
    if fov#>164.0 then fov#=164.0

    set camera aspect rat#
    set camera fov fov#
    text 0,0,"Aspect:"+str$(rat#)
    text 0,20,"FOV:"+str$(fov#)

    sync
loop


Would this be usful for a render window?
Posted: 18th Jun 2007 14:41
Hey jinzai, are you keeping track of me. GUIStudio looks great, but i'm out of cash, but may look into it in the future.
Posted: 18th Jun 2007 16:17
How would you go about making a gui system without using dll's. Could it not be done in DBP? Also, the pic is of my very early version of the editor.

Posted: 18th Jun 2007 16:53
I started making this gui system in only dark basic pro- but the latest version on my site now uses Cloggy's dll v3.

Here is
my gui.

Why does it need to be Dark Basic Pro only? Cloggy's dll is free, so why not use it?

Anyway, yes it is possible to make a user interface without dll's. I never made a menu or tool bar- but what I made still shows it is possible.
Posted: 18th Jun 2007 17:07
Daemon, thats a great gui system you've got there and I should of said DBP and anything that free only. Just checking out Cloggy's dll now. Cheers
Posted: 18th Jun 2007 20:16
Sasuke,

I started a level editor many moons ago, but switched over to 3DWS and WORLD. If you want to take what I built so far and run with it, I'd be more than happy to send you the whole source code.

Attached is a working demo of OmenEdit (ok, so I'm not so great on original names)...
Posted: 18th Jun 2007 20:34
Omen, That pretty cool, but I would like to learn the ins and outs from beginning to end if you know what I mean, but thank you for the offer.
Posted: 18th Jun 2007 20:41
Well first thing and probaly the most important keep the code modular and seperate or youll end up spending your friday night rewriting alot of code,lol don't make the same mistake I did. Oh yea make sure you know exactly what features you want in the editor so you design the gui accordingly. Im currently in the process of fixing this mistake but at least the gamescape code is modular so it won't be that bad. If you ever need help with anything let me know as im also working on a level editor in the wip forums gamescape 3d. Good Luck!
Posted: 18th Jun 2007 21:42
This post raised a smile since I've been involved with developing the Sandbox editor since 2000.

Not to discourage you - Sandbox has taken some very smart people many years (and a *lot* of money) to get where it is now, and still isn't finished. But it started as an automatic heightmap creator (called TED - Terrain EDitor) that needed 100Mb of ram and half an hour to generate anything, and grew from there. It's all about modularity as the ARRAYinator says.

So feel free to look at it and draw inspiration - we based the layout on 3ds Max for instance.

Tony Davis
Lead Level Designer
Crytek


Btw there's a lot of functionality in the CryEngine 1 editor still - I use it as a terrain editor in my DB Pro projects.
Posted: 18th Jun 2007 22:21
@wilf, Thank you and the team for producing one of the best editors around and thanks for the advice (that goes to you aslo ARRAYinator). My first editor was made for snapping objects to a grid to make simple levels. I'm basing the new on yours because I like that you've taken the programming side out and let the artists create without going through tons of code, plus being able to drop in the game and play is a great idea.
Posted: 18th Jun 2007 22:28
Wow its amazing what kind of people are on these forums. I look up to you man I can only hope my editor can come out 1/1000 of that and even thats asking for much. Have you ever posted any of your dbpro projects on the forums here Wilf? Cause id love to see them! Anyways Nice to see that you use dbpro Wilf(adds to list of people in profesional game development that use dbpro list,lol) and good luck to everyone on all there projects!

BTW It does look alot like max.
Posted: 20th Jun 2007 12:51
I've been working on the gui system and this is what it looks like:


I can so far change every color and style of the interface just by going into my prefrences menu and sliding color bars around or loading images. I'm going for a windows feel and looking at the pic the default editor color set is the top one. Now the question, what should be taken into account when working with gui's, like working with lots of sprites, positioning everything, memory usage and anything else to do with gui's. Thanks to anyone that will help.
Posted: 20th Jun 2007 14:33
WOW! The lead level designer from Crytek...... My jaw is still dragging along the floor from the videos of Crysis 2/Cryengine 2.

E.D.
Posted: 20th Jun 2007 15:01
I feel the same way Eldest Dragon, I wasn't sure how to reply and didn't expect the lead level designer of Crytek using DBP.

If anyone else has any level editor related questions please post them.
Posted: 20th Jun 2007 18:53
Wow Susuke pretty impressive GUI you ve got there! It looks like your pretty serious about this project. are you planning on this to be an outdoor or indoor editor? Anyways I wish you the best of luck on this project and if you need any help let me know!
Posted: 20th Jun 2007 21:20
Cheers ARRAYinator, it's going to be a editor based on the CryEngine Sandbox editor witch is indoor and outdoor. Gui still needs tweaking to work with the render window though. Added a new style, a kind of Mac black interface just because it looks sleek.



This is all made with DBP if anyone was wondering.