Jump to content

atari2600land's Blog - Three foods


Recommended Posts

So I did a bit of coding before I went to sleep. I got three foods in the game now. But I discovered a couple of bugs.
#1 - when the score reached past 255, it went crazy. I discovered this was due to me trying to add different types of variables together. Which I don't understand why it wouldn't go crazy before it reached 255. So I changed food speed variables from a char to an int (which the score was) and the problem went away.

I went to sleep and woke up. I'm trying to switch my life around so I'm awake during the day and asleep at night. I went to sleep at noon and woke up a couple of times and woke up for good at about 2am. It was at 2am when I noticed the other bug:
#2 - right after the food got eaten but before a new one was on screen, the new food type was displayed at the mouth for a split second. I think changing some code around fixed that problem. The third food seems to be random enough.

I was noticing that the black pickles weren't showing up as much. So I made the "random" number be between 0-10 and have the pickle be between 8-10. The pickle shows up more often now which is good.

The way I do random numbers is this:


Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...