EEEEE! I have to get this idea out!
Okay, well, since most of you probably don't know, I am planning to have a mine cart stage or two in my hack. I even have an idea of how I'll code the mine cart sprite. (Of course, for best results, it would have to be dynamic, but I can learn that.) The problem is, I don't know how to get it to interact with slopes correctly. I'd been planning on making it show a different frame depending on what kind of slope it is on (it is dynamic, after all), but I don't know how to tell that. I've heard that $15B8,x has something to do with sprite/slope interactions, but I don't really know anything about it.
Well, tonight, I happened to be listening to an SPC of the SMRPG mine cart music (which has to be one of the catchiest tunes in the history of video game music), and that reminded me of my mine cart. That's when the idea hit me: what if, instead of the sprite determining which frame to show, make blocks that do the same thing?! I could make 9 different blocks: left and right shallow slope, normal slope, steep slope, and very steep slope, plus flat track. These blocks would act like tile 25 to the player, but to sprites, or more specifically, to a specific sprite number (sprite 70, which is my mine cart), they would give the sprite a certain speed value. In a way, it would be a sort of variation of the line guides, where the sprite is on top of them instead of over top of them. The blocks would also set a misc. sprite table, say $1528,x, to a certain value, which would determine the sprite's X and Y speeds as well as the frame to show. Then I'd simply make the mine cart update its position without gravity, figure out how to make it interact with the player correctly, and I'd be ready to roll. (No pun intended.)
Hmm...at least, I think that would work...
----------------
I'm working on a hack! Check it out here. Progress: 64/95 levels.
Okay, well, since most of you probably don't know, I am planning to have a mine cart stage or two in my hack. I even have an idea of how I'll code the mine cart sprite. (Of course, for best results, it would have to be dynamic, but I can learn that.) The problem is, I don't know how to get it to interact with slopes correctly. I'd been planning on making it show a different frame depending on what kind of slope it is on (it is dynamic, after all), but I don't know how to tell that. I've heard that $15B8,x has something to do with sprite/slope interactions, but I don't really know anything about it.
Well, tonight, I happened to be listening to an SPC of the SMRPG mine cart music (which has to be one of the catchiest tunes in the history of video game music), and that reminded me of my mine cart. That's when the idea hit me: what if, instead of the sprite determining which frame to show, make blocks that do the same thing?! I could make 9 different blocks: left and right shallow slope, normal slope, steep slope, and very steep slope, plus flat track. These blocks would act like tile 25 to the player, but to sprites, or more specifically, to a specific sprite number (sprite 70, which is my mine cart), they would give the sprite a certain speed value. In a way, it would be a sort of variation of the line guides, where the sprite is on top of them instead of over top of them. The blocks would also set a misc. sprite table, say $1528,x, to a certain value, which would determine the sprite's X and Y speeds as well as the frame to show. Then I'd simply make the mine cart update its position without gravity, figure out how to make it interact with the player correctly, and I'd be ready to roll. (No pun intended.)
Hmm...at least, I think that would work...
----------------
I'm working on a hack! Check it out here. Progress: 64/95 levels.