[BatchGame] SokoBox

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
carlos
Expert
Posts: 503
Joined: 20 Aug 2010 13:57
Location: Chile
Contact:

[BatchGame] SokoBox

#1 Post by carlos » 17 Nov 2012 17:01

Image

This is a batch game.

sokobox.cmd

Code: Select all

@Echo off
::SokoBox
::Version: 1.0.8
::Author: Carlos.
::Uses BG.exe v2.5 (built-in)

SetLocal EnableExtensions EnableDelayedExpansion
Cls
If Not Exist BG.exe Call :BuildBG
Color 37
BG.exe Cursor 0
BG.exe Font 8
Mode Con Cols=40 Lines=32
Set "self=%~0"
Set "sokobox_file=!UserProfile!\sokobox.dat"
Set /a "S.M.X=2,S.M.Y=2"
Set "fb=\219\219\219\219"
Set "tb=\32\219\219\32"
Set "fs=\32\32\32\32"
Set "mc=\219\32\32\219"
Set "g.0=0 %fb%\n%fb%\n%fb%\n%fb%"
Set "g.1=88 %fb%\n%fb%\n%fb%\n%fb%"
Set "g.2=E %fs%\n\32\177\177\32\n\32\177\177\32\n%fs%"
Set "g.3=A %tb%\n\219 E \177\177 A \219\n\219 E \177\177 A \219\n%tb%"
Set "g.4=A %tb%\n%mc%\n%mc%\n%tb%"
Set "g.5=E \32 E0 \228\228 E \32\n%fb%\n%tb%\n%mc%"
Set "g.6=E \32 E0 \228\228 E \32\n%fb%\n A \219"
Set "g.6=!g.6! E \219\219 A \219\n E \219 A \219\219 E \219"
Set "g.7=33 %fb%\n%fb%\n%fb%\n%fb%"
Set "g.8=0 %fb%\n%fb%\n%fb%\n%fb%"
Set /a "r.0=5,r.2=5,r.3=6,r.4=6,r.5=0,r.6=4"
Set /a "r.b.0=2,r.b.2=0,r.b.3=4,r.b.4=3"
Set /a "g22=0,g23=-1,g32=1,g33=0"
BG.exe Print 70 "SokoBox\n\n"
BG.exe Print 37 "Push all boxes to storage locations.\n"
BG.exe Print 37 "A box cannot be pulled.\n\n"
BG.exe Print 37 "For move: \24\25\26\27\nFor restart: Intro\n"
BG.exe Print 37 "For quit: Esc twice\n\nPress any key for continue ..."
BG.exe Kbd
:Menu
Set "sol_level=0"
If Not Exist "!sokobox_file!" Echo !sol_level!>"!sokobox_file!"
For /f "usebackq" %%# in (
"!sokobox_file!") do Set "sol_level=%%#"
Set /a "nlevel=1+!sol_level!"
Set "level=!nlevel!"
Set "limit_levels=!nlevel!"
Set "show_nlevel=!nlevel!"
If !nlevel! Gtr 170 (Set "level=0"
Set "limit_levels=170"
Set "show_nlevel=")
If !level! Lss 1 (Set index=0) Else If !level! Lss 10 (
Set index=1) Else If !level! Lss 100 (
Set index=2) Else (Set index=3)
:ChLevelM
Cls
BG.exe Print 37 "Choose Level [1-!limit_levels!]:!show_nlevel!"
:ChLevel
BG.exe Kbd
Set "k=!ErrorLevel!"
Set /a "v=0"
For %%a in (8 13 48 49 50 51 52 53 54 55 56 57 27
) Do If %%a Equ !k! Set /a "v=1"
If !v! Equ 0 Goto ChLevel
If !k! Equ 8 (If !index! Gtr 0 (BG.exe Print 37 "\8\32\8"
Set /a "index-=1,level/=10")
) Else If !k! Equ 13 (
If !level! Geq 1 If !level! Leq !limit_levels! Goto PlayLoop
) Else If !k! Equ 27 (Goto End
) Else If !index! Lss 3 (Set /a "lev_c=!level!*10+(!k!-48)"
If !lev_c! Geq 1 If !lev_c! Leq !limit_levels! (
BG.exe Print 37 "\!k!"
Set /a "index+=1,level=!lev_c!"))
Goto ChLevel
:PlayLoop
Call:Play !level!
If !ErrorLevel! Equ 1 Goto PlayLoop
If !ErrorLevel! Equ 2 Goto Menu
If !level! Geq !nlevel! Echo !level!>"!sokobox_file!"
Set /a "s.x+=1"
BG.exe Locate !s.x! 0
BG.exe Print 70 "Very Good\19"
BG.exe Sleep 2000
If !level! Geq 170 (Cls
BG.exe Print FC "Congratulations\19\nAll Levels Clear\19\n\n"
BG.exe Print FC "Credits of Levels: Jordi Domenech.\n\n"
BG.exe Print 0F "         \nGAME OVER\n         \n         "
For /L %%X in (5,1,28) do (BG.exe Sprite %%X 9 %g.5%
BG.exe Sleep 75
BG.exe Sprite %%X 9 %g.8%)
For /L %%Y in (9,1,36) do (BG.exe Sprite 28 %%Y %g.5%
BG.exe Sleep 75
BG.exe Sprite 28 %%Y %g.8%)
BG.exe Sprite 17 15 CF "Press any key for quit"
BG.Exe Kbd
Goto End)
Set /a "level+=1"
Goto PlayLoop
:Play
Set /a "n=111111111,o=11111111,p=1111111,q=111111,r=11111,s=1111"
For /f "tokens=2 delims== " %%a in (
'Findstr.exe "^^\%1^=" "!self!"') do Call :SetLvl "%%a%"
For /F "tokens=1-8 delims=," %%a in ("!l.src!") do (Set l.d=%%h
Set /a "l.d.fw=%%a+1,l.d.w=%%a,l.d.h=%%b,l.d.g=%%c"
Set /a "l.p.v=%%d,l.p.i=%%e,l.p.r=%%f,l.p.c=%%g")
Cls &BG.exe Print 37 "Level %1"
Set /a "s.x=S.M.X"
For /L %%r in (0,1,%l.d.h%) do (Set /a "s.y=S.M.Y"
For /L %%c in (0,1,%l.d.w%) do (Set /a "l.d.i=%%r*l.d.fw+%%c"
For %%i in (!l.d.i!) do Set "l.d.v=!l.d:~%%i,1!"
For %%v in (!l.d.v!) do (BG.exe Sprite !s.x! !s.y! !g.%%v!
Set /a s.y+=4))
Set /a s.x+=4)
:GetMov
Set /a "l.p.n.n.r=l.p.n.r=!l.p.r!,l.p.n.n.c=l.p.n.c=!l.p.c!"
BG.exe Kbd
Set /a "k=!errorlevel!"
If !k! Equ 327 (Set /a "l.p.n.n.r=(l.p.n.r-=1)-1"
) Else If !k! Equ 335 (Set /a "l.p.n.n.r=(l.p.n.r+=1)+1"
) Else If !k! Equ 330 (Set /a "l.p.n.n.c=(l.p.n.c-=1)-1"
) Else If !k! Equ 332 (Set /a "l.p.n.n.c=(l.p.n.c+=1)+1"
) Else If !k! Equ 13 (Exit /b1) Else If !k! Equ 27 (
BG.exe Beep 0
Exit /b2) Else Goto GetMov
If !l.p.n.r! Lss 0 Goto GetMov
If !l.p.n.r! Gtr %l.d.h% Goto GetMov
If !l.p.n.c! Lss 0 Goto GetMov
If !l.p.n.c! Gtr %l.d.w% Goto GetMov
Set /a "l.p.n.i=l.p.n.r*l.d.fw+l.p.n.c"
For %%i in (!l.p.n.i!) do Set "l.p.n.v=!l.d:~%%i,1!"
If !l.p.n.v! Equ 1 Goto GetMov
Set /a "p=0"
If !l.p.n.v! Equ 2 set /a "p=1"
If !l.p.n.v! Equ 3 set /a "p=1"
If !p! Equ 1 (Set /a "l.p.n.n.i=l.p.n.n.r*l.d.fw+l.p.n.n.c"
For %%i in (!l.p.n.n.i!) do Set "l.p.n.n.v=!l.d:~%%i,1!"
For %%v in (1 2 3) Do If !l.p.n.n.v! Equ %%v Goto GetMov)
Call:B !l.p.i! !r.%l.p.v%! !l.p.r! !l.p.c!
Call:B !l.p.n.i! !r.%l.p.n.v%! !l.p.n.r! !l.p.n.c!
If !p! Equ 1 (
BG.exe Beep 3
Call:B !l.p.n.n.i! !r.b.%l.p.n.n.v%! !l.p.n.n.r! !l.p.n.n.c!
Set /a l.d.g+=g%l.p.n.v%!r.b.%l.p.n.n.v%!)
Set /a "l.p.r=!l.p.n.r!,l.p.c=!l.p.n.c!,l.p.i=!l.p.n.i!"
Set "l.p.v=!r.%l.p.n.v%!"
If !l.d.g! Equ 0 (
BG.exe Beep 2
Exit /b0)
Goto GetMov
:B
Set /a "z=%1+1"
If %1 Gtr 0 (Set "l.d=!l.d:~0,%1!%2!l.d:~%z%!"
) Else Set "l.d=%2!l.d:~1!"
Set /a "row=4*%3+S.M.X,col=4*%4+S.M.Y"
BG.exe Sprite !row! !col! !g.%2!
Goto :Eof
:End
Cls
Color 07
BG.exe Cursor 1
BG.exe Font 6
Mode Con Cols=80 Lines=300
Goto :Eof
:SetLvl
Set "l.src=%~1"
Goto :Eof
:BuildBG
::This make BG.exe v2.5
::Source code at: code.google.com/p/bg-tool/
Del /f /q /a bg.exe bg.ex_ >nul 2>&1
For %%b In (
"4D534346000000008F080000000000002C000000000000000301010001000000000000"
"00430000000100030FBC160000000000000000924178B6200062672E65786500CCC3D9"
"BC4408BC165B80808D0110C26B00003302563400006F006EBBF6D6B6D75BEF9235D8D6"
"66BD12D938CBACCDAB84FF016A6D993B75ED45495E81BDDBCDB5EEEE77CF6D6B1564B8"
"C6351DA1C50A225A44068C48164BB6F641256448EC830659225108906862E5E61E18F2"
"C71C39AB80B800008DCC80191900CF83AF7BB98FC50BE09B082C4B0613F0408899DDE6"
"281B48B796616EDC2D6FD96A666BC77B6BB49296ED573B9B9649674A532E8A26412520"
"1C3449164812F8111088D89F002000002300404340046DB7ACDB71254204E08C3921C8"
"C7F03FFF07EBFF3E142EDFD0076D1676A2B274DD4180E07E2F4BFFEA056CBE3310FD8F"
"F0955193871FC78BA947203F3CA184724F4922C6994CA33A64F1511F98227EFC869BE2"
"E6A58F8C4E10843030BB100F232E87D320A9E3C0D27D1E1ABA3CB9E42E46DA3F6883B6"
"DAF336F97F676162B283EB8BBB217AEF223F12AE447BCF1102B4EE83AF62415940798C"
"A8AA92DAE38C3E7715F74CFB5608942AD1F544EFA7F5016B8F39BB64355D41C087B4FD"
"D6AF5C923970677990E34CD55E937AFAF452421A8A7592B325C77B605D185742FF4896"
"F741F6B0F1ECD95AAF661200DC9CF424AA09ADD1E672E976B82D1E6B942F516C96AF50"
"CDC0971E37C884EDCDACDB5713B64D3F68F353E31B53F1B100331DA224E6B3AFE956BC"
"3E92EC0CCE6CE4F4ABB2D3756CD395F99E1E8E21BC97DCEFB79D9FEEFB7801619759D7"
"83857A1021DC6FA117E8313B5F014C761AAC7865AFD1F471B920FBCC9B841E9FA15E18"
"5A4B3BDBE897AD4C6BC9AA268A5D26080BE99173FA02C6D7B2284A4FDD2953E0BDB8D6"
"B2B931D785C667B02E3652BB3AF61CCE68881F7A00E18CE0BDA7F306CCA5CE05798F17"
"6637E92ECB8E8DB0DD2B316C9015E5CA9E4F3F5CD59ADBD00BED7C477044C399780978"
"1E2B0391B6AA3C345B7F9F7539A97325D8A0A94B3D8101C772A83CA12E9B44ADA19151"
"AD32D746E53362A119D6A47C6778369300AE0778D28D0FC64B27C606D85FD9C581DD02"
"52ED87943F0DA56DAB3F7EBB191F83F775F143AB0FF15F677EAF1A47A7DE436865FE9F"
"CD156AB385379692EE1EBE33B0B45FDEB3BBD02F67A95FDCDA9CC99EC1CBB888F1BF0C"
"0E9998C48327AF50FC20173C78A8F7AADD6430C578FEE649B8A1038338DC59F70C5E9B"
"6ED8FB863FA0A9EE2E1BC4D5DD5A60CB89A381090DA2F0C97B836EF42F11B279979CD8"
"EED9DA87B4E8FD158CBE80DF1556305F865D6D333EB1A1E9B38F71DCA7D6148866DCE3"
"4A4557B3BE618D2E9E9F04BE575EEF298B104F38C754EE8B4B24AFD11F4EFC4F0B134E"
"C90E2379E306C582B5BCFE7652B86880F8526621F0AEB11AAC4C977C3643666AD05873"
"E538C3EE399819ED27005C41992DD42AD1CCECEE4936592839343760627059B8A23AAB"
"7736CC3C016B0DDBDBC57C8E7DEA8F2C03F5B669CE38E84951810C3F19D32CCF798BEC"
"AF980B6DE783C87B60243FBAA7652577B907BB35CA8A8A5A47BC93BA56D8B7BBD5ECCB"
"EC39BEAF2B05099CB4EC2583B2FBF792D1DFFE2B1BFFB22358C89A1A8DA1AF17AC4BD7"
"9F3587AD9E6FEDBA2F84673B940AC182FD37B0EAAD8676EFDA758CF5E8F3B019B6CB43"
"DF42E56A8693B4078B4942E4004C171EE4AD5C9D42ED5876709C25360BDF5B9BD18C5F"
"D683E71777348E4955EA3F2F2D9C7E3B7B39879DFC607BB0D15801845FC13327B775FA"
"FF1EFFD171C1E480DCE71D1FE285DD41D3AF72FC134373A0C6190B9F71B6BE281AF4F6"
"C0DACADB77B7BE39EC8076172E58BA77656D1B6A3F6E75AA8295F53BF8F006A554CEAD"
"BEE6B7D0BF86B7505D8449B810D772FCCC176F3D06FD342C688EE6B3D22FDA13435C58"
"0E0D6B00EF6677ADE8BBFCFDDEDF5E6F541F42ACE71CF5E6A58EA5D98E6E53928DCDFF"
"807C16CB1EEAE17616E3C69678B9C79F0913F2BF21C9E39CE2525EFA1DAC920CF7FB42"
"5FCB5284E50990D17A002C2E97F025E2B3CFAC2A6C84E971BAA02EE54B7C092CB197D0"
"255209D5C466FB8AA5A2A0ACBE43C493117D28FF957120BF9E9BF4A64DAEF70B3AB6B6"
"61F003383DA4FDFBFF05C343C5595BA7797FC394B49CEEC438DDACECAC5D19085F9AE4"
"5BDBB88E6225ED9F3550FC630A50D4F9B975765A301BCFD9D35074467686742667A6E9"
"8CCDCCDA19F499FA0C2C4638336E675E6176F0B54B6D8AE19CCC8BDFBDA23BB0590F66"
"8DD438B3D361CF3A86160C3273C51FF4C9C59D5C088B8864C3CFD0773B35E1C37B2830"
"FE680D47B000010608A249BC83F02D6E028E96C4FF222A6894502EA0B904E6343E7721"
"62BD59A0EBB668AD0F9A1D667E0057A8B807CF0DFD947A75736BF833A5A03E0F701950"
"FC41F50F991560FB813961B7B3A52583E50C82714891A1400FE05FC2CCFE572A19849C"
"8562114849A4C847AA48C6C89163A3286568932AEAC852BAC612644856C17C5C3A5E55"
"3D1C17AA42FD79A284323DDDA8A75409F52A322635223712E0A6A24975528E91D9D792"
"3CB609854988BF80AAF954F685E9994E744A4584F93B260448C2C6C67BCFD134DBA9A1"
"F82E3695A3D560762ABA7888C6E6F06461505407AAA64ED1AB93F4A4CAA45294789149"
"77D33492D129EDD4782A11A2D6237A4775DC78CE10F1319E4C127A5C965AA4A66B48CA"
"4B75CDEE5D28624E554788796C15C5119B7CACBDDB7E3CB7D6492342771DB362453438"
"D468A7103377641122B672C41B8B3F795121EAE8689316BB0D9DD844C288D564FD799F"
"BA9579A58AC8DB21A9FD46A18889D971144718D0B8EE6F67A1358D7FA0AB18A66579D8"
"05FDBCD822D7735F2F77D6288399332F2F47B06E186D438EC8FFB4ACEDFBBBD45BEBEB"
"DD20EBCFD14806EDB9B02CE17283E887D187E387E40EA83B701F51882A6003057E17C8"
"1C30F8030120017445D020C7242306471E817AA2622C897450D47F8DD0447F23AD8824"
"70BFB4A1647B2A1C20E02BF4292973DBA35BB540DF"
) Do >>bg.exe (Echo For b=1 To len^(%%b^) Step 2
Echo WScript.StdOut.Write Chr^(CByte^("&H"^&Mid^(%%b,b,2^)^)^) : Next)
Cscript /b /e:vbs bg.exe > bg.ex_
Expand -r bg.ex_ >nul
Del bg.ex_ >nul 2>&1
Goto :Eof
::Levels
1=5,4,2,5,9,1,3,7%p%45011022011400%p%7
2=5,4,2,5,16,2,4,%r%710001112035114420%p%
3=6,4,2,6,26,3,5,%r%77104011710020%s%002617%q%
4=7,4,2,6,11,1,3,771117771116%r%00220011000400%n%
5=6,4,2,5,23,3,2,77%o%0001102000114524%o%7
6=5,5,1,5,26,4,2,7%r%71000111000110231110504%p%
7=5,5,2,5,16,2,4,%r%71004111002511120017104017%r%
8=5,5,2,5,16,2,4,%r%71000111000511122011404%p%7
9=7,4,2,5,28,3,4,%q%7714000%s%02020011041500%n%
10=5,5,2,5,8,1,2,%r%71450171002111020411100017%r%
11=5,5,3,5,8,1,2,%p%051411220411420011000%p%7
12=7,4,2,5,17,2,1,%r%7771004%r%5202001110400017%p%
13=6,4,3,5,25,3,4,%q%710204111400201100254%o%
14=5,5,2,5,13,2,1,%p%040411522%s%00017100017%r%
15=7,4,2,5,30,3,6,%q%7710400%s%40220011000035%n%
16=6,4,3,5,22,3,1,7%o%042011002201154004%o%
17=5,5,2,5,8,1,2,%p%450011132411002011000%p%7
18=5,5,3,5,19,3,1,7%p%040110200115220114104%p%
19=6,4,3,5,11,1,4,%o%4015011220201140004%o%
20=5,5,3,6,13,2,1,%p%42001162001140201100%p%77
21=5,5,3,5,26,4,2,%p%004011020411122011450%p%7
22=7,4,2,5,20,2,4,777%n%000110025201104004%n%7
23=5,5,2,5,13,2,1,%r%714001115420110200%s%00177%s%
24=6,4,3,5,19,2,5,%o%002441100025110024%o%7
25=5,5,3,6,10,1,4,%p%402611120411002011000%p%7
26=5,5,3,5,22,3,4,77%p%00110200110425110424%p%
27=5,5,3,5,8,1,2,7%p%50411420411202011000%p%7
28=5,5,2,5,8,1,2,7%r%71504111223110040110000%p%
29=5,5,2,5,9,1,3,%r%71045171042111020011100017%r%
30=5,5,2,5,13,2,1,%r%714001715021110320114000%p%
31=6,5,2,5,19,2,5,%o%000341102235110004111000117%r%77
32=5,5,3,5,9,1,3,7%p%454110221110420110000%p%
33=7,4,2,5,26,3,2,777%n%4301102020011050040%n%
34=7,4,3,5,21,2,5,%n%4042401102025011000%n%777
35=6,5,3,5,33,4,5,77%r%711000111000011432211144025%o%
36=7,4,2,5,17,2,1,%n%00040011520200%q%4017777%s%
37=7,4,3,5,20,2,4,%r%7771024%r%00252011044000%n%
38=6,5,3,5,30,4,2,7%o%0400110220011420001145100%o%
39=6,5,2,6,15,2,1,%o%43000116120011020001100100%o%
40=6,5,3,6,33,4,5,%o%00100110004211002341100026%o%
41=5,5,2,5,19,3,1,%p%4300114200115200%s%00177%s%
42=5,5,3,5,13,2,1,%p%42001152441100201100%p%77
43=6,5,3,5,15,2,1,77%o%000115200411422001140100%o%
44=6,5,3,5,10,1,3,%r%771435%s%402201142000%s%000177%r%
45=6,5,3,5,23,3,2,7%r%711404171020%s%052001104200%o%
46=6,5,3,5,30,4,2,%o%0204011002001103214111500417%q%
47=6,5,3,5,19,2,5,%r%771440%s%2002511042001100100%o%
48=7,4,3,5,30,3,6,%r%7771040%r%02020011404205%n%
49=7,4,3,5,17,2,1,%n%4240001152200011401000%n%
50=6,5,2,5,22,3,1,%r%7714001771040%s%522001103000%o%
51=6,5,3,5,9,1,2,7%q%7150441112204110002011000%o%77
52=6,5,2,5,32,4,4,77%o%0001100000110322111443517%q%7
53=6,5,2,5,22,3,1,%o%0010411002341152000%s%000177%r%
54=6,5,3,5,29,4,1,%o%04440110223011000201150%o%777
55=6,5,1,5,15,2,1,777%o%00115200011033001143000%o%
56=6,5,3,5,32,4,4,%o%004201100220%s%0041771054177%r%
57=6,5,4,5,12,1,5,7%o%00051142220114420111040017%q%7
58=6,5,2,5,19,2,5,%o%04004113220511000%s%000177%r%77
59=6,5,3,5,32,4,4,%o%00024110002411001241100150%o%
60=6,5,2,5,22,3,1,777%s%711100111000011522001143040%o%
61=6,5,3,5,16,2,2,%r%771000%s%052001102034111024417%q%
62=6,5,3,5,26,3,5,%r%771400%s%0002011422051140100%o%
63=7,5,4,5,37,4,5,%n%000100110422001124300011440250%n%
64=6,5,1,6,12,1,5,%o%000261100330110000111001117%s%777
65=6,5,4,5,30,4,2,%o%0444011042201102200111510017%q%
66=6,5,2,5,32,4,4,%o%000301100220%s%0041771054177%r%
67=6,5,3,5,17,2,3,%r%7710401771405%s%022001102040%o%
68=6,5,2,5,26,3,5,%o%0042011003301102045%s%000177%r%
69=6,5,2,5,19,2,5,777%s%711100111022511040301104000%o%
70=6,5,3,5,17,2,3,%o%400201101520110020411400%o%77
71=6,5,1,6,8,1,1,%o%62000113330011000001100100%o%
72=6,5,1,5,30,4,2,77%o%000110200011033001145100%o%
73=7,5,1,5,33,4,1,7777%n%00110300001143320011530000%n%
74=6,5,3,5,29,4,1,%q%7141001114200011020201151400%o%
75=6,5,3,5,23,3,2,77%o%400110202011052001144100%o%
76=6,5,3,5,26,3,5,77%o%00011002001143425114020%o%7
77=7,5,3,5,36,4,4,1117%r%4111001104420011000220%r%5011777%s%7
78=7,5,4,5,25,3,1,%s%7777100%q%0010401152224011020044%n%
79=6,5,3,5,22,3,1,%r%7710401771040%s%522201104000%o%
80=6,5,3,5,15,2,1,%o%040001152220%s%0401771040177%r%
81=7,5,4,5,17,2,1,77%r%71110001115220001104220011434400%n%
82=7,5,5,5,38,4,6,%p%71400001114102201144220011040025%n%
83=6,5,3,5,22,3,1,777%s%711140111022011504201100400%o%
84=6,5,2,5,8,1,1,%o%53040%s%20011020301104000%o%
85=6,5,3,5,15,2,1,%o%03000115104411022001102040%o%
86=6,5,2,5,16,2,2,%o%004001105430111022017111001777%s%
87=7,5,3,5,38,4,6,7%n%002401100430011020020%q%4517777%s%
88=6,5,2,5,19,2,5,%o%04020110103511000231100040%o%
89=7,5,4,6,34,4,2,%n%41000011400020114322101116200017%p%
90=7,5,4,5,25,3,1,7%r%7771000%r%010401152224011020044%n%
91=7,5,4,5,17,2,1,7%n%00014115202041100202411000104%n%
92=7,5,1,5,38,4,6,77%q%7714000%r%0301100002311000035%n%
93=6,5,3,5,12,1,5,%o%004251140220110410111000017%q%7
94=7,5,4,5,36,4,4,7%n%0400011002000114222%r%0454177%q%7
95=7,5,2,5,10,1,2,7%n%5300011030200114020%s%4100177%q%77
96=6,5,3,5,33,4,5,%o%04020110000011410211100425%o%
97=7,5,4,5,38,4,6,7%r%771140017714420%s%02220011400035%n%
98=7,5,2,5,17,2,1,%n%001000115010201143300011034020%n%
99=7,5,4,5,38,4,6,%n%40010011000220114410201110402517%p%
100=7,5,4,5,17,2,1,%n%020040115201041102204011001004%n%
101=7,5,4,5,28,3,4,%n%40000011401200114325201140020%n%7
102=7,5,2,5,17,2,1,7%s%7771100%r%5200001100334011020040%n%
103=6,5,4,5,12,1,5,%o%04005112224011400101100240%o%
104=7,5,3,5,17,2,1,%r%7771404%r%54220011102000171110001777%r%
105=7,5,5,5,30,3,6,%n%414020110401001100222511440020%n%
106=7,5,4,5,37,4,5,7777%n%0011020200114002201144405%n%7
107=7,5,4,5,29,3,5,%n%441000110002201140215011040020%n%
108=7,5,4,5,34,4,2,77%s%7711100%s%0240201144322011054000%n%
109=7,5,5,6,11,1,3,77%n%6200114122001104020011440020%n%
110=7,5,3,5,36,4,4,7%n%004401102340011002200110015%n%77
111=7,5,4,5,30,3,6,7%n%0444411022000110020251100%n%7777
112=7,5,3,5,28,3,4,%n%40400011042020110235%q%0017777%s%77
113=7,5,3,5,17,2,1,77%s%771114017715420%s%0202001110400017%p%
114=7,5,5,5,14,1,6,7%n%4241511410020112020201104040%n%7
115=6,5,3,5,29,4,1,%o%02040114100011022001153400%o%
116=6,5,4,5,19,2,5,%o%04020114022511021011104004%o%
117=7,5,4,5,10,1,2,7%n%5204011020200114420%s%4100177%q%77
118=7,5,5,5,22,2,6,%q%7710000%s%4412251140002011442020%n%
119=6,5,3,5,26,3,5,%q%7100401714010111002251104020%o%
120=7,5,4,5,38,4,6,%q%771400017714102%s%40220011400025%n%
121=7,5,3,5,10,1,2,7%n%5440011022000110042%s%0300177%q%77
122=7,5,4,5,9,1,1,%n%520004111222041100001411000114%n%
123=7,5,4,6,9,1,1,%n%600100111201001140202011040204%n%
124=7,5,3,5,14,1,6,%n%004025114301211103002011400000%n%
125=7,5,2,5,17,2,1,7%n%000401152020011403101110300017%p%7
126=6,5,3,5,15,2,1,%o%004001154420111022017111001777%s%
127=7,5,4,5,22,2,6,%n%00010011410205114420201104020%n%7
128=7,5,3,5,17,2,1,%n%441000115022001103001011024000%n%
129=7,5,5,6,17,2,1,%n%042420116200001141120011420000%n%
130=7,5,4,5,21,2,5,%n%440100114221501103002011400020%n%
131=7,5,2,5,20,2,4,7777%n%0011003520110043201110040017%p%
132=7,5,5,6,17,2,1,%n%42040011612210112020401104000%n%7
133=7,5,3,5,22,2,6,%q%7710400%s%0012051120002011440100%n%
134=7,5,4,5,26,3,2,%n%4420201100200011451200110040%n%77
135=7,5,3,5,25,3,1,%n%4410001104202011530200%r%0001777%r%
136=7,5,3,5,9,1,1,%n%500104110102201140200011400%n%777
137=7,5,4,5,26,3,2,7%n%02004110202441105201411001000%n%
138=6,5,3,5,29,4,1,%o%00100110022011344201150400%o%
139=7,5,3,5,28,3,4,7%n%044001100432011002520%q%0017777%s%
140=7,5,3,5,33,4,1,%n%414000114300201102120011501000%n%
141=7,5,4,5,13,1,5,%n%44015011000220114010201110402017%p%
142=7,5,4,5,17,2,1,%n%024404115011211100200011024000%n%
143=7,5,2,5,14,1,6,%n%0001051141003011002420110000%n%77
144=7,5,3,5,20,2,4,7%n%00100110025201104332011040400%n%
145=7,5,4,5,34,4,2,%n%43000011402200114210001115240017%p%
146=7,5,3,5,12,1,4,77%s%7711105%s%0022001143430011420000%n%
147=7,5,4,5,30,3,6,%q%771044017714302%s%02020511000240%n%
148=7,5,4,5,30,3,6,%n%0020041104022011041025110040%n%77
149=7,5,3,5,9,1,1,%p%71520401713031011102020011400040%n%
150=7,5,5,6,33,4,1,%n%4200001142222011401000116400%n%77
151=7,5,2,5,13,1,5,%n%0001501141002011002430110000%n%77
152=7,5,5,5,12,1,4,%q%7714005%s%4410001142222011420000%n%
153=7,5,3,5,17,2,1,%n%0300001154220011441020110000%n%77
154=7,5,4,5,21,2,5,7%n%0040011022050110442%s%0204177%q%77
155=7,5,3,5,38,4,6,%n%0004201100234411020100%s%0005177%q%
156=7,5,4,5,19,2,3,7%n%00000110251241100202411001044%n%
157=7,5,2,5,13,1,5,%p%71000351714302%s%0002001110400017%p%
158=7,5,4,5,10,1,2,%n%450020114122001144021011030000%n%
159=7,5,4,5,25,3,1,%p%7102004171442101115202001114000017%p%
160=7,5,3,5,26,3,2,7%n%004001103420011052101110240017%p%7
161=7,5,4,5,17,2,1,7777%n%00115202001143420011424000%n%
162=7,5,4,5,26,3,2,77%q%7710420%s%2044110502201104000%n%7
163=7,5,3,5,38,4,6,%n%000000114310001143022111040025%n%
164=7,5,4,5,22,2,6,7%n%000001142120511402021114400017%p%7
165=7,5,5,5,17,2,1,%q%7714004%s%5212001124042011000024%n%
166=7,5,4,5,9,1,1,%p%71500401710304211142120011420000%n%
167=7,5,3,5,36,4,4,%n%0300001100220011041020114045%n%77
168=7,5,4,5,30,3,6,%n%04002411002430110020251104%n%7777
169=7,5,4,5,36,4,4,%n%4200001143120011420021114005017%p%7
170=7,5,4,5,37,4,5,%p%71040001714222211104103011400050%n%
::

