I'd like to make a pokemon fighting simulator, where you have an image and every pixel is one pokemon.
Every pokemon has it's speed, x and y positions on the image and a couple of other members.
I don't know how to store them, but those are my needs:
- be able to iterate through them sorted by their speed
- duplicate, erase and modify objects (modify every member but speed) or modify all members, speed included
(whichever's fastest, number of objects what change during the simulation)
- access them by their coordinates
- maximum performance, I don't really care about memory usage. If it's nesesery I can use multiple containers
I'll need to create about 2 million objects, each has about 40 bytes.
What do you think would be the best way to store the objects?