Mirage Source
http://miragesource.net/forums/

Need an Opinion on Tiles
http://miragesource.net/forums/viewtopic.php?f=193&t=5908
Page 1 of 1

Author:  Whit119o [ Tue Jun 30, 2009 11:41 pm ]
Post subject:  Need an Opinion on Tiles

It always bothered me that tilesets had to be set up certain ways to make things work right, ect. A few years back I had an idea but never could decide if it would help or hurt the fps of the game.

Well, the idea is this, much like items, spells, and sprites are handled I want to make tiles each have their own file so that for simple maps that use 2-5 tiles, very little info has to be stored. Basically, how the system chooses the x/y of the tile out of the tileset, just change that system to load tile#.bmp. I have an idea on how to work it. Just was wondering if it was worth it or if it would cause more load.

The other idea is to use the same basic system already in place but change the tileset attribute from maprec to each layer of tile. Then just making one set for each thing, signs on one, grass on another.

Or would it be best to keep it the same?

The last version of the source I have really worked with was 3.03 so I do not know what would be the best option here and figured yo all would know better than me.

Author:  Pbcrazy [ Tue Jun 30, 2009 11:56 pm ]
Post subject:  Re: Need an Opinion on Tiles

I believe this is already integrated :D

Author:  Whit119o [ Wed Jul 01, 2009 12:07 am ]
Post subject:  Re: Need an Opinion on Tiles

It's been awhile. It's my first time getting on VB in months. From what i see, it is still in a tileset format. Is there something else to change to get it tow work like i mentioned?

Author:  Pbcrazy [ Wed Jul 01, 2009 12:18 am ]
Post subject:  Re: Need an Opinion on Tiles

Ah, i see. Deeply sorry.

Although, i suppose. Just swap out the tile code with a copy of the items or such code. I don't work with MS4 so idk. Just guessing.

You'd have to just change the tilesetoffset of the tiles to just a number of the file. Load it and then render. However, having to render so many instances of the file. Loading the single file rendering, deleting, and moving on to the next one, seems highly in-efficient.

Maybe someone with more skill than me will post thier advice :D

Author:  Whit119o [ Wed Jul 01, 2009 12:25 am ]
Post subject:  Re: Need an Opinion on Tiles

That is what i was thinking too, it may be inefficient. But i was hoping for a way that it will just load one instance of the file and just keep rendering it repeatedly, much like how it works with the tilesets now.

Author:  Zephius [ Wed Jul 01, 2009 3:04 am ]
Post subject:  Re: Need an Opinion on Tiles

I would think the only downside would be extra memory taken up. Many games use this type of tiling. Tibia is a prime example. They have all the tiles packaged into one file which load into memory individually. You could do it dynamically if memory becomes an issue.

Author:  Toast [ Wed Jul 01, 2009 5:06 pm ]
Post subject:  Re: Need an Opinion on Tiles

Yes, it would take up alot of memory. My idea would be in the map file it specifies what tiles it uses, and when the map loads it loads the seperate tile files with it. This would save from loading every single tile into memory on DirectX initiliazation.

Author:  Joost [ Wed Jul 01, 2009 6:13 pm ]
Post subject:  Re: Need an Opinion on Tiles

But in return for that you'd keep having to load and unload small .bmp images.

Author:  Matt [ Wed Jul 01, 2009 6:42 pm ]
Post subject:  Re: Need an Opinion on Tiles

It wouldn't use much memory to just preload them all on start. I'd just go that route. Most games use massive amounts of memory for maps and stuff. MS, loading all tilesets at once, barely uses any memory. I'd worry about this once the game was taking 100+MB of memory to load and what not.

Author:  Jacob [ Wed Jul 01, 2009 6:56 pm ]
Post subject:  Re: Need an Opinion on Tiles

Depends on what you ultimately want. Lower memory usage or quicker loading of maps.

If you want a lower memory footprint, then save which tiles are used in the MapRec and load those as needed.

If you want your maps to load faster, you would keep all tiles in memory.

In the current MS, it's a pretty happy medium. You use tilesheets, usually things of the same look are kept on each tilesheet. Each map can use 1 tilesheet. This has much lower memory usage and you only have to load 1 tilesheet per map. Matt has made it so you can load multiple tilesheets per map, so it's still less memory than every tile loaded.

Author:  ExoShox [ Wed Jul 01, 2009 10:35 pm ]
Post subject:  Re: Need an Opinion on Tiles

Couldn't you also just make the map layers in paint and then the client first initializes the layers/sprites/items, and then Blts the ground, mask, anim, items/players/npcs/spells and then the fringe? And then you could also package the graphics so they use 1 file per map, but it holds all the layers. And of course the map editor would require tiles, but then only the developers really need it, and you dont edit the maps while the server is up. (and the client automatically downloads the new stuff once they connect to the server after it is turned on again.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/