I have been currently using gamespace for making my models. Boy do I love that program. Anyways, I was working on a third person space combat game, and wanted some fullscreen renders of my game. Soon did I find out, you cant do that with gamespace, I never needed too. So I made this little virtual camera thing.
rem start it up
sync on
sync rate 60
draw to front
rem binding commands
open to read 1,"bindingcommands.txt"
if file open(1)=1
while file end(1)=0
read string 1,command$
print command$
inc lines
if lines>30 then cls : lines=0
endwhile
endif
rem some of the variables
ssfilename$="xrenderpic.bmp"
rox#=rox#
roy#=roy#
roz#=roz#
rem find out the object filename
input "object filename>";object$
rem find out the background texture filename
input "background texture filename>";bgtex$
rem find out the object texture filename
input "object texture filename>";objtex$
if object$="" then ld=0 else ld=1
if ld=1
if file exist(object$) then objex=1 else objex=2
if objex=1
load object object$,1
endif
if objex=2
ld=0
endif
endif
if ld=0
if objex=2 then print "File not Found..."
if returnkey()= 1 then cls
endif
rem make simples
if object$="sphere"
input "radius>";radius#
objex=1
make object sphere 1,radius#
endif
if object$="cube"
input "size>";size#
objex=1
make object cube 1,size#
endif
if object$="plain"
input "width>";width#
input "height>";height#
objex=1
make object plain 1,width#,height#
endif
if object$="cylinder"
input "size>";size#
objex=1
make object cylinder 1,size#
endif
if object$="cone"
input "size>";size#
objex=1
make object cone 1,size#
endif
rem bind commands
`ghost object
if command$="<change/object=ghost>" and objex=1 then ghost object on 1
`change object to wireframe
if command$="<change/object=wireframe>" and objex=1 then ghost object on 1
`color object
if command$="<color/object>" and objex=1
input "red value>";r#
input "green value>";g#
input "blue value>";b#
color object 1,rgb(r#,g#,b#)
endif
`color backdrop
if command$="<color/backdrop>" and objex=1
input "red value>";r#
input "green value>";g#
input "blue value>";b#
color backdrop rgb(r#,g#,b#)
endif
`change screenshot filename
if command$="<change/screenshot filename>" and objex=1
input "new filename>";ssfilename$
endif
`scale object
if command$="<scale object>" and objex=1
input "x value>";x#
input "y value>";y#
input "z value>";z#
scale object 1,x#,y#,z#
endif
`matrix
if command$="<create matrix>"
input "width>";width#
input "height>";height#
input "x segmented>";xseg#
input "z segmented>";zseg#
make matrix 1,width#,height#,xseg#,zseg#
endif
rem texture the object
if objtex$="" then ld=0 else ld=1
if ld=1
if file exist(objtex$) then ex=1 else ex=2
if ex=1
load image objtex$,1
texture object 1,1
endif
if ex=2
ld=0
endif
endif
if ld=0
if ex=2 then print "File not Found..."
if returnkey()= 1 then cls
endif
if objtex$="black" then color object 1,rgb(0,0,0)
if objtex$="white" then color object 1,rgb(255,255,255)
if objtex$="blue" then color object 1,rgb(0,0,255)
if objtex$="green" then color object 1,rgb(0,255,0)
if objtex$="red" then color object 1,rgb(255,0,0)
rem texture the background
if bgtex$="" then ld=0 else ld=1
if ld=1
if file exist(bgtex$) then ex=1 else ex=2
if ex=1
load image bgtex$,1
texture backdrop 1
endif
if ex=2
ld=0
endif
endif
if ld=0
if ex=2 then print "File not Found..."
if returnkey()= 1 then cls
color backdrop rgb(0,0,0)
wait 1000
endif
if bgtex$="black" then color backdrop rgb(0,0,0)
if bgtex$="white" then color backdrop rgb(255,255,255)
if bgtex$="blue" then color backdrop rgb(0,0,255)
if bgtex$="green" then color backdrop rgb(0,255,0)
if bgtex$="red" then color backdrop rgb(255,0,0)
rem start main loop
do
rem make a movable camera
if mouseclick()=1
cya#=wrapvalue(cya#+(mousemovex()/3.0))
cxa#=cxa#+(mousemovey()/3.0)
cx#=newxvalue(x#,cya#,sin(cxa#)*10)
cz#=newzvalue(z#,cya#,sin(cxa#)*10)
rotate object 1,wrapvalue(cxa#),cya#,0
endif
rem movable object
if upkey()=1 then objz#=objz#+.5
if downkey()=1 then objz#=objz#-.5
if rightkey()=1 then objx#=objx#+.5
if leftkey()=1 then objx#=objx#-.5
position object 1,objx#,0,objz#
rem zoom
if inkey$()="=" then move camera 0.5
if inkey$()="-" then move camera -0.5
rem render the scene
if returnkey()=1 then hide mouse:save bitmap ssfilename$:wait 1000:show mouse
rem sync
sync
rem end loop
loop
rem delete object
delete object 1
rem end the program
end
I kinda tested it as I went along so its probably got a ton of bugs. You all know testing your games and stuff as you go along isnt the best way to go.
Anyway, I always wanted to make my own programming language, so I sortof intergrated one into the viewer thing. You can probably tell what the commands are, just by looking through the code, I dont have time
It does'nt matter what side of the road you drive on, you'll still crash...