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 - [Coding competition 2024] Spaghetti Numbers by Z80ASMprogrammer2022

Reply to topic

Rate this entry!

1 (Terrible) 5% 5%
2 5% 5%
3 16% 16%
4 16% 16%
5 22% 22%
6 22% 22%
7 5% 5%
8 5% 5%
9 0% 0%
10 (Excellent) 0% 0%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
[Coding competition 2024] Spaghetti Numbers by Z80ASMprogrammer2022
Post Posted: Mon Mar 25, 2024 10:48 am
Last edited by Maxim on Tue Apr 02, 2024 9:21 am; edited 1 time in total
https://www.smspower.org/Homebrew/SpaghettiNumbers-SMS



Quote
The game is a demo made from a WIP.

Everyone knows you can make words from alphabet Spaghetti.

This game uses a related idea, where you have to make certain numbers (which are prime numbers) out of Spaghetti numbers; where the prime numbers are all odd primes between 0 and 200.

The purpose of the game is it is used for learning all the odd prime numbers between 0 and 200. In the game and on the left of the screen (see fig. 2) you will see a bowl with spaghetti numbers jostling about.

Find as many of the allowed primes numbers as possible in the time limit-use the up and down keys and button 2 to enter your answer..


  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: Sat Mar 30, 2024 1:35 pm
I think I prefer this game to finding Wordy Gems, although perhaps that says more about my sensibilities with respect to prime numbers more than anything else :)

I like the way the numbers are vibrating, it adds some additional challenge to the game, as well as reminding me that the clock is ticking!

A couple of usability issues on this one I found:

- the game seems to very often start with the wrong palette, so multiple hard resets are required to get the palette looking like the examples. This also affects playability, as sometimes the numbers are very hard to see. See the screenshot below. From Emulicious (standard BIOS), but the same on my real hardware (no BIOS) as expected.

- I find the feedback on guessing the number very difficult to understand. Basically when you think you know the number, you have to place the cursor on the first digit, and then quite carefully watch the "lives" and "score" fields, to see whether you got it correct or not. In either case the grid changes. Some more explicit feedback about whether or not my guess was correct, for instance a popup banner, overlayed message or even a transition to a result screen would be really nice here I think.
spaghetti.png (57.99 KB)
spaghetti.png

  View user's profile Send private message Visit poster's website
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Sat Mar 30, 2024 2:09 pm
willbritton wrote
I think I prefer this game to finding Wordy Gems, although perhaps that says more about my sensibilities with respect to prime numbers more than anything else :)

I like the way the numbers are vibrating, it adds some additional challenge to the game, as well as reminding me that the clock is ticking!

A couple of usability issues on this one I found:

- the game seems to very often start with the wrong palette, so multiple hard resets are required to get the palette looking like the examples. This also affects playability, as sometimes the numbers are very hard to see. See the screenshot below. From Emulicious (standard BIOS), but the same on my real hardware (no BIOS) as expected.

- I find the feedback on guessing the number very difficult to understand. Basically when you think you know the number, you have to place the cursor on the first digit, and then quite carefully watch the "lives" and "score" fields, to see whether you got it correct or not. In either case the grid changes. Some more explicit feedback about whether or not my guess was correct, for instance a popup banner, overlayed message or even a transition to a result screen would be really nice here I think.




" but the same on my real hardware (no BIOS) as expected."

The colors are 100% correct on real hardware for Spaghetti Numbers (see attached photo).The black line in photo is master system aerial and the white spot in the photo is the screen glare. The palette is loaded correctly with no problem.

  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Sat Mar 30, 2024 2:52 pm
Yes, I saw the similar response you made to segarule elsewhere.

I suspect that the problem might be to do with BIOSes - it could be that when played on original hardware with certain BIOSes the palette is already set up for your game but when played with an emulator this is not the case.

I might humbly suggest that if you want to allow as many people as possible the ability to enjoy your games the way you intended you could make a small change to fix the palettes for all users, not just those lucky enough to be playing on hardware that happens to work, but that's just an opinion.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Sat Mar 30, 2024 5:28 pm
willbritton wrote
Yes, I saw the similar response you made to segarule elsewhere.

