so after a few hour of coding my new level editor designed mainly so I could use it easily is pretty much done. its for dbpro but you could probably get it to work in dbc fairly easily. what you do is you make your level and when you're done, you press enter and the db code gets coppied to the clipboard. then just paste it into your program. you could also modify it to output other code. this is just an early release. i dont have a downloadable version yet but heres the code if you want to compile it. this is the first version so it has limited features.
theres still 1 known bug which stops you from increasing an objects x scale. if someone knows whats wrong please tell me.
and if you're having trouble, feel free to post your question.
thanks to all the people who helped me with my problems coding.
so here it is:
Rem Project: ez level
`www.dougsworld.tk
set camera range 0.1,10000000
sync on:sync rate 60 :autocam off
trol=0
x=0
y=0
z=0
sx=100
sy=100
sz=100
type scale
x as float
y as float
z as float
endtype
dim sc(30000) as scale
dim key(256)
sync
INPUT "start object?",object
input "scale/movement interval?",inter
make object box object,inter,inter,inter
position camera 0,0,-20
do
`-
if (keyready(74)=1 or keyready(12)=1) and object>1
object=object-1
x = object position x(object)
y = object position y(object)
z = object position z(object)
sx= sc(object).x
sy= sc(object).y
sz= sc(object).z
endif
`+
if (keyready(78)=1 or keyready(13)=1)
object=object+1
if object exist(object)=1
x = object position x(object)
y = object position y(object)
z = object position z(object)
sx= sc(object).x
sy= sc(object).y
sz= sc(object).z
endif
if object exist(object)=0
make object cube object,10
x=0
y=0
z=0
sx=100
sy=100
sz=100
endif
endif
`enter
if (keyready(156)=1 or keyready(28)=1)
tex$=""
for a=1 to 30000
if object exist(a)=1
tex$=tex$+"make object box "+str$(a)+","+str$(int(object size x(a)+.5))+","+str$(int(object size y(a)+.5))+","+str$(int(object size z(a)+.3))+chr$(13)+chr$(10)
tex$=tex$+"position object "+str$(a)+","+str$(object position x(a))+","+str$(object position y(a))+","+str$(object position z(a))+chr$(13)+chr$(10)
endif
next a
write to clipboard tex$
endif
if keystate(2)=1 then trol=0
if keystate(3)=1 then trol=1
if keystate(23)=1 then inter=gettext("interval?")
`scale
if keystate(45)=1 and keystate(31)=1
if trol=0 then sx=gettext("X scale?")
if trol=1
if keyready(200)=1 then sx=sx+inter
if keyready(208)=1 then sx=sx-inter
endif
endif
if keystate(21)=1 and keystate(31)=1
if trol=0 then sy=gettext("Y scale?")
if trol=1
if keyready(200)=1 then sy=sy+inter
if keyready(208)=1 then sy=sy-inter
endif
endif
if keystate(44)=1 and keystate(31)=1
if trol=0 then sz=gettext("Z scale?")
if trol=1
if keyready(200)=1 then sz=sz+inter
if keyready(208)=1 then sz=sz-inter
endif
endif
`move
if keystate(45)=1
if trol=0 then x=gettext("X position?")
if trol=1
if keyready(200)=1 then x=x+inter
if keyready(208)=1 then x=x-inter
endif
endif
if keystate(21)=1
if trol=0 then y=gettext("Y position?")
if trol=1
if keyready(200)=1 then y=y+inter
if keyready(208)=1 then y=y-inter
endif
endif
if keystate(44)=1
if trol=0 then z=gettext("Z position?")
if trol=1
if keyready(200)=1 then z=z+inter
if keyready(208)=1 then z=z-inter
endif
endif
position object object,x,y,z
scale object object,sx,sy,sz
sc(object).x=sx
sc(object).y=sy
sc(object).z=sz
text 1,screen height()-20,"F1 for controls"
text 100,1,"fps "+str$(screen fps())
text 200,1,"object "+str$(object)
if keystate(59)=1 then controls()
set cursor 100,100
MouseControl(1)
sync
loop
function MouseControl(Speed as float)
xrotate camera camera angle x()+mousemovey()
if camera angle x()>90 then xrotate camera camera angle x()-10
if camera angle x()<-90 then xrotate camera camera angle x()+10
yrotate camera camera angle y()+mousemovex()
if mouseclick()=1 then move camera Speed
if mouseclick()=2 then move camera (0-Speed)
endfunction
function keyready(keyz)
vl=0
if keystate(keyz)=1 and key(keyz) = 0
key(keyz) = 1
vl=1
endif
if keystate(keyz)=0
key(keyz) = 0
vl = 0
endif
endfunction vl
function controls()
text 1,1,"controls:"
text 1,20,"+ next object"
text 1,40,"- previous object"
text 1,60,"enter/return write to clipboard"
text 1,80,"x x move object"
text 1,100,"y y move object"
text 1,120,"z z move object"
text 1,140,"s and x x scale object"
text 1,160,"s and y y scale object"
text 1,180,"s and z z scale object"
text 1,200,"1 control object by typing"
text 1,220,"2 control object by up/down arrows"
text 1,240,"i change interval"
text 1,260,"escape quit"
text 1,280,"camera control:"
text 1,300,"mouse rotate"
text 1,320,"mouse buttons move forward/back"
text 1,340,"note: in mode 2, hold down the x,y,z,s keys to move/scale"
endfunction
function gettext(message$)
CLEAR ENTRY BUFFER
repeat
a$=" "
set cursor 100,100
var$=var$+entry$()
CLEAR ENTRY BUFFER
print message$+" "+var$+"_"
if keyready(14)=1 then var$=" "
sync
until returnkey()
var=val(var$)
endfunction var