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] SKBN by Raphnet

Reply to topic

Rate this entry!

1 (Terrible) 0% 0%
2 0% 0%
3 0% 0%
4 0% 0%
5 5% 5%
6 5% 5%
7 23% 23%
8 41% 41%
9 11% 11%
10 (Excellent) 11% 11%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8405
  • Location: Paris, France
Reply with quote
[Coding competition 2021] SKBN by Raphnet
Post Posted: Sat Mar 27, 2021 9:18 am
https://www.smspower.org/Homebrew/SKBN-SMS



Quote
Yes, yes, another Sokoban clone.. But this one has lost its vowels ;-)

SKBN is a sokoban clone called SKBN. The 128kB ROM contains the 1043 levels of the Microban and Sasquatch level sets created by David W. Skinner.

In this project, I focused mostly on making sure that all levels of those sets would be playable, even large ones.

To achieve this, the engine supports different tile sizes: 16x16, 12x12, 8x8 and 4x4. The 12x12 engine was the most challenging, as the two grids of 8x8 tiles (native) and 12x12 tiles (virtual) create interesting complications, combining
vertical and/or horizontal splits. The required tiles are built on-the-fly while displaying and playing the level.
The 4x4 engine is useful for previews, but also for very large levels. Those may not be very playable unless you use
an emulator or an RGB-connected display. I would like to add support for 24x24 tiles, but the level sets I included do not contain such small puzzles.. Maybe in a future version.

The in-game menu has options to undo a move or the last push. The history can hold 1000 moves.

Of course, solving more than 1000 levels in one session is unthinkable (probably) so the completion status of the levels is saved in SRAM, or directly on flash, if the game is running on a compatible cartridge.

I did not have time to compose music for the title screen, but I did manage to include sound effects for walking and pushing crates.

Tested on real hardware using a Japanese SMS and a US Megadrive.
  View user's profile Send private message Visit poster's website
Revo
  • Guest
Reply with quote
Post Posted: Sat Mar 27, 2021 10:02 pm
 
  • Joined: 28 Jan 2017
  • Posts: 400
  • Location: Málaga, Spain
Reply with quote
Post Posted: Sun Mar 28, 2021 5:49 pm
Wow

How much work you are done here... Not only for the screens (i know, it is easy to get all them in text format or even in custom binary format) i am talking about the additional modes on big screens.

Liked the parallax effect when you finish a level and the menus in general.

Well done!
  View user's profile Send private message
  • Joined: 07 Mar 2021
  • Posts: 10
Reply with quote
Post Posted: Sun Mar 28, 2021 6:46 pm
Great game and great work ! Hours and hours of play! I really like the menu management, the idea to undo the last action, the variable size of the play area and saving method.

All this give a very PC feeling to this Sokoban. it's impressive !
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 644
Reply with quote
Post Posted: Mon Mar 29, 2021 7:12 am
Great version of Sokoban. I really like the idea with the differently sized blocks. Creating 12x12 and 4x4 mode must have caused some headscratching. Great work.

My only complaint would be that the game doesn't ease you in exactly, as the puzzles are fiendishly difficult from the get-go.

eruiz00 wrote
Liked the parallax effect when you finish a level and the menus in general.


Yes! I may have to steal that for my mermaid game . ;-)
  View user's profile Send private message
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Post Posted: Mon Mar 29, 2021 10:52 am
Kagesan wrote
Great version of Sokoban. I really like the idea with the differently sized blocks. Creating 12x12 and 4x4 mode must have caused some headscratching. Great work.

Yes, that was quite a challenge, the kind that I like! I did the 12x12 mode twice (my first attempt failed) and after that the 4x4 mode was easy.

Kagesan wrote
My only complaint would be that the game doesn't ease you in exactly, as the puzzles are fiendishly difficult from the get-go.

The easiest levels should be in the Microban 1 set. Did you try those? Sorry, it's difficult to judge difficulty, I have played too much Sokoban in my life... But there are (said to be) easier levels I just added in v1.1!
  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Post Posted: Mon Mar 29, 2021 10:57 am
Hello!

I built a new version with additional levels and various small corrections:

- Added a short "end level" jingle.
- Added "Dimitry & Yorick" and "Sokogen-990602" level sets by Jacques Duthen (Easy levels)
- Fixed the "parallax" effect at the end of a level (was not well controlled and jittery on real hardware).
- Corrected initial player position (was not centered until first movement)
- Fine tuned player sprite position in 12x12 tiles levels (was a bit too low)
- Removed the debug info (number in upper right corner) in 12x12 tile display mode