I suspect that the problem might be to do with BIOSes - it could be that when played on original hardware with certain BIOSes the palette is already set up for your game but when played with an emulator this is not the case.

I might humbly suggest that if you want to allow as many people as possible the ability to enjoy your games the way you intended you could make a small change to fix the palettes for all users, not just those lucky enough to be playing on hardware that happens to work, but that's just an opinion.



"Yes, I saw the similar response you made to segarule elsewhere.
I suspect that the problem might be to do with BIOSes -"

I think it because Brazil uses 60Hz and the game was made for a 50Hz master system.

The game works at 50Hz but not guaranteed to work for 60Hz (hence it didn't work on Segarule's Brazilian master system). So the game will work on a 50Hz master system . It has been tested and working on a few 50Hz master systems.

"not just those lucky enough to be playing on hardware that happens to work, but that's just an opinion"

But as the photo shows it works on a 50Hz one master system setup (as the photo shows) so it will work on the same master system 50Hz model (of which there are
a few million according to wikipedia)-in other words there isn't actually a bug in the game because, case in point, not all 50Hz commerical PAL games work on NTSC 60Hz.

So I am just happy to know , for now, that my demo does work properly on a 50Hz master systems as the photo shows.

That said, if I do have the time and energy I will try to fix the potential palette problem or the other real hardware problem, but if it not a quick fix then it may take tons of time and be exhausting to find a hardware bug (by doing exhaustive hardware testing) lots more so than doing a paid day job for example (in terms of time and energy)- e.g. it can involve writing lots of different new versions and testing them on different hardwares until the problem is fixed.

That said, there maybe a quicker way to do such testing but I may not be aware of it as I only write games in my spare time.

I'll try my best regarding your above.
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Sat Mar 30, 2024 9:07 pm
Last edited by Z80ASMprogrammer2022 on Sun Mar 31, 2024 12:13 pm; edited 5 times in total
Here is the second version (version 1.1) of Spaghetti Numbers (which works on real hardware too).


* It changes the VDP register 6 to load 3 as sverx suggested (for SMS1 and SMS2)
* It uses OUTI instead of OTIR as sverx suggested enabling the slow down
for writing the tile and sprite palettes to graphical memory-this has been tested in an emulator and as a consequence of this code change,suggested by sverx, the palette always loads correctly in an emulator.
* Following on from a suggestion from Will Britton it gives feedback to the player writing "CORRECT" or "WRONG" for the answer before the grid of numbers change (which they will do in either case if the answer is correct or wrong).

Can somebody update the page for it here

https://www.smspower.org/Homebrew/SpaghettiNumbers-SMS

,please, with the updated zip file attached

  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Sat Mar 30, 2024 9:25 pm
Z80ASMprogrammer2022 wrote
Can somebody update the page for it here

Done!
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Sun Mar 31, 2024 4:18 pm
It’s an interesting concept, but I’m really bad at this.
  View user's profile Send private message
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Mon Apr 01, 2024 8:05 pm
Z80ASMprogrammer2022 wrote
Here is the second version (version 1.1) of Spaghetti Numbers (which works on real hardware too).


* It changes the VDP register 6 to load 3 as sverx suggested (for SMS1 and SMS2)
* It uses OUTI instead of OTIR as sverx suggested enabling the slow down
for writing the tile and sprite palettes to graphical memory-this has been tested in an emulator and as a consequence of this code change,suggested by sverx, the palette always loads correctly in an emulator.
* Following on from a suggestion from Will Britton it gives feedback to the player writing "CORRECT" or "WRONG" for the answer before the grid of numbers change (which they will do in either case if the answer is correct or wrong).

Can somebody update the page for it here

https://www.smspower.org/Homebrew/SpaghettiNumbers-SMS

,please, with the updated zip file attached

My SMS freeze again.
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Mon Apr 01, 2024 8:19 pm
segarule wrote
Z80ASMprogrammer2022 wrote
Here is the second version (version 1.1) of Spaghetti Numbers (which works on real hardware too).


