Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Port client to Android

Ideas
2011-01-19
2013-06-06
  • It would be nice to play Stendhal game on Android-based smartphone.

    Client is written in pure Java, as I see. Not sure that Android has as complete Java as on PC Java installation, but I think porting to Android will not be very difficult.

     
  • Katie Russell
    Katie Russell
    2011-01-19

    Indeed, that would be great if you like to try it? We would welcome submitted patches.

    In fact there was already work done to port Marauroa, the framework dealing with client/server communication and database access for Stendhal.
    That is at https://sourceforge.net/tracker/?func=detail&aid=3062215&group_id=1111&atid=301111

    Perhaps you would like to review that patch? To be honest I haven't looked closely at it because the comment says 'Currently won't build due to library support problems' - but if you're keen, have a go!

    Are there other things to consider other than ease of porting code? Bandwidth, system requirements, UI difficulties?

     
  • Stendhal is playable without lag over a WLAN created by a android phone in Hotspot mode. So bandwith and latency are okay.

    For the user interface: I am not sure how precise the touch screen is. I just know those touch screens from ticket and bank terminals and they are extremely imprecise. Clicking with the right mouse button may need another idea, too.

    CPU, memory, graphic: How fast are those phones? How much memory do they have? How fast is graphic output?

    Android does not support Swing. The client has 152 java files which import swing or awt packages. Those files have 32,412 lines, but not all of them are swing related obviously.

    rutsky, what made you think that it is not difficult? Do you have experience with porting Java programs to Android?

     
  • If you want a few words from "granpa"…

    I did some research to make a port of Stendhal working on Java ME. The conclusion was simple: "You need to code it again".
    Nothing of what Stendhal is now can be fun at a mobile phone, you need to rework the whole GUI, and change the way you interact with the game as a touch screen isn't as fast placing info as a mouse-keyboard.

    On the good old times I wrote a client version of marauroa in C++, so updating it shouldn't be hard (compared to the task of writting it from scratch). Sounds exciting but that's a lot of work.

    Just my 2 cents.

     
  • Katie Russell
    Katie Russell
    2011-01-20

    Just to answer a few points that I can help with:

    Regarding specifications:
    My HTC Desire HD has:
    CPU 1 GHz

    Internal phone storage: 1.5 GB
    RAM: 768 MB

    microSD memory card slot for more storage.

    I watch Youtube videos on it perfectly well (to answer about speed of graphic output).

    Well, I think that 'Nothing of what Stendhal is now can be fun at a mobile phone' is an exaggeration. On a mobile phone with a touch screen, one would tap it to do a single click. In Stendhal you can single click to perform the default action on an entity. For example single clicking a portal walks you to it and then through the door, single clicking a creature attacks it, single clicking a sign reads it. You can move around with clicking the game screen on minimap which automatically plans a route. The route is updated if you need to walk around some NPC or creature that moved into your path since you started walking.

    My phone does have a huge and responsive touch screen as it's relatively new so maybe my experience is better than most.

     
  • kymara, nhnb, arianne_rpg,

    Thanks for replies!

    nhnb,

    rutsky, what made you think that it is not difficult? Do you have experience with porting Java programs to Android?

    I have no experience in porting Java programs to Android and even no experience in development in Java and for Android. I assumed that most of client kernel written in Java must work on Android without any modification. The only difference must be in GUI (which is quite simple in Stendhal). But you all showed me that there are some libraries that are not supported on Android, so my assumption was not correct.

    Hardware of modern Android-based mobile phones is quite fast. My HTC Desire Z has 800Mhz CPU and 512 Mb RAM. It supports OpenGL ES so graphics output must be fast. Android market has games with non-trivial GUI and since Stendhal doesn't need any difficult computations I think phone speed should be enough for it.

    I think little performance requirements and simple GUI of Stendhal makes it potentially portable for Android platform. And I will be glad to play Stendhal on my phone!

     
  • Paul Chitescu
    Paul Chitescu
    2011-08-29

    Most Android devices have adequate resources for running Arianne.

    However, the following must be considered:
    - Java is not portable, a source written for Java SE cannot be used unchanged on ME or Android/Dalvik
    - The build system must support some form of conditional compiling which is frowned upon by out of this world Java purists
    - The GUI must be rewritten from scratch
    - All UI must make use of factories for creating instances of abstract interfaces
    - The client code must be rewritten, classes moved around, countless interfaces created to abstract implementation
    - You will need to think layouts for small/medium/large screens and portrait/landscape

    I have some experience having written a Java ME client for WoW that I am trying to port to Java SE and Android (but not having enough time…) - even if the initial design was rather portable some classes leaked during implementation as abstracting away everything is a lot of work and code.

     


Anonymous


Cancel   Add attachments