España (Español)
Canada (English)
Canada (Français)
Deutschland (Deutsch)
España (Español)
France (Français)
Italia (Italia)
United Kingdom (English)
United States (English)
日本 (日本語)
Foros
Hola:
Visitante
Iniciar sesión
Inicio
Guía de inicio rápido
Noticias
Suscripción
Juegos
Catálogo de juegos
Enviar juego
Revisar juego
Probar juego
Creadores
Mi perfil
Mi empresa
Comunidad
Foros
Temas destacados en la comunidad
Recursos de la comunidad
Educación
Introducción
Catálogo de contenido sobre educación
Packs de inicio
Utilidades
Recursos
Preguntas más frecuentes
Socios
Descargar
Comentarios
Sitio de prensa
foros de la comunidad
XNA Community Forums
»
XNA Game Studio Technologies (Xbox 360, Zune, and Windows)
»
General
»
Destroying unused objects or reusing?
More Search Options
|
My Discussions
|
Active Topics
|
Not Read
Page 1 of 1 (4 items)
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
Destroying unused objects or reusing?
Last post 16/04/2009 9:17 by
Rizman
. 3 replies.
16/04/2009 3:39
Zepher
(0)
Posts
125
Destroying unused objects or reusing?
Reply
Quote
I am creating a Tower Defense game and I have started to create the missiles that will be fired from my towers. What is the best way to handle these missile objects? The two methods I have thought of:
1. Initialize and create enough missiles that you can use an 'alive' bool to create and reuse these missiles.
2. Create a missile each time a bullet is fired and destroy it when it hits its target.
Which is the better approach or is there something else I should be considering? Thanks!
16/04/2009 3:45
In reply to
Craig Martin
(3973)
Posts
2.616
Re: Destroying unused objects or reusing?
Reply
Quote
If you plan to deploy to XBox then 1. is the recommended techique.
Game hobbyist hell-bent on coding a diabolical Matrix
16/04/2009 4:19
In reply to
Zepher
(0)
Posts
125
Re: Destroying unused objects or reusing?
Reply
Quote
Okay, thanks, that is exactly what am planning to do so I'll take that approach, I appreciate the fast response :)
16/04/2009 9:17
In reply to
Rizman
(0)
Posts
175
Re: Destroying unused objects or reusing?
Reply
Quote
You should absolutely use number 1).
Here is a very good blog entry about resource pools which you should really read.
Advice from the swamp: A generic pool collection class
Page 1 of 1 (4 items)
Previous
Next
© 2009 Microsoft Corporation. Reservados todos los derechos.
Condiciones de uso
Declaración de privacidad
Código de conducta
Comentarios