The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDLGUI编写的小&#
goxl


Joined: 23 Jan 2014
Posts: 17


打方块游戏项目地址
https://github.com/twtfcu3/hit_box
上面的下载地址包含了游戏源码5.97MB,编写本款游戏时使用的SDLGUI最新版,游戏展示视频及教程页面。


下面的下载地址仅提供了游戏源码,文本大小为550KB
http://pan.baidu.com/s/1kTupvuR
编译游戏源码时要使用第二次重写的SDLGUI,它托管于https://github.com/sdlgui/sdlgui
请点击下面的链接下载最新版式的SDLGUI
https://github.com/SDLGUI/sdlgui/archive/master.zip










本例子可以在WINDOW与LINUX下编译,不能在手机平台编译。
编译前先将SDLGUI所要用的库文件编译环境设置好
SDLGUI所需库有SDL2,SDL2_TTF,SDL2_IMAGE,SDL2_gfx,SDL2_net,SDL2_mixer

以下连接是SDLGUI库所用的库文件包。
http://pan.baidu.com/s/1hqmkhXa
当然你也可以到官方网站http://www.libsdl.org下载




本例子在mingw32 GCC下编译通过
在终端输入以下命令行并回车
make或make name=hit_box.exe


如果使用可视编辑软件(如codeblack)要设置好头文件路径和库文件路径
库文件加载顺序为
-lSDL2_gfx
-lSDL2_image
-lSDL2_image.dll
-lSDL2_draw
-lSDL2_ttf
-lSDL2_ttf.dll
-lSDL2_mixer
-lSDL2_mixer.dll
-lSDL2_net
-lSDL2_net.dll
-lmingw32
-lSDL2main
-lSDL2
-lSDL2.dll



本例子的游戏为《打方块》




游戏代码结构

test.cpp游戏主进程源码


readme.html游戏展示视频


game_core文件夹游戏内核算法,实现方块的填充与摘取,并进行游戏信息的更新与状态反馈.


game_gui文件夹游戏GUI层的显示与输入输出


sdlgui文件夹SDLGUI库文件,实现GUI底层实现与窗口管理。


运行test.exe开始游戏



游戏使用方法


每过一关后点击"吻"进入下一关

使用键盘上的【四个方向键】移动游戏中的活动方块(即在闪动的方块),
每关有【3个可用方块】,使用键盘上的【四个方向键】把它们打到所有【浅白色方块】中则【过关】
【最亮的方块】和【填充后的方块】均为【障碍物】,填充时只能把方块打到障碍物的上下左右。


本例子的目标
1、解决上个版本出现的BUG:不能编译与运行。
2、用于测试SDLGUI的可行性,发现在绘图方面非常方便,所用即所见的效果。但在性能上还有很大的改进空间,主要表现在事件处理上。
3、用于测试SDLGUI在游戏开发上的适用性,个人感觉非常好,这个游戏分为两层,第一层为游戏计算核心层,第二层为游戏人机交流表现层。SDLGUI在这两层上可以很好的交换数据。
本例子的BUG
现在不能在ANDROID编译运行[img][/img][img][/img]
SDLGUI编 写 的 小 游 戏 「 打 方 块 」
Juan Manuel Borges Caño
Guest

Japanese, besides So Cool, is not international (yet).
It is... WHAT? Wink
If you try to spam on another media more... get in the line. Ha Ha, ;-D.
goxl


Joined: 23 Jan 2014
Posts: 17
SDLGUI is the development of SDL2 based GUI Library

This is the HITBOX game using SDLGUI
Re: SDLGUI编 写 的 小 游 戏 「 打 方 块 」
goxl


Joined: 23 Jan 2014
Posts: 17
Juan Manuel Borges Caño wrote:
Japanese, besides So Cool, is not international (yet).
It is... WHAT? Wink
If you try to spam on another media more... get in the line. Ha Ha, ;-D.



SDLGUI is the development of SDL2 based GUI Library

This is the HITBOX game using SDLGUI
Re: SDLGUI编 写 的 小 游 戏 「 打 方 块 」
mr_tawan


Joined: 13 Jan 2014
Posts: 161
Juan Manuel Borges Caño wrote:
Japanese, besides So Cool, is not international (yet).
It is... WHAT? Wink
If you try to spam on another media more... get in the line. Ha Ha, ;-D.


Well said, although apparently it's Chinese, not Japanese :-)
SDLGUI编 写 的 小 游 戏 「 打 方 块 」
Jonny D


Joined: 12 Sep 2009
Posts: 932
It actually looks like Chinese...


There's a game to try and a GUI library he put up on Google Code.  I'm not sure what else there is to this message though.


Jonny D
Re: SDLGUI编 写 的 小 游 戏 「 打 方 块 」
goxl


Joined: 23 Jan 2014
Posts: 17
mr_tawan wrote:
Juan Manuel Borges Caño wrote:
Japanese, besides So Cool, is not international (yet).
It is... WHAT? Wink
If you try to spam on another media more... get in the line. Ha Ha, ;-D.


Well said, although apparently it's Chinese, not Japanese :-)



hei hei

Very Happy Smile
SDLGUI编 写 的 小 游 戏 「 打 方 块 」
Robotic-Brain
Guest

Have you tried Google Translate yet?
It says it's chinese... The content:

some overly long description of how to play the "Game"
and basically the information: "Does not compile on Mobile"

the translation is cryptic though...

Am 09.07.2014 15:01, schrieb Jonathan Dearborn:
Quote:
It actually looks like Chinese...

There's a game to try and a GUI library he put up on Google Code.
 I'm not sure what else there is to this message though.

Jonny D
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDLGUI编 写 的 小 游 戏 「 打 方 块 」
Juan Manuel Borges Caño
Guest

Have He?



On Wed, Jul 9, 2014 at 3:19 PM, Robotic-Brain wrote:
Quote:
Have you tried Google Translate yet?
It says it's chinese... The content:

some overly long description of how to play the "Game"
and basically the information: "Does not compile on Mobile"

the translation is cryptic though...

Am 09.07.2014 15:01, schrieb Jonathan Dearborn:
Quote:
It actually looks like Chinese...

There's a game to try and a GUI library he put up on Google Code.
 I'm not sure what else there is to this message though.

Jonny D


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org