Jump to content
IGNORED

atari2600land's Blog - Some random orange knocked me in the head!


RSS Bot

Recommended Posts

Back to the Oranges GB game. Today's update: Making the oranges random. Some kind people on the GB programming forums helped me with this. And I will relate it to you now.
There is a timer on the Game Boy's hardware that updates 16,384 times per second (I think that's what they said.) It is register 0xFF04. This is what Tetris used to make the shapes random. So if it's good enough for Tetris, it's good enough for me. Trouble was, I didn't know how to read it. But someone else helped me with it and now the oranges move randomly. I thought for a truly random game, the oranges' speed should be random as well, otherwise it would just return the same random number over and over again. Which while it would still be random, I want randomness...TO THE MAX! So the oranges' speed changes as well. Not very much, I can barely tell the difference between them. The next step was trying to make the guy not flash when the game restarted. This took a while until I realized that if I moved the show sprite command down to the bottom, that would work. I tried it in BGB a few times. One time I couldn't see the guy until I moved him, but I think that was the emulator or my computer being flaky because it works good on a real Game Boy. So now with the guy, one orange, score, title screen, there's still more work to be done. Like adding more oranges. What is the maximum number of sprites I can have on screen? One guy and how many oranges using the same tile map?



http://atariage.com/forums/blog/168/entry-13604-some-random-orange-knocked-me-in-the-head/
Link to comment
Share on other sites

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

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