Page 5 of 7

Posted: Sun Jun 11, 2006 9:46 am
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
:)

Posted: Sun Jun 11, 2006 3:23 pm
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

hello zenaku!

Posted: Tue Jun 13, 2006 12:39 am
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!!!

Posted: Sun Jun 18, 2006 7:10 am
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
:)

Posted: Mon Jun 19, 2006 1:58 pm
by Strong99
other people can change the code, i gues

IrrLua + DirectX == BROKEN!

Posted: Sun Jul 02, 2006 3:00 pm
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.

Posted: Sun Jul 02, 2006 11:44 pm
by Lazarus_
Zenaku, what version of Irrlicht does Irrlua currently support?

Posted: Mon Jul 03, 2006 9:48 pm
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

Posted: Thu Jul 20, 2006 6:36 am
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

Posted: Thu Jul 20, 2006 11:57 am
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?

Posted: Thu Jul 20, 2006 1:41 pm
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.

Posted: Mon Jul 24, 2006 12:47 am
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

IrrLua-0.8 released

Posted: Thu Jul 27, 2006 4:43 am
by zenaku
IrrLua 0.8 has been released.

New features include:

Irrlicht 1.0 support
Lua 5.1 support
LuaBinaries support

Posted: Sat Jul 29, 2006 10:36 pm
by SiriusCG
Zenaku, just curious but how much of the Irrlicht 1.0 API is now available through IrrLua 0.8?

Posted: Sun Jul 30, 2006 12:51 am
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.