Author Topic: Android Port (Old)  (Read 86820 times)

Volutar

  • Guest
Re: Android Port
« Reply #15 on: February 28, 2011, 05:14:49 pm »
There are styluses adapted for capacitive touchsecreens. I don't think zooming buttons 4 times for large fingers will be fair enough, considering globe tiny 3x3 pixeled objects (ufos, crafts, bases/cities, etc) and battlescape tiles aren't capable to be enlarged for fingeraiming purposes.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Android Port
« Reply #16 on: February 28, 2011, 05:55:54 pm »
The globe already has a built-in "tolerance" anyways so you don't have to click exactly on the markers but close enough (which is why you get a popup when there's multiple markers), so this could be tweaked for mobile devices too.

Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Android Port
« Reply #17 on: March 01, 2011, 03:50:44 am »
I also plan on adding dragging to certain aspects of the UI, like the globe on the Geoscape and probably the map on the Battlescape.

Some of that features probably could be merged back to pc openxcom as well. Btw, where you will be coding those? In your fork/branch on github or in another project?

Edit:

Hmm, i just found that project https://github.com/sirnacnud/openxcom-mine

Why another project? Why not fork of https://github.com/SupSuper/OpenXcom ?

I created it before the switch to GitHub.  That repository will be going away shortly, replaced by the fork I have here: https://github.com/sirnacnud/OpenXcom.  There is an android branch in this repository that I will be committing my changes to.

There are styluses adapted for capacitive touchsecreens. I don't think zooming buttons 4 times for large fingers will be fair enough, considering globe tiny 3x3 pixeled objects (ufos, crafts, bases/cities, etc) and battlescape tiles aren't capable to be enlarged for fingeraiming purposes.

Almost all new smart phones use capacitive touch screens, so I will be targeting finger input.  Most people don't  want to use a stylus anyways.  I am planning on increasing the area for things you can click on the globe.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Android Port
« Reply #18 on: July 22, 2011, 01:18:11 am »
sir_nacnud : did you check this out? https://github.com/PutzWorks/androidOpenXcom
Why would he not fork the project, as that seems to be easier to merge in updates, no?

PutzWorks also seems to be good at android apps, as he is selling them, maybe you two can get in touch :)

Offline AlienRape

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: Android Port
« Reply #19 on: July 22, 2011, 12:37:52 pm »
sir_nacnud : did you check this out? https://github.com/PutzWorks/androidOpenXcom
Why would he not fork the project, as that seems to be easier to merge in updates, no?

Probaby, because one's done in C++ where as another is in Java?

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Android Port
« Reply #20 on: July 22, 2011, 01:00:00 pm »
sir_nacnud : did you check this out? https://github.com/PutzWorks/androidOpenXcom
Why would he not fork the project, as that seems to be easier to merge in updates, no?

Probaby, because one's done in C++ where as another is in Java?

Hehe, I even did not look that far. I wonder how all the SDL and YAML stuff works with java...  I wish this guy a lot of luck, because he'll need it :p

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Android Port
« Reply #21 on: July 23, 2011, 03:49:07 am »
sir_nacnud : did you check this out? https://github.com/PutzWorks/androidOpenXcom
Why would he not fork the project, as that seems to be easier to merge in updates, no?

Probaby, because one's done in C++ where as another is in Java?
Wow why would someone convert the entire codebase to Java?! :o

Props for effort.

Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Android Port
« Reply #22 on: July 24, 2011, 08:09:50 pm »
sir_nacnud : did you check this out? https://github.com/PutzWorks/androidOpenXcom
Why would he not fork the project, as that seems to be easier to merge in updates, no?

Probaby, because one's done in C++ where as another is in Java?

Hehe, I even did not look that far. I wonder how all the SDL and YAML stuff works with java...  I wish this guy a lot of luck, because he'll need it :p

