Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Adding more Tiles to use for Tile sets?  (Read 1581 times)

ArPharazon

  • Bay Watcher
    • View Profile
Re: Adding more Tiles to use for Tile sets?
« Reply #15 on: January 26, 2012, 01:30:53 am »

I would just like to add that years ago, there probably was a theoretical (negligible or otherwise) FPS benefit to not using a graphical tileset. However, since the renderer has undergone quite a few improvements, I'm not sure if the code for displaying ASCII would even be any different than a graphical tileset.
Logged

Ghills

  • Bay Watcher
    • View Profile
Re: Adding more Tiles to use for Tile sets?
« Reply #16 on: January 30, 2012, 12:40:11 pm »

I've seen reports of slowdowns with graphic sets, but I can't remember how recent they were.  It was only 1-2 average FPS in the reports I saw, so not a big deal.

Plus, being able to tell what's going on without pausing all the time makes the game feel like it's going faster.
Logged
I AM POINTY DEATH INCARNATE
Ye know, being an usurper overseer gone mad with power isn't too bad. It's honestly not that different from being a normal overseer.
To summarize:
They do an epic face. If that fails, they beat said object to death with their beard.

thisisjimmy

  • Bay Watcher
    • View Profile
Re: Adding more Tiles to use for Tile sets?
« Reply #17 on: January 30, 2012, 03:02:07 pm »

I'm not sure if the code for displaying ASCII would even be any different than a graphical tileset.

You are correct.  The ASCII now actually is a graphical tileset where the tiles are pictures of the characters.
Logged

Courtesy Arloban

  • Bay Watcher
  • This isn't a fortress... ...It's also not a map.
    • View Profile
Re: Adding more Tiles to use for Tile sets?
« Reply #18 on: January 30, 2012, 03:24:56 pm »

256 is enough for me, but i'd like to shuffle them around a bit. More settings like SkyTile and Pillar for every tile in the game.
Logged
Maybe that the dwarves never died and everyone is just shunning them.
"Wait, what are you doing?  I don't want to go in there!  No, I'm still alive, you can't do this to me!  Is Anybody listening?  Hello... Can someone let me out?  Help me!  Is anyone there?  I'm running out of air!"

Kipi

  • Bay Watcher
    • View Profile
Re: Adding more Tiles to use for Tile sets?
« Reply #19 on: January 30, 2012, 04:43:09 pm »

I'm not sure if the code for displaying ASCII would even be any different than a graphical tileset.

You are correct.  The ASCII now actually is a graphical tileset where the tiles are pictures of the characters.

This is true.

As far as I understand it, everything rendered in the game, even the text, is from graphic files. This can be noticed if you use one of those more advanced tilesets where special characters (like gender symbols, brackets and so on) are replaced by pictures like bags, armors and so on. These changes also affect to text as well. This has caused some of the tilesets to remove the accented characters from language files to make the text a bit more readable.

Now, what I know about programming due personal experience, if you have hundreds of pictures and for each tile the image is loaded, tile grabbed from the image and then the data of image disposed, this process repeated hundreds of times due the amount of tiles present in game screen each frame, then there is possibility of slowing down. But I think this is not how it works in DF, I believe Toady loads all the images to memory at the beginning of program and only calls those images from memory when needed, removing the need for fetching the image from file each and every time. Of course this does cause some higher memory usage, depending on the amount and size of pictures, but in case of DF not that much it would be noticeable.
Logged
Room Values - !!SCIENCE!!

Quote from: zanchito
You know, they could teach maths like this at school. "There are 105 dwarves in a settlement. A goblin invasion appears and 67 die. Then a migrant wave..."

Neonivek

  • Bay Watcher
    • View Profile
Re: Adding more Tiles to use for Tile sets?
« Reply #20 on: January 30, 2012, 07:11:38 pm »

I'd like to add a gimic too

Randomised Tiles (occurs if you add more then one tile for a single creature or item). It will pick from the list.
Logged

thisisjimmy

  • Bay Watcher
    • View Profile
Re: Adding more Tiles to use for Tile sets?
« Reply #21 on: January 30, 2012, 07:54:22 pm »

I believe Toady loads all the images to memory at the beginning of program and only calls those images from memory when needed, removing the need for fetching the image from file each and every time.

Yup, this is how pretty much all games work.  They load their content (images, models, sounds, etc.) at the start of the game, or perhaps at the start of each level.  But certainly not every frame.  The graphics in DF are less than 100 KB, which is negligible.

There is an issue where having many hundreds of images all in separate files can cause slow downs, but this has to do with the interaction between the graphics card and the CPU. Basically, communication between the CPU and the GPU is relatively slow, but once you tell the GPU what you want it to do, it's very fast.  When you have all the images in separate textures, you have to tell the GPU to draw the images one at a time, and you end up wasting most of your time on communication overhead.

The solution is simple.  You put all the images together in one file.  Then you can give the GPU a big list of all the things it needs to draw from that spritesheet.  This is the main reason why games like DF use spritesheets.  It's more efficient.

The communication overhead is small enough that you can have a couple hundred texture switches per frame without problem, but more than that can have a performance impact. 

So basically, adding more tiles to the tilesets in DF won't slow it down.
Logged
Pages: 1 [2]