Physica - a casual platformer

Re: Physica - a casual platformer

Postby qubodup » 24 Feb 2013, 01:47

I finally tried it and liked it a lot!
I made a "Let's play" of my attempt. My first LP in fact.

youtu.be/uNIjmzqQSY8
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Physica - a casual platformer

Postby Buch » 24 Feb 2013, 13:08

Hey thank you a lot Qubodup! I will link to it from the website - thanks again!

As for the single jump detected as double jump, may it be that you jumped when already out of base? If so (which is: if you're more than one third out of the base, if I remember right), the game "thinks" you've fallen down and leaves you only a single jump to do...

Anyway, the "very difficult"-like mood was intended - though I'd suggest you to try the 2nd pack, which in my opinion is slightly easier than first (why the hell did I put it second then? :think: ) - still I find them all easy for having tested them hundreds of times, so I might be wrong...
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby Buch » 04 Mar 2013, 19:05

@acme_pjz (and any other potential translator): just a quick note to let you know that if you were/are experiencing problems with translation it is probably because Unicode support was not working. I've fixed that now - you should be able to translate in any language you want, provided your font supports the characters you want to add.
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 » 05 Mar 2013, 04:14

What's the encoding of your config file? UTF-8? Or platform-dependent? :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Physica - a casual platformer

Postby Buch » 05 Mar 2013, 13:40

It is UTF-8 (without byte order mark)
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 » 11 May 2013, 16:48

Hi Buch,

I have successfully ported your game to Android :) The initLang() in physica.h doesn't work, it segfaults :| So I changed the code to always load default language :|

After five minutes of playing, my phone gets hot :o Maybe your game uses too much CPU...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Physica - a casual platformer

Postby Buch » 12 May 2013, 11:21

Hi acme_pjz! Thanks for your work! I am really interested by what you made - I once thought of a phone porting (which I was never able to make, for even looking at android NDK documentation scared me and then I got taken by other real-life business :) ). What kind of controls have you implemented?

Also, have you got a repo with the code you changed? I'd really like to take a look at that, and sharing the Android port would be nice - and I know that the game uses too much CPU, for the SDL library is not very efficient. Maybe this could be improved? I don't really know what kind of graphics library android supports natively...
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby MCMic » 12 May 2013, 14:23

Just tried this game - it's awesome :-)

I'd like to do an AUR package for ArchLinux, for this I'd need a release tarball.
The idea is that each time you do a release, in top of providing a windows binary, you provide an archive with sources, that allow people to build a specific release. (building the git can result in unstable things sometimes).
I'd say the easiest for you is to tag release in the git, github allow to download tagged version as archives.
I'll also see if I can help with the french translation.

About the game itself: you should try to lock the first levels to avoid annoying the player, that means having some walls to keep him from falling. Then you can remove those safety things after a few levels once the player is used to the controls and physics. (And the level with the moving red things, the first one with moving things actually, is a nightmare, I died 169 times)
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby Buch » 12 May 2013, 17:07

Ok, I made the tag for the latest stable release: https://github.com/buch415/Physica/tags
I like the idea of safer levels at the beginning... I had the idea of expanding the tutorial, and I think those levels should be put in there. For example, a longer tutorial (8 levels, maybe?) would contain the two levels it has at the moment with how-to-play instructions, plus some safe levels to practice with 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 MCMic » 12 May 2013, 17:23

I can't seem to find the license of the code. Which is it? (you should consider having a LICENSE or COPYING file in the repo, and add a header with the license to source files)
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby Buch » 12 May 2013, 17:43

Oh, I forgot to do that! Anyway, code is licensed under GNU GPL v3.0, and graphics are under CC-BY 3.0 license.
Anyway, I added the license file in the repo root and the license information on top of each file.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby MCMic » 12 May 2013, 18:04

Thanks :-)
I just saw what the compile.sh is doing, you should use some build system. (I recommend cmake).
Also, that would allow you to add some install commands so that we can install the game (and package it).
That might require some code change as the data would need to be fetch from elsewhere. (usually we use a define to store the data PATH, and in the cmake file we change it depending on the build mode)

Also, your code seems over-commented. I don't have english link to give about this subject, but basically you shouldn't translate the code into english in the comment, you should explain what it intend to do. Comments like "#include "Bulk_graphics.h"//Includes Bulk graphics" are useless.

[EDIT] Oh, and feature request : could you allow to select the language from the settings screen?
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby MCMic » 12 May 2013, 18:53

