Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Snake Game Problems...

Author
Message
Skmist
12
Years of Service
User Offline
Joined: 1st Mar 2012
Location:
Posted: 12th Apr 2012 19:59
Can anyone help me with this? Its a game I'm working on in my C++ class, but its stuck in an infinite loop and I cant figure out exactly where or why..

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 13th Apr 2012 03:02 Edited at: 13th Apr 2012 03:09
It's just some silly mistakes:

Your first loop in drawFood() function

Change the very first loop to y++ instead... Hoping that's all it is...

EDIT: I ain't got the media so I can't test the visuals but I'm still looking at it to see if there's anything else...

EDIT2:
Isn't assigning anything the MapVar[][]...

I'm assuming this is looking for a non-empty space?

Also isn't assigning anything...

Tips:

1. Format your code so it's easier to debug.
2. Use the debugger to follow variables. (requires running in debug mode)

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-04-25 09:13:09
Your offset time is: 2024-04-25 09:13:09