sprite scrolling
sprite scrolling
ok, so I was coding on my game and i came across this problem: when i position a sprite on x = 300 for example i can't view it at the beginning. how can i scroll the sprite system? i mean that sprites placed on x = 0 wille disappear at a specific moment and the sprite at x = 300 will be visible?
-
- Site Admin
- Posts: 1845
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: sprite scrolling
Keep a track of the top left coordinates of your playfield and subtract these from the sprite coordinates you intend to display. Obviously if the new coordinates determine that the sprite will be completely invisible then don't add it to your display list.
Re: sprite scrolling
thanks, I can go further with my game too easy actually
Who is online
Users browsing this forum: No registered users and 9 guests