# On Tiles and Why We Don't Have Them (But we're progressing. Thanks utunnels)

**URL:** <https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197>\
**Category:** The Lab\
**Created:** [February 8, 2013, 6:02pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197 "2013-02-08T18:02:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [February 8, 2013, 6:02pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/1 "2013-02-08T18:02:45Z")

</div>

There is currently not a tileset system. There used to be, thanks to the awesome coder Gremour, but he has retired. We would love for there to be one again, but none of us have the time on top of all the other things that need to be done. We all agree we should have support for tilesets available, though, and it isn’t actually as difficult as one might suspect because a good portion of the work has been done for us. There is still work to do, however.

And you can help.

If you want to see tileset support, start here: [http://whalesdev.com/forums/index.php?topic=1170.0](http://whalesdev.com/forums/index.php?topic=1170.0)  
Anyone who can bring Gremours support up to date or come up with their own implementation, it WILL go in the game. So get 'er done! Linked in his thread are also the two most advanced tilesets available, one of which we will likely end up packaging with the “default graphics pack” version of the game on the front page. But none of that can be done until the code is made compatible with DDA.

So come on and help us out, and get tiles working with the game! Post your results in the Mod forum and if it works well, we’ll roll it into mainline.

---

<div class="post-metadata">

**Author:** ![gim](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/gim/32/827_2.png) [@gim](https://discourse.cataclysmdda.org/u/gim)\
**Post date:** [March 2, 2013, 9:42pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/2 "2013-03-02T21:42:13Z")

</div>

I’m not sure in what state current line is, so thoughts below are based on code that’s in my branch [https://github.com/gim913/Cataclysm](https://github.com/gim913/Cataclysm)

I was thinking about it some time ago, but the problem is Cataclysm intermix logic with “rendering”.  
This was the reason I had some problems when doing ‘native windows console’ port, and also the reasons why I’ve made small ‘hacks’ (i.e. for animations).

This really IS a problem.  
It even is a little bit worse, logic and rendering are intermixed, and Cataclysm’s ‘animations’ are also intermixed somewhere between those two.

So before starting any tileset support, I would start with separating rendering part from logic.  
(This would allow having different frontends: \*nix curses, windows console, libtcod perhaps, sdl/gl)

But I think this is quite overwhelming task and I don’t suppose anyone is willing to make that effort.

---

<div class="post-metadata">

**Author:** ![Shades](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Shades](https://discourse.cataclysmdda.org/u/Shades)\
**Post date:** [March 2, 2013, 11:45pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/3 "2013-03-02T23:45:27Z")

</div>

> [@gim](#):
>
> But I think this is quite overwhelming task and I don’t suppose anyone is willing to make that effort.

That, along with rewriting how the save files work, and how the maps work, are high up on my ‘things I really want’ list. Fixing them opens up a lot of interesting options, but the actual fix work itself is long and boring so kinda get ignored ☹

---

<div class="post-metadata">

**Author:** ![Tase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/tase/32/867_2.png) [@Tase](https://discourse.cataclysmdda.org/u/Tase)\
**Post date:** [March 3, 2013, 1:36am UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/4 "2013-03-03T01:36:56Z")

</div>

I’dd be willing to do some work, but I don’t know what to do and where to start.

---

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [March 3, 2013, 5:31am UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/5 "2013-03-03T05:31:25Z")

</div>

> [@gim](#):
>
> But I think this is quite overwhelming task and I don’t suppose anyone is willing to make that effort.

If you’ll notice, someone already DID. It just needs to be brought up to date.

---

<div class="post-metadata">

**Author:** ![gim](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/gim/32/827_2.png) [@gim](https://discourse.cataclysmdda.org/u/gim)\
**Post date:** [March 3, 2013, 8:31am UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/6 "2013-03-03T08:31:51Z")

</div>

> [@GlyphGryph](#):
>
> If you’ll notice, someone already DID. It just needs to be brought up to date.

I’ve seen it, it is similar to what I’ve done with windows console, it just implements  
ncurses api using gl functions, this is just another ‘hack’ and I still don’t think this is way to go.

Main game loop should look more or less like:

```auto
while (! end)
{
  collectInput();
  processGameLogic();
  processRendering();
}
```

and that’s it. But this would really be HUGE change (if I’m not mistaken almost every file), and one more thing that’s problematic is how cataclysm handles all menus+input 😕

> [@Shades](#):
>
> That, along with rewriting how the save files work, and how the maps work, are high up on my ‘things I really want’ list.

I also wanted to work on that, I’ve even started it at some point, but I was basically getting nowhere, and when I saw the amount of work required,  
I’ve simply gave up ☹

> [@Shades](#):
>
> Fixing them opens up a lot of interesting options, but the actual fix work itself is long and boring so kinda get ignored ☹

Exactly my friend, exactly…

(I’m quite sure at some point someone would even do HTML+JS frontend, which could bring cataclysm popularity to totally new level ;))

---

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [March 3, 2013, 3:11pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/7 "2013-03-03T15:11:35Z")

</div>

If you give me a decent API, I am 100% capable of re-implementing the visual components in html and javascript. That’s actually the closest thing to a specialty I have, after all.

---

<div class="post-metadata">

**Author:** ![Tase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/tase/32/867_2.png) [@Tase](https://discourse.cataclysmdda.org/u/Tase)\
**Post date:** [March 4, 2013, 1:56pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/8 "2013-03-04T13:56:37Z")

</div>

Someone worked on the input collecting recently, and for the process game logic, we’ve got that in 2-3 methods in the loop, but rendering is done everywhere from what I understand. So its that part that needs working on the most before there can be a tile set system, sine at that point we would have draw { drawmap; drawui; drawmenu; } and just either draw glyphs or tileset

-drawmap would iterate through the different arrays we have and draw the terrain, then items and then monsters/npcs/player. Each terrain type, item and monster/npc/player would have a corresponding glyph and tileset offset, either defined in the class itself, (i.e monstertype/npc/player, glyph code, tileset offset) or as a variable in the object itself (ie thing-\>icon, icon could be a type ie Icon { glyphCode, tilesetOffSet })

-drawui would draw the ui as it is now (no tile sets in the ui… ?), also for the “cursor line” we’ve got in 'V’iew, draw it here over maptiles, unless the 'V’iew interface is a menu.

-drawmenu would draw the requested menu (no clue how to handle this, would need a common menu interface, but dunno how to handle the selections/returns, not sure how it’s done ATM)

I agree with gim on the topic of the existing tileset system, it’s not really the way we would want to go, I would rather see that amount of work put into designing a proper rendering engine with no tilesets (reckon at this point tilesets would be very doable) instead of hacking the old tileset system into DDA.

Any comments on the design I suggested ? Flaws, missed issues, technical issues, design issues ?

---

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [March 4, 2013, 4:23pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/9 "2013-03-04T16:23:29Z")

</div>

I’m not sure what you mean by “use a proper rendering system with no tilesets”

---

<div class="post-metadata">

**Author:** ![Shades](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Shades](https://discourse.cataclysmdda.org/u/Shades)\
**Post date:** [March 4, 2013, 4:34pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/10 "2013-03-04T16:34:04Z")

</div>

> [@GlyphGryph](#):
>
> I’m not sure what you mean by “use a proper rendering system with no tilesets”

He means, I think, to abstract out all the rendering code we have so that it is isolated into a handful of functions but still use the current rendering system to actually draw the ascii.

That way it’s nice and clean, all the data is past to the various render functions rather than pulled out by them, and it would be easy\* for someone else to write a tile/3d/audio/whatever renderer at some point in the future.

[sub]\*for varying degrees of easy[/sub]

---

<div class="post-metadata">

**Author:** ![Tase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/tase/32/867_2.png) [@Tase](https://discourse.cataclysmdda.org/u/Tase)\
**Post date:** [March 4, 2013, 6:05pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/11 "2013-03-04T18:05:32Z")

</div>

I spoke to kevin and I was enlightened on how drawing works right now.

Pretty much any function that needs something drawn calls the to draw on a curse window i.e mvwputch(window, x, y, color, char) window being w\_terrain, w\_HP, w\_minimap, and then calls wrefresh(); when done.

This is done so you can draw stuff w/o having to go back in the game loop, i.e the user uses 'V’iew, it doesnt have to make the whole system move, just get the items, draw the window and draw the cursor.

Not sure how we could make this work with a whole unified drawing system while not making the whole system loop. Maybe having the rendering system “look” at arrays and objects, and just have the method call “update” to trigger a screenrefresh, with the renderer doing most of the grunt work (positioning chars, borders, text, etc)

---

<div class="post-metadata">

**Author:** ![gim](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/gim/32/827_2.png) [@gim](https://discourse.cataclysmdda.org/u/gim)\
**Post date:** [March 5, 2013, 6:09pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/12 "2013-03-05T18:09:06Z")

</div>

Small OT here, please take a look at this topic: [http://www.cataclysmdda.com/smf/index.php?topic=352.0](http://www.cataclysmdda.com/smf/index.php?topic=352.0)  
as I think that’s something that should be done before any attempts to do changes in rendering system…

---

<div class="post-metadata">

**Author:** ![Tase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/tase/32/867_2.png) [@Tase](https://discourse.cataclysmdda.org/u/Tase)\
**Post date:** [March 10, 2013, 3:23am UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/13 "2013-03-10T03:23:32Z")

</div>

I ported Gremour’s tiles to the latest DDA

[https://github.com/tasetase/CZSplusDDA/tree/tiles](https://github.com/tasetase/CZSplusDDA/tree/tiles)

There are a few bugs, like you can’t resize the window from the default size, you cant move your view (HJKL) and horizontal walls (and perhaps other horizontal things) don’t get a texture.

I don’t know how to compile it on windows, I tried via Cygwin and it will not compile no matter what Opengl lib I install.

On Linux you can compile it after installing mesa-common-devel and libglu1-dev (this was on Linux Mint 14)

Just do “make tiles” then run ./catatiles

PS: You’ll need a tileset, I used Deon’s and it works fine, just copy all the files you need from the data folder (aka everything you don’t already have in your data folder). Don’t copy his catatiles.

Here is Gremour’s thread : [http://whalesdev.com/forums/index.php?topic=1170.0](http://whalesdev.com/forums/index.php?topic=1170.0)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/1X/21b5d044e8473b25d0bf905d60477e25f6fbe0cf.png) [@system](https://discourse.cataclysmdda.org/u/system)\
**Post date:** [March 10, 2013, 3:36am UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/14 "2013-03-10T03:36:18Z")

</div>

Someone get a windows download for this tileset! I want version 0.2.1!

---

<div class="post-metadata">

**Author:** ![AerialK7](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@AerialK7](https://discourse.cataclysmdda.org/u/AerialK7)\
**Post date:** [March 26, 2013, 3:03am UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/15 "2013-03-26T03:03:46Z")

</div>

Someone should ask Derek Yu to do a tileset, hes an amazing pixel artist and he did the ‘Doom RL’ tileset

---

<div class="post-metadata">

**Author:** ![xxrogxx](https://avatars.discourse-cdn.com/v4/letter/x/e8c25b/32.png) [@xxrogxx](https://discourse.cataclysmdda.org/u/xxrogxx)\
**Post date:** [March 30, 2013, 4:42am UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/16 "2013-03-30T04:42:06Z")

</div>

in my opnion, what makes the “cataclysm” its no tiles.

---

<div class="post-metadata">

**Author:** ![Da-Fort](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@Da-Fort](https://discourse.cataclysmdda.org/u/Da-Fort)\
**Post date:** [March 31, 2013, 12:18pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/17 "2013-03-31T12:18:33Z")

</div>

Though, I have nothing to contribute I want to add this comment.

Some people like the ASCII graphics, others like the tileset.  
I personally like to play more with the tileset over ASCII.  
Be it DF or Cataclysm.

In the end if tileset support does get added I am sure it will all be optional.

---

<div class="post-metadata">

**Author:** ![Binky](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@Binky](https://discourse.cataclysmdda.org/u/Binky)\
**Post date:** [April 2, 2013, 12:53pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/18 "2013-04-02T12:53:17Z")

</div>

My personal view (which I’ve said a few times) is that tiles make a game much more accessible and playable, both to the ‘outside world’ and to all players in general. With ASCII you’re limited to a char. set which only contains a certain number of symbols and as such, in game objects sometimes have to be represented with the same char (guns for instance). This makes searching through stuff tedious (especially in a game like Cata where you’re doing a lot of picking up/searching) whereas with tiles you can just say ‘there’s a shotgun, and a pistol. I’m terrible at shotguns so I’ll go towards the pistol’ instead of having to search both tiles individually. Stone soup is a prime example of this working well, and I don’t think it would have gotten nearly as popular without them.

I understand the ‘nostalgia’/‘I just like it’ value of ASCII, but other than the ‘it helps my imagination’ argument (which to be fair, tiles still require some imagination) I really see no reason whatsoever not to have tiles, other than how fiendishly difficult it is too put in and how fully featured/good a tileset needs to be to make it easy on the eyes.

---

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [April 2, 2013, 2:21pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/19 "2013-04-02T14:21:27Z")

</div>

Also the fact that tilesets slow development, because adding stuff is harder.

---

<div class="post-metadata">

**Author:** ![daftfad](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/daftfad/32/5_2.png) [@daftfad](https://discourse.cataclysmdda.org/u/daftfad)\
**Post date:** [April 2, 2013, 6:41pm UTC](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197/20 "2013-04-02T18:41:33Z")

</div>

Tiles were destroyed in the apocalypse. Sorry guys.

[Next page](https://discourse.cataclysmdda.org/t/on-tiles-and-why-we-dont-have-them-but-were-progressing-thanks-utunnels/197.md?page=2)
