• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Diventurer

Autotiling

2 posts in this topic

How do I autotile properly?

 

Right now, I have tried using this method: http://www.codeproject.com/Articles/106884/Implementing-Auto-tiling-Functionality-in-a-Tile-M

(and I've read the source code on there - that's how I wrote my own version of it, as the article was very abstractly written)

 

The problem is, however, that I cannot get it to use more than one tilesheet. (two tiles - dirt and grass)

 

I have been trying and trying for a long time to do it, and I've come across a lot of ways.

Like, making the tilesheet only have one tile, and the secondary tile being transparent - so there are limitless combinations, I also tried making a 9x9 tile that would overlap or underlap neighbour tiles depending on depth, but our pixel artist really dislikes this idea, and what I've primarily tried is making all the tiles have a main tile, like "dirt" "grass" or "water". I then named the tilesheets for "dirt grass", "dirt water", "grass water".

I then made two algorithms, which both failed, to find out what tileset to use for each neighbour around the new tile.

 

I am surprised that there is relatively very little information I find on Google about autotiling. Every result goes back to a few articles, which only covers the basics.

 

Am I missing some big thing with this method?

Are there any other methods that can be used?

 

Thanks in advance!

0

Share this post


Link to post
Share on other sites

A one-pass algorithm (which I presume you are using) might not do the trick, on top of most likely being unpleasantly complicated to work with. I highly recommend you make use of simple cellular automaton to generate the rules which the tiles will follow in any particular situation. Essentially, you need to make a number of passes (and perhaps repetitions) over your data using simple rules and/or algorithms so that the data will procedurally arrange itself and come to an equilibrium with your desired results, which is in this case the rule set that a tile sheet or combination of such will follow.

 

http://simple.wikipedia.org/wiki/Cellular_automata

http://en.wikipedia.org/wiki/Cellular_automaton

 

Keep in mind that rigidly attempting to define standard rule sets is not the right way to go about this; you should be able to place particular tiles, sizes or classifications anywhere you want on a tile sheet. Feed your data into the initial rule set array that classifies a particular tile and what availability it has for use with other tiles. Like, this tile is grass. It can connect with sand. It forms a wall north. And so forth.

 

Once you have fed all of your information about a tile sheet into it's rule set array, iterate over each tile and analyze the rules that it follows. Using those rules, compare them with every other tile in the array and retain the resulted relationship information in a format of your choosing. Naturally every tile in the sheet with require a container that contains references to tiles it shares information with and how. If a tile has no effect on another, then that reference will not be required because they are estranged.

 

I think a cool way to implement this would be to retain in the actual image data information that you can implement as you are drawing the tile sheet. As an example, if the topmost left pixel of a tile is green, then it is grass. If it is blue, then water. And so forth. Then when you load the image, the information storing pixels would be interpreted as non-graphical supplementary information and then discarded. This would put complete control in the hands of the artist and would not require the relentlessly brutal alternatives that you have already considered. 

Edited by S1G
1

Share this post


Link to post
Share on other sites
The corner tile system in the article can be summarized as assigning terrain types to tile corners and setting all 4 corners of a square to a given type as a basic editing operation. With n terrain (corner) types there must be n^4 tiles to cover all corner type assignments: 2^4 =16 tiles for 2 types (like in the article), 3^4=81 tiles for 3 types, 4^4=256 tiles for 4 types, which is still affordable. Effort can be reduced by marking some tiles as forbidden and checking they aren't required instead of drawing the corresponding graphics. For example, if terrain types are woods, grass, dirt and water, you could allow only tiles with woods and grass, grass and dirt, dirt and water: only 46 out of 256. Edited by LorenzoGatti
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0