* It changes the VDP register 6 to load 3 as sverx suggested (for SMS1 and SMS2)
* It uses OUTI instead of OTIR as sverx suggested enabling the slow down
for writing the tile and sprite palettes to graphical memory-this has been tested in an emulator and as a consequence of this code change,suggested by sverx, the palette always loads correctly in an emulator.
* Following on from a suggestion from Will Britton it gives feedback to the player writing "CORRECT" or "WRONG" for the answer before the grid of numbers change (which they will do in either case if the answer is correct or wrong).

Can somebody update the page for it here

https://www.smspower.org/Homebrew/SpaghettiNumbers-SMS

,please, with the updated zip file attached

My SMS freeze again.


I tested this second version on an emulator with 60Hz and it worked so I thought this second version may work for you (Brazil is 60Hz) this time.

It certainly works on 50Hz real hardware.

If I owned a 60Hz real hardware master system 1 I think I could fix this problem but unfortunately I do not own any such hardware. I do wonder what exactly you saw on screen (if anything).
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Mon Apr 01, 2024 10:08 pm
@segarule


I sent you a private SMSpower message -can you kindly reply to it.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Tue Apr 02, 2024 8:55 am
segarule wrote
My SMS freeze again.


Provide as much details as possible so that the author can quickly find why it's happening.
For instance, what were you doing when it happened? Can you reproduce the freeze by doing something specific?
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Tue Apr 02, 2024 11:01 am
sverx wrote
segarule wrote
My SMS freeze again.


Provide as much details as possible so that the author can quickly find why it's happening.
For instance, what were you doing when it happened? Can you reproduce the freeze by doing something specific?

Well, no details because the game neither start. The unique thing that appear is start screen with image Spaghetti Numbers and freeze.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Tue Apr 02, 2024 11:13 am
segarule wrote
Well, no details because the game neither start. The unique thing that appear is start screen with image Spaghetti Numbers and freeze.


Note that the screen says 'press start', but in fact you have to press button 2 instead.
It doesn't work with that either?
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Tue Apr 02, 2024 7:19 pm
sverx wrote
segarule wrote
Well, no details because the game neither start. The unique thing that appear is start screen with image Spaghetti Numbers and freeze.


Note that the screen says 'press start', but in fact you have to press button 2 instead.
It doesn't work with that either?

No.
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Tue Apr 02, 2024 8:53 pm
segarule wrote
sverx wrote
segarule wrote
Well, no details because the game neither start. The unique thing that appear is start screen with image Spaghetti Numbers and freeze.


Note that the screen says 'press start', but in fact you have to press button 2 instead.
It doesn't work with that either?

No.


@segarule I'll have to think about this more, why it works fine in an emulator (emulated at 60Hz or emulated at 50Hz) and works fine on a 50hz real hardware master system but not on you Brazilian 60Hz master system using your specific flash cartridge.
  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Apr 03, 2024 10:48 am
As someone terrible at math, this game may be a bit beyond me, I enjoyed making the numbers go up and down though :D
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Apr 03, 2024 11:23 am
@segarule what flash cartridge are you using?
I'm trying to understand if anyone else is experiencing issues on their hardware, if they're using the same as yours...
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Wed Apr 03, 2024 11:59 am
sverx wrote
@segarule what flash cartridge are you using?
I'm trying to understand if anyone else is experiencing issues on their hardware, if they're using the same as yours...

Hi. I would like in assume the "MEA CULPA". I load again the version 1.1 and when i press button 2 the game start. The sound is horrible but the game works. Sorry if i disturbed.
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Wed Apr 03, 2024 12:32 pm
segarule wrote
sverx wrote
@segarule what flash cartridge are you using?
I'm trying to understand if anyone else is experiencing issues on their hardware, if they're using the same as yours...

Hi. I would like in assume the "MEA CULPA". I load again the version 1.1 and when i press button 2 the game start. The sound is horrible but the game works. Sorry if i disturbed.



