![]() |
Tileset file format - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Tileset file format (/showthread.php?tid=405) |
- Obsidian - 06-11-2006 that's a really good way of writting it, but how are you going to do the "animations" with the number of frames, i assume you're either going to go up/down or left/right? is that going to be a problem?... although it does sound awesome to have more than 1 "animation" per tile. and what does this mean for valkoria? - Obsidian - 06-11-2006 so are you separating your tiles out or continuing to use a large set where they're all included in one? and is this something you're doing for valkoria, or as a completely "rebuilt" valkoria or just for fun? - Obsidian - 06-11-2006 so are you stopping work completely on the current valkoria then? - Dr. Spoon - 07-11-2006 I will be looking into it soon .. I may be able to offer some ideas for this.. edit: hmm looks pretty decent so far question about using multiple sheets for graphics how big would each sheet be? you would then have to identify which sheet each tile came from as far as the animations I would say if the mapper wants animation then they click on the option then you allow them to select which ever tiles they want to add to the animation sequence (keeping the tile numbers as a part of the maps data) I guess you could limit the animations to the same sheet of the specific tile they are animating just a couple of ideas/questions - Dr. Spoon - 07-11-2006 okay just curious.. - Dragoons Master - 07-11-2006 I read it yesterday but I didn't have time to answer, now I do. Well, I don't have much to say about it. It's prety good, I don't think you'll need much more things... Just keep the basics. If it works it's perfect. - Obsidian - 09-11-2006 How about instead of Tile Width and Tile Height, you just make a "size", as byte... then you just have like Size 1 = 32x32 Size 2 = 32x64 Size 3 = 64x64 etc. it might get a bit confusing later... but it would save a byte per tile, which is always nice :wink: - William - 10-11-2006 The way I do it is as follows: 1. Tileset bitmaps can be named in any way you like. 2. They can be any size that works for most graphic cards, I usually stick with 256x(whatever). When the engine loads the map, the map have a lookup table in the header of tilesets used in the map and an assigned number from 1 - 127. The engine loads the tilesets required, parses out the tiles needed (based on the map), and then unloads the tileset from memory (keeping the tiles). This use the least amount of video ram possible. Each "tile" structure contains a pointer to the sprite structure. So when rendering a map, just pass the pointer to directx, and it'll render ![]() I just encrypt and compress my tilesets. I can decompress and unencrypt them in memory and pass off a pointer to that memory address to load create the surface. Could also just keep it in memory and parse out the tiles into their own little surfaces, that way, you will only have the tiles you absolutely need in memory ... If you have tons of tilesets, it is usually always a bad idea to load them into memory (especially if you have 50+ MB of graphics). Only load the ones you need. ... ala Graal, Astonia, Ashen Empires, Shadowbane ![]() ![]() Another option is to load all graphics in system memory, then push over surfaces to video memory when you need them. Like during the loading of a map. Then you can cycle out tiles you dont need when a new map is loaded. Btw: non squared tiles are supported on newest NVidia, and ATI drivers for all their cards. So you can do 3D sprites of 32x64 or whatever. But we're only talking about the basics right now, eh? |