Almost there:
Image
(The only one I can't get 3-star on level pack one is the one with the moving red things I hate)

Medals:
Image

An other feature request : it would be cool to follow XDG specification : http://standards.freedesktop.org/basedi ... atest.html
(IIRC saved game goes into XDG_DATA_HOME and settings in XDG_CONFIG_HOME)

[EDIT] and a bug report : mouse wheel act as mouse clic.
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby Buch » 12 May 2013, 19:24

OK, I took a look at the XDG specification, and I found it pretty difficult to understand what it means (maybe because I am not much more than a newbie): am I right saying that - according to XDG - there are some environmental variables (XDG_DATA_HOME, XDG_CONFIG_HOME etc) which the program should read to know where to save/load data, settings etc?

As for the mouse wheel bug - I just forgot to check that click button is left... It should be pretty easy to fix it (though I am pretty busy these days, so I think I'm going to do that in a week). Language selection would be quite easy too, I think... Don't know why I didn't do that before, actually.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby MCMic » 12 May 2013, 22:12

Buch {l Wrote}:OK, I took a look at the XDG specification, and I found it pretty difficult to understand what it means (maybe because I am not much more than a newbie): am I right saying that - according to XDG - there are some environmental variables (XDG_DATA_HOME, XDG_CONFIG_HOME etc) which the program should read to know where to save/load data, settings etc?


Yes, that's it.
For instance you can look at our implementation in Genetic Invasion : http://projects.haxx.es/p/genetic-invas ... es.cc#L137 (SEP is a define for "/", CONFIG_FOLDER is a define with the name we want for our config folder. the code could be a bit simpler than it is, the boolean seems useless to me but I did not wrote this part. You can find in the same folder what we use for the other OSes for the same functions)
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby acme_pjz » 13 May 2013, 11:58

Hi Buch,

Buch {l Wrote}:I am really interested by what you made - I once thought of a phone porting (which I was never able to make, for even looking at android NDK documentation scared me and then I got taken by other real-life business :) ).


I use the SDL Android port (https://github.com/pelya/commandergenius). Also see here http://meandmyshadow.sourceforge.net/wi ... on_Android

I changed physica.h to

{l Code}: {l Select All Code}
//Function to initialize language
void initLang(){
#if defined(ANDROID)
   string lang = "";
   object* o = NULL;
#else
   string lang = string(setlocale(LC_ALL, "")).substr(0,2);//Gets language
   setlocale(LC_NUMERIC, "C");//Sets locale for numbers
   lang[0] = tolower(lang[0]);//Sets lower letter
   
   object* o = loadLanguagesDB(localePath + string(lang) + ".cfg");//Loads locale
#endif


And defined DOUBLEBUF_ENABLED because SDL Android doesn't support SDL_SWSURFACE main video surface. Maybe double buffer is not needed because it reduces the speed, just change SDL_SWSURFACE to SDL_HWSURFACE and try if it works :|

The AndroidAppSettings.cfg is

{l Code}: {l Select All Code}
# The application settings for Android libSDL port
AppSettingVersion=17
LibSdlVersion=1.2
AppName="Physica"
AppFullName=net.sourceforge.physica
ScreenOrientation=h
InhibitSuspend=y
AppDataDownloadUrl="Data|data.zip"
VideoDepthBpp=32
NeedDepthBuffer=n
NeedStencilBuffer=n
NeedGles2=n
SwVideoMode=y
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
CompatibilityHacks=n
CompatibilityHacksStaticInit=n
CompatibilityHacksTextInputEmulatesHwKeyboard=n
CompatibilityHacksPreventAudioChopping=n
CompatibilityHacksAppIgnoresAudioBufferSize=n
CompatibilityHacksAdditionalPreloadedSharedLibraries=""
CompatibilityHacksSlowCompatibleEventQueue=n
CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=y
AppUsesMouse=y
AppNeedsTwoButtonMouse=n
ShowMouseCursor=n
ForceRelativeMouseMode=n
AppNeedsArrowKeys=y
AppNeedsTextInput=n
AppUsesJoystick=n
AppUsesAccelerometer=n
AppUsesGyroscope=n
AppUsesMultitouch=n
AppRecordsAudio=n
NonBlockingSwapBuffers=n
RedefinedKeys="UP RETURN NO_REMAP NO_REMAP UP ESCAPE"
AppTouchscreenKeyboardKeysAmount=1
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="UP 1 2 3 4 5 6 7 8 9"
RedefinedKeysScreenKbNames="0 1 2 3 4 5 6 7 8 9"
StartupMenuButtonTimeout=2000
HiddenMenuOptions='OptionalDownloadConfig'
FirstStartMenuOptions=''
MultiABI=n
AppMinimumRAM=16
AppVersionCode=200
AppVersionName="2.0"
ResetSdlConfigForThisVersion=n
DeleteFilesOnUpgrade="%"
CompiledLibraries="sdl_image sdl_ttf sdl_mixer sdl_gfx curl"
CustomBuildScript=n
AppCflags='-O2 -finline-functions -frtti -fexceptions -fpermissive -std=c++11'
AppLdflags=''
AppOverlapsSystemHeaders=
AppSubdirsBuild=''
AppBuildExclude=''
AppCmdline=''
ReadmeText='^Readme text'
MinimumScreenSize=s
AdmobPublisherId=n
AdmobTestDeviceId=
AdmobBannerSize=


Finally, compress your data folder to data.zip and put it in AndroidData folder...

Buch {l Wrote}:What kind of controls have you implemented?


The SDL Android provided one, arrow keys and a separate button for up key.

Buch {l Wrote}:and I know that the game uses too much CPU, for the SDL library is not very efficient. Maybe this could be improved? I don't really know what kind of graphics library android supports natively...


Just use SDL OpenGL :) SDL_gfx is not hardware-accelerated, it uses too much CPU :|

Buch {l Wrote}:Also, have you got a repo with the code you changed? I'd really like to take a look at that, and sharing the Android port would be nice


No, I don't have a repository :| But here is an archive for modified source file:
Physica-master.7z
(448.59 KiB) Downloaded 80 times
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Physica - a casual platformer

Postby Buch » 13 May 2013, 13:39

acme_pjz {l Wrote}:Maybe double buffer is not needed because it reduces the speed, just change SDL_SWSURFACE to SDL_HWSURFACE and try if it works

I know double buffer slows down a lot, but it fixes some annoying tearing effects. And you need to use HWSURFACE to enable it. Anyway, knowing it could slow down the game very much, I added an option in the settings to toggle it. Of course, if the SDL Android port does not allow HWSURFACE, I guess I'll have to completely remove double buffer from the Android port. Did you try disabling it through the settings? The fps should be at least doubled...

acme_pjz {l Wrote}:Just use SDL OpenGL :) SDL_gfx is not hardware-accelerated, it uses too much CPU :|

Yes, I did know that... I'm just too lazy to implement OpenGL :) I started using SDL_gfx back when I began writing programs, for it was relatively easy to use, and I never moved to OpenGL. Hopefully, double buffer disabled will reduce CPU usage a bit... If not, I promise I'll try to replace SDL_gfx with OpenGL :)

