Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java ArrayList vs Libgdx Array

I want to know that whether or not using Java specific code breaks cross platform utility. For example, does it matter I use Java ArrayList or Libgdx Array?

like image 264
Hakan Genç Avatar asked Jan 20 '16 08:01

Hakan Genç


1 Answers

Using general java collections such as the ArrayList will not break your code, and will work properly from a functional point of view. However, usually when developing games, you want to consider the performance as well, since wasteful programming will affect your game experience. libgdx developed their own collections exactly for that reason: to have collections that are better, performance wise. In general it is better to use libgdx collections than the standard java ones. Take a look at the docs for more info.

like image 194
asherbret Avatar answered Sep 20 '22 12:09

asherbret