Full Blob 8-bit Auto-tile

1 favourites
  • 9 posts
From the Asset Store
11 loops of RPG, chiptune/8-bit music. Suitable for any pixel art game.
  • Hi all,

    After reading through this thread:

    tilemap-auto-tile-help_t92366?&hilit=tilemap+bitwise

    ...and working through R0J0hound 's neat system for 4-bit autotiling, I thought I'd have a pop at an 8-bit version and came up with this:

    dropbox.com/s/ff0tic8sw1cu0od/bitwiseTilemap_01.c3p

    It uses a full 48 tile map, which means all those corners get properly filled. I've set it up so that at start it'll render any initial tiles laid out in the editor; it takes a few seconds to redraw the starting layout, but after that you can left click to add new tiles and right click to delete.

    For this to work the bitwise values need to be mapped to the correct tile numbers - you can find the mappings in the tilekeys.json file

    For those interested in delving deeper I found these two articles useful:

    http://www.cr31.co.uk/stagecast/wang/blob.html

    https://gamedevelopment.tutsplus.com/tu ... -cms-25673

    EDIT: updated link to demo - improves initial tilemap generation (thanks to jobel for catching this) and fixes new tile creation on left click.

  • I've updated the project file with a nicer tile set.

  • this is simply amazing. you are basically doing my work for me!

    very much appreciate the share!

    you should make an addon from this and sell it in the store!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No worries, glad you're able to make use of it. :-)

    If we ever get the ability to make addons out of events I'd certainly have a crack at it - not quite ready to leap into JS! Or maybe Ashley will develop the current in-editor autotiling into tilemap actions that work at runtime...

  • so one thing about this way of doing it. When you refresh the entire tilemap it takes a few seconds to loop through everything. When placed in a game there's quite a delay. Did you experience this as well? It's something I could hide with a "loading.." icon but it just seems strange since no other calculation I do ever take that long and the game freezes while its happening...

  • I think I found a bug in the loop. It was looping for the Width and Height of the entire tilemap in pixels, not cells... once I changed it to 8x4 it ran super fast. The width/height was 775x405 so I think that's why it was taking so long!

  • Good catch! Thanks for the feedback, I've fixed and updated the demo link.

    It's been a while since I looked at this and in doing so I also found another issue: it used to be the case that if you clicked on an empty tile it would still register as being over the tilemap, but a while back (after me posting this demo) this changed so that empty tiles no longer trigger as over. I've updated so that left clicks work again.

    Also the tile update was repeating whilst the mouse button was down, even if you were on the same tile - I've adjusted the code so it only triggers once whilst on the same tile.

  • Theres a plugin for this, haven't used it myself.

    https://www.construct.net/en/make-games/addons/89/bitwise-auto-tiling-c3

    Always good to have the knowledge to do it yourself though.

  • mekonbekon oh yes I noticed that placing didn't work.. I was only used the initial build part. all good thanks!

    mOOnpunk that's strange I looked everywhere for something like this... I hate to sound like a broken record but the website: forums, store, online doc etc.. have some of the worst search tools and make it extremely difficult to find things... its far worse than the old scirra.com - I can't tell you the number of times I've been burned or wasted time because the search is so bad.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)