lua-users home
lua-l archive

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

You mean, representation of those objects in Lua?
If yes - we use boxed pointers to represent objects, and just delete C++
object and zero this pointer (without destroying userdata) when needed. This
way the userdata will remain but will be empty (no function will work for
it), it's 'dead'. The userdata will be GCed eventually too, when all
references will be canceled.


----- Original Message ----- 
From: "Jose Marin" <>
To: "Lua list" <>
Sent: Wednesday, June 09, 2004 3:15 PM
Subject: Game objects management

> Hello.
> In most games, there are many objects created and
> destroyed, for example, enemies, shots, missiles, etc.
> How do you manage this? How do you mantain the object
> list, avoiding create and destroy objects?
> Use lists?
> ______________________________________________________________________
> Participe da pesquisa global sobre o Yahoo! Mail: