Jump to content
Buckaroo

Editing GRP0 into player0

Recommended Posts

I'm trying to make a rhythm game in Visual BB where the player presses the direction on the joystick in time to music.

 

As Batari Basic can have really high sprites I want to scroll down the screen and hold multiple arrows in one player sprite.

 

The workflow I'm aiming for is:

 

X The example on the left is a sprite 8x40 pixels.

X starts outside of the screen area.

The sprite scrolls down by 8 pixels then X becomes a new arrow direction.

 

I'm using the playfield to draw graphics so can't use the multisprite kernel and I'm trying to keep the game to 4k.

 

In asm using GRP0 seems to be editing the data for player0 graphics but when I switch back to using Visual bb the data does not exist in player0.

I'm still new to programming for the Atari so making this in pure asm would be too difficult at the moment but if it's the only way then I'll pursue it.

 

I've tried multiple methods including player0pointerlo and player0pointerhi but these only seem to be able to choose a set segment of sprite data.

Share this post


Link to post
Share on other sites

Sorry Bogax, maybe I wasn't clear enough.

 

Forget the scrolling, essentially what I'm trying to do is join 2 pieces of data together into player0.

 

In the example below I want to copy lines a,b,c and h,i,j to make player0 become a,b,c,h,i,j

Lines e,f,g are ignored

 

The examples you shared are great but all seem to use one segment (unless I've missed something)

 

Hope this makes more sense

post-56098-0-67194000-1494932293.jpg

Edited by Buckaroo

Share this post


Link to post
Share on other sites

I'm not sure what you are trying to achieve (why scroll ?)

 

you can scroll through the sprite data or you can just point at different data

 

here's some sprite-pointer-animation stuff

 

might give you some ideas

 

Did the last post I made make it any clearer?

Share this post


Link to post
Share on other sites

It's clear to me, and I wish I had an answer. I could see how doing this could be useful in a project I'm working on, Hopefully there's a way to do it!

  • Like 1

Share this post


Link to post
Share on other sites

 

Did the last post I made make it any clearer?

 

yes

 

you want to scroll one part of the sprite while the other stays (more or less) constant

 

the obvious thing is to use two sprites if you can

 

you could flicker the a single sprite ie multiplex the sprite in bB, display the two parts seperately on alternate frames

 

you could put the sprite in ram

not sure you could find 40 bytes

you wouldn't have room for much else

 

 

I can't think of any other way to do it with the standard kernel

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I thought this was going to be an awkward one.

 


you could flicker the a single sprite ie multiplex the sprite in bB, display the two parts seperately on alternate frames

 

 

I need the other sprite for the second players graphics and I really don't like the flicker.

 

I did find a way to do it but it took up pretty much all of the variables in the file.

 

I pointed player0pointerlo at variables a-g, and was able to edit each line of the player graphic individually.

 

Practically, that won't work for the game as there's going to be little variable space left for anything else.

 

The RAM stuffing could be an option though, I'll look into it.

Dynamic sprite.bas.bin

Dynamic sprite.bas

Edited by Buckaroo

Share this post


Link to post
Share on other sites

You could use the multi sprite kernel to mix-and-match player0 and a virtual sprite to make one combined image

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#multikernel

 

You'd still have to design your game to not allow two virtual sprites to be on the same horizontal line to avoid flicker. But, yeah.

 

Or the DPC+ Kernel.

  • Like 2

Share this post


Link to post
Share on other sites

 

Or the DPC+ Kernel.

 

Yep. Both multispsrite and DPC+ have the same problem with flicker and virtual sprites on the same horizontal line. But, at least you get better graphics with the DPC+

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the info,

 

I've been trying to stick to the standard kernel and only use 4k because I bought an EPROM programmer and chips.

 

As I use Visual BB more I'm coming to realise the DPC+ is the way to go.

 

I still think I can finish this game in the standard kernal by flipping the sprites on their side and using NUSIZ to duplicate in the same way the score does.

Once I've go it working I'll upload, but at the moment it's still a mess.

Share this post


Link to post
Share on other sites

Made a new solution for this but it's a bit convoluted and I can only really see it working for this example.

 

Each possible combination of two arrows is put into a Data Array, e.g. ↑↑, ↑→, ↑↓, ↑← etc.. (16 possible combinations)

 

When the bottom point is reached the two players adjust the pointerhi and pointerlo for each player to update for the next arrow.

 

------------------------------------------------------------

 

Scroll arr.bas: Use the joystick to pick the next arrow direction if nothing is pressed then a random arrow is picked

Scroll arr.bas.bin

Scroll arr.bas

  • Like 1

Share this post


Link to post
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...