[gameprogrammer] Re: storing lists of units

and one last word of advice about this :P

in your program, the best solution for your code probably wont be a textbook
example word for word chunk of code such as "i used plain vanilla quad
trees".  Successful programming in areas like this comes from mixing and
matching techniques that are out there.

For instance if you used a recursive sphere tree to store objects in your
map, and you also stored your objects as recursive spheres for collision
detections, there might be some wierd optomizations you can do, involving
trig or square root lookup tables or something else.

If i remember correctly, Quake uses something called a BSP tree for their
engine (check it out if you want, similar to the oct-tree idea however quite
a bit different too), however they dont just use it for collision detection,
they also use it for being able to tell what can be seen from any given
location as well as handling lighting, explosions and lots of other things.

If you can take some code you have to do one thing, and attach a lil extra
code to make it do something else with very little extra overhead, you have
really done a good thing.

use your imagination and you might stumble onto something really awesome (:

----- Original Message ----- 
From: "Roger D. Vargas" <roger@xxxxxxxxxxx>
To: "Game programmer list" <gameprogrammer@xxxxxxxxxxxxx>
Sent: Tuesday, September 28, 2004 9:51 AM
Subject: [gameprogrammer] storing lists of units


> I need to store the list of NPCs in my game, and Im looking the best way
> to do so. I need to be able to quickly find only the ones closer to
> certain location to pass them to my lua script. Whats the best structure
> and algorithm to do this?
>
>
> -- 
> Roger Durañona Vargas
> Linux user #180787
> A cada momento nos rodea lo desconocido. Es alli
> donde uno tiene que buscar el conocimiento.
> Paul Muad'Dib Atreides. Children of Dune
>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: