Computer Science Canada Combat Game |
Author: | Monojoe [ Wed Mar 29, 2006 5:32 pm ] | ||
Post subject: | Combat Game | ||
Ok im new to turing this year so bare with me. ive been trying to make this 2 player fighting game where each person is on a side (and its a side view game) and has a gun. i have the movement down and im just wondering how i would go about making the guys shoot. heres my Code so far: (sorry if theres some variables not doing anyhting thats from trying different things and failing, if anyone has any ideas or tips it would make my life a whole lot easier.)
|
Author: | Delos [ Wed Mar 29, 2006 7:37 pm ] |
Post subject: | |
Hello Monojoe. Please resize your avatar - it's too wide. On to your code: Glad to see you have some of the ideas down. Now, you need to streamline that by incorporating Types and Records. Look at the [Turing Walkthrough] for further details. You say you're new, that's no problem. There's always room for learning. As for Shooting - this may be a little challenging for you, since it will mean that you'll have to work with elementary objects. Essentially, you'll have a group of variables (packaged in a Record) that will hold information about a 'bullet'. These will include things like its position, speed, direction, etc. In your main movement loop, you can check for the occurence of a particular key, for instance Space. When it is pressed, you will initiate a sequence of procedures/functions that will create the 'bullet' and each iteration of the loop, some of its properties will change (for instance its position). Read up on the following topics in the Tutorials: - Procedures, Functions, Processes (leave the latter alone for now though) - Records and Types - Arrays, single-dimensional is fine for now - View.Update These topics will take just a short time to read, but will take a while to get used to. The good news is you seem to be thinking in the right way about approaching programming, so just trust your intuition and experiment. Questions? Post 'em up. |