NintendoAge http://nintendoage.com/forum/ -Sqooner Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-12-11T14:32:31 -05.00 Mario's Right Nut 37
EDIT: 2x2 not 4x4 ]]>
Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-12-11T11:57:54 -05.00 Mario's Right Nut 37 Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-12-09T13:47:25 -05.00 Mario's Right Nut 37
If anyone has any knowledge of the meta sprite routines you may be able to help. It seems as though this tutorial is set up for 2x2 meta sprites. I have background collision working with those, very well actually. But my enemy that I am testing with is 2x3 (2 wide, 3 tall) and its vertical collision with the background works... but the enemy hops up and down while he does this. When I set up the transfer for bg collision I have tried many things but none of them seem to fix. So I guess my question is, do I need to heavily modify this routine for use with meta sprites larger than 2x2? ]]>
Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-11-16T09:30:27 -05.00 Mario's Right Nut 37 Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-11-16T09:16:56 -05.00 Mario's Right Nut 37  . A different story for a different day...

Re-using variables isn't bad by any means, you just have to be careful. I made separate variables for everything in Spook-o'-tron and ran out of RAM pretty quick since I was afraid to re-use anything just in case it broke things unexpectedly, but with the next project I set it up from the beginning to use a temp system. The same 25 or so variables get used for all calculations and the final result usually ends up only being a byte or two. I like it a lot better so far, but it does mean that I have to be 100% certain that the routine is not going to get interrupted, and that the routines as a whole are in the right order. ]]>
Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-11-16T08:52:47 -05.00 Mario's Right Nut 37
I have been using extra variables here and there. Never in that way, so I will use that trick for sure. I usually just put in a byte here and there to make sure that the code I think is getting hit, is getting hit. Its weird that Im used to .Net so debugging is something I have never really had an issue with. This stuff is super tricky to debug, but Im getting better at it. At the very least, I know I am enjoying myself when it takes me almost a week to find 1 issue. ]]>
Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-11-16T08:33:49 -05.00 Mario's Right Nut 37
I just got to thinking about the original question a minute ago, for whatever reason, and if you ever do suspect that you're over running your variables in some way a quick way to check is to just throw in a bunch of variables where you think that it might be occurring. Kind of a cheating way to do things (real programmers frown I'm sure   ), but it is quick! I usually throw thirty bytes of Nothing and that lets me pinpoint what might be causing the issue pretty quick. That'll also let you clearly see which of the Nothing bytes are affected if you open the hex editor. If it is over running the fourth then it is easier to see since nothing else will be modifying it. ]]>
Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-11-15T23:48:24 -05.00 Mario's Right Nut 37
Im not sure if I explained that well enough but at least it is working now.
...And now to break it again, most likely lol.

Thanks guys! ]]>
Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-11-13T14:48:48 -05.00 Mario's Right Nut 37 Originally posted by: Mario's Right Nut

It's been a bagillion years since I looked at this, but, if I had to guess, I'd say something like your variables aren't INCing properly, like Solegoose said. Basically, with meta spites you have to go up by 4, one for each sprite, and for weapons, you go up by 1. IF you forget to do both X and Y, you'll get some creative errors. Sometimes it's easier to write a routine for the meta sprites and one for the basic sprites. At least until you get it working and see how they are similar/different. Memory is cheap, as the man says.

Or, just say the hell with it and burn 3 extra sprites for the weapons. That way everything has a 16x16 sprite reserved for it and you just don't use the extras or leave them blank.

I'd imagine you're even more confused now. Haha. What year is this?!?!?

  ]]>
Game Engine Building #7: Background Collision Detection http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=38886 2017-11-13T11:55:16 -05.00 Mario's Right Nut 37
Or, just say the hell with it and burn 3 extra sprites for the weapons. That way everything has a 16x16 sprite reserved for it and you just don't use the extras or leave them blank.

I'd imagine you're even more confused now. Haha. ]]>