So, I started to document the scripting engine for Luca (The artist/musician/designer/programmer chap that's helping me) and I was trying out some of the sample I was putting in the document for him, only to discover that my KillClip flag isn't actually implemented yet - doh. KillClip is a great little tool. it allows you to write a script and set it off into an infinite loop, the script engine will first wait until its come on screen, and then when it goes off - it'll kill it. This helps make scripts easy, and removes some timing problems you sometimes get.
So, first I have to write this, then document it again. It's one of these simple but irritating little things as it does chew up a few instructions, so its just a matter of keeping it small. The usualy way is to do a bounding box check to the screen, but thats too much, so I've opted to try and be clever about it. I simply check for >320 and >186. This is because the sprite is still visible when its >0, and once its <0 we've wrapped around to 511... which IS >320. This means I only have 2 compares, and then its just a matter of keeping track of the bits and flags.
No comments:
Post a Comment