Physica - a casual platformer

Physica - a casual platformer

Postby Buch » 15 Jan 2013, 14:42

Physica (http://physica.sourceforge.net) is a very simple casual platformer game where the goal is to drive a square through game levels from its starting position to his goal, avoiding hazards and without falling down.
You can find Windows binaries on Sourceforge here, and source code together with build instructions on our Github repository

The 1.0 release includes 16 levels, plus a level editor to make your own ones; that (and feedback of course) is what I mainly need at the moment, since my level design skills are veeeery little. So if you want to have a try with the level editor, you're welcome to create and share.

You can find most of game assets on OpenGameArt

Here are some screenshots of the game. Have a try and enjoy!
Buch

Image
Image
Image
Image
Last edited by Buch on 10 Feb 2013, 14:00, edited 1 time in total.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby farcodev » 16 Jan 2013, 00:48

Thanks for the share! :)
farcodev
 
Posts: 163
Joined: 09 Feb 2011, 02:52

Re: Physica - a casual platformer

Postby acme_pjz » 16 Jan 2013, 04:37

Great game! :D The file extension of data file reminds me of Frogatto engine ;)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 16 Jan 2013, 11:50

Yes, the extension is 'stolen' from Battle for Wesnoth engine, which later got into the Frogatto engine, AFAIK... I did like the .cfg extension for somewhat aestethic reasons...

Anyway, I've recently updated to 1.1 version (same links as first post), which includes many fixes (one in particular which dramatically increases fps) as well as achievements support (only 8 achievements for now - as I said my design and content creation skills are very low :) )
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby acme_pjz » 16 Jan 2013, 14:00

Some suggestions:

* Cap the maximal FPS to 60 because higher frame rate will waste CPU power, especially on notebooks and netbooks :think:
* Configurable key settings?
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 16 Jan 2013, 14:18

I do cap fps at 60... The fps text on the upper right corner shows the maximum fps that the computer can run in that moment... That is: if higher than 60, the game will run at 60fps; else, the game will run at the fps shown in that label - and that should not happen, hopefully.

About key settings, I think I'm gonna work on them in the next few days... It shouldn't be difficult, and it is needed for those users who have a different keyboard configuration, I guess...

In case anyone else was worrying about this: I also noticed a bug which I had missed before - loading level selection screen and achievements screen causes a lot of unused memory to be kept and after a few trials the game slows down and eventually crashes... I do know how to solve that, and I'm gonna fix it as soon as I get a free moment.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby charlie » 16 Jan 2013, 15:38

Better level progression would be nicer. Level 1 wasn't exactly easy until the controls were mastered. Level 2 required a bit of skill, and level 3 was really hard!

Level 1 should introduce the keys (A(left),D(right),W(up)), level 2 should introduce the double jump, and then current level 1 should be level 3.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2131
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Physica - a casual platformer

Postby Buch » 16 Jan 2013, 18:52

Key settings now available: open the settings panel and you will find three new buttons for controls. Click on one of them and then press a key to change it.
I also fixed the memory-eating bug I was talking before.

I'm now going to work on adding some kind of tutorial levels and making the existing ones more 'playable' and better progressive, as charlie suggested.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby Buch » 18 Jan 2013, 18:14

I added a couple of very basic tutorial-like levels at the beginning, explaining the controls.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby Buch » 22 Jan 2013, 00:12

Hey folks out there! Has anyone finished the first pack's levels? For a couple of friends of mine think that those are much too difficult, and I'd like to know if anyone else thinks the same...
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby acme_pjz » 22 Jan 2013, 06:59

Buch {l Wrote}:Hey folks out there! Has anyone finished the first pack's levels? For a couple of friends of mine think that those are much too difficult, and I'd like to know if anyone else thinks the same...


I've finished the first pack's levels ;) , with number of retries over 300 in some levels :twisted:

[EDIT] BTW, your code can't compile under MSVC, I think now I need MinGW :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 22 Jan 2013, 13:40

