I need a npc in my game, now I don not know how to make it.
Shoud I make a new class (class npc_test{...};)
or must it "learn" from an Irrlicht-Class (class npc_test : public I... {...};)???
I don't have any idea,
please write something.
HEEEEEEEEEELLLLPPPPPPPPP
-
- Posts: 39
- Joined: Sat Oct 30, 2004 4:35 pm
- Location: Boston, MA
- Contact:
a linked list is a way of implementing an n-dimensional list using pointers between "adjacent" items in the list instead of allocating contiguous memory for them all
so why would you put NPC objects in a linked list? linked lists are fast at inserting and deleting things at specific locations, which is primarily useful for keeping a list in order while making many changes to it.. is there any reason NPCs should be in order?
it would probably be simpler to just make an array of pointers to NPC objects
I suggest reading tutorials on proper C++ design and on game design, and keep in mind irrlicht is only a graphics engine so we're really only in a position here to answer questions specifically about using the irrlicht engine to do graphics
so why would you put NPC objects in a linked list? linked lists are fast at inserting and deleting things at specific locations, which is primarily useful for keeping a list in order while making many changes to it.. is there any reason NPCs should be in order?
it would probably be simpler to just make an array of pointers to NPC objects
I suggest reading tutorials on proper C++ design and on game design, and keep in mind irrlicht is only a graphics engine so we're really only in a position here to answer questions specifically about using the irrlicht engine to do graphics