Cataclysm: Dark Days Ahead - Official Forums

Cataclysm: Dark Days Ahead => The Lab - Contributions and Mods => Topic started by: HRose on October 27, 2013, 05:19:28 PM

Title: ASCII/Retro tilesets
Post by: HRose on October 27, 2013, 05:19:28 PM
Last update:
All code is now merged, so both ASCII png (using a font png (http://www.cesspit.net/misc/10x10.png)) and ASCII fallback (showing ASCII whenever a graphic tile isn't defined) are in the last experimental.

This is a small package that includes the required .dlls (otherwise you'll get crashes) four ASCII sets (9x9 used by default, a 8x8, a 10x10 and a 15x15), and my last tweak of RetroDays tileset with built-in ASCII fallback. Plus my color definitions.

By default the game will run in a 1120x736 window with standard Terminus font for UI and a 9x9 ASCII set for map graphic. To switch to graphic tile just use the game option.

To switch UI or map font you have to edit /data/fontdata.json
To change default colors /data/raw/colors.json

http://www.cesspit.net/misc/asciitile.zip

The file should be unzipped in the main Cataclysm directory after you unpack the latest experimental: http://ci.narc.ro/view/Cataclysm-DDA/job/Cataclysm-Matrix/Graphics=Tiles,Platform=Windows/lastSuccessfulBuild/

(http://www.cesspit.net/misc/catatileless.gif)

(http://www.cesspit.net/misc/catasci.gif)





I was posting updates on the announcement thread since I'm relying on the most recent patches and not the official releases, to test the new features of tile-mode. We still need a couple more things before the tile mode is actually well playable but I'm posting my experimental tileset here so that people who are interested can see it more easily.

It was originally based on just a 10x10 ASCII so that the map would use a square font, while you could use whatever Truetype for the normal text. Then I started editing things little by little, and more recently I've replaced some basic ASCII with some pretty tiles.

I'm now using a publicly available tileset and adapting/tweaking it:
http://csdb.dk/forums/?roomid=13&topicid=97045&showallposts=1&utm_source=buffer&utm_campaign=Buffer&utm_content=buffer7229f&utm_medium=twitter

As long I was just fiddling with things on my own everything's fine, but I guess if we start using this more officially we should probably tell him and ask permission.

Anyway, whenever I update my tileset it pops up here, but consider this always need the most recent experimental/SDL build to work, and right now it replaces Deon tileset (since the files have those names):
http://www.cesspit.net/misc/10x10.zip
http://www.cesspit.net/misc/15x15.zip (bigger but aliased)

Theorycraft: standard tiles won't work well with Cataclysm because it's a cell-based game. You want to display a lot of screen, so tiles need to be small enough. At the same time if the tiles are small then you just can't see them properly. Same issues of Dwarf Fortress. So ASCII mode is always better because letters are always easier to read than tiny colored pixels. Moreover: with tiles and "standard" graphic you get all sort of weirdness, like vehicles looking impossibly huge. But if you instead have icons instead of detailed sprites then everything looks nicer, because it's a symbolic representation. In this case I mixed some basic tiles with ASCII trying to find a compromise between pretty and readable.

Latest stuff I added: redone the fences, doors, added variations between zombies types.

This is a screenshot from my recent version. Having a black background makes things much better to see compared to other tilesets:

(http://www.cesspit.net/misc/catatile10c.gif)

Other experiments I tried was a 16x16 version:

(http://www.cesspit.net/misc/catatiny16.gif)

And my standard ASCII: http://www.cesspit.net/misc/catatilelast2.gif

But for now I'll stick with the version of the first image.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on October 27, 2013, 05:37:09 PM
Gorgeous. This might be the one I end up using personally.
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on October 27, 2013, 05:42:54 PM
*throws up rainbows*

I like the 16x16, and I hope that you know many people will want this tileset.
Title: Re: ASCII/Retro tileset
Post by: Luissen on October 27, 2013, 07:23:42 PM
I agree. this takes the reason why I didn't use tiles until now, and makes it appealing. I think I would keep mobs as letters though... as a personal choice.
Title: Re: ASCII/Retro tileset
Post by: Zireael on October 27, 2013, 07:56:09 PM
*throws up rainbows*

I like the 16x16, and I hope that you know many people will want this tileset.

Allow me to join you in throwing rainbows up.
Title: Re: ASCII/Retro tileset
Post by: HRose on October 27, 2013, 08:32:10 PM
The 16x16 has its own issues since stuff is way too crammed and when there's stuff together it gets ugly.

The ideal would be 19x19, which uses the 16x16 and adds some space, but I think 19x19 starts to get too big, unless you have a big display.

But I'd say 10x10 and 19x19 can be two decent choices.
Title: Re: ASCII/Retro tileset
Post by: HRose on October 27, 2013, 09:22:28 PM
latest tweaks to 10x10 look like this:
(changed trees, added player's sprite, tweaked some colors)

(http://www.cesspit.net/misc/catatile10d.gif)
Title: Re: ASCII/Retro tileset
Post by: Natures Witness on October 28, 2013, 12:26:36 AM
This may just get me to switch to SDL, looks amazing.  And this works with the latest experimental?
Title: Re: ASCII/Retro tileset
Post by: moist_zombie on October 28, 2013, 04:02:26 AM
Just read the owners forum post you linked there, and he seems very reasonable and, I hope, would love to see his work splashed with zombie guts :D Glad to finally see an official post for this sweet action, as well! I downloaded your older version and did some changing to it, but before I was even 20% through I saw the newer version and was blown smooth away :| Congrats and awesomeness to you and Trihook also :) Maybe he'd like to come here and massacre some zombs with us :D
Title: Re: ASCII/Retro tileset
Post by: infectedmochi on October 28, 2013, 04:30:59 AM
Looks awesome! We should ask the owner for permission and incorporate this into CDDA right away.

Maybe this is not the right place to ask, but does the game support changing the monster character (Zs,) in the right panel into the relevant title? It'll look more consistent IMO.
Title: Re: ASCII/Retro tileset
Post by: HRose on October 28, 2013, 05:28:46 AM
Brightened everything a bit. It's a fiddly process. I'm not sure this one is better since I guess it depends a lot on how a monitor is set. This seems a good compromise to me.

(http://www.cesspit.net/misc/catatile10e.gif)

It's still far from done. Plenty of the objects aren't there, or only there in a broken rescaled way. I usually just update what comes us on screen as I go around and covered most of the common stuff. But far from done.

Locally I have a bunch of versions. 8x8, 10x10, 15x15, 16x16, 18x18, 20x20. But some of these are only rescaled and don't look as nice (I'll eventually try a 9x9 rescaled to 15x15 since it could be better than this one). See for example this 15x15:

(http://www.cesspit.net/misc/cata15.gif)

If you compare this with the native 16x16 above the difference is evident. If for some reason you like this 15x15 here, though, then it's extremely easy since it's just an automatic rescale of my 10x10. So it can always be done on the fly without any tweak (but things are blurrier).
Title: Re: ASCII/Retro tileset
Post by: HRose on October 28, 2013, 06:55:13 AM
and redone some of the objects in start area (redone doors in general too). Btw, it's a girl sprite there :) (as opposed to the guy sprite above)

(http://www.cesspit.net/misc/catastart10.gif)

Scaled (this is 20x20, not the 16x16 above):

(http://www.cesspit.net/misc/catastart102.gif)
Title: Re: ASCII/Retro tileset
Post by: tikilla on October 28, 2013, 08:29:46 AM
This tileset makes me horny!
Well done man!
Title: Re: ASCII/Retro tileset
Post by: CIB on October 28, 2013, 09:03:09 AM
Brightened everything a bit. It's a fiddly process. I'm not sure this one is better since I guess it depends a lot on how a monitor is set. This seems a good compromise to me.

Looks like utter crap on my monitor now. The "black" now is a bright shade of gray. Considering you're aiming for ASCII compatability, stick with the original - that one had actual black, same as a terminal window. Brightening the foreground colors is a different matter.

Try adjusting your gamma so that the squares are distinguishable at least counting from the 3rd one, then check your tileset again.
(http://i.imgur.com/QLNcPsZ.png)
Title: Re: ASCII/Retro tileset
Post by: HRose on October 28, 2013, 09:26:59 AM
I both brightened tiles and background color. It softens the image and puts less strain on the eyes. Even in Vim I use a slightly brighter black than full black, but as I said it depends a lot on the monitor.

In any case it takes 2 seconds to revert this, so I'm keeping this and can do an optional version as it was before.
Title: Re: ASCII/Retro tileset
Post by: HRose on October 28, 2013, 11:34:18 AM
Would an 8 be a decent compromise? It's a matter of preference, I actually like lighter blacks as backgrounds.

(http://www.cesspit.net/misc/cata108.gif)
Title: Re: ASCII/Retro tileset
Post by: ramesesniblet on October 28, 2013, 11:52:47 AM
This is beautiful and reminds me of old ZX Spectrum graphics.

(http://i.imgur.com/qlOtV2R.gif)
Title: Re: ASCII/Retro tileset
Post by: Azmond on October 30, 2013, 03:47:51 AM
How do you install the Title-set correctly? I think i've done it right, but certian things do not look correct.. Cars for instance are not the right symbols and are infact Hash-tags all the way through.

I placed everything in the DeonTitles folder an in what though were the correct places.

Little help? xD;
Title: Re: ASCII/Retro tileset
Post by: HRose on October 30, 2013, 08:29:23 AM
This only works with latest experimental SDL. If you're using the last experimental SDL then you probably didn't copy over the tile_config.json contained in the tileset .zip
Title: Re: ASCII/Retro tileset
Post by: Zireael on October 30, 2013, 08:56:56 AM
Can we have a version with monsters as letters?
Title: Re: ASCII/Retro tileset
Post by: Luissen on October 30, 2013, 12:59:35 PM
Can we have a version with monsters as letters?

I support your choice too.
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on October 30, 2013, 01:00:09 PM
Yeh, I like monsters better as letters.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on October 30, 2013, 01:05:38 PM
How complete is this tileset? Is it ready to be packaged with the next release?
Title: Re: ASCII/Retro tileset
Post by: Roderic on October 30, 2013, 02:35:53 PM
It's gorgeous, love it. I still like the symbolic approach of letters of console roguelikes rather than the micro-sprites but they look very appealing to the retro style.

Call me picky but the combination of dark grey background with the grey dots in the road strains my eyes a little, almost like a moiré effect.

If I remember the grounds in the Spectrum-like graphics tended to include less color dots and leave more black background to let the image breath a little, mostly if the pattern is repeated a lot as in this case. Have you tried to lessen the number of dots or at least, experiment a little to optimize them?

The rest of the tiles, house, items and such are perfect. Kudos.
Title: Re: ASCII/Retro tileset
Post by: Mr_Lolz on October 30, 2013, 10:28:50 PM
Likewise, I love the tiles but dislike the monster and player sprites - if not letters then something more symbolic would work better imo
Title: Re: ASCII/Retro tileset
Post by: HRose on October 31, 2013, 08:08:08 AM
How complete is this tileset? Is it ready to be packaged with the next release?

It's not complete. It's usable but I only converted the most common stuff you see around. I usually just load ASCII and tiles and then convert the stuff I stumble on.

Before I start the busywork of going through all the object files, I'm waiting that tile mode gets the needed fixes. Like the (V)iew menu and some other things that are displayed differently between ASCII and tiles (like smoke). With things changing every day it's not that convenient to complete the tileset only to have to change everything again. But before things stabilize programmers need to do the programming, and now I read that some fixes won't likely be ready for next version.

IT'S KIND OF A BIG DEAL.

What is that people don't like about the sprites? Because they are too tiny? What tells them apart is mostly just the color, so I don't see using sprites all that different from using letters. Zombies all use a "Z", so you use color to tell them apart. In my tileset you STILL use the color, since the sprite may be too small. But there isn't a loss.

If they are too tiny see this, which is a good compromise for me:

(http://www.cesspit.net/misc/cata15b.gif)

If it's instead just a preference thing I could make optional tiles with just letters. I also prefer clarity, but in this case there's really no difference.
Title: Re: ASCII/Retro tileset
Post by: Slax on October 31, 2013, 09:17:00 AM
(http://www.cesspit.net/misc/cata15b.gif)
Best I've seen. I want it. I want it to be official!
Title: Re: ASCII/Retro tileset
Post by: Seth on October 31, 2013, 09:21:07 AM
Yes, can it be official?  It's breathtaking.
Title: Re: ASCII/Retro tileset
Post by: HRose on October 31, 2013, 12:06:26 PM
And we've got View menu:

(http://www.cesspit.net/misc/cataview10.gif)
Title: Re: ASCII/Retro tileset
Post by: HRose on October 31, 2013, 12:58:20 PM
Latest versions supporting view menu and other fixes:

http://www.cesspit.net/misc/10x10.zip
http://www.cesspit.net/misc/15x15.zip
http://www.cesspit.net/misc/20x20.zip
Title: Re: ASCII/Retro tileset
Post by: Mamalque on October 31, 2013, 05:19:20 PM
This is great. And I for one quite like the zombie sprites. The girl sprite is great too, distinct, it's amazing how much you (or the artist) managed to convey with so little. I can't praise you enough, this will most likely be the one I eventually use.

I will echo the criticism regarding the color change, however. I find the darker colors of the first screenshot, not only the black, easier on the eyes. Though, as you say, it depends a lot on how one's monitor is set, and I understand I could just personally change them later on for my own use.
Title: Re: ASCII/Retro tileset
Post by: HRose on October 31, 2013, 06:18:40 PM
Made walls a single line. Not sure if I like this better, but it looks cleaner, especially in town.

(http://www.cesspit.net/misc/cata10wall.gif)
Title: Re: ASCII/Retro tileset
Post by: Mamalque on October 31, 2013, 06:56:17 PM
I'm... not sure either. But I feel the doors match the double lines better.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 01, 2013, 10:19:33 AM
walls:

(http://www.cesspit.net/misc/cata10walls2.gif)
Title: Re: ASCII/Retro tileset
Post by: infectedmochi on November 01, 2013, 10:40:16 AM
I like this new wall more, good job!
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 01, 2013, 12:33:12 PM
Yes. Thick walls better than single or double.
Title: Re: ASCII/Retro tileset
Post by: vultures on November 01, 2013, 01:27:24 PM
(http://cdn.imghack.se/images/22edf349fcf52c8ceeb610871cea0fda.png) (http://www.imghack.se/128770)

Here, you can use these if you want to change the car layouts...
I only need to make 'em larger so they fit into the 8x14, or 8x15 pattern for the screen font.
Title: Re: ASCII/Retro tileset
Post by: Tsu on November 01, 2013, 04:58:14 PM
This looks quite cool..  My only concern would be that it might feel a little overwhelming, that the low pixel density might be interpreted as heavy detail by your eyes. But it's a gorgeous style that I don't think I've ever seen an equivalent of.
Title: Re: ASCII/Retro tileset
Post by: trusty_patches on November 01, 2013, 05:09:06 PM
Oh. My. God.
It looks just like a game running on the Spectrum.
THIS MUST BE IN THE MAIN PACKAGE
Title: Re: ASCII/Retro tileset
Post by: dwarfkoala on November 01, 2013, 06:14:05 PM
I find the darker background better as well, but I also really like the thick single line walls.

I really like this tileset. Once it's done it's gotta be in the main package.
Title: Re: ASCII/Retro tileset
Post by: Cinghiale on November 01, 2013, 07:03:13 PM
For some reason this tileset bothers my eyes, my brain keeps shifting between the neon dots and the black background. However, maybe other people do not have this problem so don't consider it. It is beautiful looking from an artistic standpoint, if not functional for me :)  I don't think I'll ever stop using ASII, i've been playing with it so long it seems like heresy to quit using it.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 01, 2013, 08:53:25 PM
(http://cdn.imghack.se/images/22edf349fcf52c8ceeb610871cea0fda.png) (http://www.imghack.se/128770)

Here, you can use these if you want to change the car layouts...
I only need to make 'em larger so they fit into the 8x14, or 8x15 pattern for the screen font.

I'm not sure it can work. On one side the vehicles are changing frequently and still not 100% consistent in tile mode. On the other side every vehicle is built its own way and so it's hard to make tiles that look fine when recombined in different ways. Right now even the wheels aren't frequently shown.
Title: Re: ASCII/Retro tileset
Post by: vultures on November 02, 2013, 06:37:12 AM
I know. The game assumes your driving skill only lets you line up your vehicle once the turn is over and does so in 15-degree increments, but doesn't see fit that if you turn your steering wheel - the vehicle keeps on steering in that direction. The ideal thing would be, since movement is based upon direction keys, that if you keep steering you line up your ride with either diagonal, or x/y axis. Otherwise, hitting '.' key would straighten up your direction to the nearest of [0, 90, 180, 270] or [45, 135, 225, 315] respectively. It would certainly mean difficult maneuvering in-between the trees, but it is exactly how your character goes on walking/running on foot.
I've also recognized the other solution being that of what tiles you cover if you shift tiles the current way steering works, and it's far more complicated. It would require much more than a few redraw() funcs.
Title: Re: ASCII/Retro tileset
Post by: dda on November 02, 2013, 02:53:34 PM
So. Im totally new to this. I tried to get this new tileset going by copying the relevant files into gfx/deontileset and then turn the tiles on but I still am only seeing the original deontileset. What am i doing wrong? If someone could take a moment to give me a detailed explanation on setting these gorgeous tiles it would be much appreciated.
Title: Re: ASCII/Retro tileset
Post by: dv on November 02, 2013, 03:36:41 PM
Maybe your file manager/archive manager didn't overwrite the files. You need to overwrite the existing files in gfx/DeonTileset with the files in the zip.

You can check deontiles.png to see if it worked.
Title: Re: ASCII/Retro tileset
Post by: dda on November 02, 2013, 04:07:50 PM
It definitely overwrote. Checked the .png.

EDIT: Does it matter if it is the 10x10, 15x15, or 20x20?

It kinda looks like its using the HODER set even though I changed the # in the gfx.txt

EDIT: NEVERMIND! Got it! Thanks.
Title: Re: ASCII/Retro tileset
Post by: Tivec on November 03, 2013, 04:07:29 PM
I just thought I'd drop by and say how much I enjoy this tileset. It's being featured in my Cataclysm Let's Play series, starting from episode 12 (https://www.youtube.com/watch?v=0HJjl7ZH3vo&list=PL_LXcBF_ySuH20lkwmSKtrpW0UDispVxG&index=12).

On the latest patch, build #529 (win32-sdl) your tileset will not load, however. There's been some changes that cause the json to be invalid, you might want to take a look at that :) Anyhow, truly enjoying the look of it. Keep up the great work!
Title: Re: ASCII/Retro tileset
Post by: HRose on November 03, 2013, 05:50:07 PM
fixed.

http://www.cesspit.net/misc/10x10.zip
http://www.cesspit.net/misc/15x15.zip
http://www.cesspit.net/misc/20x20.zip

If you hit some place where tiles are missing you can send me the saves so I fix it. A complete version would actually require trough way too many entries...
Title: Re: ASCII/Retro tileset
Post by: Mr_Lolz on November 03, 2013, 08:16:14 PM
its really hard to see if items are on shelves/in fridges atm, not enough contrast between shelf icon and items
Title: Re: ASCII/Retro tileset
Post by: HRose on November 03, 2013, 10:00:03 PM
The fridge has a { symbol. If there are objects you see a blue square around it. I don't understand what's hard to see about it.
Title: Re: ASCII/Retro tileset
Post by: STD on November 03, 2013, 10:09:53 PM
That you for updating this to make it work with the latest experimental build. I wasn't sure what I was going to do having to play without it. Probably cry in a darkened corner while little Z's taunt me and call me names. Also, any chance later on to get the icon for NPC's to be replaced with a blue and pink version of yourself instead of a flower?
Title: Re: ASCII/Retro tileset
Post by: Tivec on November 04, 2013, 05:51:49 AM
If you hit some place where tiles are missing you can send me the saves so I fix it. A complete version would actually require trough way too many entries...

Here's a save for win32-sdl #536 where you can see some missing tiles. In particular spike pit traps and logs from felled trees.

Edit: Actually add the link too: Dropbox (https://www.dropbox.com/s/5vjsacfzwwdiufr/HRose-missing_tiles.zip)
Title: Re: ASCII/Retro tileset
Post by: HRose on November 04, 2013, 10:07:51 AM
fixed what I could see. Tried to do some wildlife but there are way too many variations

http://www.cesspit.net/misc/10x10.zip

Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 04, 2013, 01:11:40 PM
Let's see what monster categories would probably be required.

Rodents
Birds
Deer (including moose and cows)
Bears (And Zombears)
Dogs
Vermin
Spiders
Snakes
Flying bugs (bees, wasps, mosquitos)
Crawling bugs (ants, mostly)
Slimers (Slugs and Sludge Crawlers)
Adult Fungaloids (regular fungal critters can just all be light whatever fungal colour you decide on (blue?)if it's not used elsewhere)
Young fungaloids (unfortunately would prob. need to be different since the fungals tend to be mono color associated)
Triffids (Can all probably be the same even they they look super different, except the heart which could probably use it's own tile, and maybe the queen)
Small Robots (Manhacks, eyebots, etc)
Large Robots (Securbots, Tank Bots, etc)
Turrets

And then the rare critters...
(click to show/hide)

I think that's most of them - it's certainly a decent sized list, and then you'll have to figure out how many color variations to put in...

Man, it really is a lot of work, and I think I'm missing some. Glad I'm not making a tileset. :P
Title: Re: ASCII/Retro tileset
Post by: HRose on November 04, 2013, 02:00:15 PM
Yes, but I can't make "categories".

The annoying part is that each individual variation needs its entry in the json file. I can point it to the same tile, but I still need to have each entry in the json. For example there are two squirrel types. If you define only one the other will be "unknown" and not display at all.

And whenever they add or change stuff you also need to add entries.
Title: Re: ASCII/Retro tileset
Post by: Tsu on November 04, 2013, 02:13:20 PM
This is the reason I kind of want tile development to be more supported. It is already a pain in the arse to tile the roughly 1800 things by my tally in the game, but with more things being added by people all the time and no way of knowing other than stalking github, it makes supporting a tileset a pain in the arse.
Title: Re: ASCII/Retro tileset
Post by: Natures Witness on November 04, 2013, 03:13:19 PM
Can we code something that would enumerate every tile in the game and output a file listing them?
Title: Re: ASCII/Retro tileset
Post by: HRose on November 04, 2013, 05:36:07 PM
Can we code something that would enumerate every tile in the game and output a file listing them?

Then what? Whenever a new file is generated how do you replace every single number to the corresponding tile?
Title: Re: ASCII/Retro tileset
Post by: Natures Witness on November 04, 2013, 05:50:39 PM
I mean like a Batch file or something that looks through the game code and prints up a list of every tile ID it finds.  Then we just work our way down the list and add in which tile goes to which ID.
Title: Re: ASCII/Retro tileset
Post by: Tsu on November 04, 2013, 06:17:35 PM
Might be usefull as a way to figure out what has been added since the last time everything worked, and it might preclude people having to note down the id's of things they just added somewhere.
Title: Re: ASCII/Retro tileset
Post by: Kevin Granade on November 04, 2013, 06:38:05 PM
This looks so awesome I could cry, I'm having C64 Ultima flashbacks.

It sounds like the biggest things you need are a way for new entities to have a default tile based on their category, and a way to enumerate the entities, their symbols, and their tiles.  Does that sound right?

Also I hate to be that guy, but if we're going to incorporate this into the main release, we need a license from the guy on csdb.dk, not just "yea sure use it".  CC-BY or CC-BY-SA would be ideal, -NC and -ND would not work.  I'm sure there are other licenses that would work as well, but I'm not redistributing without a license.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 04, 2013, 06:49:58 PM
Yes, but I can't make "categories".
Kevin basically beat me to it, but my response was essentially going to be "Ah, but I can, if I knew it was needed and we had a list of what should go in what category".
Title: Re: ASCII/Retro tileset
Post by: Tsu on November 04, 2013, 06:52:43 PM
the "Unknown" tile currently tiles on anything that is missing a tile declaration in the game, could it be possible to tile things to groups? Because that would make maintaining a tileset far easier.

Atleast for me I would use that for item groups, rather than writing the hundred lines of different id's and linking them to the same tile.
Additionally it might be interesting to have a way to figure out what is not currently tiled in a readable format that presents you with the missing Id's
Title: Re: ASCII/Retro tileset
Post by: HRose on November 04, 2013, 08:02:31 PM
the "Unknown" tile currently tiles on anything that is missing a tile declaration in the game, could it be possible to tile things to groups? Because that would make maintaining a tileset far easier.

I guess it could be done in the sense that you can redefine a tile twice and the last definition takes priority. So code-wise you could have categories on top, and then specific definitions.

So specific definitions come after and take priority, then falls back to categories, and then to "unknown".
Title: Re: ASCII/Retro tileset
Post by: HRose on November 04, 2013, 08:07:11 PM
Also I hate to be that guy, but if we're going to incorporate this into the main release, we need a license from the guy on csdb.dk, not just "yea sure use it".  CC-BY or CC-BY-SA would be ideal, -NC and -ND would not work.  I'm sure there are other licenses that would work as well, but I'm not redistributing without a license.

Of course. And I don't think the guy will really have issues.

In any case I'm using probably not more than 10 tiles or so from the original tileset. Most of the stuff is tweaked or redone by me. What's currently copied: some vegetation, sidewalk and some of the monsters and animals.

Even the "dots" on the ground are "mine" since the tileset is 8x8 and I'm using 10x10, so nothing tiles well and I had to redo those dots.
Title: Re: ASCII/Retro tileset
Post by: Miloch on November 05, 2013, 06:40:02 AM
Can this get added to the main build? :P
Title: Re: ASCII/Retro tileset
Post by: jokaro on November 05, 2013, 07:23:15 AM
I can't really tell from the conversations in this thread. But is it possible to play with this tile set? Or will things missing in the tileset be invisible?
Title: Re: ASCII/Retro tileset
Post by: Kevin Granade on November 05, 2013, 03:38:43 PM
There's a fallback tile that gets displayed, so you can see something is there, but not what it is.
Title: Re: ASCII/Retro tileset
Post by: ramesesniblet on November 06, 2013, 03:56:23 PM
I've been playing with it for a few days and it's really nice. Some videos if anyone wants to see how it is in motion:

(click to show/hide)
Title: Re: ASCII/Retro tileset
Post by: Wayfarer on November 07, 2013, 04:02:34 AM
Ooh, looks cool.  A bit different.

Might give it a whirl at some point.
Title: Re: ASCII/Retro tileset
Post by: Rookie on November 07, 2013, 10:55:42 AM
Wow, I am impressed. Usually I never use tilesets. Neither in DF nor CDDA. Because I learn the game with ascii and had to "re-learn" all the symbols when installing a tile set.

But this... this is sooo adorable! If you will keep it updated frequently, I will use that one form now on. Nice job!
Title: Re: ASCII/Retro tileset
Post by: wad67 on November 09, 2013, 12:02:31 AM
This looks amazing, Well done and keep up the good work.
Title: Re: ASCII/Retro tileset
Post by: jcannon98188 on November 09, 2013, 01:08:11 AM
I mean like a Batch file or something that looks through the game code and prints up a list of every tile ID it finds.  Then we just work our way down the list and add in which tile goes to which ID.

Is there still a want for this? I could maybe code something up for it.
Title: Re: ASCII/Retro tileset
Post by: TheNineRings on November 09, 2013, 01:23:03 AM
Yeah, that'd be really useful.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 09, 2013, 03:34:48 AM
HRose - Release Candidate for 0.9 is out.

If you wanted a single, stable, unmoving target, you've got it, at least for a little while.

Hopefully you can get this up to par and figure out the rights stuff because I would absolutely love to ship this packaged into the actual release.
Title: Re: ASCII/Retro tileset
Post by: jcannon98188 on November 09, 2013, 04:26:43 AM
https://app.box.com/s/yukbjsotsui7stcra8m2

I wrote this up. It uses C# .Net 4.0 (sorry linux/mac guys)

Usage is more or less simple. Run the Program. Click "Select original tile_config.json" and point it towards the gfx/tile_config.json file. Then click "Select your tile_config.json" and point that towards the tile_config.json file you are writing. It will compare the two, and list all missing id's in a file called "missing.txt" which it will ask you to place. Let me know if something doesn't work right or if additional functionality is requested. I can also recode this in python if needed in case cross platform functionality is required. I probably won't be checking this post for replies though, so feel free to pm me.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 09, 2013, 11:06:13 AM
HRose - Release Candidate for 0.9 is out.

If you wanted a single, stable, unmoving target, you've got it, at least for a little while.

Hopefully you can get this up to par and figure out the rights stuff because I would absolutely love to ship this packaged into the actual release.

I'd rather see this and other fixes, actually: https://github.com/CleverRaven/Cataclysm-DDA/pull/3883
Title: Re: ASCII/Retro tileset
Post by: HRose on November 09, 2013, 11:20:57 AM
Also, I'm not sure it's possible to contact that guy.

His name doesn't seem locked to an account (can't click on it), and I tried registering but you have to pass through some moderation process AND I HATE THAT.

P.S.
The best hope to see me updating the thing is to post savegames with stuff broken or looking wrong.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 09, 2013, 01:39:56 PM
I'll see if I can get ahold of him then.

Edit: His name IS locked to an account on Tig Forums, and he's been active fairly recently - I'll try there. He also frequents the #rgrd chat, so I'll try hanging out there for a while as well.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 09, 2013, 02:06:11 PM
Ok, here a thing.

I just spent a VERY long time going through all "books.json" to add ALL entries to the tileset. It's insane work.

This is something that needs to be refactored and that is more important than categories: we need a way to bind tiles NOT through IDs, but through ASCII colors.

It's just not remotely possible to bind every single ID. The real problem here is that there are like 50 books that have different IDs but that are all shown as a pink "?". So I don't want to use 50 entries IDs in my tile file. I just want to bind the pink "?" ASCII to a tile.

So, basically, we should build tiles for ASCII+color combinations. There should be an automatic method/output file that lists every combination and what it is associated to. Something like the green "/" represents this list of objects. And then let tiles bind one tile to the green "/" and not IDs (unless overridden with a specific ID).

So the tile_config.json should first have a block where you bind all ASCII and colors. THEN an optional block where you bind single IDs, if you want.

But that way every time you add stuff to the game, you ALWAYS have tile mode working perfect, because it can always output that ASCII+color combination by default.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 09, 2013, 02:12:07 PM
I agree, and it will be done - not for version 0.9, unfortunately, but it will be done.

For now, I will be willing to add the entries for you - with the power of regex, I'm sure it will be a heckuvalot easier for me than you. So feel free to tell me something like "everything in this item file should be assigned to this tile, everything with that type should be assigned to this tile" etc. and so on for now.

It looks right now like the generic "book" icon is
         "fg" : 883,
         "bg" : -1,
         "rotates" : false,
         "multitile" : false

So I can quickly apply that to ALL book ids if you want, for example. For now.


Okay, to isolate the ids in the booklist, I'm using the following regex replacements. This should work in ANY item file.
\{([^}]*\n) *"id" -> "id"
"id".*"(.*)".*\r\n([^}]*\r\n)* -> \1\n
.*\}.*\r\n -> nothing
 * -> nothing

This will give you JUST the ids for items in that file (plus an easily deletable leading and trailing array bracket)

Then, to give that the new format:
(.*) ->      {\n         "id" : "\1",\n         "fg" : 883,\n         "bg" : -1,\n         "rotates" : false,\n         "multitile" : false\n      },

Which gives me:
http://pastebin.com/YdRhrAKV

Is that helpful? I can do that to whatever file you want with whatever item file you want, no problems.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 09, 2013, 02:50:15 PM
I'm off to work on the video filming today, but let me know if there's anything else I can do to help - I do have the power of scripting at my command, so if you have any bulk tasks that could be expressed in straightforward rules, I can totally do that.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 09, 2013, 02:52:46 PM
I've finished the books part, each with the proper color. It's everything else that needs to be done now.

But I don't know if bulk actions are of any help here. Plus I'm reporting a number of inconsistencies in tile mode. It's all stuff that needs to be fixed in the code.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 09, 2013, 02:58:10 PM
I can modify the bulk editing above to link to a different tile based on colour - none of those code changes will get in for 0.9, and I'd like THIS to do so anyway.
Title: Re: ASCII/Retro tileset
Post by: Nopkar on November 15, 2013, 09:37:16 AM
I've resurrected from the depths of the forums to offer you my unwavering support for this HRose.

I can say that you have rekindled my absolute adoration for this game with your tileset. As soon as this is geared for official release I will be playing this non-stop. I may even muscle this into the latest release if I become too impatient.

Needless to say, fantastic work and I hope to see this come to full fruition.

If there is any assistance I may lend don't hesitate to ask!
Title: Re: ASCII/Retro tileset
Post by: HRose on November 15, 2013, 03:03:50 PM
I'm only waiting for:

1- Code being coded.
2- Savegames with broken stuff that I can fix.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 15, 2013, 03:24:01 PM
And inclusion is only waiting for tracking down the original guy this pulled from.

HRose, how much of the current thing is actually pulled from Trihook's sheet? Can we change a few icons and eliminate any legal dependency, do you think?
Title: Re: ASCII/Retro tileset
Post by: noego on November 15, 2013, 05:21:38 PM
Props for this tileset, it is awesome.
Title: Re: ASCII/Retro tileset
Post by: Paquito on November 15, 2013, 06:05:00 PM
What is that people don't like about the sprites?

I like the sprites!
Title: Re: ASCII/Retro tileset
Post by: HRose on November 15, 2013, 07:59:13 PM
HRose, how much of the current thing is actually pulled from Trihook's sheet? Can we change a few icons and eliminate any legal dependency, do you think?

No. It's just a few but with just an handful of pixels you're not gonna "change" much.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 15, 2013, 09:28:31 PM
...yeah, I can see how that is kind of an issue.

Maybe I'll pull out the gimp this weekend and see if I can't just replace them with something that looks good but is also different. >_>
Title: Re: ASCII/Retro tileset
Post by: Szpiczak on November 16, 2013, 12:41:10 AM
Is the tileset shown in http://www.cesspit.net/misc/catatilelast2.gif (http://www.cesspit.net/misc/catatilelast2.gif) available somewhere?
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on November 16, 2013, 01:50:55 AM
Is the tileset shown in http://www.cesspit.net/misc/catatilelast2.gif (http://www.cesspit.net/misc/catatilelast2.gif) available somewhere?

Are you fucking...?

It's on the first page of this topic.
Title: Re: ASCII/Retro tileset
Post by: moist_zombie on November 16, 2013, 03:19:33 AM
Its a reasonable question: the image is of the tileset before HRose made some pretty drastic redesigns (it was more simple, closer to a reflection of the ascii characters represented by tiles..)
Title: Re: ASCII/Retro tileset
Post by: vultures on November 16, 2013, 10:52:38 AM
I'm 99,9% sure it's an 8-bit console/computer export. With that particular timescale in mind there's no doubt someone already made use of something "original", and with so many emulators around there's no doubt if the "memorabilia" is free to use.
I spent a considerable ammount of time over this PNG image and it looks as if someone was playing with it, certainly not as it was seriously reworked in a way that it could be a part of a scaled (game) project. It's a 8x8 font that uses a default of 768 bytes of video memory, if I remember correctly... so for Christ's sake... :-)

Some references: TypeFace / Character Set Image Data (http://www.sxlist.com/techref/datafile/charsets.htm)
-----------------------PAGEZERO nocash C64 specs (http://nocash.emubase.de/pagezero.txt), !C64 VIC Character Sets!
Title: Re: ASCII/Retro tileset
Post by: voskhod on November 16, 2013, 11:21:32 AM
2 questions:
Are you going to release the 16x16 version any time soon?
And when will this tileset be adapted to the official 0.9 version? There's a lot of stuff that don't have their own tiles yet, like foxes, spiders, pretty much all of the new animals, and 99% of all the new items.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 16, 2013, 09:09:45 PM
2 questions:
Are you going to release the 16x16 version any time soon?

Never. 16x16 was an experiment done by rescaling 8x8, and 8x8 has things too crammed to look good. Try 15x15 if the aliasing is fine, or you have to go up to 20x20, that I guess is way too big.

Quote
And when will this tileset be adapted to the official 0.9 version? There's a lot of stuff that don't have their own tiles yet, like foxes, spiders, pretty much all of the new animals, and 99% of all the new items.

If I get savegames I fix the stuff I can see. Otherwise I'm waiting for code, and I doubt this will be done soon (if ever).
Title: Re: ASCII/Retro tileset
Post by: jcannon98188 on November 16, 2013, 09:12:25 PM
If I get savegames I fix the stuff I can see. Otherwise I'm waiting for code, and I doubt this will be done soon (if ever).

My Tileset Checker should scan all .json files and tell you which ones you are missing item wise. The only thing it doesn't check is hardcoded things like rain/acid rain. But it checks all the items and monsters and vehicle parts and all that good stuff. Link in my sig.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 16, 2013, 09:36:24 PM
What I need I've explained here: https://github.com/CleverRaven/Cataclysm-DDA/issues/4236

Anything else is not useful to me.
Title: Re: ASCII/Retro tileset
Post by: stuntaneous on November 17, 2013, 10:47:42 AM
*appreciating your efforts*
Title: Re: ASCII/Retro tileset
Post by: Marine on November 19, 2013, 04:32:16 PM
Whenever I try to execute the bigger versions (15x15 or 20x20), it just doesn't work.
Looking trough the debug log yields this:

Code: [Select]
src/cata_tiles.cpp[273]: gfx/DeonTileset/tile_config.json: line 115:19: leading zeros not strictly allowed


        {
            "id":"lighting_hidden",
            "fg":00
                  ^
                   ,
            "bg":00,
            "rotates":false

Tile number 00 is pitch black darkness, used to "draw" areas where you just can't see.

Could this problem be related to my SDL image not being up to date or something?
Title: Re: ASCII/Retro tileset
Post by: HRose on November 19, 2013, 08:03:38 PM
No, it's related to the non 10x10 versions being more lazily updated. I'll fix this in a little while.
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on November 19, 2013, 08:15:53 PM
Marine... I love your profile pic...
Title: Re: ASCII/Retro tileset
Post by: Ratha on November 22, 2013, 07:24:37 AM
HRose: Do you have a link to the ASCII font that you are using here: http://www.cesspit.net/misc/catatilelast2.gif

Both it and your 'retro' tileset are quite exceptional. If the latter was a complete tileset I would be incredibly interested in using it as its simply beautiful. I have not tried it out yet, or even played a recent build of DDA, but the 16x16 screenshot with the black background looked quite nice. (The vegetation, fence, road, and zombies in particular.)

I realize that the 16x16 was just a concept/test though, which is why im interested in the ASCII version of the font in that picture if it exists somewhere. Having it scaled up to be a tiny bit easier on the eyes would make that a particularly enjoyable font to use. Im guessing that its not just a 'font' though due to the fact that the game-area is square, while the interface text is rectangular?

Title: Re: ASCII/Retro tileset
Post by: HRose on November 22, 2013, 10:29:34 AM
HRose: Do you have a link to the ASCII font that you are using here: http://www.cesspit.net/misc/catatilelast2.gif

No, it's an old version of the current one.

Whenever coding is done (again, maybe never), redoing the ASCII tileset would be fairly easy. The problem is always the code, and current Cataclysm coders aren't focused on the Windows version at all.
Title: Re: ASCII/Retro tileset
Post by: Mattamue on November 22, 2013, 12:48:20 PM
It is being worked on, looks like it just needs someone to finish it up: https://github.com/CleverRaven/Cataclysm-DDA/pull/4283 (https://github.com/CleverRaven/Cataclysm-DDA/pull/4283)
Title: Re: ASCII/Retro tileset
Post by: HRose on November 22, 2013, 02:30:50 PM
That part isn't even remotely doing what I've asked, sadly.
Title: Re: ASCII/Retro tileset
Post by: Marine on November 22, 2013, 03:06:20 PM
That part isn't even remotely doing what I've asked, sadly.
What do you exactly need?
I could come up with some commit if I have the time.
Title: Re: ASCII/Retro tileset
Post by: GlyphGryph on November 22, 2013, 03:11:17 PM
There is a discussion linked from your ticket that is discussing how to actually implement what you want, btw. Things take time, and tileset stuff probably won't be finalized until the next version anyway.

https://github.com/CleverRaven/Cataclysm-DDA/issues/4448
Title: Re: ASCII/Retro tileset
Post by: HRose on November 22, 2013, 05:12:25 PM
That looks to me just overcomplicating what is already the most straightforward way: a tileset image with all characters + all 16 colors already there.

The more control the better. The less code the better. There's absolutely zero need to use mathematical formulas to calculate colors or luminosity.

What I need to know as a tilemaker is:
1- The right sequence of characters. Or the order they have to have in the tileset image.
2- The right sequence of colors they have to have in the tileset image.

That's all.

All you say about "The index must be the same for every image, so it has to be decided in advance how many we'll use" this makes no sense to me. No one has to "decide" anything because what is used and how entirely and solely depends on how the terminal game works. This is a fallback mechanic for tiles, this means that it need the same granularity as there is in the ASCII version. See how many ASCII and colors the console version uses, and that's it. If there are 16 colors, we need 16 colors.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 22, 2013, 05:25:52 PM
Here's an example:

http://cesspit.net/misc/source.png

It took less than two minutes to make. Done.
Title: Re: ASCII/Retro tileset
Post by: Paquito on November 22, 2013, 06:06:54 PM
This is a pointless post expressing my love and longing for this tileset, and an unreasonable demand that a new stable version with the tileset set as default be released immediately.
Title: Re: ASCII/Retro tileset
Post by: Mattamue on November 23, 2013, 12:23:14 AM
I thought the PR I linked was headed in the right direction. If the item does not have a specific tile it finds a 'food' generic tile (or whatever the category is) that I specify somewhere in the image and while it isn't perfect it would work and be simple.

Creating an organized json template would be a step in the right direction, too.

To your original issue you wouldn't have to make 80 item_bookblah, item_bookscience, etc you would just point and say image 174 is generic book and any item in the game that doesn't have a tile finds 'book' and gets the image.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 23, 2013, 10:14:42 AM
I thought the PR I linked was headed in the right direction. If the item does not have a specific tile it finds a 'food' generic tile (or whatever the category is) that I specify somewhere in the image and while it isn't perfect it would work and be simple.

It wouldn't be simpler than what I'm asking, and it wouldn't work because ASCII would provide better functionality.

Until tile mode isn't AS GOOD AS ASCII terminal then tile mode isn't usable.

If different types of food use different colors or ASCII characters then having just one tile reduces granularity. I need tile mode to represent all ASCII+colors combinations that the terminal can display.
Title: Re: ASCII/Retro tileset
Post by: Zireael on November 23, 2013, 11:26:54 AM
HRose, the PR linked would contain a feature which picks a random color for the specified tile if I'm understanding it right.
Title: Re: ASCII/Retro tileset
Post by: Marine on November 23, 2013, 12:00:19 PM
It seems to me there is a lot of confussion going here between devs and the tilemakers.
Title: Re: ASCII/Retro tileset
Post by: HRose on November 23, 2013, 02:08:11 PM
No, the problem is that all devs minus one work exclusively on the Linux version, and that one guy works on everything but tile mode.

There's literally no one who's currently working on tile mode/windows version.
Title: Re: ASCII/Retro tileset
Post by: vultures on November 23, 2013, 09:38:16 PM
I'm not getting you HRose, issues/4448 (https://github.com/CleverRaven/Cataclysm-DDA/issues/4448) cares little about Windows and Linux. Is there anything we need to know about that Win_SDL version?
If you need to draw pixels after the image(regular tile) is loaded, you must have some way of handling that before the Draw() func is called for that particular square. For example, if you wanted to imitate the sun's glare on pavement tiles, you would need to have a function that renders those bends and slopes, changing the color of the tile you've assigned accordingly - and still you need to wait for WorldGen to work out the space you're handling.
As far as font chars go, adding a few pixels to imitate that subscript isn't a problem at all, but with smaller tiles you'd have to scale them down even more, perhaps.
Title: Re: ASCII/Retro tileset
Post by: Natures Witness on December 13, 2013, 03:38:50 PM
What's the status of this?  Is it still being worked on?
Title: Re: ASCII/Retro tileset
Post by: HRose on December 15, 2013, 10:04:23 AM
As I said, it's not an issue of the tileset, but an issue of programming the game.

Right now absolutely no one is working on the Windows/SDL build. That's sadly the truth. So no updates on the horizon.
Title: Re: ASCII/Retro tileset
Post by: gtaguy on December 21, 2013, 08:43:11 PM
(http://th02.deviantart.net/fs51/150/f/2009/340/f/d/So_much_win__by_Kisame_X_Mudkip.png)

Wow. Much DF-like. Very Good. Many 16x16.
Title: Re: ASCII/Retro tileset
Post by: nikola on December 26, 2013, 08:48:38 PM
I really like this tileset.

I think the solution presented by HRose is very straightforward. However I suppose that a successful tileset would expand the number of tiles beyond the (ascii x colors) because some tilesets that are more graphical than symbolic will demand more sophisticated merger between the game logic and tiles.
Whatever road will be taken I really would like to thank all of the people involved.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on January 21, 2014, 08:12:47 PM
Bump for very nice tileset.

What's really needed is the same approach Dwarf Fortress uses. ASCII tile page of default tiles, and any existing graphics overlayed on top of that, if they exist.

I.e., say I make a new Zombie variant creature, and represent it with a dark gray Z. No graphics exist for that creature. So instead of drawing a "missing tile" graphic, or fumbling around for a default tile, the game would use the ASCII page index of 'Z' - that's 91, if I'm not mistaken - then find the 91st tile in the assigned "tileset", apply the proper color, and draw that. Same for anything else.

Separating graphics tiles from regular tiles is normally a hard process, I'd imagine, but in Cataclysm's case it's pretty much already done. All you need is add a page of ASCII characters of matching dimensions to the graphics tiles used, and everything will immediately work. If a graphics tile exists, it is drawn - and if it's not, it's taken from the ASCII page.
Title: Re: ASCII/Retro tileset
Post by: RoguelikesEsp on February 16, 2014, 02:07:46 AM
Hello.

 Your tileset is just awesome, i love the retro fresh air that adds to the game, but the tiles of some zombies (fat zombie, decayed zombie, etc) don't appear (well, yes, they appear, but not has a tile, they are a "#").
¿What to do? Please, help.
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on February 16, 2014, 02:20:14 AM
I don't think he's maintained it over the course of several months, which means that it's not updated.
Title: Re: ASCII/Retro tileset
Post by: Natures Witness on February 16, 2014, 10:18:56 PM
I would love to see this up-to-date again, is HRose still around?  If not, maybe someone else could update it?
Title: Re: ASCII/Retro tileset
Post by: Antistar on February 17, 2014, 11:44:40 PM
Funny you should say that...

I'm very new to CDDA - only on my second character, even if he is lasting a good long time (my first didn't survive the first day) - but I'm hooked. Loving it. I've been using HRose's tileset basically since the start, and loving it too; it's gorgeous.

I couldn't imagine playing without it, but I also couldn't stand it being unfinished, so I started adding to it myself...

(http://i.imgur.com/XBkVKVV.png)

(http://i.imgur.com/Zvpmkng.png)

I've been drawing from Trihook's charset (http://csdb.dk/forums/?roomid=13&topicid=97045&showallposts=1) - same as HRose - and adding my own new tiles as well. The plan has been to replace tiles that were scaled down from Deon's tileset (I think it was) in HRose's version - you can't really make those out, as they are - and to give everything a graphic tile, rather than an ASCII character. And to add in missing tiles, of course.

It's been a lot of fun, actually; I've maybe added more tiles than were in there originally (not counting ASCII characters and stuff scaled down from Deon's), though a lot of that is clothes and weapon items. It wouldn't be possible without HRose and Trihook's great work as a base, though.

I've been trying not to spoil things in the game for myself too much, so what I've done mostly only covers what you'd see around town. I'm also using version 0.9 stable. So there's still a lot more to add. It's an awful lot of work; I can see why HRose wanted some changes to tileset support.


I can share my version of the tileset, if no-one has any objections. It would seem sort of a shame not to. I imagine it would make sense to make a new thread if so, and give the tileset a new name as a kind of offshoot. I don't want to tread on HRose's toes too much.

I could put it up on the Nexus (http://www.nexusmods.com) - you may know me from my mods for Fallout 3 and New Vegas there in fact, if you've played those games.

As far as permissions go, credit would be nice I guess, but for the part of it that is my work at least I'm fine with it being used however and wherever.
Title: Re: ASCII/Retro tileset
Post by: Natures Witness on February 18, 2014, 12:20:32 AM
This looks AMAZING!  Please share what you've done, I'm sure a lot of people would really enjoy it.
BTW, I loved the weapon mod kits for Fallout 3, definitely one of the essential FO3 mods.
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on February 18, 2014, 12:39:59 AM
Well Antistar, you could continue this.
Title: Re: ASCII/Retro tileset
Post by: Antistar on February 18, 2014, 10:32:00 AM
Thanks. :)

I'll give it a bit of time in case anyone does object - and I am still working on this pretty heavily - but I might be able to put out what I've got so far in the next day or so.
Title: Re: ASCII/Retro tileset
Post by: phaethon on February 19, 2014, 12:33:52 AM
Really nice work, Antistar.  Can't wait to use your additions.
Title: Re: ASCII/Retro tileset
Post by: Antistar on February 20, 2014, 01:43:27 AM
Just waiting to hear back from HRose. Looks like he was last online a few days ago.

I'm still adding stuff every day, anyway. Added a bunch of medical items yesterday, among other things. Next up will be some vehicle parts I think, since my character is at the point where he's turning an RV he found into a 'SupeRV'. ;)
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on February 20, 2014, 08:18:49 PM
Few days ago huh? Haven't seen him in forever.
Title: Re: ASCII/Retro tileset
Post by: Inquisitor Dust on February 21, 2014, 03:15:03 AM
Awesome! Glad to see that you're going to continue the tileset.

Oh, and I checked out your nexus page and I run a few of your New Vegas mods... Er, used to. Haven't played in a while. Still, it's cool seeing you here!
Title: Re: ASCII/Retro tileset
Post by: Antistar on February 24, 2014, 01:04:26 AM
Okay, it's been a while. I'll probably share my version of the tileset soon. I want to do some more work on it today, so maybe after that.

If HRose does object, then I can take it down I guess. Or he can use anything I've done in my version in his own version, if he likes. Same goes for anyone, really; I'll release my psd file for this too.

In any case, look out for a new thread sometime soon.
Title: Re: ASCII/Retro tileset
Post by: HRose on February 28, 2014, 02:27:06 AM
As far as I'm concerned I'm not doing any more work until devs support the features I've asked (as I've said again and again).

Since it won't happen you can do whatever you want with what's left. My attention is elsewhere.
Title: Re: ASCII/Retro tileset
Post by: KA101 on February 28, 2014, 02:37:25 AM
A quick check of your posts indicates that you're not happy about the lack of SDL support.  Seen that Chase-san guy around?  He's got an update to SDL2 in the pipe, which'll land as soon as we're back in experimentals.

Rivet and I both work Windows; unfortunately we don't do SDL, but in my case at least that's because I can't get it to work on my system.  It's possible the SDL2 upgrade will fix that.

Thanks for checking back in, in any event.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on February 28, 2014, 05:41:57 AM
I can also confirm (having IRC'd with the guy in question) that his SDL branch with support bitmap ASCII sheets. At least, that was his intention as far as I gathered.

In the meantime I've managed to persuade Chase, the maker of the recent tileset editor here, to add an ASCII tile generator to his program, and while it can't generate proper ASCII-sheet tiles yet, I have already used the generator's output to pad this tileset (well, actually the RetroDays tileset) with most of the missing tiles, hand-replacing the tiny scaled symbols with tiles from HRose's colored ASCII sheet. I've only got as far as creatures for now (https://dl.dropboxusercontent.com/u/4152380/retrodaystiles.png), because holy crap there is a lot of tiles, and I still made some mistakes here and there because it's hard to make out the white/light grey/light pink colors in bicubic-scaled tiny letters.
Title: Re: ASCII/Retro tileset
Post by: CIB on February 28, 2014, 06:14:44 AM
Just PR'd something that might help: https://github.com/CleverRaven/Cataclysm-DDA/pull/6349

It's much more generic, though. In high detail tilesets like Waldo's, ASCII fallback and colors wouldn't be very useful(would look very out of place), so I went for this solution first. There are solutions more specific to iconic tilesets like this one that can be implemented. Namely, falling back to ASCII instead of "unknown", and color-swapping combined with grouping(so you could, say, have a single zombie sprite, then have it automatically color-swapped for you depending on what the color of the zombie is in ASCII).

I don't think carrying over the meaning of letters into tilesets is a good idea, though. Like, say, two monsters using "M" as ASCII character, should not lead to them sharing the same sprite in the tile version. Rather, semantic groups(like species) should be used for that.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on February 28, 2014, 06:23:17 AM
I don't think carrying over the meaning of letters into tilesets is a good idea, though. Like, say, two monsters using "M" as ASCII character, should not lead to them sharing the same sprite in the tile version. Rather, semantic groups(like species) should be used for that.
That problem only exists in Dwarf Fortress, as far as I know, where non-graphics tiles are limited to the 256 ASCII symbols. Here, the two are combined and every creature can have its own tile regardless of what ASCII letter it was assigned. Even with the generated ASCII page like the one I linked, different creatures with the same ASCII symbol still have different tile ID's on the sheet.

Also, very neat feature. It will indeed make the high-graphical tilesets a little more uniformly detailed with their undefined graphics.
Title: Re: ASCII/Retro tileset
Post by: Antistar on February 28, 2014, 06:43:10 AM
As far as I'm concerned I'm not doing any more work until devs support the features I've asked (as I've said again and again).

Since it won't happen you can do whatever you want with what's left. My attention is elsewhere.

I'm glad you don't mind; thanks. :)


I've only got as far as creatures for now (https://dl.dropboxusercontent.com/u/4152380/retrodaystiles.png), because holy crap there is a lot of tiles...

Holy yikes you're not kidding; look at that. I've got my work cut out for me.


Just PR'd something that might help: https://github.com/CleverRaven/Cataclysm-DDA/pull/6349

That sounds cool; looking forward to that.
Title: Re: ASCII/Retro tileset
Post by: HRose on February 28, 2014, 12:40:23 PM
It's much more generic, though. In high detail tilesets like Waldo's, ASCII fallback and colors wouldn't be very useful(would look very out of place), so I went for this solution first. There are solutions more specific to iconic tilesets like this one that can be implemented. Namely, falling back to ASCII instead of "unknown", and color-swapping combined with grouping(so you could, say, have a single zombie sprite, then have it automatically color-swapped for you depending on what the color of the zombie is in ASCII)..

I need a mode where it displays *exactly* what you see in ASCII. We are a long way from that.

I don't need "grouping", I need the fallback to look to the specific object and check both its glyph and color, and display that.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on February 28, 2014, 02:28:09 PM
It's much more generic, though. In high detail tilesets like Waldo's, ASCII fallback and colors wouldn't be very useful(would look very out of place), so I went for this solution first. There are solutions more specific to iconic tilesets like this one that can be implemented. Namely, falling back to ASCII instead of "unknown", and color-swapping combined with grouping(so you could, say, have a single zombie sprite, then have it automatically color-swapped for you depending on what the color of the zombie is in ASCII)..

I need a mode where it displays *exactly* what you see in ASCII. We are a long way from that.

I don't need "grouping", I need the fallback to look to the specific object and check both its glyph and color, and display that.
As far as I'm aware the new SDL2 build will do exactly that. Also, assuming Chase's tileset editor goes opensource or he himself adds that feature, we would be able to just auto-pad the missing tiles with matching ASCII as a temporary measure in the meantime.
Title: Re: ASCII/Retro tileset
Post by: HRose on February 28, 2014, 04:47:09 PM
we would be able to just auto-pad the missing tiles with matching ASCII as a temporary measure in the meantime.

The problem isn't generating the .png, but generating the tile_config.json as stuff is constantly added or modified.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on February 28, 2014, 05:38:10 PM
we would be able to just auto-pad the missing tiles with matching ASCII as a temporary measure in the meantime.

The problem isn't generating the .png, but generating the tile_config.json as stuff is constantly added or modified.
Since the program scans all .jsons in the game folder and can create a list of missing tiles - and then fill those missing tiles with exact ASCII replicas of the console version, adjusted for your preferred ASCII bitmap tilepage (not currently, but it's definitely doable) - I don't think that's a problem.

Just keep working on tiles as you need, then anytime you do a release, just copy your set, run the program's ASCII generator for missing tiles, and you have a complete set. If anything is added, say with a mod, all anyone would have to do is run the program on the tileset again. It does generate the .json file for the tileset, that's the only reason I started playing again - I couldn't bear to play with so many missing tiles before, and the console version refused to cooperate with square-shaped tiles of non-obnoxious size - and now I've generated the missing tiles, and, in absence of that function I mentioned, manually replaced all generated creature tiles I could see with colored ASCII from your example sheet. So far it works like a charm - I'm no longer chased around town by angry blue sharps.

Here (https://dl.dropboxusercontent.com/u/4152380/RetroDaysTileset.zip) is what I'm playing with now. A lot of the item graphics are not replaced, and some creature tiles are inaccurately colored (light pink and light grey are easy to mistake for white at that size), but it's miles above the existing versions of either ASCII/Retro or the RetroDays tilesets for playability.
Title: Re: ASCII/Retro tileset
Post by: Chase on February 28, 2014, 06:59:10 PM
I can also confirm (having IRC'd with the guy in question) that his SDL branch with support bitmap ASCII sheets. At least, that was his intention as far as I gathered.

When did I say that??? Did I say that?? What? I am not sure I even know what "bitmap ASCII sheets" means here.

My point behind the SDL2 conversion is to convert it to SDL2. Seriously, that is it. Please do not project onto me.

I said there was a "possibility" for ASCII character fallback. This is because we already store most characters in textures in SDL2, which means a fallback mode wouldn't be overly difficult. (Though they would end up either being their default size, or stretched/crunched).
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on February 28, 2014, 07:31:33 PM
I can also confirm (having IRC'd with the guy in question) that his SDL branch with support bitmap ASCII sheets. At least, that was his intention as far as I gathered.

When did I say that??? Did I say that?? What? I am not sure I even know what "bitmap ASCII sheets" means here.

My point behind the SDL2 conversion is to convert it to SDL2. Seriously, that is it. Please do not project onto me.

I said there was a "possibility" for ASCII character fallback. This is because we already store most characters in textures in SDL2, which means a fallback mode wouldn't be overly difficult. (Though they would end up either being their default size, or stretched/crunched).
Hmm. *pulls up logs*

Quote
[00:01:21] <Graywolfe> Ah. I was planning to approach that by creating a fallback system.
[00:03:16] <Graywolfe> My idea, basically, is a tileset would be set up with an ASCII replacement set, which doesn't necessarily have to be proper text
[00:03:45] <SeanMirrsen> If you're familiar with Dwarf Fortress, I wanted to set up something like what it does.
[00:04:08] <SeanMirrsen> An ASCII bitmap tile page, plus graphics of matching size.
[00:04:53] <Graywolfe> Ah, yeah. that's basically what I'm talking baout
[00:04:55] <Graywolfe> about*

Well, the name's certainly different. Are there two people working on separate SDL2 branches? :confused:
Title: Re: ASCII/Retro tileset
Post by: HRose on February 28, 2014, 07:46:17 PM
I said there was a "possibility" for ASCII character fallback. This is because we already store most characters in textures in SDL2, which means a fallback mode wouldn't be overly difficult. (Though they would end up either being their default size, or stretched/crunched).

Nope, that's not needed.

Please look here for a simpler method, and if you think you can code it:
https://github.com/CleverRaven/Cataclysm-DDA/issues/4236

(not currently, but it's definitely doable) - I don't think that's a problem.

Everything is doable. The point is that four months passed and no one did anything about it.
Title: Re: ASCII/Retro tileset
Post by: Chase on February 28, 2014, 07:53:29 PM
I am not "Graywolfe" nor am I, well you. I go by "Chase-san" in chat.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 01, 2014, 06:26:29 AM
I am not "Graywolfe" nor am I, well you. I go by "Chase-san" in chat.
Well then, I guess that means that either someone else is/was working on a SDL2 branch with ASCII fallback in parallel to your own fallback-less SDL2 branch, or someone was pretending to.

Either way, it seems I will have to wade through that code myself after all. Dammit, I have enough things to do already. :|
Title: Re: ASCII/Retro tileset
Post by: Robik on March 01, 2014, 07:00:22 AM
I was working on tileset editor which would parse game jsons and fill missing tiles with prepared font-tiles as well as generate new tileset json. But being lazy as fuck and currently addicted to my Tweaker character, I can't pull myself out of playing.

And I can live with blue sharps from RetroDays tileset for now. :)

Once I die, I will finish it. Promise!

(Big props to HRose for starting the tileset and Antistar for continuing it. I have a blast!)
Title: Re: ASCII/Retro tileset
Post by: HRose on March 02, 2014, 03:29:32 PM
So, I've seen SDL2 is in, along with the category output.

Can now figure out how to do what I'm asking instead (display the exact ASCII glyph and color)?

I think the major hurdle is to actually implement loading two .png images to use them separately.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 02, 2014, 03:41:35 PM
So, I've seen SDL2 is in, along with the category output.

Can now figure out how to do what I'm asking instead (display the exact ASCII glyph and color)?

I think the major hurdle is to actually implement loading two .png images to use them separately.
The game already builds a bitmap sheet for use in non-tiled SDL output, out of a system font or PNG sheet. The project I tried to undertake involved splicing that non-tile SDL output function with the tiles, so that instead of using unknown tiles it'd fall back to the same ASCII - except it wouldn't use the bitmap ASCII for the menus, which just looks bad. I kinda fell away from the project for IRL reasons, and partly because I thought that what I wanted to do was already being worked on by a more competent programmer. I guess I'll have to revisit my project, but I really don't have the time nowadays.

edit: I literally just wanted to kludge the two functions together, so that both sets of tile data are prepared, and if the tiled output fails (i.e. results in "unknown") it passes the tile to the SDL output. It'd be part of the same Draw function that calls the tile draw function now, but instead of drawing an unknown the tile draw function would return 0 and the Draw function would call the ASCII draw function instead.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 02, 2014, 03:43:44 PM
Btw, this is the way I'd complete my tile compared to what Antistar is doing:

I'm not going to draw a symbol for each object. Not because I'm lazy, but because the purpose is to have individual objects stand out clearly against the background and be easily recognizable. You need to notice at glance where's the stuff that is relevant all across the screen.

So for all generic tiles that are repeated over the place like walls, trees, doors, tables, beds, fences, grass and so on, all of these can be drawn because they are part of the scene and don't have individual value. But for all items that you usually interact with and can pick up to use, those need to stand out clearly, so ASCII is perfect.

And that's why I need an ASCII fallback that can display exactly the item.

And once this kind of support is done, we could also make custom combinations, so that, for example, you could make so all monsters use ASCII instead of a sprite, if you like it better that way.

Actually, this could be supported entirely on Chase's editor:
You just let me load another .png with my ASCII, then use the editor to auto-complete all the different combinations. It would be the editor to go through each object, find the ASCII+color and assign the corresponding tile to that entry.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 02, 2014, 04:37:49 PM
I was attempting to compile, since maybe with SDL2 it would work. This on Windows and MinGW:

In file included from src/animation_tiles.cpp:5:0:
src/cata_tiles.h:7:17: fatal error: SDL.h: No such file or directory
 #include "SDL.h"

SDL.h should be in SDL2/SDL2.h on Windows. So why is it looking in the root?
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 02, 2014, 04:57:49 PM
Stupid question, but to get the obvious possibility out of the way - you did download and set up the SDL, SDL_ttf, and SDL_image sources and libraries, right?

If you did, then you might need to tinker with the environment variables - look at the #ifdef's in the top of, say, the catatiles.cpp file. Notice how SDL2 is only included if some specific requirements are met.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 02, 2014, 05:00:28 PM
I moved the headers to the root directory and it compiles everything fine, but then fails on the linker:

objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x599): undefined reference to `
SDL_RenderClear'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x671): undefined reference to `
SDL_CreateRGBSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x1566): undefined reference to
`SDL_FreeSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x1587): undefined reference to
`SDL_DestroyTexture'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x27a6): undefined reference to
`SDL_DestroyTexture'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x2900): undefined reference to
`SDL_CreateRGBSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x2925): undefined reference to
`SDL_UpperBlit'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x2933): undefined reference to
`SDL_CreateTextureFromSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x2941): undefined reference to
`SDL_FreeSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x2b89): undefined reference to
`SDL_FreeSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x2d8d): undefined reference to
`IMG_Load'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x2d9d): undefined reference to
`IMG_Load'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x30e3): undefined reference to
`SDL_RenderCopy'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x31c4): undefined reference to
`SDL_RenderCopy'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x32d3): undefined reference to
`SDL_RenderCopyEx'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x7a88): undefined reference to
`SDL_CreateRGBSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x7ab5): undefined reference to
`SDL_MapRGBA'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x7ac9): undefined reference to
`SDL_FillRect'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x7ad7): undefined reference to
`SDL_CreateTextureFromSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x7ae2): undefined reference to
`SDL_FreeSurface'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x8a2d): undefined reference to
`SDL_RenderSetClipRect'
objwin/tiles/cata_tiles.o:cata_tiles.cpp:(.text+0x8bda): undefined reference to
`SDL_RenderSetClipRect'
d:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 objwin/tiles/cata_tiles.o: bad reloc address 0x20 in section `.rdata'
d:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
 final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
make: *** [cataclysm-tiles.exe] Error 1

No idea how to fix this mess. I was never able to compile Cataclysm. I can compile everything else, but Cataclysm ALWAYS fails every time I tried.

EDIT: Nevermind. It wanted
SDL2-2.0.1\i686-w64-mingw32

instead of
SDL2-2.0.1\x86_64-w64-mingw32
Title: Re: ASCII/Retro tileset
Post by: HRose on March 02, 2014, 05:12:32 PM
Or not.

(http://www.cesspit.net/misc/catabug.gif)
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 02, 2014, 05:16:59 PM
I compile it fine in Code::Blocks. Well, "fine". It ends up requiring DLLs for SDL and the other two sublibraries, but works as intended as far as I can see. Not sure how to set up MinGW to work. :/
Title: Re: ASCII/Retro tileset
Post by: HRose on March 03, 2014, 02:03:42 AM
I managed to compile the thing, though it's not working with the font I'd normally use.

The issues I had:
- SDL include headers need to be in root directory, since the default SDL2/sdl.h doesn't work
- SDL package needs to be i686-w64-mingw32 and NOT x86_64-w64-mingw32
- zlib1.dll conflicts with MinGW version of the library, so you have to pull the one in the SDL package in the root directory of the game. Otherwise the game will crash.
- Compiled successfully with make NATIVE=win32 TILES=1 RELEASE=1

Anyway. Blending the tiles function with the one used for the rest of the UI wouldn't work. Because the point here is to draw the graphic window with a different size than normal text. So if we use the normal text to fill the gaps of the graphic window we just don't respect the cell size.

So, code-wise, what we should do is load up TWO .png and use the other one only when needed for the ASCI fallback. So, ideally, I'd simply duplicate the functions that load one tileset. And then manually override the draw function to use the second tileset only in those cases where a sprite isn't available.

I know very little C++, even less figuring out someone else's code.

Right now I have:
sdltiles.cpp
cata_tiles *tilecontext;
cata_tiles *tilecontext2;

So we have two pointers.

under curses_init I added:
tilecontext2 = new cata_tiles(renderer);

So again duplicating the memory content. We have two pointers pointing to two different memory spaces.

Then the next instruction seems to be:
tilecontext->init("gfx");

The init function is in cata_tiles.cpp and it calls:
get_tile_information(load_file_path, json_path, tileset_path);

I think that what happens in that function is only about storing the right paths. Then:
load_tileset(tileset_path);

This handles first a tile_atlas, that is part of the cata_tiles object, so if the plan is to duplicate the tileset then I don't need to change anything here, since both tilesets will have their respective tile_atlas.

So what I did was create an init2 duplicate function that simply initializes a different .png
Up to this point it compiles:
Could not locate tileset file at gfx/HoderTileset/hellobeta.png

I guess I'll continue tomorrow.
Title: Re: ASCII/Retro tileset
Post by: Zireael on March 03, 2014, 09:16:24 AM
You guys are making amazing progress.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 03, 2014, 12:25:57 PM
If you call this progress:

(http://www.cesspit.net/misc/catabug2.gif)

Anyway. Loading a second .png crashes the program. After adding a few debug flags it seems the crash happens in the reload_tileset() function, which actually does the loading since even the load_tileset() function does nothing:
int sx = w / tile_width;
int sy = h / tile_height;

The crash is there. So I'm guessing it may be a divided by zero crash. In fact what I'm doing is to skip all the json side of things. And it seems that tile_width is actually initialized into load_tilejson_from_file()

So now I'll try to give hard values to those variables. I'm really just trying to do it bluntly, then whenever it actually works we'll think about making it smoother.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 03, 2014, 02:33:42 PM
You've got more progress than me. I still can't get the 0.A master to compile. Probably wrong setup of dependencies. Will figure it out later.
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on March 03, 2014, 08:42:25 PM
Dang, that menu actually looks kinda cool.

But it melts my eyes, so there's that.
Title: Re: ASCII/Retro tileset
Post by: Chase on March 03, 2014, 10:59:26 PM
I got the new version to compile just fine over here on windows mingw. Mind you, I tweaked the #includes a bit see #6410 (https://github.com/CleverRaven/Cataclysm-DDA/pull/6410)
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 02:04:24 AM
I got the new version to compile just fine over here on windows mingw. Mind you, I tweaked the #includes a bit see #6410 (https://github.com/CleverRaven/Cataclysm-DDA/pull/6410)

Could you figure out what I've tried to do?

Duplicating the png reading functions to have two tilesets active doesn't seem a big deal, but we'll probably need a function that reads ASCII color+glyph from the json files with all the object entries, and then figure out how the png is indexed to pick the correct tile number.

See this for an example of how this second png is organized:
http://cesspit.net/misc/source.png
Title: Re: ASCII/Retro tileset
Post by: Chase on March 04, 2014, 02:12:42 AM
I really don't think we should use a PNG with the colored tiles included. We can recolor them on the fly with SDL2. This will use around 16 times less memory and not be appreciably slower.

You really shouldn't try and load two complete tilesets at the same time. If that is what you are actually doing. I really don't see the benefit to this.

Send me a message with exactly what you want the end result to be and I can advise you a bit on what you need to do.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 04, 2014, 03:02:46 AM
I think that HRose and I both want the same thing, and I've been telling you exactly what I wanted to see in the game for a while now. And it does necessitate loading a second PNG tilepage. In the end, the game must have three tilesets loaded: One "curses" set of generated console font, for UI; one ASCII set loaded from a provided PNG; and one object graphics tiles set loaded as it is now. The game must use the generated font tiles for UI only, and use a combination of ASCII and graphics tiles for main viewport display. It should effectively look like this:
(click to show/hide)
Note lack of "unknown" tiles for monsters that don't have tiles defined. Right now this effect was achieved with your Tileset Editor program's ASCII generation function, with subsequent manual editing of the resulting PNG to replace ugly shrunken text with HRose's colored ASCII.

(The UI doesn't have to use the curses font as it can load PNGs already, but I find the sidebar quite wide enough as it is, and the default terminus font is pretty good for displaying text.)
Title: Re: ASCII/Retro tileset
Post by: FunsizeNinja123 on March 04, 2014, 03:07:31 AM
I like it...
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 01:03:47 PM
So, after setting tile_width and tile_weight the second tileset.png is loading. The game works without crashing.

Obviously it's not using the second tile at all. So now I have to figure out the drawing function to make some tests and see if I can print something from the second tile instead.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 01:14:08 PM
I think I already hit a wall.

If the functions that draw the tiles are within the tile object, then I can't call a different object from within the first tile object.

So how the hell do I tell it to use a ASCII fallback tileset if we are in a specific tile object already? I can't do this from inside the object. And the function that looks up which tile to draw seems to be within the object.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 02:07:16 PM
Ugly attempt part 2.

To bypass the whole two tile thing, I now pasted my ASCII fallback png right into the tile png:
Tiles Created: 5824

It loads fine, runs fine. Obviously the ASCII tiles aren't being used, but at least they are indexed and accessible.

Now I'm trying to reverse engineer the tile_ids->find()

I'm guessing that in any case these functions are only looking into tile_config.json, so how the hell can we look into the data json to retrieve symbol+color?

Anyway, tile_ids are put into tile_id_iterator, and that's tile_id_map::iterator

I can' currently find where tile_ids->find() is defined.

What happens next is:
tile_type *display_tile = it->second;
then
draw_tile_at(display_tile,screen_x,screen_y,rota);

So I need a way to first check for  symbol+color into the data json, then give a correct value to display_tile, since I have no idea what it contains until I find where it's defined.

We are a LONG way to get this done. It doesn't look like it will happen, at least if I have to do it myself.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 02:18:35 PM
Yeah, well it's enough. I'm done wasting my time when someone who knows the game could probably do this in half an hour.

I have no way of looking into the data json from the tile object, so this is way beyond my skills and the convoluted design of Cataclysm.

So, again, I'm done.
Title: Re: ASCII/Retro tileset
Post by: Zireael on March 04, 2014, 03:16:52 PM
I think that HRose and I both want the same thing, and I've been telling you exactly what I wanted to see in the game for a while now. And it does necessitate loading a second PNG tilepage. In the end, the game must have three tilesets loaded: One "curses" set of generated console font, for UI; one ASCII set loaded from a provided PNG; and one object graphics tiles set loaded as it is now. The game must use the generated font tiles for UI only, and use a combination of ASCII and graphics tiles for main viewport display. It should effectively look like this:
(click to show/hide)
Note lack of "unknown" tiles for monsters that don't have tiles defined. Right now this effect was achieved with your Tileset Editor program's ASCII generation function, with subsequent manual editing of the resulting PNG to replace ugly shrunken text with HRose's colored ASCII.

(The UI doesn't have to use the curses font as it can load PNGs already, but I find the sidebar quite wide enough as it is, and the default terminus font is pretty good for displaying text.)

This is amazing!
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 03:42:17 PM
By the way, the big problem here is that the tile code works on a completely different level than curse.

This means that tile functions don't have even the vague idea of what a "color" or a "symbol" is. The tile functions know a bed is a string ID "bed", and then it looks up to the tile number associated. THERE'S NO FUCKING WAY to recognize the bed as a '#' standard. We have the IDs of objects, but nothing else. So we don't know anything that is associated with that IDs in the data json.

There's obviously no way for each frame and each single tile to search through all the data files and find a specific ID. It's insane. So the only way I could think to do this, would be about initializing a kind of library object specific for ASCII fallback and to store along with the tile object. So we go through ALL the data json, and store every ID with matching color and symbol. At that point you actually can have a simple lookup by using that library object.

But that means writing a json parser that builds the object and a lookup function. All stuff beyond my level. And probably beyond the interest level of those who could do it.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 04, 2014, 05:04:00 PM
At this point it seems the quickest workaround is to get Chase's tileset editor to generate custom ASCII tiles for all missing objects. Literally the only thing missing is the "custom ASCII" bit, as the program already does everything else. I have exactly zero experience with Java though, so even with the project on GitHub, I'm kinda skeptical of my abilities to add it. I don't think I can't try though. :P
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 06:10:00 PM
Narc0tiq in chat was helping.

Unsurprisingly, this can be done in a couple of lines of code. This already compiles:

long whatsymbol;
    long whatcolor;
    if (it == tile_ids->end()) {
        whatsymbol = furnmap[id].sym;
        whatcolor = furnmap[id].color;
    }

We need to find all the maps available to cover each thing that can be drawn.

Then we need to figure out how to convert those longs and use them to point to the right tile.
Title: Re: ASCII/Retro tileset
Post by: ramesesniblet on March 04, 2014, 08:54:08 PM
I really hope this doesn't get abandoned, it's my favourite tileset :( I hope that a decent solution gets hammered out soon, if at least for my tendency to get mauled by random #'s.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 04, 2014, 09:03:59 PM
Actually something is getting done. Discussion is ongoing:
https://github.com/CleverRaven/Cataclysm-DDA/issues/4236

Even when it works it will probably still have its shortcomings. Performance could also be an issue here.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 05, 2014, 02:54:40 AM
Got ASCII fallback working locally.

Tomorrow I'll post a package that includes everything, to test.

There are some issues with stuff that uses two colors, so in those cases the color you see might be wrong. But in general it should be now be impossible to see the "unknown" tile. Everything missing is shown in ASCII.

There's stuff that breaks the function, like walls. But that's stuff that should be already covered by the tileset. Plus tomorrow I'll try some code that fixes that too.

It's a very ugly implementation, but it works.
Title: Re: ASCII/Retro tileset
Post by: Robik on March 05, 2014, 06:52:33 AM
I'd like to know, how are making your png files, are you really drawing in that one ugly png or are you using some sort of application (of function in drawing application) to glue tiles together in one png? Or if said application simplifies drawing in tiles, like showing boundaries or something?

Thanks!
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 05, 2014, 07:41:56 AM
I'd like to know, how are making your png files, are you really drawing in that one ugly png or are you using some sort of application (of function in drawing application) to glue tiles together in one png? Or if said application simplifies drawing in tiles, like showing boundaries or something?

Thanks!
Back when I tried making a tileset for Dwarf Fortress, I used Photoshop and its grid overlay. Splitting a giant image into lots of small ones doesn't really simplify anything, especially if you can reuse some elements for variants.
Title: Re: ASCII/Retro tileset
Post by: Robik on March 05, 2014, 08:51:46 AM
I'd like to know, how are making your png files, are you really drawing in that one ugly png or are you using some sort of application (of function in drawing application) to glue tiles together in one png? Or if said application simplifies drawing in tiles, like showing boundaries or something?

Thanks!
Back when I tried making a tileset for Dwarf Fortress, I used Photoshop and its grid overlay. Splitting a giant image into lots of small ones doesn't really simplify anything, especially if you can reuse some elements for variants.

I should maybe explain why I want to know :)

I am planning doing tileset studio. Main difference from the Chase's editor would be that tiles will be separate files (one png per tile) in directory structure. It should simplify searching for and mapping tiles on objects. Function for easy cloning would be of course there, for reusing in variants. Mapping on object would be on tile side (I didn't settle on this one yet) and tile.png and tile.json would make a pair of defining files, in similar fashion like in programming editors, where are pairs of files, one defining looks and second defining the function.

Now, all this work make sense only if people, who are making tilesets are not using something like that already, being it standalone software or built-in function of graphics editor.

Things that will be in before I even start to think about releasing it to the world
1) Import - it takes tileset as is prepared for game, and will make entire project from it (creating project definition, basic directory structure, png splitting and naming, generating jsons with links between png files and game objects), you can then alter directory structure and naming to your liking, where necessary, some problems below...
   - how to name tiles which are used on multiple objects (because name will be from object id), I can either name it after first one,  or making clones ?
   - there are some special tiles (one of them for unknown tile) are there more specials? is it documented somewhere?
   - is there some sort of description of tileset.json file? it looks simple but there are some rotating things multitile things and maybe other things?
2) Export - it 'compiles' entire project into the form that the game recognize

It should include user defined font tiles for auto generation where tile is not directly defined for object, but HRose is working on adding such support into the game itself, so my editor would just make another png from font tiles, instead of autogenerating missing tiles, while exporting.

Why I think it is good idea?
Aside from mentioned browsing thru the tiles, collaboration of more people on one tileset will be much easier.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 05, 2014, 09:09:54 AM
It should be far better to make a program that loads compiled packages of tiles (i.e. single large files) but breaks them down to single tiles for operation, and resaves them as a whole package again. This way people can collaborate on packages, and you don't end up with eight hundred individual little PNGs fragmenting your harddrive.
Title: Re: ASCII/Retro tileset
Post by: Robik on March 05, 2014, 09:18:12 AM
It should be far better to make a program that loads compiled packages of tiles (i.e. single large files) but breaks them down to single tiles for operation, and resaves them as a whole package again. This way people can collaborate on packages, and you don't end up with eight hundred individual little PNGs fragmenting your harddrive.

Scenario:
Tileset project has 2 directories
  Adam
  Ben

They decide that Adam will work on zombies and Ben on Furniture.

If Adam want to share his work with Ben, he just send zipped directory to him, it includes all tiles he made along with mapping to objects. Ben just unzip it in Adam directory. Done!

How would you put work of two people together in your case?
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 05, 2014, 09:33:41 AM
Have two separate image files, each with its own definition file (which doesn't have to be JSON for this purpose, plain text will do for indexed IDs and comments).

One person sends his pair of files to the other. The other person uses the program to load his set, and the other set - each set is broken up into individual images upon loading, so they can all be worked on individually. The end result is a single big set that can be saved together, and any overlap and conflicts can be resolved as needed before export. This setup allows to easily filter by author and save sub-selections of the entire loaded tileset, while still not resulting in hundreds of files for the OS to choke on.
Title: Re: ASCII/Retro tileset
Post by: Robik on March 05, 2014, 09:49:34 AM
Have two separate image files, each with its own definition file (which doesn't have to be JSON for this purpose, plain text will do for indexed IDs and comments).

One person sends his pair of files to the other. The other person uses the program to load his set, and the other set - each set is broken up into individual images upon loading, so they can all be worked on individually. The end result is a single big set that can be saved together, and any overlap and conflicts can be resolved as needed before export. This setup allows to easily filter by author and save sub-selections of the entire loaded tileset, while still not resulting in hundreds of files for the OS to choke on.

I am not saying it cannot be done your way, but why would I want to do something so complicated?

Beauty of my solution is that it is more simple for me to make, why program some sort of in-editor merging support, when there are directory and file merging utilities already, like WinMerge.

And if the only argument for such solution is hundreds of files to fragment your HDD and have your OS to choke on? Well, you should check how many files the CDDA has itself... or Windows folder for that matter.
Title: Re: ASCII/Retro tileset
Post by: Zireael on March 05, 2014, 10:07:49 AM
As I already said, you're making great progress, HRose.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 05, 2014, 12:03:54 PM
Have two separate image files, each with its own definition file (which doesn't have to be JSON for this purpose, plain text will do for indexed IDs and comments).

One person sends his pair of files to the other. The other person uses the program to load his set, and the other set - each set is broken up into individual images upon loading, so they can all be worked on individually. The end result is a single big set that can be saved together, and any overlap and conflicts can be resolved as needed before export. This setup allows to easily filter by author and save sub-selections of the entire loaded tileset, while still not resulting in hundreds of files for the OS to choke on.

I am not saying it cannot be done your way, but why would I want to do something so complicated?

Beauty of my solution is that it is more simple for me to make, why program some sort of in-editor merging support, when there are directory and file merging utilities already, like WinMerge.

And if the only argument for such solution is hundreds of files to fragment your HDD and have your OS to choke on? Well, you should check how many files the CDDA has itself... or Windows folder for that matter.
When the beauty of your solution lies in how easy it is for you to make, rather than how easy it is for others to use, you may be better off making things for yourself only.

Cataclysm on the whole has 18-something hundred files.
A complete Cataclysm tileset has a little over 24 hundred tiles.
Of course, that's not as bad as, say, Cortex Command.

But frankly, I see absolutely no benefit to working on several hundred separate files that are really separate. Do you give each tile its own definition file? Do you sort through twenty hundred picture/textfile pairs when you need to extract a subset of your work to send to someone? Or do you have one definition file for the whole set?
You can much easier load a single 16xN tileset image file and split it into tiles for working with them - a little like this program does. It allows you to import tileset pages whole, and pick out which tiles you want to use, splitting them up for the user's convenience, without having to keep every tile you make in a separate file and load it separately.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 05, 2014, 12:09:34 PM
I'd like to know, how are making your png files, are you really drawing in that one ugly png or are you using some sort of application (of function in drawing application) to glue tiles together in one png? Or if said application simplifies drawing in tiles, like showing boundaries or something?

Oh, I don't know. I use an ancient Paint Shop Pro version, mostly. Just zoom in, and sometimes use a 10x10 grid to see the tile sizes.

If you look for a good program to do pixel drawing there's Grafx2.
Title: Re: ASCII/Retro tileset
Post by: Robik on March 05, 2014, 12:32:22 PM
Have two separate image files, each with its own definition file (which doesn't have to be JSON for this purpose, plain text will do for indexed IDs and comments).

One person sends his pair of files to the other. The other person uses the program to load his set, and the other set - each set is broken up into individual images upon loading, so they can all be worked on individually. The end result is a single big set that can be saved together, and any overlap and conflicts can be resolved as needed before export. This setup allows to easily filter by author and save sub-selections of the entire loaded tileset, while still not resulting in hundreds of files for the OS to choke on.

I am not saying it cannot be done your way, but why would I want to do something so complicated?

Beauty of my solution is that it is more simple for me to make, why program some sort of in-editor merging support, when there are directory and file merging utilities already, like WinMerge.

And if the only argument for such solution is hundreds of files to fragment your HDD and have your OS to choke on? Well, you should check how many files the CDDA has itself... or Windows folder for that matter.
When the beauty of your solution lies in how easy it is for you to make, rather than how easy it is for others to use, you may be better off making things for yourself only.

Cataclysm on the whole has 18-something hundred files.
A complete Cataclysm tileset has a little over 24 hundred tiles.
Of course, that's not as bad as, say, Cortex Command.

But frankly, I see absolutely no benefit to working on several hundred separate files that are really separate. Do you give each tile its own definition file? Do you sort through twenty hundred picture/textfile pairs when you need to extract a subset of your work to send to someone? Or do you have one definition file for the whole set?
You can much easier load a single 16xN tileset image file and split it into tiles for working with them - a little like this program does. It allows you to import tileset pages whole, and pick out which tiles you want to use, splitting them up for the user's convenience, without having to keep every tile you make in a separate file and load it separately.

Well, so far, your arguments were that if would be hard for HDD and OS, not for the user. If it would be inconvenient for user, then the application is not well thought.

Each tile would have it's own json, with links to its assigned game objects, but user will not have to edit them manually, they fill themselves automatically when user picks tiles for object.

For sending subset of your work, it is much easier to have files separated and let user use file manager of their choosing (I prefer FreeCommander and its folder and file comparing and synchronizing ) to copy only tiles the want to send, than trying to program equivalent into the editor itself.

Now, I don't think I can convince you, and I do not want to. I just posted here to get people ideas and how they are working currently. So I appreciate your input even when I do not agree with you. In the end, after it is done, it will be tile-makers who will decide if it is good enough for them or not.
Title: Re: ASCII/Retro tileset
Post by: Robik on March 05, 2014, 12:48:21 PM
I'd like to know, how are making your png files, are you really drawing in that one ugly png or are you using some sort of application (of function in drawing application) to glue tiles together in one png? Or if said application simplifies drawing in tiles, like showing boundaries or something?

Oh, I don't know. I use an ancient Paint Shop Pro version, mostly. Just zoom in, and sometimes use a 10x10 grid to see the tile sizes.

If you look for a good program to do pixel drawing there's Grafx2.

Thanks for info.

And sorry for hijacking your thread somewhat, it was not my intention :)
Title: Re: ASCII/Retro tileset
Post by: HRose on March 05, 2014, 04:24:16 PM
It seems the last official experimental is broken. So I can't test how well the code works.

On the old version ASCII fallback is fine. It can display some colors wrong and it has a number of other minor issues, but it works.

I could package the older version, but I'll wait a bit to see if they fix the experimental.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 05, 2014, 04:50:16 PM
Here's a build if you want to test:
www.cesspit.net/misc/cataf.zip

This includes everything. It has my colors, it has ASCII fallback and it's using by default RetroDays (with some minor changes as I was fiddling with it), since my tileset crashes the program for some reason.

Since RetroDays bsically covers most stuff, it's actually rare to see ASCII, but the point is that you shouldn't be able to see the "unknown" symbol as everything comes either from the tileset or it's drawn in ASCII.

And there seem to be some problems displaying traps.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 05, 2014, 06:49:24 PM
Updated to the latest experimental:
http://www.cesspit.net/misc/cataf3.zip
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 05, 2014, 07:24:29 PM
And I managed to sledgehammer my way through some Java code and made Chase's tileset editor capable of generating bitmap ASCII.

And hopefully not earning an infraction for triple posting - I am prepared to humbly admit victory. :P

(click to show/hide)

Down at the bottom is all the generated tiles. It still needs some polish and proofing against user error (such as selecting a tileset of mismatched dimensions), but it can now autogenerate ASCII tiles from a bitmap file.

Updated program (https://dl.dropboxusercontent.com/u/4152380/cddatse_0.10_CSJM_Custom.zip)
Updated source (https://dl.dropboxusercontent.com/u/4152380/CDDA-Tileset-Editor-master.zip)
The RetroDays tileset padded with ASCII (https://dl.dropboxusercontent.com/u/4152380/RetroDaysTileset.zip)

Well, "capable" is the wrong word - now all it can do is the bitmap ASCII. I gotta split them functions at some point. But it already seems to work.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 05, 2014, 09:35:24 PM
Fixed traps:
http://www.cesspit.net/misc/cataf4.zip
Title: Re: ASCII/Retro tileset
Post by: HRose on March 06, 2014, 02:49:09 AM
Fixed some dll dependencies:
http://www.cesspit.net/misc/cataf5.zip

This build actually WORKS, compared to the current official experimental builds that crash. So basically this version is recent and working.
Title: Re: ASCII/Retro tileset
Post by: Robik on March 06, 2014, 06:24:51 AM
Fixed some dll dependencies:
http://www.cesspit.net/misc/cataf5.zip

This build actually WORKS, compared to the current official experimental builds that crash. So basically this version is recent and working.

Its working indeed!

Great work. I noticed you went with one png file in the end instead of two.
Title: Re: ASCII/Retro tileset
Post by: Necrucifer on March 06, 2014, 09:14:06 AM
Color seems a bit too bright in terms when it comes to the menu and font, more like a fluorescent bright and a bit hard on my eyes. I could always set my screen a more halogen tone so no worries but wondering if somehow there is a way to tweak it otherwise? Otherwise awesome and thanks though :) Any difference between the regular tile and full? Both seem the same but figured I would ask if I missed something.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 06, 2014, 12:06:10 PM
Well, I tweaked the colors mostly because I don't like the almost fluorescent greens and magenta, but the text colors are in data/raw you can always change them as you like.

I'll probably keep updating that version from time to time, but in this case is just tweaks to the tileset, not code. But if you download an incomplete zip it's because I'm uploading a new one.

http://www.cesspit.net/misc/cataf5.zip

The problem with RetroDays tileset is that he "overdrew" it. All the things look very nice when you look at them on the tileset, but in the game they often look like an unreadable smudge of pixels. The problem is that he uses too much single pixels and sometimes even more than one color, all things that I tried to avoid exactly because they are too small to look good. So at times I tweak his tiles to be more stylized and less detailed, or to use colors with more contrast, or even to remove the reference, so that we get the straight ASCII.

Also changed the item highlight box to be less intrusive I expect many won't like it.
Title: Re: ASCII/Retro tileset
Post by: Necrucifer on March 06, 2014, 12:30:20 PM
Well, I tweaked the colors mostly because I don't like the almost fluorescent greens and magenta, but the text colors are in data/raw you can always change them as you like.

Understandable and thank you. Also not sure if you knew this but even though the menu screens act a bit glitchy, it seems that driving lags but only tried this out on one world so far. No worries though, still glad you did this. Thanks again.

Seems to be fine in windowed in terms of the menu's acting weird though.
Title: Re: ASCII/Retro tileset
Post by: Natures Witness on March 06, 2014, 02:37:38 PM
Is there any chance the ASCII fallback parts of this could be moved into mainline?  These changes would be an incredible boon to ALL of Cata, not just for tilesets, but people making new content of any kind; it seems a shame to not use that potential to it's fullest.  I understand the actual tiles part of this can't be included until we get the red tape out of the way, but until then a lot of people could benefit from the hard work you've done on the code side of this.

On a personal note HRose, let me say I'm VERY impressed with how much you've been able to accomplish on this by yourself, on a problem that so many people have been unable to resolve for so long.  This has become much more than a really cool tileset, it's a massive improvement to the entire graphics engine.
Title: Re: ASCII/Retro tileset
Post by: Zireael on March 06, 2014, 03:21:33 PM
Is there any chance the ASCII fallback parts of this could be moved into mainline?  These changes would be an incredible boon to ALL of Cata, not just for tilesets, but people making new content of any kind; it seems a shame to not use that potential to it's fullest.  I understand the actual tiles part of this can't be included until we get the red tape out of the way, but until then a lot of people could benefit from the hard work you've done on the code side of this.

On a personal note HRose, let me say I'm VERY impressed with how much you've been able to accomplish on this by yourself, on a problem that so many people have been unable to resolve for so long.  This has become much more than a really cool tileset, it's a massive improvement to the entire graphics engine.

I was going to ask the same thing...
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 06, 2014, 03:41:15 PM
Is there any chance the ASCII fallback parts of this could be moved into mainline?  These changes would be an incredible boon to ALL of Cata, not just for tilesets, but people making new content of any kind; it seems a shame to not use that potential to it's fullest.  I understand the actual tiles part of this can't be included until we get the red tape out of the way, but until then a lot of people could benefit from the hard work you've done on the code side of this.

On a personal note HRose, let me say I'm VERY impressed with how much you've been able to accomplish on this by yourself, on a problem that so many people have been unable to resolve for so long.  This has become much more than a really cool tileset, it's a massive improvement to the entire graphics engine.

I was going to ask the same thing...
Same here. Nice work, HRose.

Although I've been wondering. Looking (more like sneaking a peek) at your code, it looks like you're essentially generating a tileset for the game to use on the fly. That is, pretty much doing exactly the same thing that Chase's tileset editor is (now) doing, except done within the game and in C++ instead of Java. Maybe you could reuse some of the algorithms that are used there? (though I suspect you have more of the thing figured out than I have)
Title: Re: ASCII/Retro tileset
Post by: HRose on March 06, 2014, 04:17:40 PM
Even if this took hours and hours and hours in the last few days, I've written something like three lines of stupid code.

I've simply merged the content of the ASCII png into the tileset png so we just load one. Then used this chunk of code written by someone else to retrieve symbol+color of an object:

Code: [Select]
bool fuck = false;
    long sym = 0;
    nc_color col = c_white;
    if (it == tile_ids->end()) {
        if (category == "furniture") {
            if (furnmap.count(id) > 0) {
                const furn_t &f = furnmap[id];
                sym = f.sym;
                col = f.color;
                fuck = true;
            }
        } else if (category == "terrain") {
            if (termap.count(id) > 0) {
                const ter_t &t = termap[id];
                sym = t.sym;
                col = t.color;
                fuck = true;
            }
        } else if (category == "monster") {
            if (MonsterGenerator::generator().has_mtype(id)) {
                const mtype *m = MonsterGenerator::generator().get_mtype(id);
                sym = m->sym;
                col = m->color;
                fuck = true;
            }
        } else if (category == "vehicle_part") {
            if (vehicle_part_types.count(id.substr(3)) > 0) {
                const vpart_info &v = vehicle_part_types[id.substr(3)];
                sym = v.sym;
                col = v.color;
                fuck = true;
            }
        } else if (category == "field") {
            for(int i = 0; i < num_fields; i++) {
                if(field_names[i] == id) {
                    sym = fieldlist[i].sym;
                    col = fieldlist[i].color[0];
                    fuck = true;
                }
            }
        } else if (category == "item") {
            if (item_controller->has_template(id)) {
                const itype *i = item_controller->find_template(id);
                sym = i->sym;
                col = i->color;
                fuck = true;
            }
        }
    }

It basically goes through the categories and takes out the values. Since I didn't know those structures were available, or even existed, I couldn't have written that piece of code.

Then I simply override the tile value before the draw function is called:

Code: [Select]
if (fuck) {
        int whatc = color_to_int(col);
        if(sym > 256 || sym < 0) sym = 666;
        if(whatc > 15) whatc = whatc % 16;
        display_tile->fg = 1744 + sym + (256 * whatc);
        display_tile->bg = 0;
        if(sym == 666){
            display_tile->fg = 54;
        }   
    }

This last bit is the piece of code I made. The basic formula takes 1744 (where the ASCII tile starts), the symbol which is the number of the ASCII, and then 256*whatc that is basically an offset for the color.

So right now the ASCII fallback itself would only work on the tileset I use. If you load a different tileset it wouldn't have an ASCII png and wouldn't work properly. Even if you added ASCII into a tileset it wouldn't work because the code uses hardcoded numbers.

I doubt this will be included in mainline anytime soon, because the code needs to be fixed and they didn't even like how I made it work.

The "history" of this thing is here: https://github.com/CleverRaven/Cataclysm-DDA/issues/4236
Title: Re: ASCII/Retro tileset
Post by: HRose on March 07, 2014, 05:37:54 PM
New build with lots of changes on top of the latest experimental. The default changed: if you boot the game as it is you see the full ASCII fallback in action.

If instead you want to have the tileset you have to copy the content of the "/gfx/RetroDaysTileset - full" over to the standard "RetroDaysTileset".

http://www.cesspit.net/misc/cataf6.zip
Title: Re: ASCII/Retro tileset
Post by: HRose on March 09, 2014, 09:06:09 PM
New test version:
http://www.cesspit.net/misc/catatileless.zip

This is entirely WITHOUT tiles. It's just ASCII rendering as in straight ASCII mode, but it loads by default Terminus font for the UI and a 9x9 font for the map.

I've included various other fonts for the map 8x8, 9x9, 10x10, 15x15. To switch them you have to edit data/fontdata.json

(http://www.cesspit.net/misc/catatileless.gif)

(http://www.cesspit.net/misc/catatileless15.gif)
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 10, 2014, 09:01:00 AM
Okay, so after a brief test run (which involved a random new character finding three gunshops back-to-back on the edge of the city... much shooting ensued), here's what I think.

Mighty well done! ^_^

The bonus here (compared to my "implementation" :P) is that it allows you to choose your color scheme, and the colors look quite nice (even if they take a bit of getting used to). Plus of course it's blisteringly fast (but no zoom :( ), and doesn't require much doing to use.

Of the downsides (besides no zoom), I can note that it doesn't seem to use altered tiles for walls? Is that a limitation, or will it also be worked out later?
Title: Re: ASCII/Retro tileset
Post by: Zireael on March 10, 2014, 09:58:21 AM
On my end, it suffers from the same slowdown the experimental does. Is it related to viewport size or something? Although 0.A on the same settings runs quickly...

EDIT: Reducing the viewport size slightly solved the problems.
Title: Re: ASCII/Retro tileset
Post by: HRose on March 10, 2014, 12:32:12 PM
Yeah, the same issues affecting ASCII affect this mode. So it can get slow on a big window and there's no zoom.

I wasn't even aware of a zoom mode.
Title: Re: ASCII/Retro tileset
Post by: Sean Mirrsen on March 10, 2014, 01:26:48 PM
And the wall tiles?
Title: Re: ASCII/Retro tileset
Post by: HRose on March 16, 2014, 05:47:58 PM
All code is merged, so both ASCII png and ASCII fallback are in the last experimental.

This is a small package that includes the required .dlls (otherwise you'll get crashes) three ASCII sets (9x9 used by default, a 8x8 and a 15x15), and my last tweak of RetroDays tileset with built-in ASCII fallback. Plus my color definitions.

By default the game will run in a 1120x736 window with standard Terminus font for UI and a 9x9 ASCII set for map graphic. To switch to graphic tile just use the game option.

To switch UI or map font you have to edit /data/fontdata.json
To change default colors /data/raw/colors.json

http://www.cesspit.net/misc/asciitile.zip
The file should be unzipped in the main Cataclysm directory after you unpack the latest experimental: http://ci.narc.ro/view/Cataclysm-DDA/job/Cataclysm-Matrix/Graphics=Tiles,Platform=Windows/lastSuccessfulBuild/
Title: Re: ASCII/Retro tileset
Post by: Robik on March 16, 2014, 06:11:40 PM
Do ASCII png and tileset png where tile size is different work with each other?
Title: Re: ASCII/Retro tileset
Post by: HRose on March 16, 2014, 07:13:09 PM
In this package the ASCII png is used on the map, so it replaces tiles. As I said by default it's Terminus on text, ASCII 9x9 on the map.

If you use tiles you don't need any ASCII png, you use the tiles png.
Title: Re: ASCII/Retro tilesets
Post by: Paquito on May 26, 2014, 05:56:49 PM
Bump.

What needs to be done to get this tileset in an official release? I work full time as a C++ developer, I'd be happy to help.
Title: Re: ASCII/Retro tilesets
Post by: noego on May 29, 2014, 04:23:34 AM
I don't think this is working with the latest experimental. Tried writing the original experimental and the game doesn't start. I noticed a file logg.txt that says:

------------------
Initializing SDL Tiles context
Attempting to Initialize JSON and TILESET path information from [gfx]
   JSON path set to [gfx/RetroDaysTileset/tile_config.json].
   TILESET path set to [gfx/RetroDaysTileset/retrodaystiles.png].
Attempting to Load JSON file
-----------------
Title: Re: ASCII/Retro tilesets
Post by: noego on May 29, 2014, 06:44:20 AM
Never mind, I'm an idiot. Was downloading stable, not experimental.
Title: Re: ASCII/Retro tilesets
Post by: Heema on June 02, 2014, 08:33:54 AM
will you post an updated 20x version ?
Title: Re: ASCII/Retro tilesets
Post by: Antistar on June 03, 2014, 04:39:05 AM
will you post an updated 20x version ?

Not sure if it's exactly what you're after, but I updated this tileset as 'RetroDays (http://smf.cataclysmdda.com/index.php?topic=5482.0)'; 10x and 20x versions.
Title: Re: ASCII/Retro tilesets
Post by: Heema on June 04, 2014, 12:06:36 PM
will you post an updated 20x version ?

Not sure if it's exactly what you're after, but I updated this tileset as 'RetroDays (http://smf.cataclysmdda.com/index.php?topic=5482.0)'; 10x and 20x versions.

Thanks but i meant the latest version that's in the experimental release, as i am using the latest experimental (1585)
Title: Re: ASCII/Retro tilesets
Post by: Antistar on June 04, 2014, 12:36:52 PM
Thanks but i meant the latest version that's in the experimental release, as i am using the latest experimental (1585)

The one in experimental is a quite outdated version of RetroDays altered by HRose to include some fallback stuff. I updated RetroDays a fair bit beyond that point; everything in 0.A stable accounted for, plus a few new things in experimental. It doesn't have the fallback stuff though, so... it depends on what you're after. :)