Last edited by carlos on 18 Dec 2012 21:37, edited 4 times in total.

Aacini
Expert
Posts: 1886
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: [BatchGame] SokoBox

#2 Post by Aacini » 17 Nov 2012 17:48

This is very interesting, Carlos! :P

I take a look at your page on the development of BG.exe program. Your code is very familiar to me. I also used to write small .exe programs as aid for better Batch files, but I use assembly language. I want to invite you to see my work at this post.

You are very welcomed to this site. I hope we can help each other when Win32 API doubts arise... :wink:

Antonio

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: [BatchGame] SokoBox

#3 Post by foxidrive » 17 Nov 2012 22:34

That's neat carlos, and fun :)

Well done!

RogerSmith
Posts: 22
Joined: 20 Nov 2012 12:42

Re: [BatchGame] SokoBox

#4 Post by RogerSmith » 20 Nov 2012 18:17

wow
the game very addictive

the code:
GodLike!!

carlos
Expert
Posts: 503
Joined: 20 Aug 2010 13:57
Location: Chile
Contact:

Re: [BatchGame] SokoBox

#5 Post by carlos » 24 Nov 2012 19:31

Thanks for all comments.
But code is not godlike :lol:
All levels are solvables.
For me the most difficult levels were 108, 114, 125, 144, 149.

