Add support for tilesets

User avatar
iisu
Member
 
Posts: 101
Joined: Tue Mar 28, 2017 20:13
Location: Internet
GitHub: iisu
IRC: iisu
In-game: iisu

Add support for tilesets

by iisu » Thu Jun 15, 2017 12:30

Tilesets are commonly used in games when there are many small textures. The basic concept is that instead you should use bigger files each containing a grid of textures called tiles. When you load the tileset, you then split it into the tiles in the program. The purpose for this technique is to optimize loading textures: it takes less time to load a single file and perform some simple operations on it than to load many small files separately. Mod API should provide an easy way to load tilesets and cut them according to given parameters.
Á sér krummi ýfði stél
Einnig brýndi gogginn vel
flaug úr fjalla gjótum
flaug úr fjalla gjótum

"Krúnk krúnk nafnar komið hér
Krúnk krúnk því oss boðin er
Krás á köldum svelli
Krás á köldum svelli"
 

User avatar
texmex
Member
 
Posts: 583
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Add support for tilesets

by texmex » Mon Jun 19, 2017 08:44

I get you argument, but it would probably be a pain for texture pack maintainers.
Taking a break from Minetest.
Mods Commons, Sling, hbSprint, Floodables, item_drop⑂, Telemosaic⑂, Herbs⑂.
Texturepacks Good Morning Craft
 

User avatar
sorcerykid
Member
 
Posts: 396
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
In-game: Nemo

Re: Add support for tilesets

by sorcerykid » Wed Jul 05, 2017 20:27

This is not a bad idea. It's not much different than the way that textures for player models in Minetest are stored.

I imagine the tileset storage method would be of particular benefit for remote hosting of media. I don't know if Minetest supports HTTP keep-alive sessions, but no doubt there is still going to be less overhead transferring a single large image file for each node than hundreds of small image files for every node face.
 

User avatar
iisu
Member
 
Posts: 101
Joined: Tue Mar 28, 2017 20:13
Location: Internet
GitHub: iisu
IRC: iisu
In-game: iisu

Re: Add support for tilesets

by iisu » Wed Jul 05, 2017 20:48

I thought more of one or a couple tilesets for entire mod but your point is also valid. We do this with player skins already afterall.
I wonder if it would noticeably affect the gameplay if merged default mod's textures in a single image file and also gave it a proper compression.

An external utility to convert a tileset to a series of single textures and back for texture pack maintainers who still want to work on single files should be relatively easy to write but working on a single tileset file also has benefits for a designer: you could see how all textures look together and it's generally easier to maintain a consistent style when you have everything on one sheet so you don't need to jump between files to check if you're not screwing some important details. Also it's easier to chose one color palette and stick to it which will make your texture pack look more consistent and professional.
Á sér krummi ýfði stél
Einnig brýndi gogginn vel
flaug úr fjalla gjótum
flaug úr fjalla gjótum

"Krúnk krúnk nafnar komið hér
Krúnk krúnk því oss boðin er
Krás á köldum svelli
Krás á köldum svelli"
 

User avatar
sorcerykid
Member
 
Posts: 396
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
In-game: Nemo

Re: Add support for tilesets

by sorcerykid » Thu Jul 06, 2017 20:07

I agree with your points. According to this video by octacian, tilesets (or more aptly sprite sheets) were added in 0.4.16. I haven't had a chance to scan through the recent changelogs, but it's undoubtedly mentioned somewhere.

https://www.youtube.com/watch?v=sieIpZoR_Mg
 

User avatar
kaadmy
Member
 
Posts: 691
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

Re: Add support for tilesets

by kaadmy » Thu Jul 06, 2017 20:18

Yeah, you can use tilesheets via something like ^[sheet;x,y I think.
Never paint white stripes on roads near Zebra crossings.

Pixture
 

User avatar
sorcerykid
Member
 
Posts: 396
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
In-game: Nemo

Re: Add support for tilesets

by sorcerykid » Mon Jul 17, 2017 17:15

I'm curious if this is indeed a new feature? Or is it supported by client versions prior to 0.4.16?
 

User avatar
webdesigner97
Member
 
Posts: 1317
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: Add support for tilesets

by webdesigner97 » Wed Jul 19, 2017 06:46

I think we used to have something like this in earlier versions (correct me if I'm wrong). It was called Texture Atlas and caused a lot of problems...
 


Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 3 guests