I've been finishing off the firing of baddies and was playing with the actual bullet direction stuff. I short-cut most of the work by not using a line draw, but a best guess. That is if we're 200 pixels away on X then I give it a steep angle, if Im zero pixels away on X then it fire directly up or down. Now this works pretty well but now that baddies shoot I've been extending it to be a little more prescise. However, with each tweak, I'm making the code bigger and more complex, and its all just a fudge anyway.... so I'm wondering if I should rip it all out and just use a line draw.
The thing about a line draw is its nice and prescise, but the good thing about mine is that it isn't! I know that sounds a bit strange so let me explain. If someone shoots at you're position, you simply move out the way. If 5 baddies shoot at your position, then again... its a little harder, but move and your probably safe. If 5 people shoot in your general direction then moving out of the way of one bullet, will probably throw you into the path of another! This makes it harder to avoid bullets which is the idea.
So... should I just leave the spaghetti code and think "well, it does what its supposed to, even if it is a bit unreadable..." or should I have a nice neat bit of code (that might take longer to run) but may also make the game easier.... Mmmmm.
The only way really is to try and see, but its a fair amount of work, so I'm not sure....
1 comment:
Leave the "not so precise" code...
Its better for gameplay and code will work.... probably :)
Post a Comment