Ahahaha. I really wish I didn't need to do math, especially in the summer (after studying a whole book), but it seems to hit me back again. So now, I think after this post, I'm going to take a break.
Probably not.
Anyway, here's a math problem. a total area size of a room is 800 pixels by 600 pixels (width by length), and the tiles inside here must be exact, and not so big so they don't take up much space, but not so small that you can't detail them. What could be an appropriate size?
Using my trusty MS calculator, I find out the complete area of the rectangle in pixels (which leads to 480,000 pixels). Since I need to fit squares into a rectangle, I use a trial and error test between various square numbers ( 9, 16, 25, those kinds of numbers), and divide. The amount I get is the amount of blocks that can fit inside. There is a problem, though, as these are not square roots and can mislead a person (example, 480,00/16 = 30,000 blocks, but the square root of 16 is 4. 4 pixels by 4 pixels is way too small), and the second part is the amount of blocks I'll be using (they have to be a reasonable range, I am not going to create an area that consists of a little less of 30,000 blocks, when the character is at least 5 times the size, and mind you, the characters have a little more [in estimate] than 30 pixels). The solution? Sprite out the square number. to see how big it is. The answer I have arrived at is 100 pixels, 10 by 10. It's reasonable, not so small, and takes up only 4,800 blocks. The result is the block prototype.
There is a part 2 to the problem, though (which is mostly a flaw in my own part). The rooms have a size of 800 x 600, but I had fooled myself into believing that was going to be the screen size. I don't want to show the whole room, it'll ruin all it's surprises. Instead, the size of the scroll camera will replace the window size, but the whole question is, what should be the size of the window? Now, in this case, the camera should not scroll of it's edges, but then, should the camera be a square number, or should it be a little bigger in a horizontal view? There is an idea to this, though. Say the scroll size of the game is a square number. It doesn't have to remain that way, it could scroll farther depending on the direction. What worries me, though, is the size of the screen, for unless there was a possibility to zoom it in a ratio in such a way that it matches the 800:600 ratio, the size will be very small. I have decided on a size, though, but I'm still having trouble for it. I'll solve it eventually, as for now, let's move on to a different subject. For now, indulge in some self-blatant image-hosting for the game.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment