Porting Me and My Shadow to Android

Porting Me and My Shadow to Android

Postby acme_pjz » 21 Apr 2013, 09:27

Hi everyone,

After two days of work I managed to build Android version of all dependencies of MnMS, and the game itself. :) It runs on my phone, but unfortunately SDL Android doesn't support 32bpp video surface, so the graphics doesn't display at all :| Now I need to check if changing it to 16bpp works :| Maybe a lot of code in the game should be changed, too :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Porting Me and My Shadow to Android

Postby acme_pjz » 21 Apr 2013, 15:04

Finally, it works :D The document of SDL 1.2 Android port is frustrating and confusing :| It said that we should use SDL_SWSURFACE and 16bpp in the code and use software mode in the config file, but maybe it's wrong because I can only get black screen :| And there http://www.anddev.org/code-snippets-for ... 8-270.html also said that :think:

The corrent one is use SDL_HWSURFACE and 32bpp (?) in the code, but use software mode in the config file. Then it works :cool:

There are some photos:

1.JPG


2.JPG


The next thing to do is improve UI and performance (currently it runs smoothly on my Samsung Galaxy SIII except for the fading screen), after V0.5 release :)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Porting Me and My Shadow to Android

Postby Edward_Lii » 21 Apr 2013, 16:03

Hello acme_pjz,

acme_pjz {l Wrote}:Finally, it works :D

Great work, it looks awesome. :D

acme_pjz {l Wrote}:The next thing to do is improve UI and performance (currently it runs smoothly on my Samsung Galaxy SIII except for the fading screen), after V0.5 release :)

There are quite a few things UI wise that could be improved.
Although I think the level editor will never be practical on a hand-held device.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 770
Joined: 20 Dec 2010, 16:46

Re: Porting Me and My Shadow to Android

Postby acme_pjz » 22 Apr 2013, 13:45

In order to compile it, the name of findlocale.c must be changed to findlocale.cpp and change some code in it :| I don't know if it's OK to change SVN version to that?
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Porting Me and My Shadow to Android

Postby Edward_Lii » 22 Apr 2013, 15:37

Hello acme_pjz,

acme_pjz {l Wrote}:In order to compile it, the name of findlocale.c must be changed to findlocale.cpp and change some code in it :| I don't know if it's OK to change SVN version to that?

Depends on the changes that need to be made. ;)
Renaming the file is completely fine, so feel free to make the needed changes.

What I would like is to keep track of the changes we make/made to the bundled libraries.
Preferably a text file stating the source and license of each library and patch files.

There is however a small problem with the included md5 code. :|
The license of the code segment seems quite permissive and might be DFSG compliant, but I'm not sure...
As far as I can see the code is in Debian's curl package and no patch file is changing/removing it.

Anyway, maybe I'll try to compile it and run it on an android devices myself if I find the time for it. ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 770
Joined: 20 Dec 2010, 16:46

Re: Porting Me and My Shadow to Android

Postby acme_pjz » 22 Apr 2013, 16:02

Hi Edward_Lii,

About the changes to the bundled libraries, I'll upload it soon to SourceForge "Files" tab first, but I'm sure if I should upload it to SVN :|

EDIT: I have uploaded it here: http://sourceforge.net/projects/meandmy ... y/download Somehow the file name is incorrect, at first I want to create a "android_dependency" folder :| The actual file name is "mnms_android_dep_src.7z" :|

Edward_Lii {l Wrote}:There is however a small problem with the included md5 code. :|
The license of the code segment seems quite permissive and might be DFSG compliant, but I'm not sure...
As far as I can see the code is in Debian's curl package and no patch file is changing/removing it.


Maybe we should write some comments says that this code is taken from libcurl md5.c, it is in turn taken from MD5 reference implementation (not sure) :|

Edward_Lii {l Wrote}:Anyway, maybe I'll try to compile it and run it on an android devices myself if I find the time for it. ;)


You can check the uncompleted instructions here http://meandmyshadow.sourceforge.net/wi ... on_Android :)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Porting Me and My Shadow to Android

Postby acme_pjz » 23 Apr 2013, 05:06

