Jump to content

Photo

Editing GRP0 into player0

visual bb asm GRP0

11 replies to this topic

#1 Buckaroo OFFLINE  

Buckaroo

    Space Invader

  • 19 posts
  • Location:Plymouth, UK

Posted Mon May 15, 2017 3:10 AM

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.



#2 bogax OFFLINE  

bogax

    Dragonstomper

  • 705 posts

Posted Mon May 15, 2017 6:37 PM

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



#3 Buckaroo OFFLINE  

Buckaroo

    Space Invader

  • Topic Starter
  • 19 posts
  • Location:Plymouth, UK

Posted Tue May 16, 2017 5:08 AM

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

Attached Thumbnails

  • sharing data.jpg

Edited by Buckaroo, Tue May 16, 2017 5:09 AM.


#4 Buckaroo OFFLINE  

Buckaroo

    Space Invader

  • Topic Starter
  • 19 posts
  • Location:Plymouth, UK

Posted Thu May 18, 2017 7:00 AM

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?



#5 kdgarris OFFLINE  

kdgarris

    Chopper Commander

  • 129 posts

Posted Thu May 18, 2017 7:32 AM

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!



#6 bogax OFFLINE  

bogax

    Dragonstomper

  • 705 posts

Posted Thu May 18, 2017 7:34 PM

 

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 



#7 Buckaroo OFFLINE  

Buckaroo

    Space Invader

  • Topic Starter
  • 19 posts
  • Location:Plymouth, UK

Posted Thu May 18, 2017 10:21 PM

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.

Attached Files


Edited by Buckaroo, Thu May 18, 2017 10:21 PM.


#8 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,822 posts

Posted Tue May 23, 2017 10:02 AM

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

http://www.randomter...tml#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.



#9 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,021 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue May 23, 2017 11:16 AM

You could use the multi sprite kernel to mix-and-match player0 and a virtual sprite to make one combined image
http://www.randomter...tml#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.



#10 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,822 posts

Posted Tue May 23, 2017 3:07 PM

 
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+



#11 Buckaroo OFFLINE  

Buckaroo

    Space Invader

  • Topic Starter
  • 19 posts
  • Location:Plymouth, UK

Posted Wed May 24, 2017 4:43 AM

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.



#12 Buckaroo OFFLINE  

Buckaroo

    Space Invader

  • Topic Starter
  • 19 posts
  • Location:Plymouth, UK

Posted Thu May 25, 2017 11:40 AM

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

Attached Files







Also tagged with one or more of these keywords: visual bb, asm, GRP0

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users