Anyway, I am pretty busy these days and I don't think I will be able to work on this for a week or two... To build the port I should setup a Linux environment (I am running in Windows ATM), and take a deeper look at the building instructions and similar stuff, and I don't have enough time to do that :(
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby Buch » 02 Jul 2013, 22:12

Soooo...

It's been a while since I took up Physica development for the last time. That's mostly because I've been busy with school term's end and similar stuff, which I won't go into. Still, I've been learning some useful stuff about game (and software in general) developing in the meanwhile, so I drew a plan for future developments of the game in order to make it more "standard". The idea is not to introduce big changes in the gameplay or in the game structure itself (nothing more than new levels, basically) but to make the source code more tight to coding standards. Here are my thoughts...

Standard languages implementation
Up to now, data was defined through a game-specific script language, which was some kind of wheel reinvention. I plan to implement XML as the main language (via the pugixml library) and Javascript for procedural scripting (via the TinyJS library). That will probably make it easier to other people to edit stuff, and for sure will relief me of taking care of the scripting part. I've done most of this.

Gettext for translations
Again, there's no need to reinvent the wheel. Translations should be done via gettext. Unfortunately, I haven't had time to try to implement it yet, and I'm waiting to have a running linux machine (which should happen in a couple of weeks), but that's something I will definitely implement.

SDL 2.0
The release candidate should be reliable enough for me to use it. And it lets the game run faster, of course, which is definitely good (I had to run it windowed on some computers because the fullscreen mode would take too much CPU, now I should not have those problems anymore).

A fancy UI!
Up to now UI was mostly static. I've managed to implement some UI animations, which look kinda nice to me (I'll post a demo video as soon as I can)

More logical version numbers :)
This is mostly a formal detail due to my inexperience in game developing. Up to now version numers seemed a bit illogical... And no testing was made before releases considered to be stable and bug-free (again my ignorance and inexperience mostly) - I should take a more logical workflow from now on :)

