返回列表 回复 发帖

SokoPlayer

终于把SokoPlayer和Discuz!论坛结合起来了,自定义一个Discuz!代码即可。

自定义的Dicuz!代码最多支持三个参数。
现在定义的格式和MF8论坛完全一样,所以可以沿用YSokoban程序ctrl-M生成的Discuz!代码。



下一步准备支持静态推箱子图片,即


不过还不太清楚实现的原理了,mf8论坛是用自定义Discuz!代码把上面的
的Discuz!代码替换为下面的HTML代码。
但是HTML代码里面关键的soko.php文件是如何实现合并图片的呢?


<img src='http://bbs.mf8.com.cn/soko/soko.php?w=27&h=27&level=<br />
HHHHHHHHHHHHHHHHHHHHHHHHHHH<br />
H_*______._*_*_*_$________H<br />
H_HHHH_HHH$__H__.HHHH_HHH*H<br />
H_H__$_$___HHHHH____$_$_H_H<br />
H_H$..$._H_H____.H$..$._H_H<br />
H___$...$H*HH_HH$H_$...$H_H<br />
H_H$...$_H__*__H_H$...$___H<br />
H_H_.$..$H_H___H_H_.$..$H_H<br />
H_H_$_$____HHHHH___$_$__H_H<br />
H_H_HHHH_H___H__$H_HHHH_H*H<br />
H_$_.$___*_*_*_*_.___*____H<br />
H*_H_HHHH_*HHHHH*_HH_HHH_*H<br />
H__H_H__H__H___H__H_*H_H__H<br />
H*HH____HH*H___H*HH____HH*H<br />
H__H_H*aH__H___H__H__H_H__H<br />
H*_HHH_HH_*HHHHH*_HHHH_H_*H<br />
H____*_____*_*_*_*___$.___H<br />
H*H_HHHH_H.__H___H_HHHH_H*H<br />
H_H__$_$___HHHHH____$_$_H_H<br />
H_H$..$._H_H___H_H$..$._H_H<br />
H___$...$H_H__*__H_$...$H_H<br />
H_H$...$_H$HH_HH*H$...$___H<br />
H_H_.$..$H.____H_H_.$..$H_H<br />
H_H_$_$____HHHHH___$_$__H_H<br />
H*HHH_HHHH___H___HHH_HHHH_H<br />
H________*_*_*_*_*______*_H<br />
HHHHHHHHHHHHHHHHHHHHHHHHHHH<br />
'>
经过搜索,基本明白了。php代码经过服务器端运行之后,可以返回文本html文件,也可以返回一个图片。
参看:http://itshenxiaoxiang.blog.163. ... 156342010882487988/
静态推箱子关卡图片生成功能也完成了,编写了一个PHP推箱子图片合成程序sokoimage.php

也是支持和MF8论坛一模一样的[soko
代码。只是把此Discuz! 代码替换为
<img src="http://sokoban.ws/utility/sokoimage.php?w=?&h=?&lvl=?">
非常好!   进展很快!  
7# anian

我们还可以把SokoReplayer也结合到论坛里来。
The sokoplayer is good.

Another suggestion:  Can you display the  "move/push" status on the top instead of at the bottom ?  (basically display it before displaying the level)

I ask for this because in the script I am doing, I plan to make the display field a square so that when you add the "rotate" function in, it will work with 90 degrees rotation.
Displaying the move status at the bottom makes it look odd.
Move the status display to the top solves this problem.

Or perhaps you can even give a parm for this change (and by default it displays at the bottom)... in the script I will use the parm to make it display on the top.

Up to you.    My script basically works now, but it's not aligned yet.   So, it doesn't look nice.

I have the option to switch between two skins (we can add more), I will add option for Normalize or not.
本帖最后由 stopheart 于 2011-7-27 14:44 编辑

5楼的皮肤很好看,请问谁能把这个皮肤给我,歪推箱子的皮肤不好看,我也会制作
返回列表