Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Yum! (Game Gear game)

Reply to topic
Author Message
  • Joined: 06 Sep 2015
  • Posts: 268
  • Location: United States
Reply with quote
Yum! (Game Gear game)
Post Posted: Mon Sep 11, 2023 2:49 am
I think I'm finished with my new game for the Game Gear. It's called Yum! Food is zooming towards your mouth. The object of the game is to open the mouth to let in pizza and cookies, and close the mouth for lettuce and broccoli. There are four different backgrounds, each one a level, until you get to level 5. Then the backgrounds keep changing but the levels don't increase. What do you think?

EDIT: I can't seem to attach the game. Help?
  View user's profile Send private message Visit poster's website
  • Joined: 06 Sep 2015
  • Posts: 268
  • Location: United States
Reply with quote
Post Posted: Mon Sep 11, 2023 4:35 am
Trying again with attaching...
yumversion31.zip (17.37 KB)
Yum! (version 31)

  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Mon Sep 11, 2023 2:52 pm
It's funny and entertaining in a simplistic kind of way. I like it.
  View user's profile Send private message
  • Joined: 04 Jul 2010
  • Posts: 542
  • Location: Angers, France
Reply with quote
Post Posted: Mon Sep 11, 2023 4:43 pm
A little update could be "open / close the mouth" with the same button ;)
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 556
  • Location: Málaga, Spain
Reply with quote
Well done!
Post Posted: Mon Sep 11, 2023 5:07 pm
I see that you are not using all the graphical possibilities in terms of palette of the gamegear (errrr... on the cookie, yes), but it must be said that I have played more to this game than to some triple A of Steam.... Well done!
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Mon Sep 11, 2023 5:24 pm
omg, why is this so much fun!?

Looks like you're not seeding your random sequences at all, so presumably it's possible to learn how to get really good at this game..
  View user's profile Send private message Visit poster's website
  • Joined: 06 Sep 2015
  • Posts: 268
  • Location: United States
Reply with quote
Post Posted: Tue Sep 12, 2023 7:04 am
thanks for the feedback, all. I'll try to seed the randomness of the game.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Sep 2015
  • Posts: 268
  • Location: United States
Reply with quote
Post Posted: Tue Sep 12, 2023 7:48 am
It should be fairly random now.

By the way, I found this site which has a tiny RNG using LFSR, but it uses 6502 assembly and I don't know how to make it GG/SMS compliable.

https://codebase64.org/doku.php?id=base:small_fast_8-bit_prng Any help with that would be greatly appreciated.
yumversion32.zip (17.38 KB)
Yum! (version 32)

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Post Posted: Tue Sep 12, 2023 8:09 am
That’s a fairly bad RNG as its sequence is only 255 long. You can get better randomness easily on Z80, there’s a few algorithms around, for example https://www.smspower.org/Development/RandomNumberGenerator
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Tue Sep 12, 2023 8:12 am
Gamegearguy wrote
It should be fairly random now.

By the way, I found this site which has a tiny RNG using LFSR, but it uses 6502 assembly and I don't know how to make it GG/SMS compliable.

https://codebase64.org/doku.php?id=base:small_fast_8-bit_prng Any help with that would be greatly appreciated.


Yeah using a LFSR is a pretty good way to do it, the directly equivalent Z80 assembler for that example is something like this:


        ld a, (seed) ; lda seed
        sla a        ; asl
        jr nc, noEor ; bcc noEor
        xor $1d      ; eor #$1d
noEor:
        ld (seed), a ; sta seed


The important thing is that you can start off with seed being different every game. There are a few ways to approach it, but you can certainly use the variable time it takes for the user to initially press the start button to set different seed values. Just note that you can never use 0 as a seed value because that will cause your LSFR to get stuck.

EDIT: sorry @Maxim saw I cross posted. Good point about the sequence length although I rather suspect in this game it would be unnoticeable.
I used a 16 bit LSFR to generate the scenery in Primates FWIW. Here's what I wrote in C, if that's of any use at all. Note that it right shifts rather than left:


uint16_t get_random(void)
{
  static uint16_t random = 0x49E5; // initial static seed - so need to call get_random an arbitrary number of times to properly randomise
  uint8_t lsb = random & 1;
  random >>= 1;
  if (lsb == 1)
    random ^= 0xb400u;
  return random;
}


Or to try and implement the same 8 bit left shift as your 6502 example (a bit contrived):


  uint16_t tmp = seed << 1;
  if (tmp & 0x0100)
    tmp ^= 0x001du;
  seed = tmp & 0x00ff;
  View user's profile Send private message Visit poster's website
  • Joined: 06 Sep 2015
  • Posts: 268
  • Location: United States
Reply with quote
Post Posted: Tue Sep 12, 2023 9:12 am
Ive been using the Phantasy Star one, and it seems to work pretty good now that I added one to the RandomNumberGeneratorWord variable on each frame. I decided to add an extra one to it whenever the 1 or 2 button is pressed, so it should be even better now.
I also fixed a bug that didn't allow the broccoli to show up on level 1.
yumversion33.zip (17.38 KB)
Version 33

  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Tue Sep 12, 2023 9:28 am
Gamegearguy wrote
Ive been using the Phantasy Star one, and it seems to work pretty good now that I added one to the RandomNumberGeneratorWord variable on each frame. I decided to add an extra one to it whenever the 1 or 2 button is pressed, so it should be even better now.
I also fixed a bug that didn't allow the broccoli to show up on level 1.

You shouldn't really need to keep on adding constant values to your seed throughout the game — in fact that might result in a "less random" sequence — once you have come up with a suitably random initial seed value right at the beginning of your game, you should be able to happily keep generating numbers just from the LSFR without worrying any more about it. But anyway, no point getting too scientific about it, with your sequences of vegetables as they are very little pseudo-randomness is needed to make the game suitably difficult so whatever works!
  View user's profile Send private message Visit poster's website
  • Joined: 05 Jan 2006
  • Posts: 374
  • Location: USA
Reply with quote
Post Posted: Sun Oct 01, 2023 9:28 am
Anyone care to share a screenshot? )
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!