@segarule there is no sound or music so what your are hearing will be some noise I did not code so you can just turn off the volume on your TV-the sound you are hearing is not a bug in the game. There is no sound or music because the game is a WIP (as it states on the title screen). On 50Hz real hardware master system there is no sound emitted. Says in manual (the rtf file) button 2 starts game.

So it works on a 60Hz master system then.

@sverx Thanks for you input- we resolved the problem quicker working together :-)
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Fri Apr 05, 2024 5:16 pm
Last edited by Z80ASMprogrammer2022 on Fri Apr 05, 2024 5:58 pm; edited 2 times in total
I would like to add a bit more here about the game design. Only knowing or learning your primes numbers between 0 and 200 (where this learning is the goal of the game) allows you to get the most points in the time limit. When an answer is entered the starting point to get to the next answer is changed so knowing or learning your prime numbers will make you get to the next available answer quicker.


The game allows only to select numbers between 0 and 200 only. Randomly entering a number between 0 and 200 (e.g. 015 or 150 which are not primes) is a less optimal strategy that will not let you beat the high score.This is because there are more non-primes than primes numbers between 0 and 200 thus such random answers result in a less optimal strategy.

Of course not every Spaghetti number in the bowl will corresponds to a prime number-that would make the game too easy (for one reason).

I won't reveal anymore regarding strategies because I do not want to spoil the game for those new to learning prime numbers. I want them to learn and figure it out for themselves..
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Fri Apr 05, 2024 5:21 pm
(I think that may help the memory for learning).Still like my other game it's a WIP as stated on the title screen.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Thu Apr 18, 2024 12:15 pm
I still get a few problems running on Emulicious. There's for instance a read from uninitialized memory at 00:0175.
I suspect it's either a bug (it's reading from a location where it shouldn't) or you forgot to initialize some variables there.

Technical issues apart, I still suggest that if you write 'press start' then you should actually expect the player to press the start button, which is button 1 on the SMS (I don't do the rules, it's labelled 1/START...)

Anyway - pretty unusual game. Not sure if I'm having fun watching those small numbers vibrating in the bowl but I'm also pretty old and I suspect this is more aimed to a greener audience...
  View user's profile Send private message Visit poster's website
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Thu Apr 18, 2024 7:49 pm
Last edited by Z80ASMprogrammer2022 on Thu Apr 18, 2024 10:52 pm; edited 9 times in total
" pretty unusual game."

Thanks. I wanted to make a game based around an original idea I thought of , not a run of the mill style game or a remake of a known game (which would be easier to do so I didn't do that :-)). I think it is more creative and more interesting to do a game based on an original idea.

"I suspect this is more aimed to a greener audience.."

Yes it aimed at players new to learning about prime numbers.

"Not sure if I'm having fun watching those small numbers vibrating in the bowl"

I think if you like Sudoko you will probably like Spaghetti Numbers.

"I still get a few problems running on Emulicious. There's for instance a read from uninitialized memory at 00:0175.
I suspect it's either a bug (it's reading from a location where it shouldn't) or you forgot to initialize some variables there."

This new version (1.2) and the previous version (1.1) was tested and works fine on real hardware. Though it reads from an unitialised memory location (thanks for you feedback here) there is no practical consequence of this from our testing both versions on real hardware, that is why I didn't code to initialise it before-anyway I initialised the unitialised memory you mention above, by adding a few lines of ASM code, along with making it press start with the labelled start button. It's a WIP.
  View user's profile Send private message
  • Joined: 21 Jan 2023
  • Posts: 56
Reply with quote
Post Posted: Thu Apr 18, 2024 7:50 pm
So following on from sverx comments attached is version 1.2 of Spaghetti Numbers which is the same as version 1.1 except for the following changes. It uses the labelled start button to start the game. It also initliases all memory locations before the memory is used. So this initialises the unintialised memory sverx mentions.

This version 1.2 has been tested on real hardware and works fine on real hardware.

Can someone update the page for it here , thanks

https://www.smspower.org/Homebrew/SpaghettiNumbers-SMS

with the attached new version (this is a WIP as it states on the title screen).

  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!