Computer Science Canada I need some guidance |
Author: | Brandon FS [ Thu Jun 21, 2012 9:49 am ] | ||
Post subject: | I need some guidance | ||
What is it you are trying to achieve? I am trying to create a simple Turing game where you can move around an object that fires at an AI while the AI fires at the object/user. the user and the AI player should take turns shooting. The bullets should ricochet off of the sides of the map.> What is the problem you are having? I am unfamilair with the Turing Language and I would like it if someone could provide a basic set of code that I can adapt(replacing the background, incorporating sounds into the game, changing the skin for each player. Keep in mind I am only asking for basic code, nothing far fetched. Thank you. Describe what you have tried to solve this problem <Answer Here> Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using <Answer Here> |
Author: | Raknarg [ Thu Jun 21, 2012 1:08 pm ] |
Post subject: | RE:I need some guidance |
You're going to have a hard time getting people to do any actual programming for you here, we advocate creating things yourself. You learn more. |
Author: | Zren [ Thu Jun 21, 2012 1:28 pm ] |
Post subject: | RE:I need some guidance |
> I am trying to create a simple Turing game If this is your first project, then a particle engine is probably not a simple game. > where you can move around an object that fires at an AI while the AI fires at the object/user. Change that to 2 Players, and you might be able to pull this off. Writing a good AI is a project all on it's own. Moving an object around the screen can be found in the Turing Turorial forum. http://compsci.ca/v3/viewforum.php?f=3 > the user and the AI player should take turns shooting. Use a variable to store which players turn it is. When you reach the last player's turn, wrap around to the first player. You should first try to design this with an unknown amount of players (2 or more). But only if you've learnt arrays. > The bullets should ricochet off of the sides of the map. Look for a Particle Engine. A custom one where each particle either stores the distance it's travelled or the number of collisions it's had, so that the particle will stop moving. If you don't do that, it will bounce forever. > unfamilair with the Turing Language The Turing Walkthrough is a fairly good primer if you're jumping from another language. |
Author: | Brandon FS [ Thu Jun 21, 2012 1:31 pm ] | ||||
Post subject: | Re: I need some guidance | ||||
Thank you for the replies, Ie deicided to try and program a different game. But my game does not seem to be working, If one of you guys could tell me where I went wrong and how i can get my program running I would appreciate it. Thank you. Here is the Code:
Mod Edit: Please wrap all turing code in:
So that we get proper whitespace and colorized syntax. |
Author: | Tony [ Thu Jun 21, 2012 1:36 pm ] |
Post subject: | RE:I need some guidance |
In what way is it not working? |
Author: | Brandon FS [ Thu Jun 21, 2012 1:43 pm ] |
Post subject: | Re: I need some guidance |
When I run the program it says that it is executing but a few seconds after it says the program is finished being ran and no screen pops up |
Author: | Brandon FS [ Thu Jun 21, 2012 2:24 pm ] |
Post subject: | RE:I need some guidance |
bump |
Author: | Zren [ Thu Jun 21, 2012 2:26 pm ] |
Post subject: | RE:I need some guidance |
At what point do you actually draw anything? |
Author: | Brandon FS [ Thu Jun 21, 2012 2:31 pm ] |
Post subject: | Re: RE:I need some guidance |
Zren @ Thu Jun 21, 2012 2:26 pm wrote: At what point do you actually draw anything?
I am new with the turing language, if you have spotted something that is causing my program not to open up and have visible graphics, can you please tell me what it is. This is a basic project for my grade 10 programming class. |
Author: | Dreadnought [ Thu Jun 21, 2012 2:55 pm ] |
Post subject: | Re: I need some guidance |
Brandon FS wrote: if you have spotted something that is causing my program not to open up and have visible graphics, can you please tell me what it is. It's quite the opposite, we can't spot anything that would make your program create any visible output. Which part(s) of your program do you think should be drawing things to the screen? |
Author: | Brandon FS [ Thu Jun 21, 2012 3:07 pm ] |
Post subject: | Re: I need some guidance |
Dreadnought @ Thu Jun 21, 2012 2:55 pm wrote: Brandon FS wrote: if you have spotted something that is causing my program not to open up and have visible graphics, can you please tell me what it is. It's quite the opposite, we can't spot anything that would make your program create any visible output. Which part(s) of your program do you think should be drawing things to the screen? Is there anyway you could tell me the command or commands to give my program visible output. If you could I would appreciate it, like i said im in grade 10 and this is my first graphics programming assignment |
Author: | Brandon FS [ Thu Jun 21, 2012 3:33 pm ] |
Post subject: | Re: I need some guidance |
I would edit the title of the post but people have already commented on the post |
Author: | Tony [ Thu Jun 21, 2012 3:39 pm ] |
Post subject: | RE:I need some guidance |
Don't do offscreenonly for now -- that buffers all the output until you call View.Update |
Author: | Brandon FS [ Thu Jun 21, 2012 3:46 pm ] |
Post subject: | Re: RE:I need some guidance |
Tony @ Thu Jun 21, 2012 3:39 pm wrote: Don't do offscreenonly for now -- that buffers all the output until you call View.Update
whenever I run my program it says that it is executing and a few seconds after it says execution finished. Every time I run the program no window appears and the game is unplayable. Thank you for the help so far Tony |
Author: | Brandon FS [ Thu Jun 21, 2012 3:47 pm ] |
Post subject: | Re: RE:I need some guidance |
Brandon FS @ Thu Jun 21, 2012 3:46 pm wrote: Tony @ Thu Jun 21, 2012 3:39 pm wrote: Don't do offscreenonly for now -- that buffers all the output until you call View.Update
whenever I run my program it says that it is executing and a few seconds after it says execution finished. Every time I run the program no window appears and the game is unplayable. Thank you for the help so far Tony I do not mean that in a reluctant way, I am being sincere when I say thank you |
Author: | Zren [ Thu Jun 21, 2012 5:24 pm ] |
Post subject: | RE:I need some guidance |
Start a new program, then start messing around with functions in the Draw Module -> drawmodule. Using any of the draw functions will automatically create a window, and set all drawing calls towards it. Start with Draw.Box |
Author: | Dragon20942 [ Sat Jun 23, 2012 2:23 pm ] |
Post subject: | RE:I need some guidance |
Well, no screen appears because you didn't draw anything in your program. Even if you did, the "offscreenonly" would prevent anything from being drawn until you call View.Update. There are 2 your 2 problems. As Zren said, look into the Draw module and actually draw stuff. |