Updated again:
I edited the code for use the bg.exe v2.4. Also I added a little animation that is displayed when you complete all levels.

@Aacini: I tried write small assembly utilities, but I stopped because of the size of the executables, usually you get a false positive detection by some antivirus, and that's uncomfortable.

Squashman
Expert
Posts: 4472
Joined: 23 Dec 2011 13:59

Re: [BatchGame] SokoBox

#6 Post by Squashman » 24 Nov 2012 22:08

Funny because I can't figure out how to play or what the concept is.

Boombox
Posts: 80
Joined: 18 Oct 2012 05:51

Re: [BatchGame] SokoBox

#7 Post by Boombox » 25 Nov 2012 02:57

.
Sokoban is a game I used to have on my high school Win3.1 computers.

Push all bricks to the marked areas, in as few moves as possible. No pulling.

Well done Carlos.

Squashman
Expert
Posts: 4472
Joined: 23 Dec 2011 13:59

Re: [BatchGame] SokoBox

#8 Post by Squashman » 25 Nov 2012 08:04

Boombox wrote:.
Sokoban is a game I used to have on my high school Win3.1 computers.

That is a little after my time. I played Oregon Trail and Moon Patrol on Apple II's.

carlos
Expert
Posts: 503
Joined: 20 Aug 2010 13:57
Location: Chile
Contact:

Re: [BatchGame] SokoBox

#9 Post by carlos » 18 Dec 2012 21:41

Updated to use bg.exe v2.5 and play some sounds.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: [BatchGame] SokoBox

#10 Post by foxidrive » 18 Dec 2012 23:47

Thanks carlos.

Post Reply