Jump to content
IGNORED

Bananas are good.


atari2600land

Recommended Posts

Bananas are good...so you want to protect them from the nasty fruit flies! They're coming after your banana! What are you to do? Armed with your fly swatter, the object of the game is to swat as many flies as possible.

 

I want to keep this at 2k. It's a fairly simple game mechanic, so I was able to make a fancy title screen. There are still some things left to do, like sound effects, and timer adding. So this isn't done yet. I do have 224 bytes left which should be enough space. To start a new game, press fire. You'll see a fairly primitive-looking banana on the screen (this is the 2600 after all.) Move the flyswatter around with the joystick and press fire to swat the fly. Press the reset switch to go back to the title screen.

bananas1.bas.bin

bananas1.bas

  • Like 4
Link to comment
Share on other sites

Good start. You should expand the game to 4k.

 

Add two frame animation to the swatter when the button is pushed it can snap down.

Flash the fly red when hit.

Add a heath bar or tally that diminishes when a fly has contact with the banana. Or just have the banana slowly turn brown.

More enemies to swat or not.

Bee that must be avoided.

Ants that attack along the ground.

  • Like 1
Link to comment
Share on other sites

New version. Here's what I added:

- timer using pfscore. When the timer gets to 0, the game ends. If you hit a fly, the timer resets.

- added a sound effect for hitting the fly.

- game over screen. to get back to the title screen, wait three seconds. I found that if you were going after the fly and pressing fire, that it would flash the game over screen, so I put in a three second or so delay.

All this in 2k (but I have one byte left. And I struggled to put this in 2k.) I will only make it 4k if I deem it absolutely necessary. Right now, I'm trying to see what I can fit in 2k.

bananas2.bas.bin

Link to comment
Share on other sites

Another new version. By making the playfield blocks one color, I was able to free up more space. I added a few of neotokeo's suggestions.

+ instead of having a game over when you miss a fly, the banana just turns a little bit more brown. When the banana gets really brown, then the game ends.

+ I made a swatting animation.

+ I also made it the more flies you swat, the harder it is to swat them. Right now, the flies get harder at 10 and 20 points, but this is just for testing purposes, and I can and will change it. To what, I don't know. 25 & 50? 50 & 100?

bananas3.bas.bin

Link to comment
Share on other sites

Thanks. Here is an image from a minor adjustment. As you can see, I made the swatter blue. I was having trouble with the files I downloaded to make player0 under player1, so I just switched it around.so player0 is the swatter and player1 is the fruit fly.

 

post-9475-0-43047400-1464559469_thumb.png

Link to comment
Share on other sites

Gave this a try. I like the swatting animation and sound effect made when I swat a fruit fly. My suggestions are to:

 

- make the banana be horizontal, rather than vertical, similar to the way the banana is in your avatar

 

- to make the game more difficult / challenging... for every 25 points, the fruit fly moves faster, making it harder to swat

Link to comment
Share on other sites

New version. I had the fly changing direction faster, hoping that it would result in it being harder to swat, but that turned out not to be the case. After making some changes and freeing up some room somehow, I made the fly speed up at 25 points and again at 50.

bananas5.bas.bin

Link to comment
Share on other sites

I deleted the banana on the title screen to free up room, but the example shown on the bB website does not work.

titlescreen

  a=0 : b=0



   if sc2 > y then goto New_High_Score

   if sc2 < y then goto ts



   if sc3 > z then goto New_High_Score

  

    goto ts



New_High_Score

 y=sc2 : z=sc3



ts
 rem rest of the code.

I've tried to put the similar code and it never works for me. What could I possibly be doing wrong?

 

bananas8.bas

Edited by atari2600land
Link to comment
Share on other sites

I've tried to put the similar code and it never works for me. What could I possibly be doing wrong?

It's because you're mangling the code. You need all of the if-thens and you need them in the order they are presented:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#savehighscore

 

 

This example program also saves the high score:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#sprite_missile_bankswitching_example

Link to comment
Share on other sites

I did not mangle the code here:

