@UFO:
Thanks for helping me with some stuff UFO but. I've posted 7 now. It keeps this thread alive. I will use edit from now this is the last and only post by me on this thread for updates everything else will be announced on the launch date. The forums are up but you have nothing to talk about! Until Game Developer comes around.
Heres more code:
`Version: 1.0
Remstart
###############################
#Begin Source Code #
###############################
Remend
`variables
imageid = 700
`Install if not run
if file exist("C:\Game Developer\install.txt") = 1 then readfile = 1
if file exist("C:\Game Developer\install.txt") = 0 then writefile = 1
`Write the file needed for the game developer to work
if writefile = 1
readfile = 0
make directory "C:\Game Developer"
make directory "C:\Game Developer\My Multimedia"
make directory "C:\Game Developer\My Games"
make directory "C:\Game Developer\Example Games"
set dir "C:\Game Developer"
open to write 1,"install.txt"
installdone = 1
write string 1,str$(installdone)
close file 1
writefile = 0
gosub startgd
endif
`Read if it exist
if readfile = 1
writefile = 0
if file exist("install.txt") = 1 then open to read 1,"install.txt":read string 1,installdone$
if file exist("install.txt") = 0 then writefile = 1:readfile = 0
if installdone$ = "1" then gosub startgd
else
readfile = 0
writefile = 1
endif
`Start Game Developer
startgd:
`Setup screen rate
syncrate = 40
sync on
sync rate syncrate
`Setup misc
disable escapekey
`Setup window to on
set window on
`Allow the regular window outlook
set window layout 1,1,1
`Position the window neatly
set window position 100,200
`Regular screen size
set window size 640,480
`Put in the title
set window title "Game Developer - Version: Alpha - By: Jonathan Skinner "
`Setup a welcome
set dir "C:\Dark Basic\myproj\Game Developer"
`Db
load image "media/logow.bmp",1
paste image 1,220,100
text 220,250,"Power of DarkBASIC Inside"
text 220,270,"http://www.thegamecreators.com/"
wait key
cls
`JG2d
load image "media/logoj.bmp",1
paste image 1,160,150
text 200,230,"Programmed By - Jonathan Skinner"
text 200,250,"Design By - Jonathan Skinner"
text 200,270,"Copyright(C) 2006 Jonathan Skinner"
wait key
cls
`New Project
New_proj = 1
if New_proj = 1
Set cursor 1,10
ink rgb(255,0,0),1
Print "Welcome to the Project Magician!"
Print "?: Games made in Game Developer are known as projects"
Print "Please input your desired project folder read below on how to open"
Print "Or else type openproj as the project folder name"
Print "And you can open to work on an active project"
Print "If you want to work on a project type none in all fields"
ink rgb(0,255,0),2
Input "Desired Project Folder Name: ";projectfolder$
endif
make directory "C:\Game Developer\My Games\"+projectfolder$
ink rgb(0,255,255),3
Input "Desired Project Name: ";projectname$
set dir "C:\Game Developer\My Games\"+projectfolder$
if file exist(projectname$+".gdp") = 1 then delete file projectname$+".gdp"
open to write 1,projectname$+".gdp"
write string 1,projectname$
write string 1,projectfolder$
close file 1
set dir "C:\Dark Basic\myproj\Game Developer"
Print "Created Project ";projectname$
Print "@ Project Folder ";projectfolder$
Print "Press Any Key!"
wait key
cls
`Main loop
do
`The Power Code
`Set the text color to white and give it the standard id 1
ink rgb(255,255,255),1
Remstart
#############Establish the engine & main loop
Remend
`Get rid of the old cursor
if cursorno = 1
if sprite exist(200) then hide sprite 200
sprite 60,mousex(),mousey(),100
cursorgo = 0
endif
`Clear Screen
cls
Remstart
#########Setup toolbar and buttons
Remend
`Paste the toolbar image on screen
load image "media/toolbar_image.bmp",1
paste image 1,1,8
`Make the file button
load image "media/file.bmp",2
sprite 1,3,13,2
`Make the add button
load image "media/add.bmp",3
sprite 2,33,13,3
`Make the editor button
load image "media/editor.bmp",4
sprite 3,63,13,4
`Make the game button
load image "media/game.bmp",5
sprite 4,93,13,5
`Make the help button
load image "media/help.bmp",6
sprite 5,123,13,6
`Make the view button
load image "media/view.bmp",60000
sprite 7,145,13,60000
Remstart
#########HUD
Remend
`Opaque
set text opaque
`Display the mouse x
text 1,35,"Mouse X: "+str$(mousex())
`Display the mouse y
text 110,35,"Mouse Y: "+str$(mousey())
`Load the mouse image
load image "media/mouse_image.bmp",200
`Put a mouse image on the screen
sprite 100,mousex(),mousey(),200
`Make the mouse hidden so we can see my mouse only
hide mouse
Remstart
#############Establish cursor code
Remend
`Load the cursor image hehe
load image "media/thingamabob.bmp",300
`If the mouse is on or below the grids allow it to work and
`traverse between mice
`Get rid of the old cursor
if cursorno = 1
cursorgo = 0
endif
if cursorno = 0 then cursorgo = 1
if mousey() > 55 and cursorgo = 1
sprite 200,mousex(),mousey(),300
if sprite exist(200) = 1 and mousey() > 55 then show sprite 200
hide sprite 100
else
if sprite exist(200) =1 and sprite exist(100) = 1 then hide sprite 200:show sprite 100
endif
Remstart
#############Establish the Grid!
Remend
`Load the universal "parent" image
load image "media/grid.bmp",400
`Setup the grid positioning
for posx = 1 to 640 step 27
paste image 400,posx,65
next posx
for posx2 = 1 to 640 step 27
paste image 400,posx2,92
next posx2
for posx3 = 1 to 640 step 27
paste image 400,posx3,119
next posx3
for posx4 = 1 to 640 step 27
paste image 400,posx4,146
next posx4
for posx5 = 1 to 640 step 27
paste image 400,posx5,173
next posx5
for posx6 = 1 to 640 step 27
paste image 400,posx6,200
next posx6
for posx7 = 1 to 640 step 27
paste image 400,posx7,227
next posx7
for posx8 = 1 to 640 step 27
paste image 400,posx8,254
next posx8
for posx9 = 1 to 640 step 27
paste image 400,posx9,281
next posx9
for posx10 = 1 to 640 step 27
paste image 400,posx10,308
next posx10
for posx11 = 1 to 640 step 27
paste image 400,posx11,335
next posx11
for posx12 = 1 to 640 step 27
paste image 400,posx12,362
next posx12
for posx13 = 1 to 640 step 27
paste image 400,posx13,389
next posx13
for posx14 = 1 to 640 step 27
paste image 400,posx14,416
next posx14
for posx15 = 1 to 640 step 27
paste image 400,posx15,443
next posx15
Remstart
############Establish the Editor Button
Remend
if sprite collision(3,100) = 1 and mouseclick() = 1 then editor = 1
if editor = 1
game = 0
other = 0
file_start = 0
add = 0
help = 0
view = 0
load image "media/editor2.bmp",500
paste image 500,33,50
wait key
editor = 0
endif
Remstart
###############Establish the Add button
Remend
`Mouseclicked the button?
if sprite collision(2,100) = 1 and mouseclick() = 1 then add =1:other = 0:game = 0:file_start = 0:editor = 0:help = 0
load image "media/adding.bmp",500
`Key shortcut
if inkey$() = "=" or inkey$() = "+" then add = 1
load image "media/adding.bmp",500
`The Add Button
if add = 1
game = 0
other = 0
file_start = 0
editor = 0
help = 0
view = 0
paste image 500,33,50
sprite 500,33,50,500
hide sprite 500
cursorno = 0
cursorgo = 1
load image "media/text.bmp",501
paste image 501,43,100
sprite 501,43,100,501
hide sprite 501
load image "media/image.bmp",502
paste image 502,43,150
sprite 502,43,150,502
hide sprite 502
load image "media/music.bmp",503
paste image 503,123,100
sprite 503,123,100,503
hide sprite 503
load image "media/level.bmp",504
paste image 504,123,150
sprite 504,123,150,504
hide sprite 504
load image "media/tile.bmp",505
paste image 505,43,200
sprite 505,43,200,505
hide sprite 505
load image "media/exit2.bmp",506
paste image 506,123,200
sprite 506,123,200,506
hide sprite 506
load image "media/sound.bmp",507
paste image 507,43,250
sprite 507,43,300,507
hide sprite 507
load image "media/health.bmp",508
paste image 508,123,250,508
sprite 508,123,250,508
hide sprite 508
load image "media/counter.bmp",509
paste image 509,203,100
sprite 509,203,100,509
hide sprite 509
load image "media/lives.bmp",510
paste image 510,203,150
sprite 510,203,150,510
hide sprite 510
load image "media/score.bmp",511
paste image 511,203,200
sprite 511,203,200,511
hide sprite 511
if mouseclick() = 1 and sprite collision(200,501) = 1 then text2 = 1:add = 0
if mouseclick() = 1 and sprite collision(200,502) = 1 then image = 1:add = 0
if mouseclick() = 1 and sprite collision(200,506) = 1 then add = 0
endif
`Text
if text2 = 1
textid = 1
textid = textid + 1
paste image 500,33,50
sprite 500,33,50,500
hide sprite 500
set cursor 48,80
ink rgb(255,0,0),1
Print "?: To change the color, font, size, etc. of your text use 'view'"
Input "Text Body: ";textbody$
if file exist("textbody"+str$(textid)+".ini") = 1 then delete file "textbody"+str$(textid)+".ini"
set dir "C:\Game Developer\My Games\"+projectfolder$
open to write 1,"textbody"+str$(textid)+".ini"
write string 1,str$(textid)
write string 1,textbody$
close file 1
set dir "C:\Dark Basic\myproj\Game Developer"
set cursor 48,100
Print "Text Id(Current): ";textid
Print "Okay, all done press any key"
wait key
text2 = 0
endif
`Image
if image = 1
imageid = imageid + 1
if imageid = 732 then imageid = 700
paste image 500,33,50
sprite 500,33,50,500
hide sprite 500
set cursor 48,80
ink rgb(255,0,0),2
set cursor 43,80
Print "?: Include the path name and extension."
set cursor 48,100
input "Image Name?: ";imagename$
Print "Current Image ID is: ";imageid
set cursor 48,140
Print "(Press Any Key) Okay, I'm done let me load my image!"
wait key
set dir "C:\Game Developer\My Games\"+projectfolder$
if file exist("imagedata"+str$(imageid)+".ini") = 1 then delete file "imagedata"+str$(imageid)+".ini"
open to write 1,"imagedata"+str$(imageid)+".ini"
write string 1,str$(imageid)
write string 1,imagename$
close file 1
set dir "C:\Dark Basic\myproj\Game Developer"
if file exist(imagename$) = 1 then loadit = 1
if loadit = 1 then load image imagename$,imageid
ink rgb(255,255,255),1
image = 0
endif
`####################Establish View Button
if sprite collision(7,100) = 1 and mouseclick() = 1 then view = 1
if view = 1
game = 0
other = 0
file_start = 0
add = 0
editor = 0
help = 0
load image "media/view2.bmp",500
paste image 500,33,50
sprite 500,33,50,500
hide sprite 500
cursorno = 0
cursorgo = 1
load image "media/texts.bmp",501
paste image 501,43,100
sprite 501,43,100,501
hide sprite 501
load image "media/image2.bmp",502
paste image 502,43,150
sprite 502,43,150,502
hide sprite 502
load image "media/musics.bmp",503
paste image 503,123,100
sprite 503,123,100,503
hide sprite 503
load image "media/levels.bmp",504
paste image 504,123,150
sprite 504,123,150,504
hide sprite 504
load image "media/tiles.bmp",505
paste image 505,43,200
sprite 505,43,200,505
hide sprite 505
load image "media/exit2.bmp",506
paste image 506,123,200
sprite 506,123,200,506
hide sprite 506
load image "media/snds.bmp",507
paste image 507,43,250
sprite 507,43,300,507
hide sprite 507
if sprite collision(200,506) = 1 and mouseclick() = 1 then view = 0
if sprite collision(200,502) = 1 and mouseclick() = 1 then imageview = 1:view = 0
if sprite collision(200,501) = 1 and mouseclick() = 1 then textview = 1:view = 0
endif
`Imageviewing and pasting
if imageview = 1
imageview1 = 1
if imageview1 = 1
imageview = 0
set cursor 1,10
cls
for a = 1 to 3000
if sprite exist(a) = 1 then delete sprite a
next a
set cursor 1,10
Print "?: Images Range From 701 - 732. Most start at 701."
Input "Image Id: ";imageid2
imageview1 = 0
imageview2 = 1
endif
if imageview2 = 1
set dir "C:\Game Developer\My Games\"+projectfolder$
if file exist("imagedata"+str$(imageid2)+".ini") then readit3 = 1
if readit3 = 1
open to read 1,"imagedata"+str$(imageid2)+".ini"
read string 1,imageid$
read string 1,path$
close file 1
readit3 = 0
endif
set dir "C:\Dark Basic\myproj\Game Developer"
imageid3 = val(imageid$)
paste image imageid3,1,10
cls
for a = 1 to 3000
if sprite exist(a) = 1 then delete sprite a
next a
paste image imageid3,1,10
text 1,200,"Image ID - "+str$(imageid3)
text 1,300,"Image Name - "+imagename$
text 1,400,"Press Any Key To Paste Image"
wait key
imagetag = 1
endif
endif
`Paste the image:
if imagetag = 1 then sprite 600,mousex(),mousey(),imageid3
if imagetag = 1 and mouseclick() = 1 then paste image imageid3,mousex(),mousey()
if imagetag = 1 and mouseclick() = 2 then imagetag = 0
Remstart
###############Establish Game Button
Remend
`Game
if sprite collision(4,100) = 1 and mouseclick() = 1 then game = 1
if game = 1
view = 0
other = 0
help = 0
file_start = 0
editor = 0
add = 0
load image "media/game2.bmp",600
paste image 600,33,50
sprite 600,33,50,500
hide sprite 600
load image "media/configurate.bmp",601
paste image 601,43,100
sprite 601,43,100,601
hide sprite 601
endif
`help
if sprite collision(5,100) = 1 and mouseclick() = 1 then help = 1:other = 0:game = 0:add = 0:editor = 0:file_start = 0
if help = 1
cls
for a = 1 to 1000
if sprite exist(a) = 1 then delete sprite a
next a
set cursor 1,10
Print "Game Developer Manual - By: Jonathan Skinner"
ink rgb(0,255,0),1
Print
Print "These are the troubleshooting or MISC sections"
Print "C>redits and Special Thanks"
Print "G>lossary"
Print "F>ixing Errors"
Print
ink rgb(255,255,0),1
Print "Below are the tutorial sections"
Print "1>Introduction"
Print "2>Chapter 1 - The Basics of the Editor"
Print "3>Chapter 2 - GD - Pong"
Print "4>Chapter 3 - GD - BreakOut!"
Print "5>Chapter 5 - GD Invaders"
Print "6>Chapter 6 - GD Man"
Print "7>Chapter 7 - GD Dash"
Print "8>Chapter 8 - A Basic RPG"
Print "9>Chapter 9 - Duper Lario Bros"
Print "10>Chapter 10 - The Quiz"
Print
Print "<space> Back to Editor"
if spacekey() = 1 then help = 0
if inkey$() = "C" or inkey$() = "c" then credits = 1:help = 0
endif
if credits = 1
cls
for a = 1 to 1000
if sprite exist(a) = 1 then delete sprite a
next a
set cursor 1,10
ink rgb(192,192,192),1
Print "JonoGame 2d - Manual - Section 1: About"
Print "JonoGame 2d was originally created as a science fair project."
endif
`file
if sprite collision(1,100) = 1 and mouseclick() = 1 then file_start = 1:other = 0:game = 0:add = 0:editor = 0:help = 0
sync
loop
Peace
Jon
Ran out of unwitty remarks and puns
Official Site: http://gamedeveloper1.tripod.com Official Forum: http://www.topfreeforum.com/forum/gamedeveloper.html