Results 1 to 10 of 27

Thread: EGSL Interpreter

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Freepascal-meets-SDL View Post
    That's a nice project. So if I get you right with EGSL you can script a full game only by using LUA, right?
    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.
    Best regards,
    Cybermonkey

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I'm sure Jeremy Darling would love your project. He's a bit Lua and scripting engine fan.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3
    Quote Originally Posted by WILL View Post
    I'm sure Jeremy Darling would love your project. He's a bit Lua and scripting engine fan.
    Yes, I know, although I am not using his pLua unit ... ;-)
    Best regards,
    Cybermonkey

  4. #4
    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?

  5. #5
    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

  6. #6
    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

  7. #7
    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.

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
  •