Jump to content

Photo

Playfield/ score help


3 replies to this topic

#1 8bitgnome OFFLINE  

8bitgnome

    Space Invader

  • 23 posts
  • Location:Philladelphia

Posted Sat Oct 22, 2011 7:54 AM

rem variables used up so far
rem a,b,c,g,h,p
opening
playfield:
XXXX.XXXX.XXXXXX.XXXXXX.XX..XX..
X..X.X..X...XX.....XX...XX..XX..
XXXX.X..X...XX.....XX.....XX....
X....X..X...XX.....XX.....XX....
X....X..X...XX.....XX.....XX....
X....XXXX...XX.....XX.....XX....
...X...X.XX..XX.XX...X..XXXXXX..
...X...X.XX..XX.XXX..X....XX....
...XXXXX.XX..XX.X.XX.X....XX....
...X...X.XX..XX.X..XXX....XX....
...X...X.XXXXXX.X...XX....XX....
end
dim p0_x = b
dim p0_y = c
dim p1_x = g
dim p1_y = h
 
 
rem Loop the screen until the spacebar is pressed
title
 
COLUBK = rand

drawscreen
if joy0fire || joy1fire then goto skiptitle
goto title
 
 
 
rem This function displays after the title is skipped
skiptitle
COLUPF = rand
COLUBK = 212

player0x = 50 : player0y = 75
player1x = 20 : player1y = 20
score = 5 : scorecolor = 0
missile0height=4:missile0y=255
NUSIZ0 = 16
a = 5
rem Create the playfield

playfield:
.XX.....X...XX..XX..............
..........................X.....
..........................X.....
.......X.....X....X.......X.....
.......X........................
.X.................X............
.........................XXXX...
....X......X.....X..............
................................
................................
...X.X..X..X........X...X.....X.
end
 
goto main
 
skiptitle2
 
COLUPF = 45
COLUBK = 212

player0x = 80 : player0y = 75
player1x = 20 : player1y = 20

playfield:
................................
.......................XXXXX....
................................
..................X.............
..XXXXXXX.X.XX.XX.X..XXXXX......
................................
..................X.............
..................X.............
..................X.............
..XX.....XX.......X.............
................................
end
drawscreen
goto main2
 
 main
 


if score > 6 then goto skiptitle2
main2


Whats the best way to change playfields? I can get it to change from the title, but I want it to change when a certain score is reached. I was hoping to have atleast 10 seperate levels. I have code under the main2 that handle collision detection point sound, boundries ect. But I cant seem to get the level to change after the intro screen? thanks for any help you can give

#2 8bitgnome OFFLINE  

8bitgnome

    Space Invader

  • Topic Starter
  • 23 posts
  • Location:Philladelphia

Posted Sat Oct 22, 2011 7:56 AM

ignore the score help i figured that out in my head as I was writing the topic sry. I still need field help though.

#3 8bitgnome OFFLINE  

8bitgnome

    Space Invader

  • Topic Starter
  • 23 posts
  • Location:Philladelphia

Posted Sat Oct 22, 2011 10:19 PM

OK I fixed the looping problem I had. thats why I couldnt change playfields.

#4 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 24,977 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Oct 22, 2011 10:23 PM

If you post your batari Basic questions in the batari Basic forum, you'll be more likely to get the answers you need:

http://www.atariage.com/forums/forum/65-batari-basic/




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users