Computer Science Canada Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
Author: | nk92 [ Fri Jan 09, 2009 7:08 pm ] |
Post subject: | Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
Well, i'm trying to make a snake game for my final ISU.. I've never programmed in my life, and its really confusing even though i've been trying really hard at it.. So well.. we were told to make a game using a map (text file), opening the file in the procedure and then using the map in some way :S I decided to make a snake game.. until it was too late and I found out that it was much harder than i expected it to be.. But, anyway. I've put both my map and my program itself in attachments.. please please please help! i need to give it in next week! =D |
Author: | syntax_error [ Fri Jan 09, 2009 7:12 pm ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
What do you need help with? No One is going to finish your program here. |
Author: | Tony [ Fri Jan 09, 2009 7:37 pm ] |
Post subject: | Re: Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
nk92 @ Fri Jan 09, 2009 7:08 pm wrote: I've never programmed in my life
What were you doing since September? What parts do you find confusing/difficult? |
Author: | nk92 [ Fri Jan 09, 2009 7:43 pm ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
I never asked anyone to finish my program for me.. I just wanted someone to have a look at it. I don't understand the concept of using the map in a text file to make my character move. I want to do the work myself.. I've been doing that the whole semester.. I don't really understand two dimentional arrays and arrays in general. |
Author: | Tony [ Fri Jan 09, 2009 7:58 pm ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
the "map in a textfile" is used only as an external storage/configuration. The contents of the textfile are read and loaded into an array. We've got an excellent tutorial on arrays and 2D arrays -- http://compsci.ca/v3/viewtopic.php?t=14333 |
Author: | nk92 [ Fri Jan 09, 2009 8:01 pm ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
Thanks! I'll check it out : ) |
Author: | nk92 [ Fri Jan 09, 2009 8:05 pm ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
So, what i've done is right or wrong? Have i used the map as an "external storage/configuration"? |
Author: | OneOffDriveByPoster [ Fri Jan 09, 2009 9:21 pm ] |
Post subject: | Re: RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
nk92 @ Fri Jan 09, 2009 8:05 pm wrote: So, what i've done is right or wrong? Have i used the map as an "external storage/configuration"? As long as you are reading the map in and not trying to store into the file, it should be what you were asked for. |
Author: | nk92 [ Sat Jan 10, 2009 10:36 am ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
Alright.. I guess its right then.. Thanks! ![]() |
Author: | nk92 [ Sat Jan 10, 2009 10:39 am ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
Sorry if this is getting annoying, but how would you make er objects like balls or squares pop up for the snake to "eat"? I tried doing a randint, but i'm not sure if im doing it the right way cause it makes the circles pop up all over the place instead of only after the snake "eats" one... |
Author: | The_Bean [ Sat Jan 10, 2009 10:50 am ] |
Post subject: | Re: Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
What you want is 1 or 2 things for him to eat, and when the snake moves over top of it, reset the objects coordinates to be somewhere else. Only reset them when a collision takes place, not every loop through the program. |
Author: | nk92 [ Tue Jan 13, 2009 12:12 am ] |
Post subject: | RE:Snake Game HELP! --> Ive never programmed in my life! First project! HELLPPPPPPPPPPPPPPPPPPP. :D |
I got it! ![]() Thanks |