+atari2600land Posted February 10, 2018 Share Posted February 10, 2018 So I am making a game where the player gets beamed up, and there's the classic light beam ray that comes down and picks the player up and beams him up. But surely there must be a better way to do it than this: please_end_level if player0y=200 && joy0fire then goto game_main if player0y=200 then l{0}=0 : goto title_screen player1: %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 end player1color: $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A end if !missile1x{0} then player1height=player1height+1 : player1y=player1y+1 temp6=player0y+3 if !missile1x{0} && player1y=temp6 then missile1x{0}=1 if missile1x{0} && player0y<>200 then player0y=player0y-1 goto game_main Can I use the player1pointers in this case, or do I have to do it like this? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted February 10, 2018 Author Share Posted February 10, 2018 I did some fooling around and this seems to work good: please_end_level if player0y=200 && joy0fire then goto game_main if player0y=200 then l{0}=0 : goto title_screen player1pointerlo=1 player1pointerhi=255 COLUP1=$1A if !missile1x{0} then player1height=player1height+1 : player1y=player1y+1 temp6=player0y+2 if !missile1x{0} && player1y=temp6 then missile1x{0}=1 if missile1x{0} && player0y<>200 then player0y=player0y-1 goto game_main (I'm using missile1x{0} since I ran out of variables.) 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted February 10, 2018 Share Posted February 10, 2018 Awesome! I didn't know that adding to playerXheight would copy any rows like that. That could be a handy trick. Did you still have to define the colors of the rows that weren't yet in existence, presumably? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted February 10, 2018 Author Share Posted February 10, 2018 Yes, I did. So I got rid of player1colors and just made it one color. Quote Link to comment Share on other sites More sharing options...
CurtisP Posted February 13, 2018 Share Posted February 13, 2018 Awesome! I didn't know that adding to playerXheight would copy any rows like that. That could be a handy trick. Did you still have to define the colors of the rows that weren't yet in existence, presumably? There isn't any copying of rows happening. All that changing playerXheight does is make the player taller ot shorter. The reason the player is solid pixels is because settng player1pointerlo to 1 and player1pointerhi to 255 makes the player data point to location 65280 ($FF00) which is at the end of the catridge ROM and the compile just happens to fill unused space with 255's ($FF). If the compiled code ever exceeds 3,584 bytes, then you will the player will contain apparently random patterns. As for the colors, I'm assuming that the example posted used the single-color player option. If multi-color were enabled, the all the lines of the player would be color $FF, or white. COLUP1=$1A 1 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.