Help in "Snake" game using C programming for the AVR

Reply

Join Date: Oct 2004
Posts: 8
Reputation: Simplicity is an unknown quantity at this point 
Solved Threads: 0
Simplicity Simplicity is offline Offline
Newbie Poster

Help in "Snake" game using C programming for the AVR

 
0
  #1
Oct 21st, 2004
Hi guys,
I'm new to this forum and this is my first post :cheesy:
I need help in modifying a "Snake game" program..
What I need to do is modify the program so that when it starts (i.e. the AVR microcontroller is reset) it displays a message giving the name of the game and your name(s). This should be displayed for several seconds before the game commences.
I know that I have to add it to the function splash_screen()
so I typed this in it:
void splash_screen(void) {
clear_terminal();

/* MY CODE HERE */
printf("Snake Game\n");
printf("Name\n");
init_timer(8000);
}
BUT it doesn't display what i want
I attached the whole program file if in need to look at the whole thing.

Regrads,
Simplicity
Attached Files
File Type: zip Project.zip (20.7 KB, 120 views)
Everything is okay in the end...
If it's not okay, then it's not the end.
:cool:
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 8
Reputation: Simplicity is an unknown quantity at this point 
Solved Threads: 0
Simplicity Simplicity is offline Offline
Newbie Poster

Re: Help in "Snake" game using C programming for the AVR

 
0
  #2
Oct 22nd, 2004
Hurray! I figured out how to solve it and solved a couple of other modifications I have to do.. Now, I'm stuck with a different thing and that is make the game speed up as the score gets higher.

This is what I've done but I don't think it's right :rolleyes:
  1. if (get_score == '30'){
  2. move_snake() + 2;
  3. }
Can anyone please help me?! You can look at the rest of the code for more info. in the attachment of the previous post

Thanx guys
Simplicity
Everything is okay in the end...
If it's not okay, then it's not the end.
:cool:
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 8
Reputation: Simplicity is an unknown quantity at this point 
Solved Threads: 0
Simplicity Simplicity is offline Offline
Newbie Poster

Re: Help in "Snake" game using C programming for the AVR

 
0
  #3
Oct 22nd, 2004
Anyone could please help me in this.. I'm still stuck with it
I changed it to this:
if (get_score == 30){
sleep(time_period + 3);
}
But still ain't workin' :!:
Everything is okay in the end...
If it's not okay, then it's not the end.
:cool:
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2
Reputation: waxx has a little shameless behaviour in the past 
Solved Threads: 0
waxx waxx is offline Offline
Newbie Poster

Re: Help in "Snake" game using C programming for the AVR

 
-1
  #4
Oct 2nd, 2008
Try to use this....


if( get_score >= value)
{
speed = value;
}

just try... thats what i did to my snake game. =)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC