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 2021] Snepzhen Solitaire by JoppyFurr

Reply to topic

Rate this entry!

1 (Terrible) 0% 0%
2 0% 0%
3 0% 0%
4 0% 0%
5 7% 7%
6 15% 15%
7 46% 46%
8 23% 23%
9 7% 7%
10 (Excellent) 0% 0%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13731
  • Location: London
Reply with quote
[Coding competition 2021] Snepzhen Solitaire by JoppyFurr
Post Posted: Sat Mar 27, 2021 7:17 am
https://www.smspower.org/Homebrew/SnepzhenSolitaire-SMS



Quote
This is a clone of the solitaire game within Shenzhen I/O.

There are three types of card:

1. Number card - Get these up into the top-right three slots.
-> In the main playing area, numbered cards stack in alternating colours with decreasing value
-> In the top-right, numbered cards stack in the same colour with increasing value starting at '1'
-> A single card can be temporarily stored in each of the top-left three slots (if unused)

2. Dragon cards (claws, paws, & hoofs) - Get these up into the top-left three slots
-> Dragon cards cannot be placed on any other card, even another dragon card of the same kind
-> A single dragon card can be temporarily stored in each of the top-left three slots (if unused)
-> If four of a single kind are at the top of their stacks, a button can move all four into one of the top-left three slots (if a slot is free, or already contains a card of the same kind)

3. Snep card (flower card in the original game)
-> This is a 'free' card, it can be moved to the top-middle slot
-> Artwork is TODO, currently a gray 'tail'

You win when all cards have been moved to the top.

Controls:
D-pad: Move the cursor to select a different card / slot / button
Button 1 (when holding cards): Place the cards currently held.
Button 1 (when not holding cards): Pick up the cards or press the dragon button under the cursor.
Button 2 (when holding cards): Return the cards back to where they were picked up from.
Button 2 (when not holding cards): Auto-move the card under the cursor to one of the top-right slots if possible.

Work still to do:
-> Title screen
-> Card artwork improvements
-> Animation for when the game has been won
-> Options menu (change background colour, cursor design, etc)
-> Animation when moving cards with button 2 or the dragon buttons.
-> Sound effects

Changelog:
r1: Fixup for real H/W + Animation for dealing / cancelling
r0: Initial release
  View user's profile Send private message Visit poster's website
  • Joined: 26 Jan 2014
  • Posts: 830
Reply with quote
Post Posted: Sat Mar 27, 2021 9:12 pm
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 21
  • Location: New Zealand
Reply with quote
Update to r3
Post Posted: Sun Mar 28, 2021 12:11 pm
A new build, r3, of Snepzhen Solitaire is now available:

  • Card-dropping animation when the game is won
  • Cards now animate (slide) when using the dragon buttons
  • RNG fixup, to reduce the chance of being dealt the same game twice



Work still to do:
    -> Title screen
    -> Card artwork improvements
    -> Options (change background colour, cursor design, etc)
    -> Sound effects

Changelog:
    r3: Animation for winning, dragon buttons. RNG improvement.
    r2: Animation when auto-placing cards with button 2 + code tidyup
    r1: Fixup for real H/W + Animation for dealing, cancelling
    r0: Initial release



  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2943
Reply with quote
Post Posted: Tue Mar 30, 2021 8:41 pm
Interesting solitaire... I still have to learn how to play it properly but it's a matter of time, as with all card solitaires. Nice card animations, reusing VRAM tiles for both cards on the table and for sprites is a good idea.

Question: why did you write your own SRAM access functions instead of simply using the devkitSMS provided ones? Is there anything you didn't like with those?
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 21
  • Location: New Zealand
Reply with quote
Post Posted: Tue Mar 30, 2021 9:53 pm
sverx wrote

Question: why did you write your own SRAM access functions instead of simply using the devkitSMS provided ones? Is there anything you didn't like with those?