I noticed some most levels in the new sets are small enough to be displayed with 24x24 tiles. This will be in v1.2!
skbn-12.png (4.36 KB)
Menu with new levels
skbn-12.png
skbn-11.png (7.67 KB)
SKBN Version 1.1 Title
skbn-11.png
skbn-v1.1.zip (115.16 KB)
SKBN version 1.1

  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Post Posted: Mon Mar 29, 2021 11:11 am
eruiz00 wrote
Wow

How much work you are done here... Not only for the screens (i know, it is easy to get all them in text format or even in custom binary format) i am talking about the additional modes on big screens.

Liked the parallax effect when you finish a level and the menus in general.

Well done!


Guy wrote
Great game and great work ! Hours and hours of play! I really like the menu management, the idea to undo the last action, the variable size of the play area and saving method.

All this give a very PC feeling to this Sokoban. it's impressive !


Thanks! The additional modes, especially the 12x12 mode was a fun challenge and part of the reason I chose this game project. I wanted to try doing this!

The great thing with Sokoban is that there are so many level collections available. Much more than I could ever hope to create. I did not design any of the levels, I simply used sets that can be freely distributed, but sets I had never played (or played a very long time ago and forgot).

When I'll be done coding, I'll sit down and have fun playing all those levels for the first time!
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 644
Reply with quote
Post Posted: Mon Mar 29, 2021 12:27 pm
raphnet wrote
- Added "Dimitry & Yorick" and "Sokogen-990602" level sets by Jacques Duthen (Easy levels)


Thank you! Some levels I can actually solve.

I seem to have encountered two minor bugs:

1. If you solve the last level displayed in the list and then scroll down, the following levels all appear marked as solved even though they are not.

2. In the preview, a target square will not be shown as such if the player's starting position is on top of it.
  View user's profile Send private message
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Version 1.2
Post Posted: Tue Mar 30, 2021 8:46 am
A new version is now available.

Changes:
- Added a 24x24 tiles mode.
- Boxes now move smoothly, in-sync with the player when pushed. (instead of teleporting).
- Reworked the player artwork and other small cosmetic details.
- Corrected a bug which caused unsolved levels to show as solved in the menu when scrolling.
- Display "player on target" correctly during previews.

Thank you Kagesan for reporting the last two issues above!

About the 24x24 mode... I wrote in the initial description that there were no levels that small in the sets I initially included, but for some reason I was wrong! It turns out most Microban levels do fit!

It may not matter much today, with emulators and sharp RGB monitors, but I like to think that if this game had been made back then, large tile modes would have been an important feature for this game, for clarity on the typical home user RF-connected TV set...
skbn-13.png (3.32 KB)
Level played in 24x24 mode
skbn-13.png
skbn-03.png (3.61 KB)
Level preview in 16x16 mode
skbn-03.png
skbn-v1.2.zip (121.4 KB)

  View user's profile Send private message Visit poster's website
Revo
  • Guest
Reply with quote
Post Posted: Tue Mar 30, 2021 8:55 am
Thank you, page updated: https://www.smspower.org/Homebrew/SKBN-SMS
 
  • Joined: 05 Sep 2013
  • Posts: 2975
Reply with quote
Post Posted: Tue Mar 30, 2021 9:28 pm
This is GREAT. The definitive Sokoban - huge amount of levels and almost unlimited undo! Great work on the different size engines, I'm sure the 12×12 should have been everything but straightforward.

Minor technical note: never write any text onto the leftmost column on screen, many TVs don't show that (at all / or anyway a part of it). In fact, title/art screens apart, you better forget it exists ;)
  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Version 1.3
Post Posted: Wed Mar 31, 2021 6:32 am
Version 1.3 is now available!

Changes:
- Added a "Well Done" message when a level is solved.
- Fix a bug where the player could move in diagonal, and undoing the last move would then remove a wall block and add a new box to the level!
- Move the Level number in the status bar one column to the right to avoid displaying text in the first column.
- Small tweaks to the tile screen (sharper box corner, black contour)
welldone.png (3.38 KB)
welldone.png
title_v1.3.png (7.66 KB)
title_v1.3.png
skbn-v1.3.zip (125.22 KB)

  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2975
Reply with quote
Post Posted: Wed Mar 31, 2021 11:24 am
I love a good use of the sprite zoom feature, and this is good use because there are only max 4 on each scanline, thus working around the original SMS VDP's infamous zoomed sprites bug.

