I have been working on a program for a little while now. Now that I got my GUI stuff figured out (had no idea what I was doing when I started) I am working on getting the rest of my game together. Right now I am working on the collision detection subroutines, and have basically come down to two ways to do it, and am wondering which would be the better way to go.
The first way I started was with a pixel object, which many put together would create other objects within the game. The variables are an int[] array to keep track of location in window, and a ton of boolean variables such as isSolid, isPlayer, etc.... Then with each image I was going to assign each pixel for what it is supposed to represent in game. This would lead to a pixel precise collision detection, but then again, it also leads to the program passing around huge arrays of pixel[], the most basic of which would be comprised of 2500 pixels.
The other idea was to create a hitbox object, which was simply a set of coordinates which represent the size of the object in game. It would work much the same way but it would only have to pass around an array of 4 int variables at the cost of being less precise.
I would hate to put a lot of work in the pixel based system only to find out later that it bogs down the program too much and have to switch to hitbox anyway. I would like to be more precise if I could.