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

Thread: EGSL Interpreter

  1. #11
    Quote Originally Posted by Cybermonkey
    Yes, absolutely right. It has been done, e.g. on the showcase section of the egsl page. There is a little retro asteroids like game completely programmed using Lua.
    That sounds great! What about the Shooter1945 game? It was also done completly in LUA with EGSL?

  2. #12
    Quote Originally Posted by Freepascal-meets-SDL View Post
    That sounds great! What about the Shooter1945 game? It was also done completly in LUA with EGSL?
    Yep, that's right.
    Best regards,
    Cybermonkey

  3. #13
    A new release was uploaded a few days ago. Some new things are:
    • an easy to use sprite animation system
    • tileset drawing functions
    • file management functions (I know Lua has its own but the EGSL version is easier to use.)

    Haiku OS is now an officially supported operating system. Instead of the Vampyre Imaging Library which are used by Windows and Linux, Haiku relies on SDL_image. Since there is no Lazarus port for Haiku there is of course no IDE available. The examples (all in one ZIP) were updated, too.
    I am still struggling with MacOSX but I still didn't manage to compile a simple Lua.pas example. I tried it with CLScript which is a kind of command line based EGSL. The source code can be found at: http://www.egsl.retrogamecoding.org/.../downloads.php
    (So if anyone has success in compiling CLScript on MacOSX, please inform me and tell me the secret how to do so.)
    Best regards,
    Cybermonkey

  4. #14
    Quote Originally Posted by Cybermonkey View Post
    I am still struggling with MacOSX but I still didn't manage to compile a simple Lua.pas example.
    It's not as complicated as you make it out to be.
    Assuming you already downloaded Lua.framework and put it in /Library/Frameworks , you just need to modify a part around line 45 in Lua.pas (as by default it does not look for the Mac library).

    Original code:
    Code:
    const
    {$IFDEF UNIX}
      LUA_NAME = 'liblua5.1.so';
      LUA_LIB_NAME = 'liblua5.1.so';
    {$ELSE}
      LUA_NAME = 'lua5.1.dll';
      LUA_LIB_NAME = 'lua5.1.dll';
    {$ENDIF}
    New code:
    Code:
    const
    {$IFDEF UNIX}
      {$IFDEF DARWIN}
        LUA_NAME = 'Lua';
        LUA_LIB_NAME = 'Lua';
    
    
        {$linkframework Lua}
      {$ELSE}
        LUA_NAME = 'liblua5.1.so';
        LUA_LIB_NAME = 'liblua5.1.so';
      {$ENDIF}
    {$ELSE}
      LUA_NAME = 'lua5.1.dll';
      LUA_LIB_NAME = 'lua5.1.dll';
    {$ENDIF}


    Some additional notes about this:
    - If you need Delphi XE2 compatibility, DARWIN is not defined with Delphi XE2. You need something like {$IFDEF FPC} {$IFDEF DARWIN} {$DEFINE MACOS} {$ENDIF} {$ENDIF} and change the {$IFDEF DARWIN} in Lua.pas to {$IFDEF MACOS}
    - In older code fragments, you may find {$IFDEF DARWIN} ... {$ENDIF} code to link against a dylib. This is not necessary as Darwin as an OS is not distributed separately any more, just as part of Mac OS.
    - {$linkframework Lua} links against the Lua framework from code and is the same as calling fpc -Mdelphi clscript.pas -k-framework -kLua from the command-line
    - Lua.framework needs to put in the app bundle when distributing the application.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

  5. #15
    Thanks. I will try that as soon as I am home from work.
    Best regards,
    Cybermonkey

  6. #16
    Thanks to Stoney I managed to compile EGSL on MacOS X. First tests are promising (see the attached image). Some things are to do, though:
    • using Vampyre Imaging Library instead of SDL_image
    • porting of the IDE
    • creating an application bundle
    If I'll have success, EGSL will run on many platforms ... One only has to code a sript once and can execute it on Windows, Linux 32 bit, Linux 64 bit, Mac OS X and Haiku with the same code.
    EGSLonMacOS.jpg
    Best regards,
    Cybermonkey

  7. #17
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Very cool. Nice work.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #18
    Thanks. I don't know if I already mentioned my other "project": fpBASCON. It's a simple BASIC to Pascal translator (which is rather useless for Pascal programmers ). But there are the things possible you can see in the attached screenshot ... in combination with my engine.

    fpBASCONGeany.jpg
    Best regards,
    Cybermonkey

  9. #19
    But back to topic. I made a MacOS X binary of the game "Astrorocks" which is a simple Asteroids clone. Maybe someone with a Mac can download it and test if everything works as expected.
    Download can be found here: http://www.egsl.retrogamecoding.org//pages/showcase.php
    It's a rather big download because of the music included. Please use the space bar to shoot instead of left ctrl on Mac. (Because of "Spaces" ...)
    Best regards,
    Cybermonkey

  10. #20
    It works for me. (MacBook Pro, Mac OS Lion 10.7.2 and MacBook Snow Leopar 10.6.8 )
    It does not work on Leopard, that means you either compiled on Snow Leopard or you used macosx_version_min with 10.6 as its parameter. You should be able to use Leopard without any problems. (SDL and Lua are both Leopard-compatible iirc.)
    You should also add a 64-bit executable to the app bundle.

    On my Macbook with the integrated Intel graphics card the game is much slower than on my MacBook Pro. You definitely need to implement deltaTime for independent movement and animation speed.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

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
  •