Computer Science Canada Need help with my final turing assignment |
Author: | muhammed3 [ Sat Jan 12, 2013 3:56 pm ] |
Post subject: | Need help with my final turing assignment |
I need help with my final turing assignment. i want to make pac man and i cant seem to get the yellow circle to stay in the path. i dont want it to be able to go over the blue borders. i tried to do whatdotcolor but i couldnt get it. i am new to turing so please dont give me complicated steps. if i need any new variables or anything please let me know. i will attach a picture of the maze i used. My code View.Set ("graphics:463;500,nobuttonbar, offscreenonly") var chars : array char of boolean var x1, x2, y1, y2 : int var speed : int y1 := 10 x1 := 10 x2 := 10 y2 := 10 speed := 1 var picID : int var x, y : int Music.PlayFileLoop ("PacMan Original Theme tune.mp3") Music.PlayFileStop picID := Pic.FileNew ("maze9.jpg") loop Pic.Draw (picID, 0, 0, picCopy) Draw.FillOval (x1, y1, 7, 7, yellow) Input.KeyDown (chars) locate (4, 1) if chars (KEY_UP_ARROW) then y1 := y1 + 2 elsif chars (KEY_DOWN_ARROW) then y1 := y1 - 2 elsif chars (KEY_RIGHT_ARROW) then x1 := x1 + 2 elsif chars (KEY_LEFT_ARROW) then x1 := x1 - 2 end if delay (20) View.Update cls end loop |
Author: | Insectoid [ Sat Jan 12, 2013 4:18 pm ] |
Post subject: | RE:Need help with my final turing assignment |
Quote: i am new to turing so please dont give me complicated steps.
Then I suggest you find a simpler project than Pacman. This is a complicated task with no simple answers. |
Author: | Raknarg [ Sat Jan 12, 2013 4:27 pm ] |
Post subject: | RE:Need help with my final turing assignment |
Absolutely, you need to do something different |
Author: | Tony [ Sat Jan 12, 2013 6:53 pm ] |
Post subject: | RE:Need help with my final turing assignment |
http://compsci.ca/blog/12-computer-science-game-project-ideas/ |
Author: | muhammed3 [ Sun Jan 13, 2013 12:40 pm ] |
Post subject: | RE:Need help with my final turing assignment |
can anyone just help me with my question? i just need a good explanation on how to do it and ill get it. Please im desperate |
Author: | DemonWasp [ Sun Jan 13, 2013 1:03 pm ] |
Post subject: | RE:Need help with my final turing assignment |
Your question has no answer. You are asking us to break a complicated problem down into simple steps for you, which isn't really possible. There are a few options: 1) Find an easier project. 2) Read the whatdotcolour collision tutorial. It's pretty good, but it's not simple. 3) Realise that the pacman map is actually a grid, and that you can do grid-based collision detection (this is how the original worked). Start by drawing an evenly-spaced grid over the whole map. I'll give you a further hint: the central block is 5 squares wide, 3 squares high. |
Author: | TuringMaster87 [ Sat Jan 19, 2013 11:15 am ] |
Post subject: | RE:Need help with my final turing assignment |
http://compsci.ca/v3/viewtopic.php?p=268913#268913 |