Computer Science Canada Maze Game |
Author: | gemini [ Thu Jan 08, 2015 11:17 am ] | ||
Post subject: | Maze Game | ||
What is it you are trying to achieve? Trying to make a simple maze game with very simple commands. Some of the commands that cant be used are: View.Update, Whatdotcolour, and getch. This is for a grade 10 summative assignment. What is the problem you are having? The problem I am having is that: I am having difficulty to make the boundaries for the maze so the circle will go back to the start as soon as the ball touches the boundary. I need to make sure the commands are very simple Describe what you have tried to solve this problem I have tried what I know: loops, elsif, and, if statement none
Please specify what version of Turing you are using 4.1 turing |
Author: | Zren [ Thu Jan 08, 2015 3:32 pm ] |
Post subject: | RE:Maze Game |
I'm assuming you're trying to detect when the player touches the wall. This is known as Collision Detection. Since the use of what dot color is banned, you can't use the screen as a 2D array to detect walls. Which is a good thing as it forces you to use math (yay math). Instead of having the player be a circle, use a square/rectangle and use Rectangular Collision Detection to check for a collision with the player rectangle against an array of wall rectangles. As an aside to the other helpers on the forum: Not sure why they'd ban View.Update() though. getch is understandable since they want to guide people to use the Input.KeyDown(). |
Author: | Insectoid [ Thu Jan 08, 2015 6:46 pm ] |
Post subject: | RE:Maze Game |
Quote: As an aside to the other helpers on the forum: Not sure why they'd ban View.Update() though.
The only reason I can think of is to prevent students taking advantage of lazy teachers by doing whatdotcolor checks on the back buffer so it isn't obvious they cheated. As for OP: Quote: I have tried what I know: loops, elsif, and, if statement
This is like saying "I tried using a hammer" when someone asks what you did to try to build a bookshelf. It's far better to tell us how you used it. "I tried using a hammer to break this board into smaller pieces to use for shelves, but the edges are all messed up and none of them are the right length" is a far better way to answer the question, don't you think? Now we know exactly where our misguided carpenter went wrong! |