Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 3 [4]
  ignore  |  Print  
  ArrayList, Hashtable, or ... for holding in-game-objects  (Read 16201 times)
0 Members and 1 Guest are viewing this topic.
Offline kaffiene
« Reply #90 - Posted 2012-02-11 06:07:48 »

Wow, this is the BEST thread about lists I've ever read!  :D
So many good ideas here!

My 2 cents: I tend to use ArrayList. Their 'sense' of order appeases me.

I'd like to add, for the OP: Whichever you use (Bag, ArrayList, etc.), you probably wont see a noticable difference, until you're working with the big boys on some voluminous project. But I must admit I share your enthusiasm for optimizing  ;)
Hehe.  Me too.  I use ArrayList and when I'm done, I profile to see what my bottlenecks are.  I've never had a container class be the bottle neck so I've never ended up optimising it.

But.... I still love to read about people's optimising efforts.  It satisfies the inner geek :o)
Offline ReBirth
« Reply #91 - Posted 2012-02-11 06:14:54 »

The main idea behind this problem is how big your object's size.

Offline Roquen
« Reply #92 - Posted 2012-02-11 07:08:12 »

Quote
Maybe on disk but in memory...

Actually I think of main memory as being a drive.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kaffiene
« Reply #93 - Posted 2012-02-12 20:05:47 »

Quote
Maybe on disk but in memory...

Actually I think of main memory as being a drive.

You shouldn't.  Disk access is many orders of magnitude slower than memory.  That's why Cas's comment about Lists not being ideal for n-memory storage needs even though it's perfect for indexing into databases is well made.
Offline Roquen
« Reply #94 - Posted 2012-02-12 20:11:05 »

Disk drive are like semaphores...not concurrency kind...the communication by flags, where the reader is blind.
Pages: 1 2 3 [4]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (45 views)
2014-10-17 03:59:02

Norakomi (36 views)
2014-10-16 15:22:06

Norakomi (27 views)
2014-10-16 15:20:20

lcass (31 views)
2014-10-15 16:18:58

TehJavaDev (61 views)
2014-10-14 00:39:48

TehJavaDev (61 views)
2014-10-14 00:35:47

TehJavaDev (51 views)
2014-10-14 00:32:37

BurntPizza (69 views)
2014-10-11 23:24:42

BurntPizza (39 views)
2014-10-11 23:10:45

BurntPizza (81 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!