Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Pascal on Android: I made it work!

  1. #11
    Quote Originally Posted by code_glitch View Post
    @Stoney: Couldn't we just use the low level stuff and then dump the lazarus UI stuff onto that instead of Java as we currently do?

    Historically, anything based on proper code is faster than Java... How many headers would have to be translated to get a minimal system up and running?
    That sounds so right to me. If I can only get UI events in some decent way, I can do the output though OpenGL.

  2. #12
    Well, I've looked into it. The android-ndk contains a file STABLE-APIS.html which says the following:

    Starting from API level 9, it is possible to entirely write an Android
    application with native code (i.e. without any Java). That does not mean
    that your code does not run inside a VM though, and most of the features
    of the platform will still need to be accessed through JNI.
    So there is some basic functionality to create native applications. However, most of this is a JNI wrapper so it's not much better in terms of performance to do it natively. Also note that only the high-level parts of the operating system are created in JAVA and run in a highly optimized Dalvik VM, so there isn't THAT much to gain anyway. Any performance critical part is natively coded.

    They are available, but there are no Pascal header translations for that - at least not that I know of. Also, the C APIs aren't really for usual GUI app development, they are designed for OpenGL apps or other low-level stuff.
    That is true. It's also the reason why I'd choose Java instead of pascal to develop normal apps. It's a huge amount of work to make all UI API's available to pascal and the benefits are not significant. When coding games however, it's actually worth some effort to get maximum performance.

    I'm actually playing with this a little, to see if I can get a pascal game running on my android device. Today I played with JNI, which will be a very important part of the puzzle. I'll keep you guys posted and I might write an article if I have got something interesting to share. In the meantime, I can use all the advice and bits of info you can give me. For example, how does one do game audio on an android device
    Last edited by chronozphere; 29-10-2011 at 10:44 PM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #13
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Lightbulb

    You know Cooper (oxygene for java) isn't such a bad product and it doesn't cost such a fortune as Delphi does. Maybe it would be worth it to ask to get on the beta for it? RemObjects does intend to support the Android platform directly so perhaps it would help streamline any Android development.

    Just a thought.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #14
    Quote Originally Posted by WILL View Post
    You know Cooper (oxygene for java) isn't such a bad product and it doesn't cost such a fortune as Delphi does. Maybe it would be worth it to ask to get on the beta for it? RemObjects does intend to support the Android platform directly so perhaps it would help streamline any Android development.

    Just a thought.
    Project Cooper does indeed support Android directly - I have tried some of the sample projects that comes with it and they compile and run on my Android tablet...yay!

    This is even on the beta version too

    Just send an email to:

    marc hoffman (mh@remobjects.com)

    and he should fix you up...

    cheers,
    Paul
    Last edited by paul_nicholls; 30-10-2011 at 10:02 PM.

  5. #15

  6. #16
    Oh that's pretty cool. Nice it works well, even in the beta version.

    I'm not sure whether I will use it since I'm comfortable with JAVA. I only truely benefit from pascal when it is actually compiled.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  7. #17
    I haven't done much with it yet, but it is much nicer having the 'Pascal' syntax instead of Java to be honest

  8. #18
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    What if you wanted to make a cross-platform game for both android and iOs for example? One code-base not 2 would make thinks go half as long no?

    If I got Garland's Quest on the iPad and then wanted to share the love with Android users I would strongly consider using oxygene for java to port it. I may even think about using prism to get it on the XBox 360 too, but that's a different topic.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #19
    Yes, being able to compile to both android and iOS is very interesting. But how is that possible? Cooper generates java bytecode, which doesn't run on apple devices.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  10. #20
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by chronozphere View Post
    Yes, being able to compile to both android and iOS is very interesting. But how is that possible? Cooper generates java bytecode, which doesn't run on apple devices.
    If your core game code is in object pascal you can easily rewrite the rest for each platform. So you take your object pascal units and other game specific code and create a new Xcode project using the Objective-Pascal templates and put them in there and rewrite the code required to support the API and other iOS specific framework to work with it.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •