Jump to content

marrat

Members
  • Posts

    7
  • Joined

  • Last visited

Everything 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. You know you are right. So i searched a bit and found these benchmark results. They are old, but its still something. They rule that IronPython is slightly faster than CPython! That is good to know :] http://sparcs.kaist.ac.kr/~tinuviel/pybench/
  4. 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 :] PyPy supports ctypes i think. Since LW exports c api there should not be many problems making a wrapper. You dont even need swig. i will :] 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 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
  5. 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 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..
  6. 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
  7. 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...