Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 6:54 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Need an Opinion on Tiles
PostPosted: Tue Jun 30, 2009 11:41 pm 
Offline
Newbie

Joined: Tue Jun 16, 2009 1:15 am
Posts: 5
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.


Top
 Profile  
 
PostPosted: Tue Jun 30, 2009 11:56 pm 
Offline
Pro
User avatar

Joined: Tue Apr 22, 2008 2:15 am
Posts: 597
I believe this is already integrated :D


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 12:07 am 
Offline
Newbie

Joined: Tue Jun 16, 2009 1:15 am
Posts: 5
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?


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 12:18 am 
Offline
Pro
User avatar

Joined: Tue Apr 22, 2008 2:15 am
Posts: 597
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


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 12:25 am 
Offline
Newbie

Joined: Tue Jun 16, 2009 1:15 am
Posts: 5
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.


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 3:04 am 
Offline
Regular
User avatar

Joined: Wed Jun 13, 2007 3:31 pm
Posts: 30
Location: WI, USA
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.


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 5:06 pm 
Offline
Regular
User avatar

Joined: Sun Jun 01, 2008 8:39 pm
Posts: 91
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.


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 6:13 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
But in return for that you'd keep having to load and unload small .bmp images.


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 6:42 pm 
Offline
Persistant Poster

Joined: Fri Jun 26, 2009 10:15 pm
Posts: 701
Google Talk: FAProductions
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.


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 6:56 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
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.


Top
 Profile  
 
PostPosted: Wed Jul 01, 2009 10:35 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Dec 14, 2008 4:28 am
Posts: 106
Location: Roanoke, VA, US
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.

_________________
:d


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group