IrrLua

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
imagination304
Posts: 56
Joined: Mon Jan 09, 2006 2:02 am

Post by imagination304 »

Hi zenaku,

I successfully run your examples.
It is unbelievable with lua!

(1) According to the doc., what is tolua++ used for? Is it a compiler for converting lua to c++ and finally a exe file?
(2) What is the usual IDE for lua?

Thanks in advance
:)
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

imagination304 wrote:Hi zenaku,

I successfully run your examples.
It is unbelievable with lua!

(1) According to the doc., what is tolua++ used for? Is it a compiler for converting lua to c++ and finally a exe file?
(2) What is the usual IDE for lua?

Thanks in advance
:)
1. tolua++ is a tool used to create a lua binding from a psuedo C++ definition. tolua++ generates C++ source code that can be compiled and loaded as a lua module.

2. There isn't an official IDE. :(

I use VIM (http://www.vim.org/), but I don't recommend it to everyone ;) VIM has a pretty large learning curve.

If you have Visual Studio 2003 you can install this:
http://www.sjbrown.co.uk/?code=lualite

It still doesn't give you an IDE, but at least you have syntax highlighting and psuedo code completion.

Here's the list: http://lua-users.org/wiki/LuaEditorSupport
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
mgphuang
Posts: 3
Joined: Thu Aug 05, 2004 2:38 am

hello zenaku!

Post by mgphuang »

I is working for a 2d game a lobby+ n little games
struct is gamerun.exe--->script----->irrlua

for some reason,the IrrDevice must be created by gamerun,but how the gamerun.exe pass the IrrDevice to script and use it?

Im wait for your next version,because i need expand my gui,for example 4-state button

IrrIGUIElement.CreateElement!go go go!!!
imagination304
Posts: 56
Joined: Mon Jan 09, 2006 2:02 am

Post by imagination304 »

Hi all,

What is the advantages of using Lua with irrlicht,
instead of using C++ with irrlicht, in the exchange of lower fps a little bit?
(just want to show us that the example c++ apps could
also be converted in lua ???)

Thanks in advance
:)
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

other people can change the code, i gues
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

IrrLua + DirectX == BROKEN!

Post by zenaku »

I'm sorry to say, but the current implementation of DirectX in Irrlicht is broken for Irrlua.

http://irrlicht.sourceforge.net/phpBB2/ ... 0738#80738


By default Irrlicht does not include D3DCREATE_FPU_PRESERVE when creating the directx driver. That option is required when using DirectX with IrrLua. Without it, you will get random Lua stack corruption problems as the Lua stack is FPU based.

As a result I can only recommend using the OpenGL and software drivers with IrrLua. If you want/need directx, you should apply the patch posted in the link above.
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
Lazarus_
Posts: 2
Joined: Fri Jun 30, 2006 12:48 pm

Post by Lazarus_ »

Zenaku, what version of Irrlicht does Irrlua currently support?
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

Lazarus_ wrote:Zenaku, what version of Irrlicht does Irrlua currently support?
The latest released version of IrrLua (0.7) supports Irrlicht 0.14.

The next version of IrrLua ( 0.8 ) will support Irrlicht 1.0 and Lua 5.1. The next version will be based on LuaBinaries which will allow IrrLua programs to use other Lua binary modules (http://lua-users.org/wiki/LibrariesAndBindings ) without recompiling anything, as long as the other project is also based on LuaBinaries.

Currently I've fixed irr.gui.createIGUIElement() and now I'm fixing the created IGUIElement's event receiver support. I have a sample custom gui element made and it seems to work Ok.

Somewhere along the way going from Irrlicht-0.14.0->Irrlicht 1.0, Lua 5.0.2->Lua 5.1, and tolua++1.0.7->tolua++1.0.92 a new bug was introduced and CAnimSprite no longer works. :( I'm not sure what's broken. It works in debug mode, not in release mode. If I only compile tolua++ in release mode it's also broken, so it's partially a problem with tolua++. I don't want to hold back 0.8 too much longer, so it may get left in.


-- zen
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

status update

IrrLua is delayed yet again. My motherboard blew out as I was playing UT2004 and it will be a few weeks before I can replace it. Sorry to everyone who has been waiting for the next release of IrrLua.

--
zen
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

zenaku wrote:
Lazarus_ wrote:Zenaku, what version of Irrlicht does Irrlua currently support?
It works in debug mode, not in release mode.
Uninitialised variable?
MarcoTMP
Posts: 37
Joined: Mon Aug 29, 2005 8:14 pm
Location: Dominican Republic
Contact:

Post by MarcoTMP »

imagination304 wrote:Hi all,

What is the advantages of using Lua with irrlicht,
instead of using C++ with irrlicht, in the exchange of lower fps a little bit?
(just want to show us that the example c++ apps could
also be converted in lua ???)

Thanks in advance
:)
Some advantages:
You dont have to spend time recompiling your game, just change script code and run again. You can also edit your code from everywhere without an IDE and a compiler. This may reduce development time in most of cases.
Coty
Posts: 8
Joined: Tue Nov 08, 2005 1:34 pm

Post by Coty »

I think the lua wrapper is absolutely wonderful!!! :)

I'm looking forward to the next release, but take your time. I'm just letting you know that I am very much interested in your project. I really like lua a lot. I can't program in C++ that good, but lua I can understand, and I don't need a compiler.

Thank You for working on this! :)
Coty
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

IrrLua-0.8 released

Post by zenaku »

IrrLua 0.8 has been released.

New features include:

Irrlicht 1.0 support
Lua 5.1 support
LuaBinaries support
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
SiriusCG
Posts: 58
Joined: Tue Feb 14, 2006 1:05 am

Post by SiriusCG »

Zenaku, just curious but how much of the Irrlicht 1.0 API is now available through IrrLua 0.8?
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

SiriusCG wrote:Zenaku, just curious but how much of the Irrlicht 1.0 API is now available through IrrLua 0.8?
I haven't added much more really. I just migrated everything from 0.7 to use irrlicht 1.0 and lua 5.1. I updated the irr.gui.createIGUIElement() so that it works now, but other than that, not much as changed.

The IrrLua API documentation is very incomplete. The functions that are documented I only documented after I did some unit testing. A lot more of the API is implemented than is documented.

The best way to see what is actually imported would be to look at the file: IrrLua/pkg/IrrLua.pkg

each $pfile line is synonymous to an #include line in C++, so you can follow each pfile and see what is actually imported. It's a lot of work but if you are having a problem with a particular method that would be be the best way to find out what's going on.

Almost every irrlicht class is imported into IrrLua, but not every method of every class works and not every polymorphed method works (e.g. something like irr.core.rect(rect) vs irr.core.rect(s32,s32,s32,s32) ) Most of irr.core and irr.gui are done. There are proably 5-10 classes I'm missing, like irrString and irrArray stuff. You don't really need them in lua though, so they may never be implemented.

IrrLua is based on tolua++. Some methods import directly without modification. Others need small wrapper functions to make them work nicely. The problem is the only way to know which methods work for sure is to try each method at runtime i.e. unit test every function.
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
Post Reply