Slick Forums

Discuss the Slick 2D Library
It is currently Wed May 22, 2013 1:37 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jun 15, 2012 11:39 pm 
Offline

Joined: Sat Jul 30, 2011 11:33 am
Posts: 60
hey I'm making a game where the user can place blocks but those are stored inside an array list but when i add like 20 blocks the fps drops down to 8 or something?
what could i do about this or should't i be storing them in an array list?


Top
 Profile  
 
PostPosted: Sat Jun 16, 2012 12:37 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1469
Shouldn't happen, sounds like you're doing something very wrong. Arrays are cheap -- adding 20 objects to an array will have no impact on FPS.

If you want help, post the relevant code and more details about your process. :)


Top
 Profile  
 
PostPosted: Sat Jun 16, 2012 10:00 am 
Offline

Joined: Sat Jul 30, 2011 11:33 am
Posts: 60
I'm currently not on my computer where i have the code but i have 3 arrays one for the positions 1 for the images and 1 for the polygons and i use a for loop to go through them all in the render method to render them.
i will post my code when i got home


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group