I implemented one touch point for now, just to test character movement. I made it so that the touch point would be tested relative to the center of the camera, so if its above the center it will go upwards, underneath the center would go downwards, to the right would go right, and to the left would go left.
So chunks are pretty simple, a chunk is simply a list of coordination for blocks, there are 10 rows of blocks in each chunk, and 50 blocks in each row, ending at 500 blocks total. I might be changing this to a different amount of dimensions later after testing it with more objects running.
Removing & Adding Blocks
To keep it simple at the beginning, I made a big loop that went through all of the blocks in a certain chunk when you touch the screen, this made it really slow because that every time you touch the screen, the loop would check 500 objects and then just erase the block when it found it. So to save time and memory, I used my math skills! I made a small function that helps me find the exact place the person touched, then calculating that into a position of the block inside the chunks, and then simply erasing it from the list.
HUD (or heads up display) is really, really, REALLY simple for now, all it is, is just a bar on top with numbers 1-10 which will soon will act like a tool bar to change weapons or items the player is using quickly. For now nothing in the toolbar is functional and probably won’t be for some time. It is using a different camera than the rest of the game, causing it to become “stuck” on the screen, and not move when the character is moving or world is changing.