Adventure Game Studio | Forums

AGS Support => Modules, Plugins & Tools => Topic started by: Wyz on Fri 28/03/2014 16:22:49

Title: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Wyz on Fri 28/03/2014 16:22:49
Tilemap 1.0.0 (download: 5kb) (https://drive.google.com/file/d/1Eto6iha4WXroszVAYF_8o5vpoD4clZJg/view?usp=sharing)

Tilemap Example 1.0.0 (download: 0.9Mb) (https://drive.google.com/file/d/1Jzo9-oiKSXVUlwMZFzvnu155FCUoLoRO/view?usp=sharing)

Tilemap Convertor 1.0.0 (download: 1.2Mb) (https://drive.google.com/file/d/1Cj6i9UyJVVOXYv37sl480rQa_pDFuUkq/view?usp=sharing)

This module contains a set of useful functions for creating tile based games. It allows tilesets (a sprite containing tile images) to be defined and used to draw tilemaps (a map that defines which tile should be drawn where). It contains simple and a bit more advanced functionality and tries to ease the amount of work needed to make a tile based game with AGS. The module is self documented: that means when using a function in your code the autocompleter will popup with an hint what the function does and how to use it. All functions in this module start with "Tilemap" so they can be recognized easily. You can also check the script header file to see the complete list of available functions.

I will put useful code snippets in this post later but you can also request them!
If you have questions about how to use this module or have comments feel free to post here!

I hope that it will be useful to someone. :-D
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Ghost on Sat 29/03/2014 18:58:14
I bet there'll be some future games taking advantage of this! Thanks for sharing; I'll surely check it out (nod)
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Taraka on Thu 10/04/2014 19:54:55
Greetings, Wyz,

I'm trying to understand this module because I need it to create mini-games and turn-based battles like Heroes of Might & Magic.
I haven't succeded yet.
Could you please make any nebut sleek demo to make it easier to understand?

...Maybe one room where the tiles move and interact with each other.. 
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Wyz on Fri 11/04/2014 13:00:52
Sure, I'll whip something up. :-D

Update:
I tried to keep it simple but I might have gone a bit overboard with the scrolling. It is just a sample of what you could do but is not necessarily what you want or a good example what this module can do. It needs AGS 3.2.1.
Tilemap example v1.0.0 (https://drive.google.com/open?id=1Jzo9-oiKSXVUlwMZFzvnu155FCUoLoRO)
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: DoorKnobHandle on Thu 17/04/2014 14:49:03
Nice work, should help a lot of people out, especially those interested in making an RPG with AGS! Also, that is the best 8x8px stickman sprite and walkcycle I've ever seen! :)
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Baron on Fri 13/06/2014 23:50:59
Quote from: Wyz on Fri 11/04/2014 13:00:52
Tilemap example v1.0.0 (http://wyz.agser.me/dl/modules/Tilemap%20Example1.0.0.zip)

This link seems to be dead.  Can I have another?
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: miguel on Sat 14/06/2014 01:42:04
+1
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Wyz on Sat 14/06/2014 11:14:59
Mirror:
Spoiler
http://s000.tinyupload.com/index.php?file_id=82115667053083316735
http://s000.tinyupload.com/index.php?file_id=60314509342376029927
[close]
But the old links should work now again!
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Tournk on Sat 21/06/2014 03:16:56
 Nice. I'll soon find a use for this module after learning how.  :)
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Tournk on Sun 22/06/2014 13:43:35
This module is amazing! But how do you create the map from the tiles? I don't see any in the room script. Or the .TMX file that does it? ???
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Wyz on Sun 22/06/2014 23:18:37
Well, I did this manually by just typing in the values but I can see how that is inconvenient. ;) But if you want I can write an exporter. :)

Btw the TMX files can be opened with Tiled (http://sourceforge.net/projects/tiled/).
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Wyz on Thu 26/06/2014 02:14:04
So I've wrote an exporter, or actually a converter to be more precise.
It takes TMX files and turns it into something you can load into your project. Ok so how does this work? Well first you make a map with one of your favourite tile editors and save it as a .tmx-file. This is a pretty wide supported format so I expect most editors can do this; Tiled can for sure.
Then you select that file in the converter and hit 'Convert' (more detailed instructions are in the readme file of the zip). What tis does is create an image file you can import into you project as a sprite. The module as a few functions to handle maps in sprite format: convert it to regular tilemaps so you edit them in game or directly draw it on a surface. That's about it, so check it out (http://wyz.agser.me/dl/modules/TilemapConv1.0.0.zip)!
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: arj0n on Sat 28/06/2014 11:58:09
Will check this out for sure, interesting stuff wyz.
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: ArgyBoi on Thu 28/08/2014 15:03:42
Sorry to bump this... Can you upload the Convertor again, please?
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Wyz on Sun 31/08/2014 22:30:27
Sure no problem, I've updated the link in the first post. :)
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: goopscoop on Fri 17/07/2015 22:46:37
Quote from: Wyz on Thu 26/06/2014 02:14:04
So I've wrote an exporter, or actually a converter to be more precise.
It takes TMX files and turns it into something you can load into your project. Ok so how does this work? Well first you make a map with one of your favourite tile editors and save it as a .tmx-file. This is a pretty wide supported format so I expect most editors can do this; Tiled can for sure.
Then you select that file in the converter and hit 'Convert' (more detailed instructions are in the readme file of the zip). What tis does is create an image file you can import into you project as a sprite. The module as a few functions to handle maps in sprite format: convert it to regular tilemaps so you edit them in game or directly draw it on a surface. That's about it, so check it out (http://wyz.agser.me/dl/modules/TilemapConv1.0.0.zip)!

Quick question. If I make my maps in Tiled and use the converter, will the collisions and layers be converted as well, or just a flat image?
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: Wyz on Tue 21/07/2015 01:14:46
The exported maps contain a single layer each but the converter lets you select a layer so you can convert them all separately if you want to. As far as I can tell collisions are just layers so that should work as well.
A limitation of the module is it only supports one tileset per map so if you're planning maps that is something to keep in mind. It also does not support objects at all unfortunately. :)

I hope that helps. :)
Title: Re: MODULE: Tilemap v1.0 - module for easing tile-based game creation.
Post by: jamesreg on Thu 20/01/2022 08:38:08
Would anyone accept a commision to add features to this existing module or create a new tile engine with additional features?