Page 1 of 1

whats fastest

Posted: Mon Jan 31, 2005 8:12 pm
by RedmoonX
whats fastest for having lots of instances on screen

using:
structures with arrays ex.

structure Instance
x.f[1000000]
y.f[1000000]
image.f[1000000]
endstructure

or using:

elements
like resetelements
addelements

:D

i would really need to know

Posted: Mon Jan 31, 2005 8:17 pm
by blueznl
do you mean arrays vs. linked lists, or did i get the question all wrong?

Posted: Mon Jan 31, 2005 8:18 pm
by freedimension
The answer depends on what you are trying to achieve ;) Tell more about it.

Posted: Mon Jan 31, 2005 8:29 pm
by RedmoonX
its about making a game with many instances.. and i saw in the demo that follows that they using ELEMENTS to keep track of all instances and move them and draw them

but is it faster then having all of them being sorted in arrays

like structure arrays

Posted: Mon Jan 31, 2005 8:39 pm
by Blade
Linked lists are slower than simple arrays, but are much more easy to use.

In a game there are many elements that have to be created/destroyed continuosly, so using linked lists helps a lot.