Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: Sprite movement
Posted by: Bod/STAX Jul,10.2014-08:35 

That type of movement uses added or double sine tables.

What you do for example on the X axis is have a sine table that is half the screen in size, you have two pointers pointing to this table. You read a value from the first pointer and add the second value read from the second pointer to the value read from the first pointer for the first sprites position, you then offset the two tables with two different values for all subsequent sprites. Then all you do is offset the pointers with two different values (thus reading the two tables at two different speeds). Then do exactly the same with the Y axis.

You'll need to play around with the values to come up with a wave that is similar to the wave you see in the sprite-record screens.

Sorry if this is not explained very well.







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Sprite movement Cyprian Jul,09.2014-23:37
  Re: Sprite movement Bod/STAX Jul,10.2014-08:35
    Re: Sprite movement Cyprian Jul,10.2014-17:03
      Re: Sprite movement Bod/STAX Jul,10.2014-17:49


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson