Saturday, 25 June 2016

Game Maker Progress 12: Smart-Tiles

Hello everyone,

I am excited to be showing what I have manage to implement in the past week or so. Those of you who follow the blog will remember I decided to code in what I nick-named a smart-tile system for my previous small project Sky High. The system simply checked what adjacent spaces were occupied by - such as a tile or empty space - and adjust it's sprite accordingly. Relative to this - that system was extremely simply since it worked with around 8 different variations if not less. 

This new smart-tile system I am using for Privateer Dungeoneers uses 48 different tiles - each with their own separate conditions to check whether it should be used or not. It took a lot of tweaking and adding new tiles (originally I only pictured around 20 tiles needed - after testing and checking for tiles that seemed off, the reality was I needed 48 at least). 

That being said - I love how the result turned out! The benefit of the system I have now is that it works with the Random Room Generator (RRG) fairly well! So any adjustments I make to the RRG means that the smart-tiles will simply adjust accordingly to what is needed! Another benefit is that whilst the above image shows an example of a room generated and the smart-tiles in action - I can simply add even more tiles than the minimum 48 to add variations to the various different tiles! 

Adding variations is far simpler since now I have the code and conditions set out - it's simply a case of creating the tiles and telling the system to randomly pick from a set of tiles that match that particular slot. As I add different types of tiles (dirt walls, rock walls, chasms, water and so on) they all can use the same system - it's just a case of changing the sprites!

This system was particularly important towards graphically improving this project - and whilst it had it's complications - I love the result and the potentially different additions I can implement with it!

Until next time,

No comments:

Post a Comment