Jump to content
IGNORED

Pineapple: a 7800BASIC exercise.


Recommended Posts

This was fun, but challenging sometimes. I made a title screen for a game that I have no idea what is going to happen in it. Lots of unexpected errors and crap popped up, but I fixed them all and now it looks lovely. It even has some music I composed in it.

 

If anyone has any ideas on what games you want to see on the 7800, let me know. And I'll add pineapples to them.

pineapple20200629.zip

  • Like 5
Link to comment
Share on other sites

58 minutes ago, RevEng said:

Unfortunately due to regional issues, I haven't been able to test 7800basic with pineapples. It has been well tested with poutine, butter tarts, and bagged milk. Any other food-stuffs are a bit of a gamble, I'm afraid.

 

I wonder how many people get this reference aside from us Canucks :)

  • Like 3
Link to comment
Share on other sites

20 minutes ago, atari2600land said:

Why wont plotvalue work? I put in

 


plotvalue atasciimynumbers 2 score0 2 8 20

 

in my title screen loop, set score0 to 0 and it won't display. Why?!?!??!

 

whywontthisstupidthingwork.zip 13.07 kB · 1 download

plotvalue works with a graphic with digits. It won't work with an ascii graphic - the digits are in the wrong place. 

  • Like 1
Link to comment
Share on other sites

37 minutes ago, Shawn said:

I wonder how many people get this reference aside from us Canucks :)

Yeah, the Poutine was a gimme. Karl got it, at least. :D

 

40 minutes ago, atari2600land said:

in my title screen loop, set score0 to 0 and it won't display. Why?!?!??!

Pineapples aren't supported

To expand on Karl's correct answer, the digits for plotvalue need to be in the same graphics block as the rest of your character set. If you check the compile output, combined they're both too big to fit in one block together. Or put another way, your character set characters plus your number characters come to a total of more than 256 characters... the 7800 (and pretty much any other 8-bit machine) can only reference 256 characters at a time.

 

Usually what I do it just make the first bit of my ascii graphic the number digits too. Then you can use the same graphic for ascii text and with plotvalue, with minimal effort.

Link to comment
Share on other sites

I found a use for this game, an idea I just got. It's a cross between the Channel F game "Dodge-It" and the Atari 2600 game "Fast Food" where players dodge certain items and pick others up for more bonus points. Here is the play area. Marked by bricks.

pineapplesmall4a.png.7ec1ec1945d3d1bba0bd9e29b9d4cc90.png

pineapple20200630version2.zip

Link to comment
Share on other sites

It doesn't state in the 7800BASIC page that the maximum size of a sprite is 8 x 8 pixels. So in order to do this, I had to use two sprites as the pineapple. One is the top, and the other is the bottom third, for an 8 x 16 sprite, but it's only 8 x 12. This may impact the game a little. Now I'll have 14 collision checks instead of 7 (I was planning on having 6 items maximum and a seventh be a banana for a special bonus points.

pineapple5.png.c7a632b1fe637d9ba1f89cb9491244c2.png

I thought the pineapple was really small so I made it bigger. It looks a lot better.

Link to comment
Share on other sites

I think I'll make it only the pineapple's "body" that gets checked for collision. So I split the pineapple's stem (4 pixels high) and the body (8 pixels high). Not only will this increase the possibility of more things bouncing around, it will also be less code.

Link to comment
Share on other sites

1 hour ago, atari2600land said:

It doesn't state in the 7800BASIC page that the maximum size of a sprite is 8 x 8 pixels.

The graphics height is limited to the chosen zoneheight, which is documented. The sprites aren't limited to a width of 8 pixels; in the 160A mode you're working with, sprites can be up to 128 pixels wide.

Link to comment
Share on other sites

On 6/29/2020 at 7:03 PM, RevEng said:

Unfortunately due to regional issues, I haven't been able to test 7800basic with pineapples. It has been well tested with poutine, butter tarts, and bagged milk. Any other food-stuffs are a bit of a gamble, I'm afraid.

I really don't have anything meaningful to add to this post, other than I don't know what poutine and butter tarts are, and I've never seen milk in a bag. ;)

 

Keep it up atari2600land, 160A is probably the best graphics mode to start with.

Link to comment
Share on other sites

5 hours ago, Atarius Maximus said:

I really don't have anything meaningful to add to this post, other than I don't know what poutine and butter tarts are, and I've never seen milk in a bag. ;)

I guess I shouldn't bother to ask about ketchup chips, beaver tails. or coffee crisp, then. ?

Link to comment
Share on other sites

OK, this isn't working.


    if banana1dir=1 then banana1x=banana1x-1 : banana1y=banana1y+2
    if banana1dir=2 then banana1x=banana1x+1 : banana1y=banana1y+2
    if banana1dir=3 then banana1x=banana1x-1 : banana1y=banana1y-2
    if banana1dir=4 then banana1x=banana1x+1 : banana1y=banana1y-2
    
    if banana1dir=1 && banana1y=152 then banana1y=150 : banana1dir=3 : bananawall=1
    if banana1dir=1 && banana1x=14 then banana1x=15 : banana1dir=2 : bananawall=1
    if banana1dir=2 && banana1y=152 then banana1y=150 : banana1dir=4 : bananawall=1
    if banana1dir=2 && banana1x=138 then banana1x=137 : banana1dir=1 : bananawall=1
    if banana1dir=3 && banana1y=6 then banana1y=8 : banana1dir=1 : bananawall=1
    if banana1dir=3 && banana1x=14 then banana1x=15 : banana1dir=4 : bananawall=1
    if banana1dir=4 && banana1y=6 then banana1y=8 : banana1dir=2 : bananawall=1
    if banana1dir=4 && banana1x=138 then banana1x=137 : banana1dir=3 : bananawall=1

    if bananawall>0 then bananawall=bananawall+1 : AUDC0=6 : AUDF0=31 : AUDV0=5
    if bananawall>5 then bananawall=0 : AUDV0=0

 

Sometimes the banana will bounce out of the play area. Why?

pineapple20200707version2.zip

Link to comment
Share on other sites

Are you sure that your banana is always starting on an even value for X and Y? If not, incrementing by 2s will skip your bounce condition. You might want to e.g. change the check for e.g. banana=138 to banana>137.

 

Also, I don't understand your randomization. You set "stupid" to rand, then divide by 128, which would give a random value of 0 or 1 only. If that's your intent you may want to use (rand&1) instead to achieve the same effect with less cycles.

 

banana1x=(stupid/128)+1

Based on the above, I believe your banana1x will be set to 1 half the time, and 2 half the time, which means the banana will miss the check for being at the edge on half of the invocations of the game as well.

  • 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...