SDL_HWSURFACE and 16bpp makes the game runs a lot faster :) with slightly inferior graphics ;)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Porting Me and My Shadow to Android

Postby Edward_Lii » 23 Apr 2013, 16:47

Hello acme_pjz,

acme_pjz {l Wrote}:Maybe we should write some comments says that this code is taken from libcurl md5.c, it is in turn taken from MD5 reference implementation (not sure) :|

After some searching I came across this: http://sourceforge.net/projects/md5deep/
The project is licensed under public domain so we can do with it what we want. ;)

I will try and extract the md5 code and implement it into meandmyshadow.
Should this become the default method, or should we still depend on openssl?

acme_pjz {l Wrote}:EDIT: I have uploaded it here: http://sourceforge.net/projects/meandmy ... y/download Somehow the file name is incorrect, at first I want to create a "android_dependency" folder :| The actual file name is "mnms_android_dep_src.7z" :|

I see, there are quite a few changes and to libraries that aren't really bundled with meandmyshadow at the moment.
We need a way to separate desktop and android development in a clean way.

What could work is creating a new separate svn repository for the android libraries and configuration files.
That way the main repository will not contain android specific files like the appsettings and icon.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 770
Joined: 20 Dec 2010, 16:46

Re: Porting Me and My Shadow to Android

Postby acme_pjz » 24 Apr 2013, 11:51

Hi Edward_Lii,

Edward_Lii {l Wrote}:I will try and extract the md5 code and implement it into meandmyshadow.
Should this become the default method, or should we still depend on openssl?


I think your code has some obvious mistake. Did you test your code? :| I fixed it in latest SVN.

Edward_Lii {l Wrote}:I see, there are quite a few changes and to libraries that aren't really bundled with meandmyshadow at the moment.
We need a way to separate desktop and android development in a clean way.

What could work is creating a new separate svn repository for the android libraries and configuration files.
That way the main repository will not contain android specific files like the appsettings and icon.


If we separate a new SVN then it's hard to make the code up to date :| IMHO there are only some #ifdefs and two additional files which are only a few KBs. For the dependency libraries, because it changes not so often, so IMHO we don't need to put them into SVN, and let the developers download them on SourceForge.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Porting Me and My Shadow to Android

Postby Edward_Lii » 24 Apr 2013, 17:43

Hello acme_pjz,

acme_pjz {l Wrote}:I think your code has some obvious mistake. Did you test your code? :| I fixed it in latest SVN.

Oops :oops:, not sure how that method slipped in.
I have it corrected in a test case but must have copied over the wrong one...
Anyway, it seems the MD5 method is never called/used.

acme_pjz {l Wrote}:If we separate a new SVN then it's hard to make the code up to date :| IMHO there are only some #ifdefs and two additional files which are only a few KBs. For the dependency libraries, because it changes not so often, so IMHO we don't need to put them into SVN, and let the developers download them on SourceForge.

I didn't mean making two different svn repositories for the code, but only for the Android specific files.
But you're right that the libraries shouldn't change that often.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 770
Joined: 20 Dec 2010, 16:46

Re: Porting Me and My Shadow to Android

Postby acme_pjz » 11 May 2013, 16:51

Unfortunately, addons doesn't work on Android even if wifi is connedted, it just freezes :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 489
Joined: 10 Dec 2009, 15:32

Re: Porting Me and My Shadow to Android

Postby Edward_Lii » 11 May 2013, 17:56

Hello acme_pjz,

acme_pjz {l Wrote}:Unfortunately, addons doesn't work on Android even if wifi is connedted, it just freezes :|

What svn revision did you try?
I have an older version and addons seem to work quite fine. :)
The only problem I've encountered so far is that although themes install and are detected, they don't seem to work.

I'm going to test the latest svn soon.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 770
Joined: 20 Dec 2010, 16:46

Re: Porting Me and My Shadow to Android

Postby MCMic » 12 May 2013, 13:40

You should consider adding M&MS to Fdroid : http://f-droid.org/
User avatar
MCMic
 
Posts: 689
Joined: 05 Jan 2010, 17:40

Who is online

Users browsing this forum: No registered users and 1 guest

cron