+nanochess Posted August 21, 2018 Author Share Posted August 21, 2018 I'm glad you noticed it because it means you're squeezing the most from it. Dz-Jay explanation is right. I would simplify that each sprite has its own collision bits (COL0 for SPRITE 0, COL1 for SPRITE 1 and so on) The mask for AND can be calculated easily as: Bit 0 - value 1 Bit 1 - value 2 Bit 2 - value 4 Bit 3 - value 8 Bit 4 - value 16 Bit 5 - value 32 Bit 6 - value 64 Bit 7 - value 128 Bit 8 - value 256 If you want to check the collision against SPRITE 1 to 6 then you add 2+4+8+16+32+64 = 126 that is $7e hexadecimal. Check Appendix A for IntyBASIC reference on COL0-COL7 it contains most of this explanation except the value table. Hope this helps. 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096061 Share on other sites More sharing options...
Fushek Posted August 21, 2018 Share Posted August 21, 2018 The "COLx" directives are actually internal variables returning the raw value of the STIC's collision register for a sprite (0 to 7). The values represent a 8-bit "bit field" in which each bit says whether the sprite collided with an object or not: 0 means no, 1 means a collision. In the Monkey Moon example, $007e is the same as the binary value %01111110. That represents a collision with objects 1, 2, 3, 4, 5, and 6 (counting bits from the right side). Notice that the first bit on the right (for sprite 0) is not "on," and neither is the last one on the left (for sprite 7). The "AND" operator "masks" the value returned by the COL0 variable using $7E as the mask. The result is for it to return "true" if any of the masked bits (representing collisions with sprites 1 to 6) are "on," "false" otherwise. (In case it is not obvious, "AND" is a "bitwise" operator which compares each bit on either side and turns them into a "1" of not are "1," or "0" otherwise. Thus, %1111 AND %0001 = %0001.) If you wanted to check a collision between sprite #4 and sprite #0, you can try either: (COL4 and $01) ' %00000001 Or (COL0 and $10) ' %00010000 Does this make sense? dZ. Got it ... going right to left on the sprite count messed me up, but got it now! Thanks! 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096065 Share on other sites More sharing options...
+DZ-Jay Posted August 21, 2018 Share Posted August 21, 2018 Got it ... going right to left on the sprite count messed me up, but got it now! Thanks! Take a look at the "Constants.bas" file in the SDK "lib" folder. I believe we defined friendly constants for the collision values. To apply more than one, just add them together. dZ. P.S. I updated my previous post to fix some typos. It seems auto-correct likes to change my "bits" into "nots," completely altering the meaning of what I was trying to say! Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096069 Share on other sites More sharing options...
carlsson Posted August 21, 2018 Share Posted August 21, 2018 Yes, those constants are called HIT_SPRITE0, HIT_SPRITE1 to HIT_SPRITE7. As I'm too lazy to check, does the compiler optimise (COL4 AND HIT_SPRITE0) OR (COL4 AND HIT_SPRITE1) OR (COL4 AND HIT_SPRITE2) into (COL4 AND $0007)? 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096115 Share on other sites More sharing options...
+nanochess Posted August 21, 2018 Author Share Posted August 21, 2018 Yes, those constants are called HIT_SPRITE0, HIT_SPRITE1 to HIT_SPRITE7. As I'm too lazy to check, does the compiler optimise (COL4 AND HIT_SPRITE0) OR (COL4 AND HIT_SPRITE1) OR (COL4 AND HIT_SPRITE2) into (COL4 AND $0007)? No. Too complicated yet for the compiler. 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096124 Share on other sites More sharing options...
carlsson Posted August 21, 2018 Share Posted August 21, 2018 Fair enough. It means hexadecimal values (once the programmer has learned how they are constructed) are relevant even when the constants are there for abstraction. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096134 Share on other sites More sharing options...
+DZ-Jay Posted August 21, 2018 Share Posted August 21, 2018 Yes, those constants are called HIT_SPRITE0, HIT_SPRITE1 to HIT_SPRITE7. As I'm too lazy to check, does the compiler optimise (COL4 AND HIT_SPRITE0) OR (COL4 AND HIT_SPRITE1) OR (COL4 AND HIT_SPRITE2) into (COL4 AND $0007)? No, but you could add them with the "+" operator and they will get resolved to a constant. 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096135 Share on other sites More sharing options...
+DZ-Jay Posted August 21, 2018 Share Posted August 21, 2018 Fair enough. It means hexadecimal values (once the programmer has learned how they are constructed) are relevant even when the constants are there for abstraction. Not necessarily. Try: (COL4 AND (HIT_SPRITE0+HIT_SPRITE1+HIT_SPRITE2)) That should work. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096139 Share on other sites More sharing options...
carlsson Posted August 21, 2018 Share Posted August 21, 2018 D'oh! I was looking for some || operator but completely forgot addition. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096140 Share on other sites More sharing options...
+nanochess Posted August 21, 2018 Author Share Posted August 21, 2018 D'oh! I was looking for some || operator but completely forgot addition. There is the OR operator. Also optimizes constants. 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096146 Share on other sites More sharing options...
+DZ-Jay Posted August 21, 2018 Share Posted August 21, 2018 D'oh! I was looking for some || operator but completely forgot addition. Note that it only works for bit fields because the values are non-overlapping powers of two (i.e. individual bits). That should cover all of the MOB register fields, though. dZ. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096147 Share on other sites More sharing options...
+DZ-Jay Posted August 21, 2018 Share Posted August 21, 2018 There is the OR operator. Also optimizes constants. Ah! Good to know. I wasn't sure if it would, but it makes sense. dZ. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4096150 Share on other sites More sharing options...
Sir Jay Posted August 24, 2018 Share Posted August 24, 2018 Question. Does This book just discuss the coding aspect, or is it truly for beginners, that is, does it walk one through downloading the necessary software and how to use that as well? I need the “for dummies” version. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4098002 Share on other sites More sharing options...
+nanochess Posted August 24, 2018 Author Share Posted August 24, 2018 Question. Does This book just discuss the coding aspect, or is it truly for beginners, that is, does it walk one through downloading the necessary software and how to use that as well? I need the “for dummies” version. It's for dummies it includes all the steps needed to download and install the required software. We couldn't use the "for dummies" name because is trademarked, but it would have sounded great "Programming Intellivision games for dummies" Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4098003 Share on other sites More sharing options...
carlsson Posted August 24, 2018 Share Posted August 24, 2018 This one perhaps would've been a tad too long: "All you ever wanted to know about programming Intellivision games, but were too afraid to ask" 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4098117 Share on other sites More sharing options...
+DZ-Jay Posted August 24, 2018 Share Posted August 24, 2018 Question. Does This book just discuss the coding aspect, or is it truly for beginners, that is, does it walk one through downloading the necessary software and how to use that as well? I need the “for dummies” version. The book is aimed at beginners. If you are a true beginner, may want to use the IntyBASIC SDK, which makes it even easier to use. For instance, it will install all the necessary tools in the right place for you, and combine the work of compilation and assemblage into a single step. A new version for Windows with the latest compiler and other features will be released at the end of the month, but you can still get the current version and get started. -dZ. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4098136 Share on other sites More sharing options...
+nanochess Posted August 24, 2018 Author Share Posted August 24, 2018 This one perhaps would've been a tad too long: "All you ever wanted to know about programming Intellivision games, but were too afraid to ask" Another very good option Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4098227 Share on other sites More sharing options...
Sir Jay Posted August 25, 2018 Share Posted August 25, 2018 (edited) First, thanks to you both for helping keep the Inty alive. I assume it is a labor of love and not a get rich quick scheme. It's for dummies it includes all the steps needed to download and install the required software. We couldn't use the "for dummies" name because is trademarked, but it would have sounded great "Programming Intellivision games for dummies" Thanks for the info. I definitely dont know command line, even though I use computers daily, so I would be looking for a step by step process to getting it started. Definitely have a game idea I would like to attempt at some point. The book is aimed at beginners. If you are a true beginner, may want to use the IntyBASIC SDK, which makes it even easier to use. For instance, it will install all the necessary tools in the right place for you, and combine the work of compilation and assemblage into a single step. A new version for Windows with the latest compiler and other features will be released at the end of the month, but you can still get the current version and get started. -dZ. Thanks. I imagine the two together would be a powerful Inty punch for a beginner. I originally held back waiting for the Mac version, since I dont have a Windows computer except my sons and he is too busy playing Fortnite to let me get on it. (Dont worry. He plays Inty with me too.) I saw on a different thread you said the Mac version may be near, so I will probably wait. Im in no rush. It is just a bucket list type thing for me to take a swing at. Edited August 25, 2018 by Sir Jay 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4098874 Share on other sites More sharing options...
+DZ-Jay Posted August 25, 2018 Share Posted August 25, 2018 First, thanks to you both for helping keep the Inty alive. I assume it is a labor of love and not a get rich quick scheme. Thanks for the info. I definitely dont know command line, even though I use computers daily, so I would be looking for a step by step process to getting it started. Definitely have a game idea I would like to attempt at some point. Thanks. I imagine the two together would be a powerful Inty punch for a beginner. I originally held back waiting for the Mac version, since I dont have a Windows computer except my sons and he is too busy playing Fortnite to let me get on it. (Dont worry. He plays Inty with me too.) I saw on a different thread you said the Mac version may be near, so I will probably wait. Im in no rush. It is just a bucket list type thing for me to take a swing at. Yeah, sorry about the delay, but I had trouble building the installer properly on a Mac. I plan on releasing the Mac SDK along with the latest version for Windows at the end of the month. -dZ. Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4099099 Share on other sites More sharing options...
Fushek Posted August 26, 2018 Share Posted August 26, 2018 Question. Does This book just discuss the coding aspect, or is it truly for beginners, that is, does it walk one through downloading the necessary software and how to use that as well? I need the “for dummies” version. I'm a novice myself and I bought it. Occassionally, there has been an item or two that having a knowledge of simple basic helps but it has explained most things pretty well. I've only gotten through the first game (pong) and I've cobbled enough together to make a (somewhat pathetic) shooting game. And, in my experience, any time I've not understood something or had a question, this community has been great in helping out those of us who are "programmatically challenged". 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4099160 Share on other sites More sharing options...
+nanochess Posted August 29, 2018 Author Share Posted August 29, 2018 I've sent a copy of the book to John Riggs and finally today he has unboxed it https://www.youtube.com/watch?v=wMOC_PpYCBw&feature=youtu.be&t=6m15s 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4101107 Share on other sites More sharing options...
+nanochess Posted October 6, 2018 Author Share Posted October 6, 2018 Nice review of the book by The No Swear Gamer. https://youtu.be/ZUgVKYVGWGo 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4128608 Share on other sites More sharing options...
+nanochess Posted October 27, 2018 Author Share Posted October 27, 2018 Great hands-on review by Gray Defender https://youtu.be/MX6mbdoNCY4 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4143635 Share on other sites More sharing options...
SiLic0ne t0aD Posted October 28, 2018 Share Posted October 28, 2018 I found the hard cover version, cheap on the lulu site and finally bought a copy! I don't know if you ship these out yourself, but if you do, please autograph my book for me. 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4144552 Share on other sites More sharing options...
+nanochess Posted October 28, 2018 Author Share Posted October 28, 2018 I found the hard cover version, cheap on the lulu site and finally bought a copy! I don't know if you ship these out yourself, but if you do, please autograph my book for me. It ships directly from a Lulu facility. But if you still want an autograph you can send it to me and I'll send it back, you'll need to pay $10 for shipping (I'm including a new bubble envelope and Mexico postal mail has increased its charges this year) If interested please PM for address. 1 Quote Link to comment https://forums.atariage.com/topic/280023-the-mystery-of-monkey-moon/page/4/#findComment-4144614 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.