User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: LUA scripting for Server

  1. #1
    No Products Registered

    Join Date
    Sep 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA scripting for Server

    Possible to make a server in LUA? Or possible to implement it?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: LUA scripting for Server

    It's possible to write a C module that uses Lacewing.dll, but it has not been done. Might come in quite handy, actually.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export ModuleXNA Export Module
    Fusion 2.5 (Steam)
    Mathias's Avatar
    Join Date
    Jun 2006
    Location
    Copenhagen, Denmark
    Posts
    1,083
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    I've been working on something for MechaBowser, that runs a server using pylacewing, loads up Lua in Python (using ctypes bindings I've made from scratch), and calls Lua functions for events like messageReceived, channelMessageReceived, acceptChannelMessage, etc., and also provides methods for doing stuff (sendMessage, sendChannelMessage, kick, etc.)

    If more people are interested, I'll work towards a release

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    Mathias - SUPER INTERESTED!

    If you able to make a custom server that can receive server messages and reply back to the channel/client interfacing with LUA then that would be awesome

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    I wonder what people find so much easier about Lua than Python..!

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    I find Python relatively easy too but it's just that I need to be able to compile Python code, import all of the right libraries, etc.

    Mathias' solution sounds as though it would take care of all the nitty gritty such as handling the connections and would also be nice if it came precompiled.

    Which would leave us only needing to add lua scripts to interpret the messages such as:

    if ServerMessageRecieved == 'Ping' then
    SendMessageToChannel( 'Pong' )
    end

    That would be awesome. (Even though I really do like the Python support already).

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    I'm interested in this as well.

    Hope to see a release soon!

  8. #8
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    someone could theoretically write an xlua c module and have direct support for lua servers through that (via xlua or something)

    ... not like im volunteering or anything

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export ModuleXNA Export Module
    Fusion 2.5 (Steam)
    Mathias's Avatar
    Join Date
    Jun 2006
    Location
    Copenhagen, Denmark
    Posts
    1,083
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    Quote Originally Posted by netninja
    I find Python relatively easy too but it's just that I need to be able to compile Python code, import all of the right libraries, etc.
    This is the exact same case with Lua Python code doesn't "compile" in that sense, you run it just like Lua. Also, if the implementation had been made in Lua, you would have had to import the various modules for the implementation too. Really, the examples given in the pylacewing wiki (and twisted examples/tutorials) are really helpful, and you shouldn't need anything else.
    Quote Originally Posted by netninja
    Mathias' solution sounds as though it would take care of all the nitty gritty such as handling the connections and would also be nice if it came precompiled.
    With pylacewing, you don't have to "manage" connections whatsoever (I'm not sure where you got this idea from?), you change the ServerProtocol class so it behaves like you want to, and that's it. Also, precompiled? You still don't compile Python, even though you can build an executable using py2exe/cx_Freeze
    Quote Originally Posted by netninja
    Which would leave us only needing to add lua scripts to interpret the messages such as:

    if ServerMessageRecieved == 'Ping' then
    SendMessageToChannel( 'Pong' )
    end

    That would be awesome.
    Code:
    def messageReceived(self, message):
        if message.value == 'Ping':
            self.sendMessage('Pong', 0)
    vs
    Code:
    function pylacewing.messageReceived(message)
        if message.value == "Ping" then
            pylacewing.sendMessage("Pong", 0)
        end
    end
    I honestly like the Python version better

    With that said, I think an official pylacewing-lua server would be a nice addition, even though I would like people to actually use the implementation directly

  10. #10
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LUA scripting for Server

    Some people just prefer lua to python. It's an opinion thing. To be honest I'm still struggling to learn Python at a proficient level.

    I probably wouldn't pursue lua for a full server implementation anyway. In fact I think lua support would be more useful client-side.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. .swf and scripting
    By Jason in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 22nd November 2010, 08:06 AM
  2. MMF and Scripting
    By Pkeod in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 8th May 2008, 03:23 PM
  3. Scripting in MMF2
    By BBrito in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 26th February 2008, 10:50 PM
  4. Is it possible without scripting?
    By Norway in forum Multimedia Fusion 2 - Technical Support
    Replies: 24
    Last Post: 12th September 2007, 07:54 AM

Posting Permissions

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