Computer Science Canada Enemies in Game |
Author: | 13erka [ Tue Nov 02, 2004 12:15 pm ] | ||
Post subject: | Enemies in Game | ||
Hello. I`m extremely new to Turing and programming in general. I wanted to make a game in Turing similar to Space Invaders or any other game where all you have to do is shoot the ememies. This is what I have so far:
I think my variables are pretty easy to understand. Now for my question: How do I make enemies and how can I get Maple (the main character) to shoot them? |
Author: | Delos [ Tue Nov 02, 2004 3:15 pm ] |
Post subject: | |
Well, let's see... For this you'll want to look up types and records so that you'll be able to consider the entire character as one 'piece' as opposed to fifty variables floating around the place. You seem to have the grasp of basic animation down, so creating a 'shooting' object from your character won't be difficult. I especially like the way you've procedurized your programme. Given, you could have done a lot more of if (and I'd suggest you do), but for a beginner this is a great habit to get into. Essentially, you'll have a number of enemy-type objects floating around...and within each loop of your main loop (the one you have at the bottom), you'll check what's going on with them. Every few loops, you can call a condition to move them, or to create some more of them, or whatever. Also in this woderful loop, you can have your Input Detection going on. When the right key is pressed, you can call a procedure to create some sort of 'shooting' picture near your main character. This will itself be an object type thing...which will then be looked during each loop. Is this making sense to you yet? You seem to be on the right track, even if something like this is quite a stretch for a beginner... Useful links. Records Records by Dodge Ifs by tony Arrays by Dodge Arrays by tony Good luck. |
Author: | 13erka [ Wed Nov 03, 2004 5:07 pm ] |
Post subject: | Thanks a bunch! |
Thanks a lot! I'll see if I can work it out at school. |