Results 1 to 10 of 15

Thread: sdl2 windows and android

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    sdl2 windows and android

    hello friends,
    in recent months I have worked with in sdl2 with freepascal on android compiled from (http://www.pilotlogic.com/sitejoom/index.php/codetyphon) this way came to the conclusion that Native give me better results than java.
    I compiled sdl2 sdl2_image sdl2_mixer and sdl2_ttf all in one dll for Windows and separate (.so) for android.
    the next step is to compile for Ubuntu .
    on this pack i have one demo using sdl2 sd2_image and sdl2_ttf on my experia x8 have 55 fps
    and 20 on BlueStacks.

    (DOWLOAD)
    (windows dll with demo) https://app.box.com/s/wcvfaw1huwpa011t9re8
    (andoid bin demo) https://app.box.com/s/906nasyoewfk6x96dpq4

    my game (sdl + glEs) (200 particles and tile map) on my device i have 45 fps



    Last edited by djoker; 19-11-2013 at 01:54 PM.
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

  2. #2
    Wow that's nice. I would like to know more about how to work with SDL2 and Android with Free Pascal. Maybe there is the chance for a how-to?
    Best regards,
    Cybermonkey

  3. #3

  4. #4
    hi folks , tank you for the feedback .
    on my zip is 1 simple demo to show how to start
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

  5. #5
    Fantastic !!
    I'm going crazy to try compile SDL2 with DelphiXE5 for android but I can not
    When I add cdecl; external 'libSDL2.so' to any function app not run, say "application has stopped".
    I test too many "libSDL2.so" and with all app not run

    Kotai.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  6. #6
    kotai I prefer open source programs i have no money to buy delphiXE
    and if you look to sdl you have to make some trick to work with delphi you have 2 ways
    declare android hidden functions from sdl on delphi or expose the native code on delphi jni functions look to my demo.



    procedure Java_org_libsdl_app_SDLActivity_nativeInit(env:JNI Env; cls:jclass; obj:jobject);stdcall;

    begin
    SDL_Android_Init(env,cls);
    SDL_SetMainReady();
    sdlMain();
    logmsg('all ok Luis Santos AKA Djoker');
    halt(0);
    end;




    exports
    JNI_OnLoad,
    JNI_OnUnload,
    Java_org_libsdl_app_SDLActivity_nativeInit;

    begin
    end.

    on the c++ you have the code android_main with this 2 calls look the source code.
    and you have to see one point delphixe5 create native libs with 14,9 MB (15.713.020 bytes) on release mode? man wtf . no way
    goto freepascal


    ps: check this site http://www.crossfpc.com/

    sory mi English
    Last edited by djoker; 20-11-2013 at 09:45 AM.
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

  7. #7
    hi kotai i (download xe5) and try with the sdl2 but i think its not possible because with xe5 you don't have way to use java and sdl2 use java for video , audio and input.
    but i think with xe5 you don't need sdl because with xe5 you have all the stuff like glES input ...
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

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
  •