Oxygen Basic
Programming => Example Code => Topic started by: Peter on March 23, 2013, 04:00:28 AM
-
Deleted
-
On that note, I'm trying to write a Sokoban map converter to your SokoMouse edition. Can you explain why you are using 3 maps when all the other Sokoban maps I've seen do it in one.
#####
# #
#$ #
### $##
# $ $ #
### # ## # ######
# # ## ##### ..#
# $ $ ..#
##### ### #@## ..#
# #########
#######
(http://webdocs.cs.ualberta.ca/~games/Sokoban/Mazes/Screens/screen.1.jpg)
-
Peter,
SokoMouse is definitely a nicer version of the game. I'm trying to write a Sokoban map to SokoMouse maps converter. It looks like a parsing job to me to build the three needed files. Am I missing something or are the two map formats incompatible between games? Thanks for the explanation of your three map files, it helps to better understand your game design.
John
-
Thanks Peter for the history of SokoMouse.
I think my direction for the SB version of SokoMouse will be to use a two dimensional array to store map data. This will allow me to use the existing format and add a routine to load Sokoban text maps if a filename is an argument to starting the game.
map[level,layer] = binary_map_string
-
Peter,
I think I can generate SokoMouse map arrays from Sokoban maps. Thanks for your help Peter!
(http://files.allbasic.info/ScriptBasic/sm_01.png)
Layer 1:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 2 2 2 2 2 0 0 0 0 0 0 0 0
0 0 0 0 0 2 2 2 3 3 3 2 2 2 0 0 0 0 0 0
0 0 0 0 0 2 3 3 3 3 3 3 3 2 0 0 0 0 0 0
0 0 0 0 0 2 3 3 2 3 2 3 3 2 0 0 0 0 0 0
0 0 0 0 0 2 2 3 2 3 2 3 2 2 0 0 0 0 0 0
0 0 0 0 0 2 3 3 3 3 3 3 3 2 0 0 0 0 0 0
0 0 0 0 0 2 3 3 3 2 3 3 3 2 0 0 0 0 0 0
0 0 0 0 0 2 2 2 2 2 2 2 2 2 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 2 2 0 2 4 2 0 2 2 0 0 0 0 0 0
0 0 0 0 0 2 0 4 0 6 0 4 0 2 0 0 0 0 0 0
0 0 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 0 0 0
0 0 0 0 0 2 2 2 2 2 2 2 2 2 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
Damn you're quick!
I thoiught I could fix my typo in my script before you saw the original post. Anyways I think I'm good to go. :-*
-
I'm curious why the double 9's in level 2 for the outside walls?
I can't see anywhere in the program 9 is even referenced as a point in the maps. Was this a leftover from some other feature?
-
This looks like the Sokoban map standard coding method.
- @ - Map elements for the man.
- $ - Map elements for box.
- . - Map elements for designated location.
- + - Map elements for the man in designated location.
- * - Map elements for box in designated location.
- (space) - Map elements for passage.
- # - Map elements for wall.
I would like to adapt the ScriptBasic version of SokoMouse to using a standard Sokoban map format.
-
Too bad this open source Sokoban game (http://sourceforge.net/projects/sokobanyasc/?source=navbar) is in Pascal. :-\ (setup just for Peter)
(http://files.allbasic.info/ScriptBasic/SM/yasc.png)
-
Is this a Sokonban from the hell ?
You're the skulls & crossbones guy and I even used your original SokoMouse background. I would say that is a custom Peterbuilt rig if you ask me. :D
Do we have a Soko mania now ?
Actually I have spent way too much time on this already. I could never top the version above and I'm not a gamer anyways. It was my first game coding project and you know what they say about the first time. ;D
If I have some spare time, about the only thing I might add to SokoMouse is the ability to read a file of Sokoban maps and a undo feature. Deadlock notice, solvers and map creators are beyond me and not my cup of tea.
Thanks for all the time you invested in this, it was a lot of fun. (and time consuming)
-
Microsoft has destroys my life. I am software beggar now.
Next time I take a run down to Redmond, I deposit a few of these signs around the Microsoft campus as feedback from the other side of the pond.
-
Peter,
This example (http://forum.basicprogramming.org/index.php/topic,2846.0.html) would be interesting to see running using Simple Window.
VIDEO (http://www.youtube.com/embed/ufPIdF-f6s8)