better? lol.
`Project by Dark Games
`Started: August 14, 2005 9:15pm
`Setup
`Our standard font will be right here:D
SET TEXT FONT AlphaMaleModern
` when I new object is created, we dont want to go to that object:)
autocam off
` Menu, Menu on the wall, stop this escape key from going a-wal.
DISABLE ESCAPEKEY
`types are below
`below is sitrep report:) By IBOL. Thanks.
TYPE REPORTS
A AS STRING
B AS STRING
Q
Pic
ENDTYPE
`set globals
`Start Turn is 0. Boo
global turn# = 0
`YEAR.
global year# = 2840
`year that ends the game
global end_year# = 7050
`races
global race$ = 0
`DIMS
dim r(NUMPLAY,200) as REPORTS
` Q will store the STAR NUMBER for any "goto star of report" function, and Pic will associate a picture.
` NumPlay is the number of players in the game. 200 is an arbitrary limit on the number of reports you can get in 1 turn
`Tie ins
` load the loading image
load image "Images/Misc/Loading.jpg",600,1
` load the fps background image
load image "Images/Misc/a_FPS.jpg",601,1
`load my 1337 toon
load music "Music/Main_Intro.wav",1
` loops the music. I might make a random track thing later
loop music 1
` plays a retro version of main tune
load music "Music/Main_Amp.wav",2
`make sure black is destroyed
SET IMAGE COLORKEY 0, 0, 0
`load the gui left bar
load image "Images/Misc/gui2.jpg",2837
`make sure black is destroyed
SET IMAGE COLORKEY 0, 0, 0
`load the gui bottom bar
load image "Images/Misc/bottom.jpg",2839
`RACE FLAGS
`Nyss Flag
load image "Images/Races/Nys/Portrait/Flag.jpg",90000,1
`Human Flag
load image "Images/Races/Humans/Portrait/Flag.jpg",90003,1
`EVENTS
`Fleet Formed, or ships arrived
load image "Images/Events/fleet formed.jpg",654,1
`Other
`menu Item 1
load image "Images/Misc/a_End.jpg",2095,1
`Mwnu Item 2
load image "Images/Misc/p_End.jpg",2096,1
`grid for the MATRIX
load image "Images/Misc/grid.jpg",1,1
`Star Backdrop
load image "Images/Steller/stars.jpg",2,1
` goto the magical menu
goto menu
menu:
a=1
cls
na=1
if bitmap exist(0) <=1
load bitmap "Images/Intro/Logo.jpg",0
endif
set current bitmap 0
do
ink rgb(0,0,0),0
if mousex()>=180 and mousex()<=250 and mousey()>=275 and mousey()<=275+text height("New Game")
ink rgb(500,500,500),1
endif
text 180,275,"New Game"
if mousex()>=180 and mousex()<=250 and mousey()>=275 and mousey()<=275+text height("New Game")
ink rgb(500,500,500),1
if mouseclick()=1
gosub game
endif
else
ink rgb(500,500,500),1
endif
ink rgb(0,0,0),0
if mousex()>=325 and mousex()<=375 and mousey()>=275 and mousey()<=275+text height("Options")
ink rgb(500,500,500),1
endif
text 325,275,"Options"
if mousex()>=325 and mousex()<=375 and mousey()>=275 and mousey()<=275+text height("Options")
ink rgb(500,500,500),1
if mouseclick()=1
gosub options
endif
else
endif
ink rgb(0,0,0),0
if mousex()>=450 and mousex()<=475 and mousey()>=275 and mousey()<=275+text height("Quit")
ink rgb(500,500,500),1
endif
text 450,275,"Quit"
if mousex()>=450 and mousex()<=475 and mousey()>=275 and mousey()<=275+text height("Quit")
ink rgb(500,500,500),1
if mouseclick()=1
end
endif
else
ink rgb(500,500,500),1
endif
loop
options:
cls
if bitmap exist(0) <=1
load bitmap "Images/Intro/Logo.jpg",0
endif
set current bitmap 0
ink rgb(255,255,255),1
print "game options:";
print " controls";
print " credits" : a=2
return
game:
` clear the screen of crummyness
cls
` paste the loading image
paste image 600,0,0
` stops the music during load
stop music 1
` play the retro music
play music 2
` wait for the image to say "loading"
wait 1900
` delete the loading image
delete image 600
` stops the loading music
stop music 2
` loops the music. I might make a random track thing later
loop music 1
` load the mighty terran battleship
if object exist(1) <= 1
load object "Models/Ships/Terran/Battleship/Battleship.x",1
endif
` make the battleship longer a bit
scale object 1, 15,12.5,12.5
` load the standard Terran Ship Hull Image
if image exist(999) <= 1
load image "Models/Ships/Terran/Battleship/Hull007.jpg",999,1
endif
` texture the object using the Hull Image(Will create a better image later)
texture object 1,999
` make the backdrop appear
backdrop on
` color it black
color backdrop 0
`the default image for "End Turn"
imagevar=2095
`Make sure the light is very strange.
set ambient light 100
`Image Pasteinh
SET IMAGE COLORKEY 0, 0, 0
`Make the Grid
if matrix exist(1) <= 1
make matrix 1,200,200,10,10
endif
`Make the Stars
if matrix exist(2) <= 1
make matrix 2,1000,1000,50,50
endif
`Make the grid in the right position
position matrix 1,-15,0,-50
position matrix 2,-300,30,-90
`Make the camera 3d Positioned
position camera 100,70,100
`Rotate the camera so the map is viewable
rotate camera 60,180,0
`Make the grid ghosted
GHOST MATRIX ON 1
`Texture matrix one with the grid
PREPARE MATRIX TEXTURE 1, 1, 1, 1
`Stars STARSSSS
PREPARE MATRIX TEXTURE 2, 2, 1, 1
`The turn has not ended.
Turn_end# = 0
`start de loopy
do
`Paste one grid part(Left)
paste image 2839,0,500,1
`Paste one grid part(Bottom)
paste image 2837,0,0,1
`Make you NYSS
if inkey$()="1"
race=2
imagerace=90000
endif
`Make you HUMAN
if inkey$()="2"
race=1
imagerace=90003
endif
`Print and paste the race info
Set Cursor 550,0
if race = 1 Or race = 2
paste image imagerace,4,5
endif
` Race 2 is The Nys. I will make a race image thing, but this is the main race:).
if race=2
text 350,30,"The Nyss Alruc shall perish by the hands of the Humans"
text 26,5,"Nyss"
endif
` Humans. Love em. Hate em. Cool.
if race=1
text 350,30,"The Humans will not survive this war!"
text 26,5,"Humans"
endif
`What does image var =?
imagevar=2095
`mouse over
if mousex()>=4 and mousex()<=98 and mousey()>=55 and mousey()<=77
imagevar=2096
endif
`print wtc the end turn button is.
paste image imagevar,4,55
`End Turn Var. Love me.
if mousex()>=4 and mousex()<=98 and mousey()>=55 and mousey()<=77
`equals mouse over
imagevar=2096
`what is the click motion
if mouseclick()=1 AND year# <= end_year# AND Turn_end# = 0
`turn equals the turn + one
turn# = turn# + 1
`Year is another year
year# = year# + 1
`the turn is ended!!!
Turn_end# = 1
`go sub to the sitrep place
gosub sitrep
endif
else
endif
` End turn Thingy.
`Make the Timer go up
IF Turn-end#=1 THEN INC Time#,.50
`Make it reload..doesnt work some reasonL:(
IF Time#>=1 THEN Time#=0:Reload#=0
`Camera movement
`Down
if inkey$()="=" and camera position y()>=21
move camera 1
endif
`Up
if inkey$()="-" and camera position y()<=102
move camera -1
endif
`Pause? Duuuh.
if escapekey()=1
`DO TEH LOOPY
do
`cool. Quiter!
ink rgb(128,182,225),0
if mousex()>=180 and mousex()<=250 and mousey()>=275 and mousey()<=275+text height("Quit")
ink rgb(500,500,500),1
endif
text 180,275,"Quit"
if mousex()>=180 and mousex()<=250 and mousey()>=275 and mousey()<=275+text height("Quit")
ink rgb(500,500,500),1
if mouseclick()=1
end
endif
else
ink rgb(500,500,500),1
endif
`Continue...
ink rgb(128,182,225),0
if mousex()>=325 and mousex()<=375 and mousey()>=275 and mousey()<=275+text height("Continue")
ink rgb(500,500,500),1
endif
text 325,275,"Continue"
if mousex()>=325 and mousex()<=375 and mousey()>=275 and mousey()<=275+text height("Continue")
ink rgb(500,500,500),1
if mouseclick()=1
exit
endif
else
endif
`Menu (go back young one)
ink rgb(128,182,225),0
if mousex()>=450 and mousex()<=475 and mousey()>=275 and mousey()<=275+text height("Menu")
ink rgb(500,500,500),1
endif
text 450,275,"Menu"
if mousex()>=450 and mousex()<=475 and mousey()>=275 and mousey()<=275+text height("Menu")
ink rgb(500,500,500),1
if mouseclick()=1
return
endif
else
ink rgb(500,500,500),1
endif
`end
loop
endif
`fps counter...
if inkey$()="f"
paste image 601,200,0
SET CURSOR 250,0
print "FPS"
SET CURSOR 250,10
print Screen FPS()
endif
`print the year
SET CURSOR 350,0
print year#
`print the turn
SET CURSOR 350,10
print turn#
`end teh loop
loop
sitrep:
A$="Our forces encountered the Blahs in 35"
B$ = "Joking"
do
SET CURSOR 50,0
print year#
SET CURSOR 150,0
print turn#
Make_Report(1,A$,B$,35,654)
ink rgb(128,182,225),0
if mousex()>=180 and mousex()<=250 and mousey()>=275 and mousey()<=275+text height("Go Back")
ink rgb(500,500,500),1
endif
text 180,275,"Go Back"
if mousex()>=180 and mousex()<=250 and mousey()>=275 and mousey()<=275+text height("Go Back")
ink rgb(500,500,500),1
if mouseclick()=1
return
endif
else
ink rgb(500,500,500),1
endif
loop
Function Make_Report(p,a$,b$,Q,Pic)
` The ZEROth (0th) element of each player's array stores what # of report they are up to this turn.
inc r(p,0).q
` that's why every time time this function is called, r(p,0).q is INC'd.
` so in the function to read them, you count from 1 to r(p,0).q to get all the reposrts
` that exist this turn, and none that are blank.
n=r(p,0).q
if n<101
r(p,n).a=a$
r(p,n).b=b$
r(p,n).q=Q
r(p,n).Pic=Pic
endif
EndFunction
` end sitrep
all of it works exept when I press esc and I try to go to the menu, and I havent tested options yet, and Sitrep doesnt list the report