Rabbit 2600 Posted November 16, 2013 Share Posted November 16, 2013 Experimenting on a racing game, and I want the playfield to scroll vertical. What would the simplest way of doing it be? Also, I've been playing Gate Racer a lot and I really like the feature of having gates to go through, Any tips on how to achieve this feature? =) Source: rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 TITLE drawscreen if joy0fire then goto start goto TITLE start player0x = 50 player0y = 80 player1x = 255 player1y = 255 scorecolor = $0E dim _P1_L_R = player1x.a dim _P1_U_D = player1y.b dim _P0_L_R = player0x.c dim _P0_U_D = player0y.d main AUDV0=0 AUDV1=0 a = a + 1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... player0: %01000010 %01111110 %01011010 %00011000 %00111100 %00111100 %00111100 %00111100 %00100100 %00100100 %00111100 %00011000 %01011010 %01111110 %01011010 %00011000 end player1: %01000010 %01111110 %01011010 %00011000 %00111100 %00111100 %00111100 %00111100 %00100100 %00100100 %00111100 %00011000 %01011010 %01111110 %01011010 %00011000 end COLUP0 = $0E COLUPF = $0E COLUP1 = $0E playfield: ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. ..X.X......................X.X.. end EXPLOSION rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 10 then player1: %00110011 %00110011 %11001100 %11001100 %00110011 %00110011 %11001100 %11001100 %00110011 %00110011 %11001100 %11001100 %00110011 %00110011 %11001100 %11001100 end if f = 20 then player1: %11001100 %11001100 %00110011 %00110011 %11001100 %11001100 %00110011 %00110011 %11001100 %11001100 %00110011 %00110011 %11001100 %11001100 %00110011 %00110011 end if f=20 then f=0 drawscreen if joy0right then player0x = player0x + 1 if joy0left then player0x = player0x - 1 if player1x < 15 then player1x = rand if player1x > 130 then player1x = rand if player1x = 255 then player1x = rand : player1y = 20 if player1y > 90 then player1x = rand : player1y = 20 : e = (rand&3) if e = 0 then NUSIZ1 = $00 if e = 1 then NUSIZ1 = $01 if e = 2 then NUSIZ1 = $02 if e = 3 then NUSIZ1 = $03 _P1_U_D = _P1_U_D + 0.60 if a = 60 then score = score + 1 : a = 0 if joy0fire then goto faster goto main faster _P1_U_D = _P1_U_D + 0.60 if a = 30 then score = score + 1 : a = 0 goto main Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 16, 2013 Share Posted November 16, 2013 If you are using the standard kernel, there's a little example here: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#pfscroll Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted November 16, 2013 Share Posted November 16, 2013 The methods I've been posting for scrolling are not the simplest but allow you to have long levels by using DATA staements. http://atariage.com/forums/topic/218357-vertical-scrolling-no-blank-lines-playercolors-demo/ http://atariage.com/forums/topic/218190-smooth-vertical-scrolling-from-data-want-4-way/ There is another method of just using a really long playfield statement http://atariage.com/forums/topic/148427-vertical-scrolling-through-a-playfield-that-wont-fit-the-screen/?do=findComment&comment=1809236 So, those two options are if you want detailed levels. My suggestion is to play with R.T. links and do what you can with just pfscroll up and pfscroll down commands. All they do is cycle one screen up or down, though. You'll have to figure out how to make it look like a unqiue track/level even though it's just looping a single screen. Quote Link to comment Share on other sites More sharing options...
bogax Posted November 17, 2013 Share Posted November 17, 2013 I think it would be interesting to have the track generated on the fly with eg a pseudorandom number generator, you wouldn't need all that playfield data and the track could be really long. 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted November 17, 2013 Share Posted November 17, 2013 I think it would be interesting to have the track generated on the fly with eg a pseudorandom number generator, you wouldn't need all that playfield data and the track could be really long. I'm being a total mooch here. I'd wish there was a function akin to wrev except instead of using a DATA statement it would call a PRNG. Something like roomstyle = prnglevel( worldx, worldy, myseed) My problem is that the built in random number generator didn't have a good enough distribution. Also, prnglevel(128, 64, myseed) should generate a different number than prnglevel(64, 128, myseed) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.