It is currently Wed Nov 22, 2017 3:20 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: SMB1 Coin Counter Sprite
PostPosted: Sun Jan 29, 2017 5:26 pm 
Offline
User avatar

Joined: Sun Jan 29, 2017 5:00 pm
Posts: 1
You know that little coin at the scoreboard which represents all the coins you collected?
I tried messing around with it, but sometimes the bottom pixels got all messed up and sometimes mario doesn't appear on screen, making the game unplayable.
Whats up with that coin?

_________________
The wonderful thing about pickles, is that pickles are wonderful things.


Top
 Profile  
 
PostPosted: Sun Jan 29, 2017 6:00 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5827
Location: Canada
That coin is part background, part sprite. The sprite is also sprite 0, the overlap of which with the background is what is used to time the scrolling split at the bottom of the status bar.

So... be careful when messing around with it. You'll need to account for both the background portion, and the sprite portion, and you need to make sure some of the sprite still overlaps the background to make sure the scrolling split takes place.


Top
 Profile  
 
PostPosted: Sun Jan 29, 2017 7:37 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10117
Location: Rio de Janeiro - Brazil
SMB1 uses the sprite 0 hit flag (a flag that gets set when a non-transparent pixel in sprite 0 overlaps - or underlaps, depending on the sprite's drawing priority - a non-transparent background pixel) to detect when the status bar is about to finish rendering, so it can change the scroll for the gameplay area of the screen. If you mess up the alignment between the sprite and the background, the hit will not happen and the program won't be able to properly prepare for the gameplay portion of the screen.


Top
 Profile  
 
PostPosted: Tue Jan 31, 2017 8:55 am 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 729
Location: New York, NY
viewtopic.php?f=21&t=15217


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group