[also, unfortunately MD users won't see zoomed sprites too - but who cares? :P ]
  View user's profile Send private message Visit poster's website
  • Joined: 01 Apr 2016
  • Posts: 43
Reply with quote
Post Posted: Sat Apr 03, 2021 9:54 am
I gave this a quick test last night and ended up losing hours to it.

Extraordinary work.
  View user's profile Send private message
  • Joined: 12 Oct 2015
  • Posts: 141
  • Location: Ireland
Reply with quote
Post Posted: Mon Apr 05, 2021 10:46 am
Nice game with tons of levels [how long did they take to design?]. I'm not sure if I'm doing things right but undo last move / push didn't seem to do anything?? I think I'd be a bit quicker if maybe button 1 was for in game menu and button 2 for in game [general] undo action i.e. without popup menu. PS: is the player sprite meant to disappear when the in game menu appears? Thanks
  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Post Posted: Mon Apr 05, 2021 11:12 am
SteveProXNA wrote
Nice game with tons of levels [how long did they take to design?]. I'm not sure if I'm doing things right but undo last move / push didn't seem to do anything?? I think I'd be a bit quicker if maybe button 1 was for in game menu and button 2 for in game [general] undo action i.e. without popup menu. PS: is the player sprite meant to disappear when the in game menu appears? Thanks

I don't know, I did not design the levels, I used free levels available on the net. My job was limited to writing a tool to parse, compress and convert to a binary format suitable for the game.

I tried to make consistent button use throughout the game. This is what I came up with:

Button 1: Validate a choice in the menu (i.e. open the selected level set, play the selected level, etc)
Button 2: Go back or cancel (return to previous menu/title screen)

When playing a level, button 2 opens the menu. Since it is a menu, button 1 is what selects the action (for instance, undo a move). Pressing button 2 when the menu is open simply closes the menu, going back to the game without performing any action.

When playing a level, pressing button 1 (action button) by itself does nothing since there are multiple possible actions. But two shortcuts are available. While holding down button 1, press the D-Pad in the Down or left direction to under the last push or move respectively. (I tried to communicate the availability of those shortcuts through the in-game menu).

Yes, the player sprite disappearing is "intentional", in the sense that I had to hide it since the menu is drawn using normal background tiles. I can't set the priority bit on these, otherwise the arrow sprite used within the menu would be hidden. (I thought of hiding the player or not depending on its position, but there are cases where it would be half-covered by the menu...)
  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Post Posted: Mon Apr 05, 2021 11:58 am
SteveProXNA wrote
I think I'd be a bit quicker if maybe button 1 was for in game menu and button 2 for in game [general] undo action i.e. without popup menu.

Since my previous post I have been thinking... why did I need two types of undos easily accessible in-game? If I only kept one (the undo "move") I could do as you suggest, and I think it would indeed be more natural. I'll give it a try.

Undo push is nice when you walked far from the last pushed crate and realize you shouldn't have pushed it as the player automatically walks back 100 steps if it has to, then "unpushes" the crate. But in practice, this is rare, so opening the menu only in those cases only seems reasonable.

Ah... user interface design is difficult!
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2975
Reply with quote
Post Posted: Mon Apr 05, 2021 10:12 pm
raphnet wrote
Yes, the player sprite disappearing is "intentional", in the sense that I had to hide it since the menu is drawn using normal background tiles. I can't set the priority bit on these, otherwise the arrow sprite used within the menu would be hidden.


You could either use a background tile for the arrow (instead of a sprite arrow) or have an arrow sprite on top of solid sprites of the same color of the background on top of every other sprite on screen. Just saying ;)
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 141
  • Location: Ireland
Reply with quote
Post Posted: Wed Apr 07, 2021 10:23 am
raphnet wrote
Ah... user interface design is difficult!

Yeah - I ask a UX designer for ideas sometimes as can be tricky... I was just trying to shout out some options... the game is nice and the overall feedback is really positive... well done!
  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2015
  • Posts: 35
  • Location: Japan
Reply with quote
Version 1.4 - It's Dimitri, not Dimitry
Post Posted: Fri May 21, 2021 6:18 am
The original author of the levels has kindly pointed out that I misspelled Dimitri in "Dimitri & Yorick" :-O

So in this version, only one byte has changed ;-)
title_v1.4.png (7.65 KB)
title_v1.4.png
skbn-v1.4.zip (125.2 KB)

  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!