I didn't actually realize that devkitSMS already had SRAM access functions. I must have had a typo when I first went searching, as I didn't get any results. I do see them now though, and will likely switch to using them in the next update.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2943
Reply with quote
Post Posted: Tue Mar 30, 2021 10:24 pm
JoppyFurr wrote
I didn't actually realize that devkitSMS already had SRAM access functions. [...] I do see them now though, and will likely switch to using them in the next update.


Here's the wiki section for that, and that page links to an example usage on this very forum :)
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 21
  • Location: New Zealand
Reply with quote
Update to r4
Post Posted: Thu Apr 01, 2021 1:25 pm
A new build, r4, of Snepzhen Solitaire is now available:

  • When first starting, a card-based menu is now shown
  • The background colour scheme can be changed
  • The mouse cursor can be changed



Work still to do:
    -> Card artwork improvements
    -> Sound effects?

Changelog:
    r4: Menu, choice of background colours and cursors. devkitSMS SRAM access.
    r3: Animation for winning, dragon buttons. RNG improvement.
    r2: Animation when auto-placing cards with button 2 + code tidyup
    r1: Fixup for real H/W + Animation for dealing, cancelling
    r0: Initial release


snepzhen_blue.png (2.47 KB)
Screenshot - Blue background
snepzhen_blue.png
snepzhen_silver_cursor.png (2.46 KB)
Screenshot - Silver cursor
snepzhen_silver_cursor.png

  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2015
  • Posts: 33
  • Location: Japan
Reply with quote
Post Posted: Sat Apr 03, 2021 5:20 am
Works very well. I have played a few games but I have yet to win. Is it always possible to win? If not, out of 10 sessions, how many can I expect to finish?

One thing I would really like is playing it with a Megamouse! (I can share the work-in-progress input "library" I have developed for my sms-a-sketch entry if you'd like. It also supports the Sports pad and Graphics board)
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 21
  • Location: New Zealand
Reply with quote
Post Posted: Sat Apr 03, 2021 10:35 am
raphnet wrote
Works very well. I have played a few games but I have yet to win. Is it always possible to win? If not, out of 10 sessions, how many can I expect to finish?

No, like regular Klondike solitaire it is not always possible to win. It can also be hard to predict when a move you make might make it impossible to win (eg, filling one of the top-left spaces with one card when finishing required the space to be saved for a different card).

I haven't kept any exact statistics, but I manage to complete around half of the games I properly start. Sometimes I'll abandon and try for a new deal before moving the first card if the start doesn't look possible.

raphnet wrote

One thing I would really like is playing it with a Megamouse! (I can share the work-in-progress input "library" I have developed for my sms-a-sketch entry if you'd like. It also supports the Sports pad and Graphics board)


While I don't think I'll find time to do that at the moment, it sounds like it could be a fun way to extend the game in the future :3
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 21
  • Location: New Zealand
Reply with quote
Update to r5
Post Posted: Sat Apr 03, 2021 12:39 pm
A new build, r5, of Snepzhen Solitaire is now available:

  • Bug fix - Disable button 2 on the dragon buttons.
  • Bug fix - Exclude off-screen sprites from the sprite list.



Work still to do:
    -> Card artwork improvements
    -> Sound effects?

Changelog:
    r5: Bug fixes for sprite wrap-around and dragon buttons.
    r4: Menu, choice of background colours and cursors. devkitSMS SRAM access.
    r3: Animation for winning, dragon buttons. RNG improvement.
    r2: Animation when auto-placing cards with button 2 + code tidyup
    r1: Fixup for real H/W + Animation for dealing, cancelling
    r0: Initial release



  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 141
  • Location: Ireland
Reply with quote
Post Posted: Mon Apr 05, 2021 10:54 am
sverx wrote
Here's the wiki section for that, and that page links to an example usage on this very forum :)

Not sure if this helps but here is a code sample that uses the devkitSMS SRAM access functions also.
  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!