titlescreen

  a=0 : b=0



   if _sc1 > _High_Score1 then goto __New_High_Score

   if _sc1 < _High_Score1 then goto __Skip_High_Score

    



   if _sc2 > _High_Score2 then goto __New_High_Score

   if _sc2 < _High_Score2 then goto __Skip_High_Score





   if _sc3 > _High_Score3 then goto __New_High_Score

   if _sc3 < _High_Score3 then goto __Skip_High_Score





   goto __Skip_High_Score



__New_High_Score



   _High_Score1 = _sc1 : _High_Score2 = _sc2 : _High_Score3 = _sc3



__Skip_High_Score



 rem rest of code goes here.

I even copied and pasted it and it still doesn't work.

 

bananas89.bas

Link to comment
Share on other sites

I even copied and pasted it and it still doesn't work.

You didn't mangle it in that version, but you're not doing anything with it. It's like you have a car and instead of putting the gas in the gas tank, you pour it through your window and complain that your car won't go.

 

In Gyvolver, I check for a high score when the game is over and have this in the title screen setup area:


   ;***************************************************************
   ;
   ;  Sets up the score swap, clears the swap bit, and sets color.
   ;
   _Score1_Mem = _sc1 : _Score2_Mem = _sc2 : _Score3_Mem = _sc3

   _Bit6_Swap_Scores{6} = 0

   scorecolor = $1C


 

Then I have this in the title screen loop:



   ;***************************************************************
   ;
   ;  Auto-play check and high score flip.
   ;
   ;  Switches to auto-play after 10 seconds if player doesn't
   ;  start the game.
   ;
   ;```````````````````````````````````````````````````````````````
   ;  Adds one to _Master_Counter.
   ;
   _Master_Counter = _Master_Counter + 1
   
   ;```````````````````````````````````````````````````````````````
   ;  Skips this section if counter is less than two seconds.
   ;
   if _Master_Counter < 120 then goto __Skip_20_Second_Counter

   ;```````````````````````````````````````````````````````````````
   ;  Increments _Frame_Counter and clears _Master_Counter.
   ;
   _Frame_Counter = _Frame_Counter + 1 : _Master_Counter = 0
   
   ;```````````````````````````````````````````````````````````````
   ;  Auto-play check.
   ;
   ;  Turns on auto-play and jumps to main loop setup if 10 
   ;  seconds have gone by.
   ;
   if _Frame_Counter < 5 then goto __TS_AP_Skip

   ;```````````````````````````````````````````````````````````````
   ;  Sets auto-play bit and jumps to main loop setup.
   ;
   _Bit3_Auto_Play{3} = 1 : goto __Main_Loop_Setup

__TS_AP_Skip

   ;```````````````````````````````````````````````````````````````
   ;  Flips the score swapping bit.
   ;
   _Bit6_Swap_Scores{6} = !_Bit6_Swap_Scores{6}

   ;```````````````````````````````````````````````````````````````
   ;  Jumps to current score if swap bit is off.
   ;
   if !_Bit6_Swap_Scores{6} then goto __TS_Current_Score

   ;```````````````````````````````````````````````````````````````
   ;  Displays high score (blue) and skips rest of section.
   ;
   scorecolor = $AE

   _sc1 = _High_Score1 : _sc2 = _High_Score2 : _sc3 = _High_Score3

   goto __Skip_20_Second_Counter

   ;```````````````````````````````````````````````````````````````
   ;  Displays current score (yellow).
   ;
__TS_Current_Score

   scorecolor = $1C

   _sc1 = _Score1_Mem : _sc2 = _Score2_Mem : _sc3 = _Score3_Mem

__Skip_20_Second_Counter


I also have similar code for auto-play in the main loop. If a game has a game over screen, I also have similar code in that section.

Link to comment
Share on other sites

OK, I think I figured it out. The problem was I wasn't putting the code in the titlescreen loop. This version should work now, I tested it. Due to space restrictions, I didn't check the first two score numbers, so I blanked them out.

 

worked for me!

Link to comment
Share on other sites

So, should I call this done? I'm a little worried about a note in the music. If you sing along with it, it's where you sing "bananas today..." the first time. Does the bass note there sound okay?

 

It could be called done if you keep it at 2k. I think it could turn out to be a really cool game if you expanded it to 4k and added more features to it.

 

One thing that bothers me is if you hold down the button when close to a fly it will commit suicide by running into the swatter.

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...