[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- 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.
Grisha
----- Original Message -----
From: "Jose Marin" <jose_marin2@yahoo.com.br>
To: "Lua list" <lua@bazar2.conectiva.com.br>
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:
> http://br.surveys.yahoo.com/global_mail_survey_br