MegaSokoban

Use this forum to share and discuss Uzebox games and demos.

MegaSokoban

Postby martinsustek » Sun Jan 22, 2012 7:42 pm

Image

Hi,

I've finished MegaSokoban - port of my early game (for AVR TV game - http://uzebox.org/forums/viewtopic.php?f=10&t=914) for Uzebox.

It's not audio or video excellent, but it's right choice for Sokoban maniacs, because it has 999 levels (all of them fitted into 664's FLASH thanks to use of my compression algorithm developed for original purpose - yes, loading levels from SD card is better solution to store more levels, but I didn't want to change engine a lot).

Levels are selected from collections Microban, Sasquatch by David W. Skinner and Procedural Sokoban Level Generation - algorithmically generated by Joshua Taylor and Ian Parberry. I've not solved them all yet, but they're guaranteed to be solvable by their authors (but compression bugs may screw it a little, so I don't guarantee, that every can be solved).

What's special for this game is it's video mode - I call it mode 10, it's generally mode 5 with changed tile size to 12x16 pixels, and there are 16x12 tiles on screen (total resolution 192x192 with black border around). I was to lazy to make instruction counting for time-perfect scanline length, so I used oscilloscope & TV to make it work by trial-error method. I hope it will work on your TV. What's good on this mode is, that it doesn't occupy much RAM (around 3KB free), and tiles are so big, that mapping between vram and game world are 1 to 1 (vram is actually used to store game data and character printing functions to load level).

I think it can be useable for games with simple graphics (not many tiles and no sprites or scrolling) and complex memory-intensive logic. There wasn't need for so much RAM in sokoban, but I wanted to play with videomode. Then I've used free RAM to make 1000 pushes undo buffer (you can go 1000 pushes back in time).

More info on wiki: http://uzebox.org/wiki/index.php?title=MegaSokoban.

UZE file attached, I'll commit source to trunk, if Uze don't mind, that I'll make little changes to kernel (add new video mode).
Attachments
MegaSokoban.uze
MegaSokoban game, v2
(52.1 KiB) Downloaded 69 times
MegaSokoban.uze
MegaSokoban game
(54.25 KiB) Downloaded 122 times
Last edited by martinsustek on Tue Jan 24, 2012 7:45 pm, edited 1 time in total.
User avatar
martinsustek
 
Posts: 115
Joined: Sat Apr 30, 2011 11:34 am
Location: Ostrava, Czech Republic

Re: MegaSokoban

Postby uze6666 » Mon Jan 23, 2012 6:02 am

Great game Martin! The new levels are challenging (some of them are quite tough!) and the undo feature now seems akin the hold block feature in Tetris: a must! Though I wonder if they should not be penalized by two moves or more. Anyhow, a great new feature. You can commit your code as mode 10, a new video mode is always welcome. I will check the cycle count afterwards to confirm it's 100% right on, through you must be damn close since the signal is rock steady on my TV. :D
User avatar
uze6666
Site Admin
 
Posts: 2672
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada

Re: MegaSokoban

Postby D3thAdd3r » Mon Jan 23, 2012 4:11 pm

Cool can't wait to check this out tonight. 999 :shock: levels....of course this compels me to add more compression to my version :lol:
Lee
User avatar
D3thAdd3r
 
Posts: 419
Joined: Wed Apr 29, 2009 10:00 am

Re: MegaSokoban

Postby JRoatch » Mon Jan 23, 2012 5:24 pm

Congratulations on stuffing those 999 levels in about 32K of ROM space. Forget the SD card, this is the way to go! (my uzebox has had a broken SD card slot for years).
User avatar
JRoatch
 
Posts: 106
Joined: Mon May 11, 2009 11:48 pm

Re: MegaSokoban

Postby martinsustek » Mon Jan 23, 2012 11:22 pm

Hi Uze,

I've merged MegaSokoban to the trunk, but there was newer version of kernel, so I had to make some changes. But I was unable to test it (I have only v1.14 of emulator in my linux, and I heard that it cannot run it - I see only black screen and emulator freezes). If you can check it (mainly timing - with modification to inline mixer), it will be great!

How about linux version of emulator? Will you release sources or binary?
User avatar
martinsustek
 
Posts: 115
Joined: Sat Apr 30, 2011 11:34 am
Location: Ostrava, Czech Republic

Re: MegaSokoban

Postby uze6666 » Mon Jan 23, 2012 11:39 pm

Great! I will test that right away. Btw the latest emulator code (1.15) is already commited. Since I only run Windows, I can't provide Linux binaries. Nebososo told me he would build them (32/64) bit but I think he forgot to send them to me. If you can build it and add it to gcode download section that would be very helpful.
User avatar
uze6666
Site Admin
 
Posts: 2672
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada

Re: MegaSokoban

Postby D3thAdd3r » Tue Jan 24, 2012 12:17 am

Very nice Martin, there are indeed some tricky levels I have no hope of solving there! Awesome that you made a video mode for it too 8-)

A small thing I noticed about the level stats: if I go back to level 999(from 0) I'm seeing it says I completed levels 996,995,994,991..971,969,etc., at least the check mark is there like I did. Running it in the emulator, I erased eeprom.bin so it had a fresh start before experimenting and it still happened(can someone else comfirm?). I opened up eeprom.bin in a hex editor and I noticed you are only using 1 block to save progress for 999 levels?

Edit: Ok I see you put the source up and I can't see why that would be happening, maybe this problem is just my own :oops:
Lee
User avatar
D3thAdd3r
 
Posts: 419
Joined: Wed Apr 29, 2009 10:00 am

Re: MegaSokoban

Postby uze6666 » Tue Jan 24, 2012 1:17 am

Timing fixed for new mode 10 and I "standardized" the SuperSokoban makefile.
User avatar
uze6666
Site Admin
 
Posts: 2672
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada

Re: MegaSokoban

Postby paul » Tue Jan 24, 2012 7:43 am

Great work, Martin!
User avatar
paul
 
Posts: 416
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: MegaSokoban

Postby martinsustek » Tue Jan 24, 2012 7:43 pm

uze6666 wrote:Timing fixed for new mode 10

Thank you!

uze6666 wrote:I "standardized" the SuperSokoban makefile

I don't know why, but it displays me sizes like this:

Code: Select all
MegaSokoban.elf  :
section             size      addr
.text              52818         0
.bss                2404   8388864
.stab               1740         0
.stabstr              84         0
.debug_aranges       928         0
.debug_pubnames     2414         0
.debug_info        12953         0
.debug_abbrev       2312         0
.debug_line        10632         0
.debug_frame        1328         0
.debug_str          3466         0
.debug_loc          9406         0
.debug_ranges       1160         0
.debug_pubtypes      646         0
Total             102291

Instead of old style where was only RAM and FLASH which is more lucid.

uze6666 wrote:Btw the latest emulator code (1.15) is already commited.

I didn't know it, I tried it a little bit sooner and there was only 1.14. I can compile it on my machine (amd64 I guess), I'll upload it. [edit: It seems, that it's there yet, but I can't run it to confirm].

Picture seems to jump up and down in emulator while playing sound (for example while moving in level selection menu), I don't know, if it's bug in emulator or my code, can anybody confirm it?

D3thAdd3r wrote:I'm seeing it says I completed levels 996,995,994,991..971,969,etc., at least the check mark is there like I did.

I fixed it, I hope - there was bug in saving last opened level (data wasn't properly initialized). New version is on SVN and main post.
User avatar
martinsustek
 
Posts: 115
Joined: Sat Apr 30, 2011 11:34 am
Location: Ostrava, Czech Republic

Next

Return to Games & Demos

Who is online

Users browsing this forum: No registered users and 0 guests

cron