yorgle Posted July 29, 2006 Share Posted July 29, 2006 Can anyone point me in the right direction in Nukey Shay's optimized adventure hack code to enable the playerball to "pick up" the authorname sprite like the other objects? Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 29, 2006 Share Posted July 29, 2006 Can anyone point me in the right direction in Nukey Shay's optimized adventure hack code to enable the playerball to "pick up" the authorname sprite like the other objects? It would be pretty easy to change. The author name is a static object (you'll notice a difference between moveable objects and non-moving ones in their corresponding data tables - such as AuthorCurr, etc.). For a moveable author object, you'd need to use 3 bytes of ram (to hold it's X,Y,and room number). This is not any different than adding objects to the code, which is covered step-by-step right at the beginning of this thread: http://www.atariage.com/forums/index.php?showtopic=50191 However, there might be a couple bugs attached to your idea (because the object is so big...extending from movement border to movement border). It seems like it should work, however. So just edit the existing author tables and assign 3 bytes of ram to it at the top of the assembly. If it's glitchy, just reduce it's size a bit by having it hit a zero value sooner in the bitmap. Quote Link to comment Share on other sites More sharing options...
yorgle Posted July 29, 2006 Author Share Posted July 29, 2006 Can anyone point me in the right direction in Nukey Shay's optimized adventure hack code to enable the playerball to "pick up" the authorname sprite like the other objects? It would be pretty easy to change. The author name is a static object (you'll notice a difference between moveable objects and non-moving ones in their corresponding data tables - such as AuthorCurr, etc.). For a moveable author object, you'd need to use 3 bytes of ram (to hold it's X,Y,and room number). This is not any different than adding objects to the code, which is covered step-by-step right at the beginning of this thread: http://www.atariage.com/forums/index.php?showtopic=50191 However, there might be a couple bugs attached to your idea (because the object is so big...extending from movement border to movement border). It seems like it should work, however. So just edit the existing author tables and assign 3 bytes of ram to it at the top of the assembly. If it's glitchy, just reduce it's size a bit by having it hit a zero value sooner in the bitmap. Thanks and btw, I've learned an incredible amount going through your tutorials. My current hack has 6 dragons (one is a baby dragon) hit points for the dragons, about 110 rooms, 4 keys, 6 gates and I wanted to do something with the author sprite (I planned to make it into a princess) but I don't see where I can get an additional 3 bytes of ram without giving up gates or dragons. Any ideas? Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted August 9, 2006 Share Posted August 9, 2006 Offhand, nothing springs to mind. Other than eliminating superfluous use of ram, the only way to get "more" is to edit the code so that the existing variables can reside in BIT's rather than full bytes of ram (not counting Supercharger or Superchip ram, of course). If a variable is always a value between 0 and 3...for example...that variable only really needs to be held in 2 bits of ram - barring any time-critical use). But unfortunately, there's not many opportunities in the Adventure code that I can think of. Most of it's ram use is already devoted to gfx and objects. If you limit the game to 32 screens or less, you have 3 potential bits of ram that could be used for something else in each object's room number variable...but it would require quite a bit of editing just to get them free (i.e. to be ignored by the existing routines). One way to start is to insert AND #$1F instructions wherever a room number variable is involved (again, care must be taken that it's not during a time-critical area...or the display will get messed up). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.