[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Game objects management
- From: "Grisha" <grisha@...>
- Date: Wed, 9 Jun 2004 15:25:04 +0400
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" <email@example.com>
To: "Lua list" <firstname.lastname@example.org>
Sent: Wednesday, June 09, 2004 3:15 PM
Subject: Game objects management
> 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: