+atari2600land Posted September 23, 2020 Author Share Posted September 23, 2020 label art? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 23, 2020 Author Share Posted September 23, 2020 I am having trouble with random numbers! The 7800 basic guide says all you have to do is just use a=rand and it should work, but it doesn't because the banana and papaya start at exactly the same place every time. What do I need to do for a random number?! Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted September 23, 2020 Share Posted September 23, 2020 Rand returns the next in a fixed (but very long) sequence of arbitrary numbers. Where it starts in that sequence is determined by the seed value, but there's no guarantee that the seed value will be different each time. If you call rand each frame and ignore the result you'll get a seemingly more randomised sequence because the arbitrary number of frames between when you actually need to use a random number makes the whole thing unpredictable. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 23, 2020 Author Share Posted September 23, 2020 Calling rand each frame still won't make it random: titlescreenloop stupid=rand drawscreen if joy0fire1 && !keygot{0} then keygot{0}=1 if !joy0fire1 && keygot{0} then score0=0 : keygot=0 : goto main_setup goto titlescreenloop Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 23, 2020 Author Share Posted September 23, 2020 Deleting an instance of "drawscreen" in the game setup code (after you press fire) seems to make it a lot more random. Though I don't know why. pineapple_2020_09_23_2.zip Quote Link to comment Share on other sites More sharing options...
+Karl G Posted September 23, 2020 Share Posted September 23, 2020 I think it's an emulator issue. The random function is seeded by the value of a timer, which would be random on real hardware, but might not be on some emulators. Edit: also adding a call to rand every frame where there is no joystick input (or vice versa) instead of just every frame could help. Quote Link to comment Share on other sites More sharing options...
+Pat Brady Posted September 23, 2020 Share Posted September 23, 2020 You can count frames (or any other unit of time) from power-on until the user starts the game, and use that number to seed the RNG. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 24, 2020 Author Share Posted September 24, 2020 New changes. Papaya power-up's point value now depends on how fast you get it. It starts at 50 points when it first comes on screen and works down to 0. Bananas' speed now varies. The bananas get faster every ten seconds once all 6 appear on screen until they reach their maximum speed. pineapple2020_09_24.zip Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 25, 2020 Author Share Posted September 25, 2020 Minor graphic changes to the title screen and font: The in-game is mostly the same: I've noticed that when using the ProSystem emulator, the sound effects are delayed a little bit. Using MAME and the other ones, they work fine. If someone would like to test this on a real 7800, it'd be much appreciated. pineapple2020_09_25.zip Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 25, 2020 Author Share Posted September 25, 2020 Is something like my mockup below possible? Since I'm only using the allowed amount of three colors. But when I try to use this as the basis for the 'alphabet', the purple color goes to black. This is the alphabet I'm using. Why isn't the third color being used at all? alphachars ' a' alphadata ingamescreen1 brix6 'aaaaaaaaaaaaaaaaaaaa' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'a a' 'aaaaaaaaaaaaaaaaaaaa' end I'm about ready to pull all my hair out. Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 25, 2020 Share Posted September 25, 2020 You sometimes need to reorder the color indexes during the incgraphic, to get them to match with your palette entries, or else, rearrange your palette entries to match the png indexes. Using the zip above and your brix6.png, If I use "incgraphic pineapplegfx/brix6.png 0 2 1 3" and then I add blue to your palette entries... P0C1=$34 P0C2=$94 P0C3=14 ...then it looks more or less like your mock-up. 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 25, 2020 Author Share Posted September 25, 2020 Success! Thanks, RevEng! I even added some gray specks along with the red specks in the background. I think the game is a lot more colorful now. pineapple2020_09_25_3.zip 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 27, 2020 Author Share Posted September 27, 2020 Added a two player option. Player 1's score is orange and player 2's score and pineapple is blue. Have you ever seen a blue pineapple? Well, pick the two-player option and then you have. pineapple_2020_09_27.zip 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 27, 2020 Author Share Posted September 27, 2020 Discovered a bug where defeated pineapples could reenter the arena by pressing up. I think I got rid of it. Let me know if you run across any other craziness. Future updates can be found at the Pineapple website. pineapple_2020_09_27_2.zip Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 28, 2020 Author Share Posted September 28, 2020 Changed a few things. I'd put a link to the pineapple website in my signature, but I don't know how to change it. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 30, 2020 Author Share Posted September 30, 2020 I set the zone height to 16. A bunch of my free space vanished. Instead of having 9997 bytes in the main area, I now only have 2175. But I read that having the zone height be 16 means that the 7800 doesn't have to work as hard (which I don't know why since everything would be bigger instead of smaller.) So now I could add a ton more bananas, but I won't because then the game would get super hard. I had to move the score down though, so both scores are on the same line, but player 1's score is on the left while player 2's is on the right. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 30, 2020 Author Share Posted September 30, 2020 Song fixed, but I don't know how. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted October 2, 2020 Author Share Posted October 2, 2020 I totally revamped the banana moving code. There's now a lot less of it. Just one chunk of code for changing the bananas' movement and separate variables for each banana to have. I also changed up the colors a little. I made the background brighter and changed the papaya color. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 10, 2020 Author Share Posted December 10, 2020 I want to work on this again. Anyone have any suggestions on things I can add to it? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 11, 2020 Author Share Posted December 11, 2020 How do I do this? It always says "it was a tie." even if score1>score0. if numplayers=1 then plotchars '& &' 1 12 6 if numplayers=2 && score0>score1 then plotchars '& player 1 won. & ' 1 12 6 if numplayers=2 && score0<score1 then plotchars '& player 2 won. & ' 1 12 6 if numplayers=2 && score0=score1 then plotchars '& it was a tie. & ' 1 12 6 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted December 11, 2020 Share Posted December 11, 2020 You are only comparing the byte that contains the ten thousands and hundred thousands digits. You have to compare all 3 bytes in decimal mode. I believe the manual gives details on how to do this. Quote Link to comment Share on other sites More sharing options...
+mksmith Posted December 11, 2020 Share Posted December 11, 2020 You could something like this (untested but based on my high-score check): dim score0Var0 = score0 dim score0Var1 = score0+1 dim score0Var2 = score0+2 dim score1Var0 = score1 dim score1Var1 = score1+1 dim score1Var2 = score1+2 ValidateScore0BiggerThanScore1 rem validate each byte if score0Var0 > score1Var0 then goto _validatedScore0IsBiggerThanScore1 if score0Var0 < score1Var0 then goto _validateHighScoreExit if score0Var1 > score1Var1 then goto _validatedScore0IsBiggerThanScore1 if score0Var1 < score1Var1 then goto _validateHighScoreExit if score0Var2 > score1Var2 then goto _validatedScore0IsBiggerThanScore1 goto _validateScore0BiggerThanScore1Exit _validatedScore0IsBiggerThanScore1 rem if you reach here score0 > score1 _validateScore0BiggerThanScore1Exit return Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 11, 2020 Author Share Posted December 11, 2020 OK, I think it works now. I used this code: if score1Var0>score0Var0 then goto player2won if score1Var0<score0Var0 then goto player1won if score1Var1>score0Var1 then goto player2won if score1Var1<score0Var1 then goto player1won if score1Var2>score0Var2 then goto player2won if score1Var2<score0Var2 then goto player1won plotchars 'it was a tie.' 0 28 6 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted December 11, 2020 Share Posted December 11, 2020 Nice! Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted December 11, 2020 Author Share Posted December 11, 2020 I added a little game over ditty. I got my highest score yet: 603. pineapple_2020_12_11_v2.zip 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.