This is the first I have seen of this project.  I do wonder how he is handling SDL and YAML.  Maybe there are some Java libraries that can do palette rendering and YAML.  If he is calling SDL/YAML natively in Java, through JNI, he might as well be using the native version of OpenXcom, then it would pretty much be the same as my port.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Android Port
« Reply #23 on: July 24, 2011, 10:07:09 pm »
i find this in google: https://sourceforge.net/projects/sdljava/ and AFIK (probaby its wrong :D) YAML is only for writing XML and can be replased by any other xml lib.
and because OpenXcom dont use any advanced C++ features (again AFIK from a short look in code) is can be easy copy/pasted to Java :) (its can be even more correct because you dont need use `delete` that can be pain in a** when you made mistaken)

Offline Putz1103

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Android Port
« Reply #24 on: September 17, 2011, 05:01:51 am »
Hey.

I'm that guy...  And yes luck is needed.

Aso for the SDL and YAML stuff I just changed them to native android methods and XML.  (Honestly I haven't tested the XML just yet, but I'm sure I'm close even though it's my first time writing JAVA XML code.  I'm not sure why I'm doing a full code conversion, maybe it's in the hope that if I ever get an interview for a software job I can have something to show.

So far I've got the geoscape and all it's parts working.  I can down UFO's and go to them but once you get into the battlescape the colors get slightly interesting.  That is what I am working on resolving at the moment.  After I get the colors working correctly then I have to tackle the 16 meg memory limit of Android.  OpenXcom takes over 40 megs when running on my computer at home.

If anyone wants the APK to test just let me know and I can get it to you and tell you how to install the xcom files properly so it will run.  My brother has been running it on his Acer tablet and loves the work I have done.

Anyway, I hope I'm not stepping on your toes openXcom people, but I just wanted to do this for me.  It has been a learning experience.

Offline AlienRape

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: Android Port
« Reply #25 on: September 19, 2011, 12:41:11 pm »
That is what I am working on resolving at the moment.  After I get the colors working correctly then I have to tackle the 16 meg memory limit of Android.  OpenXcom takes over 40 megs when running on my computer at home.

If anyone wants the APK to test just let me know and I can get it to you and tell you how to install the xcom files properly so it will run.  My brother has been running it on his Acer tablet and loves the work I have done.

Anyway, I hope I'm not stepping on your toes openXcom people, but I just wanted to do this for me.  It has been a learning experience.

It'd be interesting to see a plain java openXcom app.

(and before you ask why... No.. I don't have an android device. :P )

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Android Port
« Reply #26 on: September 19, 2011, 01:39:07 pm »
i find this in google: https://sourceforge.net/projects/sdljava/ and AFIK (probaby its wrong :D) YAML is only for writing XML and can be replased by any other xml lib.
YAML is not the same as XML, though you are right you can just serialize in whatever other format you prefer, though this will break compatibility between the different versions.

Anyway, I hope I'm not stepping on your toes openXcom people, but I just wanted to do this for me.  It has been a learning experience.
It's fine by us, and the GPL allows any code modifications as long as they're also licensed by the GPL.

It sure seems like one hell of a learning experience, good luck with that. :)

Offline Putz1103

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Android Port
« Reply #27 on: September 21, 2011, 01:18:52 am »
I read in another thread about no one being able to do optimizations.  I have made a LOT of optimizations because the hardware on a phone is much inferior that of a PC.  I'm sure a lot of what I fixed can be retranslated into C++ and help your system out a bit.  I've only focused on the globe so far since it was the real hog for resources...  I'm starting on the battlescape now.

I got the globe drawing down from 250 milliseconds to 7 milliseconds (on my phone).  Moving the globe works much faster as well.  Let me know if I can help you guys out at all instead of just me helping me.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Android Port
« Reply #28 on: September 21, 2011, 02:25:01 am »
You... you... you optimized the globe?? You tamed the beast?!?!? :o :o

Please, by all means, share with us your crazy voodoo magic because the globe has grown into this horrible monster that we have settled with "just works" and nobody dares to adventure down into its lair anymore, lest we make it worse.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Android Port
« Reply #29 on: September 21, 2011, 03:42:36 am »
I'm starting on the battlescape now.
you probably dont find any big improvement here. most demanding part of battlescape is bliting but this is already optimized.