Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Delphi & lua problem

  1. #1

    Delphi & lua problem

    I've been playing with lua in delphi lately using
    http://blog.spreendigital.de/2009/09...r-delphi-2010/

    so far so good except for 'require' command that doesn't seem to work
    any other lua fans here that can help me out?

  2. #2
    WARNIG!
    When I tried to open the above link Sophos Antivirus detected the site to be infected with some trojan (didn't got a good look at its name) and prevented me from visiting the site.
    So I advise extreme caution when you try opening that site.

    EDIT: The site is suposingly infected with Troy/JSAgent-BH
    Based on information from the web this Trojan is most comonly used to download and infect your computer with even more nasty things.

    EDIT2: After I done more searching the Trojan usually downloads other stuff into fake "svchost.exe" file. If this is done on WindowsXP and prior it is actually posible to force wundows to launch this fake "svchost.exe" instead of real one at windows start. So this would indicate that the main purpose of this trojan is to install Rootkit on your computer and theese are dificult to deal with.
    So my recomendation is to stay clear of that site until it is confirmed that it is safe again.

    @laggyluk
    Sorry for invading your thread this way but we don't cause troubles to others don't we.
    Last edited by SilverWarior; 10-03-2013 at 04:57 AM.

  3. #3
    well maybe there are some better working virus-less lua bindings for pascal then?

    it turned out that 'require' works just fine, just I had a typo in that loaded script and it was crashing lua..
    Last edited by laggyluk; 10-03-2013 at 08:18 AM.

  4. #4
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    Lua is a popular choice amongst game developers due to it being very easy to intergrate, fairly fast and there's a big user base (because it's so popular)

    But since the API exposed to LUA in any given game will be different, there's no compatibility reasons to use it.

    If you're dead set on LUA then I'll see what I can do to help but I would personally recommend you use Rem objects Pascal Script (https://github.com/remobjects/pascalscript) or Delphi Web Script (http://code.google.com/p/dwscript/ - I think there's a 'newer' fork floating around somewhere) or indeed there are a handful of different scripting engines written by people here, I can't remember who but somebody was working on a full ECMAScript (javascript) engine for scripting.

    Point is that the projects I mentioned are native to pascal and as a result it's far more convenient (and portable) to use than wrapping up a C lib.

    Plus it's not like LUA is the *fastest* I wouldn't be suprised if PascalScript could beat it on performance in more than a few areas.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  5. #5
    PhoenixLib does have good LUA Headers, I do use it on all my games (Windows/Mac/iOS).
    Attached Files Attached Files

  6. #6
    I looked at the Lua.pas of PhoenixLib, it looks like the Freepascal version. So if you want to have Lua5.2 support, you can try the library on the Lua wiki: http://lua-users.org/wiki/LuaInFreePascal
    Direct link: http://lua-users.org/files/wiki_insecure/lua52.pas
    Best regards,
    Cybermonkey

  7. #7
    thanks guys, i'll check out that PhoenixLib

    @phibermon I've worked in lua on some other project and I find it brilliant in a mind bending way

  8. #8
    Quote Originally Posted by phibermon View Post
    Plus it's not like LUA is the *fastest* I wouldn't be suprised if PascalScript could beat it on performance in more than a few areas.
    I'm sure that PascalScript could beat LUA in most scenarios. The main reason for this is that pascal script actualy gets translated (copmpiled) into byte code before it is executed. This way you get almost same performance as with native pascal code.

    I personally know that if I ever do include some scripting capabilities into any of my games it would definitly be by using PascalScript.

  9. #9
    I could not find this info, but does PascalScript works with FPC on macOs, iOS and Android?

  10. #10
    Based on FreePascal Wiki it does.
    http://wiki.freepascal.org/Pascal_Script

Page 1 of 3 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
  •