Jump to content

Photo

More than one of the same sprite?


2 replies to this topic

#1 atari2600land OFFLINE  

atari2600land

    Channel F Viewer

  • 11,354 posts
  • Location:Salem, Oregon

Posted Fri May 26, 2017 7:50 AM

So I decided to try to make a game about ants. I got one ant on the title screen and he moves around randomly. But suppose I want more than one ant running around. I found this in rapinit.s:

    dc.l    1                ;                                     ; How many sprites like this one do you want in the sprite list?

If I changed this to a 2, how would I move the second sprite?

 

Attached Files



#2 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,388 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Fri May 26, 2017 11:08 AM

All that does is save you from typing out all the exact same info a 2nd time (or copy/pasting it) and allows you to make changes to all objects of that type with one edit.

 

If your ant is the first object in the list, the copy of it would be the 2nd object. So whatever you do to make the first one move, you'd do the same but wherever you access object one, you'd need to access object 2.



#3 atari2600land OFFLINE  

atari2600land

    Channel F Viewer

  • Topic Starter
  • 11,354 posts
  • Location:Salem, Oregon

Posted Fri May 26, 2017 7:04 PM

Great, thanks! Now there are three ants roaming around the screen. Not only that, there's also music!

Attached Files


Edited by atari2600land, Fri May 26, 2017 7:43 PM.




Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users