Mmmm.. Not quite done yet. Its about 10 lines of code, yet its not working... damn. For some reason the top bit in the Y coordinate is being set of some sprites, and this is leading them to get killed off as that takes it over $c0 which is past my kill line. It looks like it's suddenly jumping from $62 to $ca the first time the circle command is run - it also looks like its only happening because of the order the sprites are being allocated in - very odd.
Ahhh.... the wonders of debugging. Turns out that the PathLastCommand variable wasn't being reset when I reallocated the sprite to a new path, and the first time this sprite was being reused it had been killed while doing a circle command. This means it was never being initialised properly and so wasn't setup right. The circle command is pretty cool, but has a couple of issues. The first is that when you initially run the command it has to work out where the center of the new circle is - this allows you to start anywhere on the arc and smoothly run around it. The problem is it requires twice the work! First you need to do an inverse circle, then you need to do the command properly. Still it's a small price to pay for such a great script command.
I'm also busy doing a script tutorial for both Luca and anyone else that wants to do Shoot-Em-Up's with this game framework once its released. With any luck, it should mean that we get a steady supply of great shooters comming out from folk - and pretty quickly too. They should have the choice of simply re-skining it with different backgrounds and sprites and possibly different music+effects. Aside from things like animating turrets, it will mean that you get a completly different game without any coding at all. Of course, if you dont want turrets, you just don't put them in! The goal here I guess is to make it as data driven as possible.... but when that fails, then coders can go in and just change whatever they like!
I'm now having a look at the turret bug - they don't always restart once your dead. This turns out to be a simple one with the FreeTurretIndex not being reinitialised on a restart. However this has now taken a funny turn.... The first turret on screen is active and shooting, but I can't kill it..... how odd.
No comments:
Post a Comment