Hi there,
My idea was to well, "Shoot objects" in my game, however...i have no clue on how to do that, I mean, i can create meshes and i can delete them
but it would be heavy on the system to load meshes from the drive and deleting them again everytime a button is pressed.
So i was wondering...what would be the best way to handle this?
Thanks alot!
Projectiles / Temporary Objects?
Re: Projectiles / Temporary Objects?
well if you load a mesh and add a scene node to scene and you remove it, you don't actually remove the mesh from the memory, so if you would add again a scene node with that mesh it would grab it from the memory, unless you have removed it by yourself from the memory.DoritoX wrote:Hi there,
My idea was to well, "Shoot objects" in my game, however...i have no clue on how to do that, I mean, i can create meshes and i can delete them
but it would be heavy on the system to load meshes from the drive and deleting them again everytime a button is pressed.
So i was wondering...what would be the best way to handle this?
Thanks alot!
Working on game: Marrbles (Currently stopped).
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: Projectiles / Temporary Objects?
This would be the way to go for deleting a single object, but you should probably try to implement a clean up routine every so many frames (or maybe every frame if you don't have to delete too many nodes)serengeor wrote:well if you load a mesh and add a scene node to scene and you remove it, you don't actually remove the mesh from the memory, so if you would add again a scene node with that mesh it would grab it from the memory, unless you have removed it by yourself from the memory.
You could implement something yourself, or use the deletion queue provided by the scene manager
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
...he just told you..DoritoX wrote:I see, but....how do i even remove stuff from both scene (and RAM) anyways?
ent1ty wrote: success is a matter of concentration and desire
at a cost measure in computer resourcesButler Lampson wrote: all problems in Computer Science can be solved by another level of indirection