It can't compile under VC, you said? Could you please post the error message(s) you get?
And coming to the many retries, do you think levels should be made easier?
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby Buch » 22 Jan 2013, 22:41

Just a quick heads-up about game development: I added support for multiple level sets, and did a general level restyling to remove that 'box' feeling most levels had before... As far as I can see, some levels also became easier after changes.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby acme_pjz » 23 Jan 2013, 17:25

Buch {l Wrote}:It can't compile under VC, you said? Could you please post the error message(s) you get?
And coming to the many retries, do you think levels should be made easier?


Sorry, but the error messages are in Chinese :think:
{l Code}: {l Select All Code}
1>------ 已启动生成: 项目: physica, 配置: Debug Win32 ------
1>正在编译...
1>physica.cpp
1>f:\projects\physica\src\bulk_console.h(42) : warning C4018: “<”: 有符号/无符号不匹配
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(518) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>        f:\projects\physica\src\bulk_script.h(99): 参见对正在编译的类 模板 实例化“std::deque<_Ty>”的引用
1>        with
1>        [
1>            _Ty=object
1>        ]
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(518) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(518) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(518) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(519) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(519) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(519) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>d:\program files\microsoft visual studio 9.0\vc\include\deque(519) : error C2027: 使用了未定义类型“object”
1>        f:\projects\physica\src\bulk_script.h(93) : 参见“object”的声明
1>f:\projects\physica\src\bulk_expr.h(144) : warning C4129: “%”: 不可识别的字符转义序列
1>f:\projects\physica\src\bulk_expr.h(171) : warning C4129: “%”: 不可识别的字符转义序列
1>f:\projects\physica\src\bulk.h(84) : warning C4018: “<”: 有符号/无符号不匹配
1>f:\projects\physica\src\bulk_image.h(367) : warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)
1>f:\projects\physica\src\bulk_ui.h(55) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(55) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(55) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(56) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(56) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(56) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(57) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(57) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(57) : error C2668: “floor”: 对重载函数的调用不明确
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(559): 可能是“long double floor(long double)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(511): 或       “float floor(float)”
1>        d:\program files\microsoft visual studio 9.0\vc\include\math.h(137): 或       “double floor(double)”
1>        试图匹配参数列表“(int)”时
1>f:\projects\physica\src\bulk_ui.h(79) : error C2059: 语法错误 : “{”
1>f:\projects\physica\src\bulk_ui.h(79) : error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>f:\projects\physica\src\bulk_ui.h(79) : error C2143: 语法错误 : 缺少“;”(在“}”的前面)
1>f:\projects\physica\src\bulk_ui.h(299) : error C2958: 左 圆括号“(”(在“f:\projects\physica\src\bulk_ui.h(296)”中找到)未能正确匹配
1>f:\projects\physica\src\bulk_ui.h(299) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(301) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(302) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>f:\projects\physica\src\bulk_ui.h(302) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(302) : error C2143: 语法错误 : 缺少“;”(在“<”的前面)
1>f:\projects\physica\src\bulk_ui.h(302) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(302) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(302) : error C2143: 语法错误 : 缺少“;”(在“+=”的前面)
1>f:\projects\physica\src\bulk_ui.h(302) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(302) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(303) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>f:\projects\physica\src\bulk_ui.h(303) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(303) : error C2143: 语法错误 : 缺少“;”(在“<”的前面)
1>f:\projects\physica\src\bulk_ui.h(303) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(303) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(303) : error C2143: 语法错误 : 缺少“;”(在“+=”的前面)
1>f:\projects\physica\src\bulk_ui.h(303) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(303) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(304) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(306) : error C2061: 语法错误 : 标识符“target”
1>f:\projects\physica\src\bulk_ui.h(306) : error C2143: 语法错误 : 缺少“)”(在“{”的前面)
1>f:\projects\physica\src\bulk_ui.h(306) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(309) : warning C4183: “SDL_SetClipRect”: 缺少返回类型;假定为返回“int”的成员函数
1>f:\projects\physica\src\bulk_ui.h(309) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(312) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(313) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>f:\projects\physica\src\bulk_ui.h(313) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(313) : error C2143: 语法错误 : 缺少“;”(在“<”的前面)
1>f:\projects\physica\src\bulk_ui.h(313) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(313) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(313) : error C2143: 语法错误 : 缺少“;”(在“+=”的前面)
1>f:\projects\physica\src\bulk_ui.h(313) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(313) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(314) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(317) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(318) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>f:\projects\physica\src\bulk_ui.h(318) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(318) : error C2143: 语法错误 : 缺少“;”(在“<”的前面)
1>f:\projects\physica\src\bulk_ui.h(318) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(318) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(318) : error C2143: 语法错误 : 缺少“;”(在“+=”的前面)
1>f:\projects\physica\src\bulk_ui.h(318) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(318) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(319) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(321) : error C2061: 语法错误 : 标识符“target”
1>f:\projects\physica\src\bulk_ui.h(321) : error C2143: 语法错误 : 缺少“)”(在“{”的前面)
1>f:\projects\physica\src\bulk_ui.h(321) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(321) : error C2535: “int theme::SDL_SetClipRect(void)”: 已经定义或声明成员函数
1>        f:\projects\physica\src\bulk_ui.h(306) : 参见“theme::SDL_SetClipRect”的声明
1>f:\projects\physica\src\bulk_ui.h(324) : warning C4183: “SDL_SetClipRect”: 缺少返回类型;假定为返回“int”的成员函数
1>f:\projects\physica\src\bulk_ui.h(324) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(327) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(328) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>f:\projects\physica\src\bulk_ui.h(328) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(328) : error C2143: 语法错误 : 缺少“;”(在“<”的前面)
1>f:\projects\physica\src\bulk_ui.h(328) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(328) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(328) : error C2143: 语法错误 : 缺少“;”(在“+=”的前面)
1>f:\projects\physica\src\bulk_ui.h(328) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(328) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(329) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(332) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(333) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>f:\projects\physica\src\bulk_ui.h(333) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(333) : error C2143: 语法错误 : 缺少“;”(在“<”的前面)
1>f:\projects\physica\src\bulk_ui.h(333) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(333) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(333) : error C2143: 语法错误 : 缺少“;”(在“+=”的前面)
1>f:\projects\physica\src\bulk_ui.h(333) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(333) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(334) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(336) : error C2061: 语法错误 : 标识符“target”
1>f:\projects\physica\src\bulk_ui.h(336) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(336) : error C2535: “int theme::SDL_SetClipRect(void)”: 已经定义或声明成员函数
1>        f:\projects\physica\src\bulk_ui.h(306) : 参见“theme::SDL_SetClipRect”的声明
1>f:\projects\physica\src\bulk_ui.h(336) : warning C4183: “SDL_SetClipRect”: 缺少返回类型;假定为返回“int”的成员函数
1>f:\projects\physica\src\bulk_ui.h(339) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(339) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(340) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(340) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(341) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(341) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(342) : error C2059: 语法错误 : “if”
1>f:\projects\physica\src\bulk_ui.h(342) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(345) : error C2059: 语法错误 : “for”
1>f:\projects\physica\src\bulk_ui.h(345) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>f:\projects\physica\src\bulk_ui.h(345) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(345) : error C2143: 语法错误 : 缺少“;”(在“!=”的前面)
1>f:\projects\physica\src\bulk_ui.h(345) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(345) : error C2238: 意外的标记位于“;”之前
1>f:\projects\physica\src\bulk_ui.h(345) : error C2143: 语法错误 : 缺少“;”(在“++”的前面)
1>f:\projects\physica\src\bulk_ui.h(345) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>f:\projects\physica\src\bulk_ui.h(345) : error C2059: 语法错误 : “)”
1>f:\projects\physica\src\bulk_ui.h(345) : error C2334: “{”的前面有意外标记;跳过明显的函数体
1>f:\projects\physica\src\bulk_ui.h(361) : error C2143: 语法错误 : 缺少“;”(在“}”的前面)
1>f:\projects\physica\src\bulk_ui.h(361) : error C2059: 语法错误 : “}”
1>f:\projects\physica\src\bulk_ui.h(361) : error C2143: 语法错误 : 缺少“;”(在“}”的前面)
1>f:\projects\physica\src\bulk_ui.h(296) : error C2143: 语法错误 : 缺少“)”(在“{”的前面)
1>f:\projects\physica\src\bulk_ui.h(296) : error C2275: “SDL_Rect”: 将此类型用作表达式非法
1>        f:\projects\meandmyshadow\sdl\sdl_video.h(50) : 参见“SDL_Rect”的声明
1>f:\projects\physica\src\bulk_ui.h(296) : error C2275: “SDL_Rect”: 将此类型用作表达式非法
1>        f:\projects\meandmyshadow\sdl\sdl_video.h(50) : 参见“SDL_Rect”的声明
1>f:\projects\physica\src\bulk_ui.h(296) : error C2660: “theme::SDL_SetClipRect”: 函数不接受 2 个参数
1>f:\projects\physica\src\bulk_ui.h(296) : error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>f:\projects\physica\src\bulk_ui.h(296) : fatal error C1003: 错误计数超过 100;正在停止编译
1>生成日志保存在“file://f:\Projects\physica\Debug\BuildLog.htm”
1>physica - 119 个错误,8 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========


Briefly, there are only 3 errors: The first one is 'deque<object>' in 'object' class, incompatible with MSVC2008 STL, the compiler complains about unknown size of 'object' class, which I think that it must be a bug in MSVC STL implementation :| The second one is that MSVC doesn't support fancy structure initializer, like 'color = {255,255,255};' and 'SDL_SetClipRect (target, & SDL_Rect { rect.x + ..., blah blah blah...' :| The third one is the compiler complains about unknown function overload of 'floor' and other floating-point processing function, in fact your code 'floor((c.r % 1000) / 100)' is wrong because '(c.r % 1000) / 100' is already an integer :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 23 Jan 2013, 17:37

Thank you for posting those!

The first error is due to having two classes known as 'object' - the first one defined by MSVC library (the base object class, from which all the others are derived, if I remember correctly), the second one defined by me in the Bulk_script.h header. I might consider a refactoring...

The second error would likely be solved replacing those initializations with correct initializations, that shouldn't be much of a problem.

Coming to the third one, I wrote that code piece a couple of years ago and don't remember exactly why I did so... It is inside a function that converts a SDL_Color structure into a string with rrrgggbbb format, though it does so digit by digit... Actually, it doesn't make much sense :? It will be fixed with my next commit to the repo.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby acme_pjz » 28 Jan 2013, 05:26

Buch {l Wrote}:The first error is due to having two classes known as 'object' - the first one defined by MSVC library (the base object class, from which all the others are derived, if I remember correctly), the second one defined by me in the Bulk_script.h header. I might consider a refactoring...


I don't think so, I think it is really a bug of MSVC STL. See http://stackoverflow.com/questions/3017 ... ual-studio and http://www.gamedev.net/topic/295828-problem-with-deque/.
I have a workaround:
{l Code}: {l Select All Code}
#ifdef _MSC_VER
    std::list<object> something; //MSVC STL deque is buggy.
#else
    std::deque<object> something;
#endif
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 28 Jan 2013, 14:37

I think I got the point. But are you sure the list doesn't cause the same problem? Also, changing the declaration only would not be enough... I'd have to change many parts of the code too, and I think I'm gonna solve this later in development. The best solution would likely be

{l Code}: {l Select All Code}
deque<object*> o;//This...
deque<object> o;//...instead of this


and then adapt all the instances. Declaring a pointer to a class instance inside the declaration of the class itself should not give problems, as said by the two forum topics you pointed to...
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby acme_pjz » 28 Jan 2013, 16:07

Hi Buch,

Buch {l Wrote}:I think I got the point. But are you sure the list doesn't cause the same problem?


The std::list doesn't cause the same problem, I have tried it ;) Only a performance issue if you don't use random access...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 28 Jan 2013, 20:15

And I do use random access (though I could get around that...)... I'd prefer the deque<object*> solution - for it would also require less changes actually
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby Buch » 29 Jan 2013, 17:22

The 1.2 version is out - this basically add a level pack editor and an automatic update system (still in development).
It doesn't include any new level pack yet, but once a new content update is released the game will notify you, and if you want it will download and install it.

I'm still looking for level editors, so if anyone wants to help just contact me...
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby Buch » 22 Feb 2013, 18:26

Physica 2.0 (final) version is out now!

New since 1.2 release:
    - antigravity!
    - a whole new level pack with 16 new levels ready to play
    - update manger: quickly download new level packs ready to play
    - smoother camera
    - translations support
    - many bugfixes and minor modifies you probably won't notice :)

Check out the website (physica.sourceforge.net) to get the latest release!
Still looking for level makers - and also for translators now... So drop me a line if you're interested in helping. Thanks in advance!

Please report any bugs you find here in the forum.

Important note about performance:
to make graphics look smoother (solve tearing problems basically) I had to turn on double buffering, which might (and probably will) slow down the game a little bit. If you're experiencing lagging, try disabling that through the corresponding option in the settings panel (this will cause little tearing anyway :( ). If you're still experiencing lagging (hopefully you aren't :) ) try disabling fullscreen. Sorry men, but SDL doesn't give that much performance on high resolutions...

Enjoy!
Buch
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby acme_pjz » 23 Feb 2013, 05:13

Hi Buch,

I'd like to translate the game into Simplified Chinese :) But we need a proper font first :| maybe Droid Sans Fallback? :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 23 Feb 2013, 14:25

I think that font should be fine...

Still, I hadn't thought of adding support for different fonts... that is: at the moment, themes (which control which font will be used) are locale-independent... That's something I hadn't thought of (my fault :) )...

So, the first solution could be creating an alternative version modifying themes with the right font - the second, which I'd prefer, would be implementing themes variations for different locales... I don't think that should be difficult, if you're a bit patient... It might take no longer than one or two days, I think...

[EDIT] I think I've fixed it... It should be possible now. And I think Droid Sans will work pretty fine - it looks quite neat. And one more question: have you experienced lagging/low fps?
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby acme_pjz » 23 Feb 2013, 17:18

Buch {l Wrote}:So, the first solution could be creating an alternative version modifying themes with the right font - the second, which I'd prefer, would be implementing themes variations for different locales... I don't think that should be difficult, if you're a bit patient... It might take no longer than one or two days, I think...


Sure ;)

Buch {l Wrote}:And one more question: have you experienced lagging/low fps?


Not really :| Maybe there are performance issue for SDL and SDL_gfx... In the case of Me and My Shadow, the game runs slowly on old computers, but SuperTux doesn't, maybe SDL is not hardware-accelerated :| (SuperTux uses OpenGL) and your game has a lot of vector graphics, and SDL_gfx is 100% not hardware-accelerated :| FYI: In my new projects I'll use SFML (2.0 nightly, not 1.6) instead of any version of SDL, including 1.2.x, 1.3, 2.0
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Physica - a casual platformer

Postby Buch » 23 Feb 2013, 17:24

Thank you for answering... And I know SDL is not accelerated, though it is much easier to learn and use than OpenGL (which I can't use yet) - it was a known limitation...

Anyway, I added locale-specific themes support right now and added information about them in the wiki page about translations - although I haven't tested this feature yet, it shouldn't create any problem for it's quite straightforward...
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Who is online

Users browsing this forum: Bing [Bot] and 1 guest