Just starting out? Need help? Post your questions and find answers here.
RedmoonX
User
Posts: 26 Joined: Mon Jan 17, 2005 9:54 am
Location: Sweden
Contact:
Post
by RedmoonX » Mon Jan 31, 2005 8:12 pm
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
i would really need to know
^^
-
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Mon Jan 31, 2005 8:17 pm
do you mean arrays vs. linked lists, or did i get the question all wrong?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
freedimension
Enthusiast
Posts: 613 Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:
Post
by freedimension » Mon Jan 31, 2005 8:18 pm
The answer depends on what you are trying to achieve
Tell more about it.
<°)))o><²³
RedmoonX
User
Posts: 26 Joined: Mon Jan 17, 2005 9:54 am
Location: Sweden
Contact:
Post
by RedmoonX » Mon Jan 31, 2005 8:29 pm
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
^^
-
Blade
Enthusiast
Posts: 362 Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:
Post
by Blade » Mon Jan 31, 2005 8:39 pm
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.