Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2018-11-15 02:13:10

26F
Member
Registered: 2018-07-25
Posts: 13
Website

Snake GBDK source code and compiled executable (for game boy.)

This is a second attempt at a game using gbdk after learning to use it to recreate various demos found on the internet.
There is a bug where the snake eats itself and the game doesn't register it as a death. I've been struggling to recreate the bug, (which is why you can press (A) to restart the game speed), so I thought I'd post it here so if anyone spots the bug they might be able to spot where the snake is and food is and understand why it's happening. The bug has only happened at the game's top speed, hence the (A) to restart the game speed, but I've been unable so far to spot the bug and am wondering if I'm imagining things. I don't want to just forget about it because the whole point of programming it was to learn to implement something without out just copying someone else code. Which I do far too often and which is not a good way to learn.

https://github.com/26F/Snake-GBDK-/tree/master

Offline

 

#2 2018-11-20 16:27:28

DU0
Member
From: Porto Alegre - RS - Brazil
Registered: 2017-04-01
Posts: 23
Website

Re: Snake GBDK source code and compiled executable (for game boy.)

Hey, thanks for sharing.
I took a quick glance here but couldn't find anything obviously wrong with your code. If I were you, I'd go by it line by line adding comments explaining what everything does. It's boring, but this has helped me many times in the past. It's a sort of rubber ducky technique, but less stupid.

Offline

 

#3 2018-11-20 19:18:03

26F
Member
Registered: 2018-07-25
Posts: 13
Website

Re: Snake GBDK source code and compiled executable (for game boy.)

DU0 wrote:

Hey, thanks for sharing.
I took a quick glance here but couldn't find anything obviously wrong with your code. If I were you, I'd go by it line by line adding comments explaining what everything does. It's boring, but this has helped me many times in the past. It's a sort of rubber ducky technique, but less stupid.

Thanks next time I'm debugging I'll keep this in mind. It's quite, but probably not a bad idea.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson