Page 1 of 1

Sokoban for GEM

Posted: Fri May 27, 2016 7:46 pm
by peterlane
With some help from this forum, I've finally finished my GEM version of Sokoban. The screen shot shows the program working under MINT+XaAES on a Firebee, but has also been tested in low and high resolution on an Hatari-emulated ST, and an Hatari-emulated Falcon.

Features:

- Contains the 50 classic levels from Thinking Rabbit
- Additional levels can be loaded from a text file
- Unlimited undo
- Total moves and pushes per level recorded and saved
- Size of display can be adapted

See http://peterlane.info/sokoban.html
- for downloadable files (there is a separate build for the Firebee, and for the ST / 68000), and
- the source code (this program was written on a Firebee using AHCC).

(If you are looking for more levels, http://www.sourcecode.se/sokoban/levels has nearly 40,000 of them!)

Re: Sokoban for GEM

Posted: Fri May 27, 2016 9:28 pm
by Cyprian
great!

Re: Sokoban for GEM

Posted: Fri May 27, 2016 11:14 pm
by shoggoth
Nice :)

Re: Sokoban for GEM

Posted: Sat May 28, 2016 10:13 am
by joska
Nice! Just tested it on my STE, it works really well.

I also like the fact that you have developed it *on* an Atari, not just *for* it :)

Re: Sokoban for GEM

Posted: Sat May 28, 2016 11:50 am
by lotek_style
I've put it into my archive: http://demozoo.org/productions/158370/

Re: Sokoban for GEM

Posted: Sat May 28, 2016 1:40 pm
by peterlane
joska wrote:Nice! Just tested it on my STE, it works really well.

I also like the fact that you have developed it *on* an Atari, not just *for* it :)


Thanks for the feedback. My STE is refusing to work at the moment, so I couldn't try it on the 'real thing'.

And yes, developing *on* an Atari is the enjoyable part!

Re: Sokoban for GEM

Posted: Sat May 28, 2016 1:41 pm
by peterlane
lotek_style wrote:I've put it into my archive: http://demozoo.org/productions/158370/


Thank you!

Re: Sokoban for GEM

Posted: Sat May 28, 2016 7:46 pm
by Cyprian
Would be possible to add "Reset level" option? Now, whenever when I get stuck I have to find the level in the Classic window.
Scale option would work globally. Now every time when I open a new level I have to change it to Large.
And last point, a new window could be fit to the Sokoban level

BTW. under XaAES I see refresh bug in "Classic" window

Re: Sokoban for GEM

Posted: Sat May 28, 2016 8:31 pm
by jfl
Cyprian wrote:Would be possible to add "Reset level" option? Now, whenever when I get stuck I have to find the level in the Classic window.

Pressing "R" resets the level. Isn't it what you want?

Re: Sokoban for GEM

Posted: Sat May 28, 2016 8:34 pm
by jfl
Your game is working quite well on my FireBee. I did notice though that the windows do not respond to the WM_BOTTOMED message. It's so simple to implement you should think about adding this.

Re: Sokoban for GEM

Posted: Sat May 28, 2016 8:51 pm
by Cyprian
jfl wrote:Pressing "R" resets the level. Isn't it what you want?

yep, thx!

Re: Sokoban for GEM

Posted: Mon May 30, 2016 12:39 pm
by MM41
Thank you Peterlane :D,

Good GEM game :cheers:.

Could you add the save screen parameter when we exit game?

Re: Sokoban for GEM

Posted: Mon May 30, 2016 1:53 pm
by peterlane
jfl wrote:Your game is working quite well on my FireBee. I did notice though that the windows do not respond to the WM_BOTTOMED message. It's so simple to implement you should think about adding this.


OK, thanks for the suggestion. It does look easy to add.

Re: Sokoban for GEM

Posted: Mon May 30, 2016 1:58 pm
by peterlane
Cyprian wrote:Scale option would work globally. Now every time when I open a new level I have to change it to Large.
And last point, a new window could be fit to the Sokoban level


Thanks, I'll think about those.

MM41 wrote:Could you add the save screen parameter when we exit game?


Do you mean a kind of 'save current position' to return to later, option? I can see that would be useful. I'll also put it on the list to think about.

Thanks for the feedback.

Re: Sokoban for GEM

Posted: Mon May 30, 2016 3:26 pm
by Anima
Thanks for the game. That's truly a great classic.

I'll give it a try soon on my STE (which is back in business again after a long hibernation). :cheers:

Re: Sokoban for GEM

Posted: Mon May 30, 2016 7:11 pm
by Eero Tamminen
Thanks, looks nice!

I noticed one bug. Quitting the game works fine under EmuTOS, TOS v2.x and TOS v1.62, but it crashes TOS v1.04.

Might happen if you e.g. do some AES/VDI operation(s) after closing AES/VDI.

Re: Sokoban for GEM

Posted: Mon May 30, 2016 7:20 pm
by jfl
Eero Tamminen wrote:I noticed one bug. Quitting the game works fine under EmuTOS, TOS v2.x and TOS v1.62, but it crashes TOS v1.04.

It does happen to me too under XaAES with an illegal instruction.

Re: Sokoban for GEM

Posted: Tue May 31, 2016 7:54 am
by peterlane
Eero Tamminen wrote:Thanks, looks nice!

I noticed one bug. Quitting the game works fine under EmuTOS, TOS v2.x and TOS v1.62, but it crashes TOS v1.04.

Might happen if you e.g. do some AES/VDI operation(s) after closing AES/VDI.


Thanks for the report, and the extensive testing. It may be an uninitialised pointer being freed - I just found one, thanks to your prompt.

Re: Sokoban for GEM

Posted: Tue May 31, 2016 8:08 am
by joska
peterlane wrote:Do you mean a kind of 'save current position' to return to later, option? I can see that would be useful. I'll also put it on the list to think about.


I'd like to see that too. Window size/position and graphics scale saved together with the scores.

I haven't played Sokoban since the 90's, spent many hours with the Syntax Terror version. And now I've spent/wasted hours on this one, trying to solve the levels again :)

Re: Sokoban for GEM

Posted: Wed Jun 01, 2016 10:36 am
by peterlane
I have created a new version of Sokoban, version 1.1.0. The changes include:

. Respond to WM_TERM message
. Respond to WM_BOTTOMED message
. Scale for position is set to last value used (so you don't have to keep changing the scale)
. Window size will fit level, if there's room on screen
. Warning if you exceed number of open windows
. Help screen to show keys
. Fixed pointer error when exiting with statistics screen open

In addition to the Firebee and ST versions, there is also a build aimed at the Falcon, responding to TOS 4.0 messages.

Available from: http://peterlane.info/sokoban.html

Thanks to everyone who tried the program, reported problems and made suggestions for improvements.

Re: Sokoban for GEM

Posted: Wed Jun 01, 2016 8:02 pm
by BlankVector
Very nice game.
It works perfectly on EmuTOS for Amiga :mrgreen:

winuae.png

Re: Sokoban for GEM

Posted: Sun Jun 05, 2016 3:57 pm
by Eero Tamminen
Tested the updated version. Quitting works now fine with TOS v1.04, when program is started from GEM desktop.

When starting program at TOS boot using DESKTOP.INF file (= what Hatari autostart does), it still crashes TOS v1.04. Other GEM programs seem to cause this too, so I think it's a TOS v1.04 bug, not Sokoban one, and can be ignored.

Re: Sokoban for GEM

Posted: Sat Jul 16, 2016 11:03 am
by AtariCrypt
How did I miss this little belter? Now I know what I'm doing today!! :D
Thank you!