Jump to content

marrat

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by marrat

  1. i just checked evaluation of le3 - it changed a lot from v2, was it completely rewritten from scratch?

     

    on topic - seems like lua is statically linked in Leadwerks.lib so... guess no CLua for us.

  2. I wanted to ask how lua interpreter is linked to engine binary - statically or dynamically?

     

    Reason i am asking this is because not everyone likes lua and some (like me) would love to use scripting language with different syntax. If lua was dynamically linked then lua.dll could be replaced with own customized lua interpreter. It would allow people to add new features to scripting language or just use CLua that has syntax in tune with c++.

  3. Performance wise I wouldn't give IronPython so less credit. It's slightly as fast as CPython, depending on the test you do of course.

    well i did some benchmarking comparing C++, PyPy, CPython, IronPython and C#. C++ ofc was fastest, but PyPy was insignificantly slower. Then went C#, which was pretty fast still, CPython was as slow as expected and IronPython came in last. By the way compiled and interpreted IronPython does not differ in execution speed. I used this benchmark for tests, maybe it is ****, i dont know :]

     

    I would however like seeing PyPy using LE... :-)

    PyPy supports ctypes i think. Since LW exports c api there should not be many problems making a wrapper. You dont even need swig.

     

    If you get IronPython into Unity3D let me know!! :-)

    i will :]

     

    Calling Lua gay is maybe over the roof but I don't like it very much either.

    That is just a matter of perspective. To me syntax of lua is so gay.. As gay as say pascal.. But yanno everyone has their taste. Someone thinks python is gay and im perfectly good with that - i just silently giggle knowing how much they loose not using python ;D

     

    I'm not sure about the "handover" process of the GMF objects. Shared MEM? Pipe? Some kind of in-mem database? I think I would prefer an in-mem File System like a RamDrive. :-)

    If you can manage it - use shared memory. It is the fastest IPC ever. I tried named pipes - could not get them work the way i wanted, probably because i suck.. anyway :o

  4. It's really great.

     

    I wonder if it would run in Mono too :-) and via Silverlight in a Browser window?

     

    How much is the overhead? Could you make some small measurements?

    When calling a specific thing in C++ and when calling it in Iron Python via LE.NET...

    I would say at least LE.NET will add some latency to it, right? How much, does anybody knows?

     

    Also when installing a game written in IronPython you would need to install .NET, IronPython and LE, right?

     

    Sorry for the many questions, I'm just excited!

    MONO is a bit vague about IronPython support http://www.mono-project.com/Python Current version of ironpython is 2.7, and mono is talking about 1.0

     

    No idea if it would run in the browser. But even if it did - would require downloading leadwerks dlls somewhere along with other resources. thats quite a long shot IMO.

     

    Installing game would require only .NET to be installed. IronPython runtime can be bundled with your app. Furthermore ironpython can be compiled to .NET executable/dll. If so then you just need to bundle ironpython dlls, no interpreter exe is needed.

     

    As for performance - ironpython is significantly slower than c# or CPython, however framerate of demo application is same on both ironpython and c# demo apps.

     

    Sorry i got to turn you down on benchmarking. At the moment im quite occupied with work and i will not be using LW anyway so i got no interest in tinkering with it further :o If anyone interested - sided with Unity3d because LW uses lua as scripting language, and boy lua is gay in my opinion :) Should not be hard to integrate ironpython into Unity3d since its all c# so.. :)

  5. Hi rndbit, awesome!

     

    This is using LE.NET, right?

     

    Did you also had a look at Cython, to call the C part of LW directly?

     

    For Code Completion in Eclipse to work you would need to provide a own file I think...

    i am aware of cython, however did not try it. i imagine debugging cython would be major pain in the rear end so i rather stay away from it :o

  6. It works pretty good. Too bad elipse is somewhat lacking in terms of code completion.. Otherwise python lovers should really try LW in python.

     

    This is a converted sample:

    '''
    Created on Aug 24, 2011
    
    @author: rndbit
    '''
    
    import clr
    clr.AddReference('IronPython')
    clr.AddReference('StdLib')
    clr.AddReference('LE.NET')
    
    from LeadwerksEngine import *
    import System, sys
    
    def UpdateCallback(ent):
       LE.TurnEntity(ent, TVec3(LE.AppSpeed() * 0.5));  
    
    def ErrOut( message ):
       System.Console.WriteLine( message );
    
    def main(argv):
       # Initialize
       LE.Initialize()
       LE.SetAppTitle('Test')
       LE.RegisterAbstractPath('C:/Leadwerks Engine SDK') 
    
       # Set graphics mode        
       if LE.Graphics(800,600) == 0:
           ErrOut( "Failed to set graphics mode."  )
           return
    
       # Create framework object and set it to a global object so other scripts can access it
       fw = LE.CreateFramework()
       if not fw.IsValid:    
           ErrOut( "Failed to initialize engine." )        
           return
    
       # Set Lua framework object        
       LE.SetGlobalObject( "fw", fw.Handle )        
    
       # Set Lua framework variable        
       lua = LE.GetLuaState()
       LE.lua_pushobject( lua, fw.Handle )
       LE.lua_setglobal( lua, "fw" )
       LE.lua_pop( lua, 1 )
    
       # Get framework main camera        
       camera = LE.GetLayerCamera( LE.GetFrameworkLayer(0) )
       LE.PositionEntity( camera, TVec3(0,0,-2) )
    
       # Create cube
       material = LE.LoadMaterial( "abstract::cobblestones.mat" )
       mesh = LE.CreateCube(TEntity())
       LE.PaintEntity( mesh, material )
    
       # Apply callback
       cb = LE.EntityUpdateWorldCallback(UpdateCallback)
       LE.SetEntityCallback(mesh.Entity, cb )
    
       # Create ground
       ground = LE.CreateCube(TEntity())
       LE.ScaleEntity( ground, TVec3(10,1,10) )
       LE.PositionEntity( ground, TVec3(0,-2,0) )
       LE.PaintEntity( ground, material )
    
       # Add some light
       light = LE.CreateDirectionalLight(TEntity())
       LE.RotateEntity( light, TVec3(45,45,45) )
    
       # Spin cube until user hits Escape
       while not LE.KeyHit() and not LE.AppTerminate():
           if not LE.AppSuspended():
               LE.TurnEntity( mesh, TVec3( LE.AppSpeed()*0.5 ) )     
    
               LE.UpdateFramework()        
               LE.RenderFramework()        
    
               LE.DrawText("C# LE.NET", 0, 20)
               LE.Flip( 0 )
    
    
    if __name__ == '__main__':
       main(sys.argv)
    

×
×
  • Create New...