View Full Version : tile size
Reanimated
07-05-2004, 02:11 PM
Hi
Im working on the background of my game, and Im using tiles to do it. Im using a program called Mappy, which automatically cuts the 1024x768 image into smaller tiles. Is it okay if the tiles are 128x128 or are these too big? If it's any smaller, then its really difficult fitting it altogether (because its going to make one big picture, not like a "grid map"). Also, if I imported the image 1024x768 and had 128x128 tiles, would it matter if the user's resolution is lower? (ie 640x480 or 800x600).
thanks in advance
Anthony Flack
07-05-2004, 06:18 PM
Too big? Too big for what? Not too big for any hardware that I'm aware of, if that's what you mean. If you're talking about 3d textures, then 256x256 is the smallest size that works on absolutely everything. [edit] er, I mean the biggest...
If you're talking about the usefulness of 128x128 tiles as opposed to something smaller, then that's entirely dependent on how you use them. From what I gather from your post, it should be fine.
If you are using them in 3d (I'm assuming so, if you're letting the user specify resolution?) then it doesn't matter if the user runs a lower res, it's just that the extra detail will be wasted; but no big deal.
Reanimated
07-06-2004, 07:36 AM
Sorry, should have made it more clearer. This is for a 2D game, not a 3d game :D Do your points still stand?
Anthony Flack
07-06-2004, 04:58 PM
Um, can't you just keep the image as 1024x768 in that case?
How are you handling different resolutions?
Reanimated
07-07-2004, 07:47 AM
Problem with keeping the 1024x768 size is that the background scrolls, so it would take a lot of memory. With tiles, it wouldnt take as much since it only shows parts of it. As for the resolution, Im letting the user decide then changing the resolution. Im not too sure whether im going to resize the images in code, or create different resolutions in PSP. (Latter having the problem of increasing download size).
Reanimated
07-07-2004, 01:33 PM
I found a program called TileStudio. Good thing about this is that it makes the tiles and places them in order for you. this means I can have 32 x 32 tiles because it will be joined together automatically. However, I dont know how to import this into blitz. Does anyone have any idea on how to import the maps into blitz? Ive created the "map_include.bb" but I dont know how to use it. :(
Mark Fassett
07-07-2004, 02:58 PM
This is a thread that probably ought to be taken to the blitz forums. You're likely to get much more help there.
Nemesis
07-15-2004, 12:46 AM
I've dabbled with platformers in the past and my experience is to have the tile size more or less match the sizes of your game characters e.g. 32x32.
I think that the smaller the tiles, the greater the opportunity to provide variety in your levels. Even if you have large non-repeating features (e.g. trees), it may be worth while building them up with the smaller tiles, even if they are not repeated. With well-thought design, you might even manage to re-use tiles to vary those features.
Most 8 and 16 bit platformers tended to use 16x16 pixel tiles. Turrican, in particular, used 8x8 pixel sprites (on 320x200 pixel resolutons)! Givne today's typical resolutins, that would equate to 16x16 pixels so in your particular case you would want to go for 32x32 or 64x64.
One other factor to take into account that the smaller the tiles, the higher the rendering overhead.. although given present hardware, this is hardly an issue!
Well.. the bottom line is that it ultimately depends on your requirements.
Reanimated
07-15-2004, 02:31 AM
Ive decided to go for the 32x32 tiles. However, did you mean that the smaller the tiles, the greater the processing power? I want the game to work on low end machines, so does that mean I should have larger tiles, or did I understand you wrong :confused:
Nemesis
07-15-2004, 01:53 PM
In theory, the smaller the tiles, the more tiles you need to render on screen and while smaller tiles should render faster individually, the overhead of calling the rendering (blitting) functions is a constant overhead that multiplies with every tile rendered.
Anyway.. this sort of consideration really mattered back when 30-60Mhz was the typical processor speed so you shouldn't bother at all! Actually, I'm convnced you can have several tile layers (say, for parallax scrolling) and your game would still be smooth on the low end machines.
My suggestion would be to go for the tile size that matches the sprite's size as closely as possible. The reason is that it makes it simpler for you to build collision detection with the tiles. Having smaller tiles makes it harder for you to do sprite-map collision detection... for instance, hitting a wall might entail checking all the tiles adjacent to the sprite.
Speaking of collision detection, you might also consider having an invisible "function" map (terms I invented over a decade ago!). This would basically contain the floors, walls, ceilings, ramps, animations and enemy spawn points corresponding to the visible tiled map.
I could go on for ages on this.. since a long time ago I wrote a Sonic The Hedgehog clone with loops etc. and had to develop a whole methodology to building platformers. (sadly, it stopped at .. surprise.. tech demo stage).
Reanimated
07-15-2004, 01:56 PM
Thanks for the tip. Ive been using placeholders so Ill have to see what tile size I should use. (The placeholders arent the same dimensions as what the final ones will be). Ive managed to have different layer collisions (built into mappy :D ). If I was to change the screen resolution from 640 x 480, would I have to adjust the tiles? If so, wouldnt that mean that I would have to have three different maps (640x480, 800x600 and 1024x768)?
thanks
Nemesis
07-15-2004, 02:39 PM
One way to go about it could be to work for 800x600 and scale up or down for the other resolutions.