lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello.

I would like to propose a feature that many game developers (not only them of course) can benefit a lot when using lua embedded in a game.

 

Ability to define custom attributes, like in C#, for lua declarations, for functions variables and table members.

Where custom attribute is a simple string that is associated with the value, and can be access at runtime thru C interface,

They will allow defining custom handling of lua variables or functions.

 

As an example something like this.

 

Table = {

            <UIWidget=”slider” UIMin=0 UIMax=100>

            Radius = 10,

 

            <UIWidget=”EntitySelector”>

            TargetName = “MyName”,

 

<UIWidget=”Color”>

            Color = {r=1,g=1,b=1},

 

<NetSync=1>

            Position = {x=0,y=0,z=0},

 

}

 

The strings in < > brackets can be parsed by Lua and associated with the table values, and later at runtime game engine can fetch this custom attribute string, parse it

And apply special processing on the values with this attribute.

 

As for now I see this is one as the main lacking feature from the Lua, which is limiting its full use for game engines.

I’m quite sure it’ll be a dream feature for all game developers trying to use lua in their engines.

I would really like to hear opinions on that.

 

- Timur

 

____
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Crytek GmbH - http://www.crytek.com