Title Page
BlitzPlus Forums/BlitzPlus Programming/Title Page
| ||
I'm working in BlitzPlus. I found out how daunting it could be to simple create a title page using an image that I made. I spent most of christmas trying to work that out. Anyway, I was trying to make it so that the title page shows first, but when the "s" key is pressed, it disappears and doesn't come back. Also I was trying to make it so that the BACKGROUND,HENRY, and DOOR be in the first scene after the "s" button is pressed (when I was working with it, in some cases it didn't show the scene). I wrote notes in the code to pinpoint what and where I need help, so that it could be easier to find. Thanks again Graphics 1600,1000 ;************************************************************888 ;Load Visual Images TITLESCREEN = LoadImage ("Title Screen.png") HENRY = LoadAnimImage ("Move2.PNG",400,370,0,13) DOOR = LoadImage("BarberDoor.png") BACKGROUND = LoadImage ("Store[1].jpg") BACKGROUND2 = LoadImage ("Barber Shop.jpg") ;*************************************************************888 ;Load Game Boundries Goinside = LoadImage ("Goinsideclutch.png") Goback = LoadImage ("Goback.png") ;*************************************************************888 ;Miscellaneous Loads MUSIC_FOR_SCENE_1 = LoadSound ("Mady.wav") LEFTKEY = (31) ;*************************************************************888 ;Types to Each Character Type TITLESCREEN Field x,y End Type Type HENRY Field x,y Field frame End Type Type BACKGROUND Field x,y Field Image End Type Type DOOR Field x,y End Type Type Goinside Field x,y End Type Type Goback Field x,y End Type ;********************************************************************************* ;Set Character Variables t.TITLESCREEN = New TITLESCREEN t\x = 320 t\y = 100 H.HENRY = New HENRY H\X = 500 H\Y = 490 H\frame = 0 ;The BACKGROUND for the first scene b.BACKGROUND = New BACKGROUND b\x = -1100 b\y = 90 b\image = BACKGROUND d.DOOR = New DOOR d\x = 430 d\y = 215 gi.Goinside = New Goinside gi\x = 430 gi\y = 200 ;************************************************************************ ;Miscellaneous ;********************************************************************8888 While Not KeyDown (1) Cls ;here is the portion of my game that I'm working on now. I'm trying to make it so that the title page shows first, but when ;the "s" key is pressed, it disappears and doesn't come back. Also I want the scene with the BACKGROUND,HENRY, and DOOR ;first (when I was working with it, in some cases it didn't even show the scene). DrawImage (TITLESCREEN,t\x,t\y) If KeyHit (31) TileImage (BACKGROUND,b\x,b\y) DrawImage (HENRY,h\x,h\y) If (d <> Null) Then DrawImage (DOOR,d\x,d\y) If h\x<=d\x+300 And h\x-150>=d\x And h\y <=d\y+200 And h\y+80 >=d\y Then Delete d EndIf EndIf EndIf ;---------------------------------------------------The things above this line are the things that I need help with for now Flip Wend |
| ||
What I do is I have the title screen in its own while loop before the actual game. You then have a main loop and loops for title screens, game over screens, etc.While Not Keyhit(31) Cls DrawImage backgroundimg,0,0 Flip Wend While Not Keyhit(1) ;main game stuff Wend |