Easier!
What many people told me is that the game is damn hard. Maybe a more gentle learning slope would be better. I'll definitely add some levels to the tutorial, so that players can become more confident with controls, but I was considering to add another level pack between the current 1st pack and the tutorial...

Those things together will practically force me to rewrite the majority of the code (all in all, I'll keep only the physics simulation part), but that's OK if I can get the game to run on as many platforms as possible.
I'd like to hear thoughts about this from more experienced developers.
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Re: Physica - a casual platformer

Postby MCMic » 03 Jul 2013, 22:59

Great plans :-)

I would add making sure your game can be properly installed on GNU/Linux, that means he'll have to read datas from /usr/share/physica, but don't write that in the code, use a define for the data path that you can change when building.
Also, be sure to follow the XDG specification for user data saving (I know I already said that :-) )

Also, be sure to study each possibility before settling for XML and JS, some people like JSON better, and some games are using lua or angelscript for scripting.
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby MCMic » 03 Jul 2013, 23:51

BTW, nailed it :
Image
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby 0zone0ne » 17 Aug 2013, 06:54

Unfortunately I'm a mac user so I won't be able to play this game... :( But from what I've seen it looks pretty good!

About the whole difficulty curve thing, I'd say that adding a softer curve is definitely better than just making the hard levels easier. Games that start off easy and end up hair-tearingly brutally hard are usually the ones I have the most fun with.

Anyways, keep up the good work! :)
User avatar
0zone0ne
 
Posts: 321
Joined: 26 Aug 2012, 02:34

Re: Physica - a casual platformer

Postby 0zone0ne » 17 Aug 2013, 10:52

I'm back again... oh god no

I messed around on GitHub and I couldn't help but notice that it appears there's no music in the game...
...So I made a quick proposal :lol: , attached below. I tried to create a style of music that would fit with the game. This is only a suggestion for the title screen, but please give it a short listen and see what you think. ;)
Attachments
Physica - Title.ogg
Looped out-of-game version, meant for listening
(3.43 MiB) Downloaded 93 times
title_loop.ogg
(1.6 MiB) Downloaded 70 times
title_intro.ogg
(242.54 KiB) Downloaded 91 times
User avatar
0zone0ne
 
Posts: 321
Joined: 26 Aug 2012, 02:34

Re: Physica - a casual platformer

Postby MCMic » 17 Aug 2013, 12:01

0zone0ne {l Wrote}:Unfortunately I'm a mac user so I won't be able to play this game... :(

You can try building it, SDL is available for Mac.
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Re: Physica - a casual platformer

Postby 0zone0ne » 17 Aug 2013, 12:08

MCMic {l Wrote}:You can try building it, SDL is available for Mac.

Ok, thanks for the heads up. :)
User avatar
0zone0ne
 
Posts: 321
Joined: 26 Aug 2012, 02:34

Re: Physica - a casual platformer

Postby Buch » 07 Jan 2014, 18:14

Hello all!

Very long since my last post, and I excuse for the lack of updates on the development of the game. I've been busy with loads of other stuff and lost interest on this for a while, but I'm back. (Special excuses go to 0zone0ne for not answering his questions)

Anyway, Physica development is slowly restarting. I created a new branch on GitHub (the 'physica-reloaded' branch, which you can find here) to put the new version, and you can test it. If you're lucky you will be able to build and run just by running the command
{l Code}: {l Select All Code}
g++ -w src/*.cpp src/PugiXML/*.cpp src/TinyJS/*.cpp -obin/test -L/usr/local/lib -lSDL2main -lSDL2 -lSDL2_image -lSDL2_gfx -lSDL2_ttf

(provided you installed SDL2, SDL2 image, SDL2 gfx and SDL2 ttf)

If you are not that lucky (which is quite probable, after all...), just drop me a line and I'll try and see what I can do (preferably, just write me an email for this kind of issues, to avoid cluttering the thread).

Since the changes I had in mind were so drastic on many aspects, many things haven't been re-implemented yet. Also, I didn't re-write all the level files in the new format (I'm gonna write a small program for that later). Simply, remember this is a development version. The stable and playable version is still available at the old links.

Relevant new features implemented up to now:
  • UI animations
  • Shadows

@0zone0ne: sorry for answering this late to your post. I do like the music you made, but I find it very hard to tell if it suits the game or not without trying it directly within the game. As soon as I add music support I'll test and see how it feels. Thank you for your help!
User avatar
Buch
 
Posts: 51
Joined: 15 Jan 2013, 14:30
Location: Castel del Piano, Grosseto, Italy

Who is online

Users browsing this forum: No registered users and 1 guest