Jump to content

Photo

How does one actually clone/copy the sprites?


5 replies to this topic

#1 ioi_xd OFFLINE  

ioi_xd

    Space Invader

  • 13 posts

Posted Wed Apr 18, 2018 7:11 PM

Say I wanted to make something like this:

9iWIPWl.png

(This is just an example, I'd probably do much more then just this.

How would I go about cloning an object and/or changing it's sprite before being cloned? I know this is possible through NUSIZ0 registers, but you don't have much control over where it's cloned, how big the gap is, or etc. How would one clone the sprites and control where it goes? I'm hoping to accomplish this through BASIC and not have to write Assembly code.


Edited by ioi_xd, Wed Apr 18, 2018 7:14 PM.


#2 KaeruYojimbo OFFLINE  

KaeruYojimbo

    Stargunner

  • 1,661 posts
  • Location:Portland, OR

Posted Wed Apr 18, 2018 7:17 PM

You'd have to use the multisprite kernel or DPC+ to do something like your mockup with basic.



#3 Lewis2907 OFFLINE  

Lewis2907

    Chopper Commander

  • 244 posts
  • Location:Senatobia, MS

Posted Wed Apr 18, 2018 7:54 PM

ioi_xd,

 

I'm looking for the actual post, but here is the code. I'm not sure how this programmer did this, thanks. 

Attached Files



#4 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

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

Posted Thu Apr 19, 2018 12:46 PM

Is this what you are looking for?

 

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



#5 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,049 posts

Posted Thu Apr 26, 2018 10:45 AM

The multisprite kernel and DPC+ both have built in "time sharing" of the second real hardware sprite.  The eee.bas code is manually re-positioning player1 every frame (that's why the non player sprites always flicker)

 

The nice thing about letting batariBASIC do the time sharing is that it's usually smart enough to know when to flicker and when not.  Though on the multi sprite kernel i've seen edge cases where everything flickers.



#6 Lewis2907 OFFLINE  

Lewis2907

    Chopper Commander

  • 244 posts
  • Location:Senatobia, MS

Posted Thu Apr 26, 2018 5:59 PM

Gemintronic,

For the repositioning is it possible to have collision detection using a variable or temp with the ball. Using the eee example you shot one of them and then you have 3 left etc.

The other question would be possible to have plafield detection. I think this would be harder and use more variables.

The reason I ask is that then I could possibly port over the PacMan Eat N Run game from DPC to the Standard Kernel. I have strayed away from DPC until the AFP can support it. Thanks if you have an idea or someone else's does.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users