Jump to content


Photo

Tiled Importer For Game Maker Studio


  • Please log in to reply
51 replies to this topic

#1 Pasty

Pasty

    GMC Member

  • GMC Member
  • 38 posts
  • Version:GM:Studio

Posted 06 June 2013 - 09:50 AM

Tiled Importer for Game Maker Studio (current version: 0.9.8.1, thanks to gameus and DivideByNil for the revisions)
Requires .NET Framework 4.0

 

Tiled Importer for Game Maker Studio converts Tiled Map Files (.tmx) to Game Maker Studio files (.gmx). Not only does Tiled Importer for Game Maker Studio handle normal tile data files, it also handles tile offsets and isometric maps with ease.

tiled_importer.png

 

Usage:

  • Converting: add all the .tmx files you want to convert using the "Add" button, set a destination folder, set your initial depth and depth spacing (see the manual), and click "Batch Process". The program will spit out everything you need - rooms, backgrounds, and tileset images - to make importing your Tiled maps into Game Maker Studio easy. (In addition to depth auto-spacing, depth can also be set manually, see the program information for more details.)
  • Importing: open a Game Maker Studio project. First, add the background.gmx files by right-clicking on the Backgrounds folder and selecting "Add Existing Background..." If your tilesets aren't already alpha transparent, you'll need to use the GMS image editor in order to eliminate the color you used to denote transparency. After all the backgrounds are imported, then add the rooms the same way you added the backgrounds. Finally, save your project to copy your new rooms and backgrounds to the project folder.

Notes:

  • This program is only compatible with Game Maker: Studio projects!
  • Your .tmx files need to be in XML format! The program will highlight tilesets in base64 or CSV format so you can easily save them as XML files in Tiled.
  • I'm still accepting test data for this program. If this program breaks your Tiled map, let me know in this topic (and, if you can, supply me with the map both before and after conversion so I can see what went wrong and fix it for the release version).

Source:

 

Tiled Importer 0.9.6 (edits by gameus)

Tiled Importer 0.9.8.1 (edits by DivideByNil)

 

Tiled Importer for Game Maker Studio (current version: 0.9.8.1, thanks to gameus and DivideByNil for the revisions)
Requires .NET Framework 4.0

 

Other versions:

 

0.9.7

 

If you have any questions or comments, do feel free to let me know.


Edited by Pasty, 05 July 2014 - 02:09 PM.

  • 4

Modest Arcade | Alcarys Complex, a story-driven action-RPG for the PC and OS X
Tools: Offset Champion | DS Legacy DLL | Tiled Importer for Game Maker Studio


#2 TheMagician

TheMagician

    GMC Member

  • GMC Member
  • 622 posts

Posted 06 June 2013 - 07:10 PM

Let me be the first one to thank Pasty for his great work on this project. 

A few month ago, after he had released the Tileset Champion and the Offset Champion I contacted Pasty via PM and asked him whether he could create an importer for the Tiled map editor. I am working on a large project that requires a lot of tilesets and even though GM:S' built-in tile capabilities have improved over the last couple of updates they are nowhere near the ease of use of Tiled.

 

Pasty agreed to look at the Tiled editor and came up with this program which can take exported Tiled data and import it into GM:S' room format. 

There is another Tiled Importer which you can find on these forums but that loads the tile maps during runtime. Pasty's program has the advantage that the imported rooms can then be further modified in the GM room editor.

 

Thanks again for taking on this project without even knowing who I am. It is very much appreciated.  :thumbsup:

I'm sure this will benefit a lot of level designers by speeding up their workflow.


  • 1

#3 gadgetmawombo

gadgetmawombo

    GMC Member

  • GMC Member
  • 258 posts
  • Version:Unknown

Posted 09 June 2013 - 12:08 AM

This is a really nice little program, legit work!


  • 0

ezgifcom-gif-maker_zps6884c6d2.gif

39134.png


#4 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3554 posts
  • Version:GM:Studio

Posted 09 June 2013 - 03:02 PM

I am not much of a fan of tileset editors, but I can see this is super! great work Pasty  :thumbsup:


  • 0

#5 Crhonos

Crhonos

    GMC Member

  • GMC Member
  • 235 posts
  • Version:GM:Studio

Posted 11 June 2013 - 03:42 PM

How does this program choose which tileset it will use in GMS?

 

 

 

Edit: Sorry didn't see the importing instruction u.u


Edited by Crhonos, 12 June 2013 - 12:49 AM.

  • 0

#6 TheMagician

TheMagician

    GMC Member

  • GMC Member
  • 622 posts

Posted 11 June 2013 - 06:55 PM

Read the instructions in the first post. The program also produces background resources for you that you then import into GM:S. These backgrounds are referenced in the room file that the program also creates.


  • 0

#7 Destron

Destron

    GMC Member

  • GMC Member
  • 1251 posts
  • Version:GM:Studio

Posted 13 June 2013 - 05:15 AM

Just tried this out, and I have to say that this is awesome work! I used Tiled for prototyping layouts, now I can just export them straight in to GMS. The only thing I would change is to have it show you it did its job. I converted the first map 3 times because I thought it wasn't doing anything when I hit the button. Also, since I have never actually used a finished product from Tiled for anything before I didn't know how to change it to save in XML format - I dug around and found it - but you may want to be more clear about that in the manual.


  • 0

HTML5 INI Saving Example | HTML5/GMS Saving/Loading/User Login with PHP/MySQL/Async | GameMaker Examples/Tutorials
Those who try to do something and fail are infinitely better than those who try to do nothing and succeed.


#8 underscore_underscore

underscore_underscore

    GMC Member

  • GMC Member
  • 72 posts
  • Version:GM:Studio

Posted 14 June 2013 - 11:00 PM

This is excellent. Thank you.

 

Is there a GM:S misc resource list somewhere? I think this should be added (or pinned!).


  • 0

Video games, all of the time, forever.


#9 Pasty

Pasty

    GMC Member

  • GMC Member
  • 38 posts
  • Version:GM:Studio

Posted 20 June 2013 - 04:23 AM

Hey, thanks for the comments!
 

I converted the first map 3 times because I thought it wasn't doing anything when I hit the button. Also, since I have never actually used a finished product from Tiled for anything before I didn't know how to change it to save in XML format - I dug around and found it - but you may want to be more clear about that in the manual.


I'll keep this in mind for the next version, thanks.

P.S: Also, as a clarification, I didn't make Tileset Champion, only Offset Champion and this program.

Edited by Pasty, 20 June 2013 - 04:24 AM.

  • 0

Modest Arcade | Alcarys Complex, a story-driven action-RPG for the PC and OS X
Tools: Offset Champion | DS Legacy DLL | Tiled Importer for Game Maker Studio


#10 jtn0514

jtn0514

    GMC Member

  • GMC Member
  • 137 posts
  • Version:GM:Studio

Posted 30 July 2013 - 07:01 AM

Had some issues with this at first using this and importing the converted room to GM studio would crash or hang and never come back., however i finally figured out i was overlooking something simple..

 

Turns out when specifying the room size in Tiled map editor, you need to take the room size you want in gm studio (2048x2048 for instance) and then divide the width of the room and height of the room by the tile size and the outcome must be an even number and not a fraction.

 

So for 16x16, you would use  128x128 sized tile map within Tiled map editor program. Then once imported, the room size should be 2048x2048..

 

My problem was just taking the room size 2048x2048 and putting that into the tiled map editor program and it was doubling the size and crashing on importing the room to GM studio as it was generating a MASSIVE map that took forever to save in xml format in Tiled map editor.

 

Hope this bit of info helps anyone else using this later on down the road.


  • 0

#11 Pasty

Pasty

    GMC Member

  • GMC Member
  • 38 posts
  • Version:GM:Studio

Posted 30 July 2013 - 04:48 PM

I'll look into this. Thanks for the tip!


  • 0

Modest Arcade | Alcarys Complex, a story-driven action-RPG for the PC and OS X
Tools: Offset Champion | DS Legacy DLL | Tiled Importer for Game Maker Studio


#12 Andy

Andy

    GMC Veteran

  • GMC Member
  • 1934 posts
  • Version:GM:Studio

Posted 05 August 2013 - 06:53 PM

Very nice work!


  • 0
Please visit Andygames.com today!

#13 marcosromeroj

marcosromeroj

    GMC Member

  • New Member
  • 12 posts
  • Version:GM:Studio

Posted 29 October 2013 - 03:31 PM

Excellent work!! It's really easy to edit rooms with Tiled map Editor instead of Room editor..

 

But after tried this out I found some problems when import .tmx files.

 

I have uploaded a gms.project example with 3 rooms in it. An isometric, and 2 orthogonal rooms.

 

https://www.dropbox....er_test.gmx.rar

 

Isometric problem: I made a 32x16 grid room in Tiled and I add a tileset with 32x32 tiles in it because of walls and high objetcs. When I import to GMS, It is like the importer only draws 32x16 tiles, so walls are not properly drawn. If I use 32x16 tileset the program import the map ok, but you can only draw flattern maps without walls or higher objects...

 

Orthogonal 2 is ok.

 

Orthogonal 1 problem: This is a simple map but when I import to GMS, you can see some tile replacement. Maybe the size of the tileset background? Orthogonal 2 background is square (128x128) and this one is rectangular ¿?¿?

 

I uploaded too a tiled map folder with .tmx maps to open in Tiled.

 

Thank you again for your good work with that program!!


  • 1

#14 Pasty

Pasty

    GMC Member

  • GMC Member
  • 38 posts
  • Version:GM:Studio

Posted 07 November 2013 - 09:35 PM

Thanks, I'll take a look at the problems as soon as I can get to them. This program is probably overdue for a second look, anyway.


  • 0

Modest Arcade | Alcarys Complex, a story-driven action-RPG for the PC and OS X
Tools: Offset Champion | DS Legacy DLL | Tiled Importer for Game Maker Studio


#15 Pasty

Pasty

    GMC Member

  • GMC Member
  • 38 posts
  • Version:GM:Studio

Posted 29 November 2013 - 08:17 AM

Updated the program to 0.9.5.

 

Fixlist:

  • Fixed a bug in importing isometric maps. If the map had different grid snapping dimensions and tile dimensions, the program would only use the grid snapping dimensions, leading to a bad offset figure when calculating tile origin.
  • Fixed a bug in importing orthogonal maps: the map spacing wasn't being calculated right. The tile origin calculation code has been refactored as a result.
  • Fixed a bug in GID offset: if two tilesets have the same name in Tiled, the second tileset's GID offset is not obtained, resulting in unusable tile data for the second tileset. This fix explicitly disallows running the program on a map that has two tilesets with the same name.
  • Added various usability fixes to the program.

Enjoy.


  • 0

Modest Arcade | Alcarys Complex, a story-driven action-RPG for the PC and OS X
Tools: Offset Champion | DS Legacy DLL | Tiled Importer for Game Maker Studio


#16 marcosromeroj

marcosromeroj

    GMC Member

  • New Member
  • 12 posts
  • Version:GM:Studio

Posted 07 December 2013 - 08:01 PM

Updated the program to 0.9.5.

 

Fixlist:

  • Fixed a bug in importing isometric maps. If the map had different grid snapping dimensions and tile dimensions, the program would only use the grid snapping dimensions, leading to a bad offset figure when calculating tile origin.
  • Fixed a bug in importing orthogonal maps: the map spacing wasn't being calculated right. The tile origin calculation code has been refactored as a result.
  • Fixed a bug in GID offset: if two tilesets have the same name in Tiled, the second tileset's GID offset is not obtained, resulting in unusable tile data for the second tileset. This fix explicitly disallows running the program on a map that has two tilesets with the same name.
  • Added various usability fixes to the program.

Enjoy.

 

How great you are Pasty!! Good work!!

 

I'll take a look :D


  • 0

#17 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 13 March 2014 - 01:58 AM

I've been trying to convert a map with only one tileset and I keep getting an error.

7tign.png

I can assure you my Tiled map is in XML format and only has one tileset.

Spoiler


I'd absolutely love to use this, I ended up making my own importer since Tiled supports exporting to JSON format, but this seems like it'd be much more easier to use.

EDIT:

I was also gonna request a feature, or maybe would you be willing to share the source code? I do like the Depth feature and the spacing, but some layers should be above the player (such as the tops of tress in RPGs) and maybe have it check to see if a "depth" property exists in each layer as it's getting converted, if it is, use it instead.

EDIT 2:

I fixed the error. Even though I had the image in the same directory as the map, the map itself was still referencing to the image when it was in a different directory. Fixed it in the XML file and it converted it just fine. Awesome tool!

Edited by gameus, 13 March 2014 - 05:54 AM.

  • 0

#18 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 16 March 2014 - 02:47 PM

So I got a hold of Pasty and he was kind enough to share the source code with me. I made a couple of modifications and fixed the error it gives you if the image isn't in the same folder.

*Images no longer have to be in the same folder. It can be anywhere on the computer, even on a separate hard drive. I've tested the code pretty thoroughly and haven't had it throw me an error yet.

*I also added the depth feature. If someone add's the depth property to any layer, it'll use that value instead. This helps to place things at a negative depth to be displayed above a player or other objects. If a layer has a depth property, it won't space out the depth until the next layer.
You have two options with depth. You can let the program automatically adjust depth as it goes through layers, or you can manually set it. To manually set the depth, right click your layer in Tiled, click Layer Properties, and add a property labeled depth. Then set the depth to any number you want.

*The program now remembers your last "Converted Folder" location. So when you reboot the program, it'll automatically fill that spot in. This has helped me since my converted folder was a deep child folder.

*I added my name to the About box as well. And changed the version number to 0.9.6.0. I might work on an object layer importer as well. Big thanks to Pasty for sharing the code with me, or these modifications wouldn't have happened.

Tiled 0.9.6.0 Build
Tiled 0.9.7.0 Build

Changelog:
0.9.7.0
*Fixed "depth" bug

Images:
Spoiler

Spoiler


I hope these changes can help a few people out! If you run into any bugs with this version, lemme know, I'll fix it right away!

Edited by gameus, 05 April 2014 - 12:40 PM.

  • 1

#19 jkamcmillen

jkamcmillen

    GMC Member

  • GMC Member
  • 37 posts
  • Version:GM:Studio

Posted 05 April 2014 - 04:39 AM

I hope these changes can help a few people out! If you run into any bugs with this version, lemme know, I'll fix it right away!

 

Hi gameus, thanks for the updates!

 

I suspect that this "depth feature" has actually broken it's initial automatic setting of each layer's depth values in the resulting GMX room file. It seems that if I do not add any "depth" (?) property to my layer in Tiled it just lumps them all into the same layer. Not what I really want to happen when I set my Initial Depth and Depth Spacing values in Map Settings.

 

There isn't really any instructions on how your depth feature works so that would be helpful. ie. should I be adding a case sensitive property name to Tiled and under what part of my layer's data? Tile Layer, Custom Properties?

 

A little more information and maybe a toggle option for your new feature would be a great fix. Thanks!


  • 0

I make games. Check them out at www.RedAntGames.com & Follow me at @jkamcmillen

 

indiedb.png Current Project: Space Mercenary


#20 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 05 April 2014 - 12:43 PM

Hey, glad you like the updates. :) My new feature I implemented broke the automatic depth feature. But I fixed it, if you just check my last post, I added a new download link. I also added a bit of information to my depth feature. It now either A) Automatically calculates the depth or B) If you add the property "depth" to a layer and give it an actual number value, that'll be the layer's depth in Game Maker. If you don't add this property, it'll still auto-calculate the depth for you.
  • 0

#21 nasty

nasty

    GMC Member

  • GMC Member
  • 24 posts
  • Version:GM:Studio

Posted 06 April 2014 - 02:17 PM

Thanks gameus for the various fixes/updates! :)


  • 0

#22 jkamcmillen

jkamcmillen

    GMC Member

  • GMC Member
  • 37 posts
  • Version:GM:Studio

Posted 08 April 2014 - 04:35 AM

Hey, glad you like the updates. :) My new feature I implemented broke the automatic depth feature. But I fixed it, if you just check my last post, I added a new download link. I also added a bit of information to my depth feature. It now either A) Automatically calculates the depth or B) If you add the property "depth" to a layer and give it an actual number value, that'll be the layer's depth in Game Maker. If you don't add this property, it'll still auto-calculate the depth for you.

That's perfect! Thanks so much for the quick fix.


  • 0

I make games. Check them out at www.RedAntGames.com & Follow me at @jkamcmillen

 

indiedb.png Current Project: Space Mercenary


#23 Pasty

Pasty

    GMC Member

  • GMC Member
  • 38 posts
  • Version:GM:Studio

Posted 08 April 2014 - 04:58 AM

I haven't been able to be around a lot because of a few big things I've been working on, but I went ahead and open-sourced this. Feel free to futz around with the source if you want and make it do what you need it to do for your particular Tiled-dependent project.

 

Thanks for making the program ever better, gameus, you're way better at responding quickly than I am! If you want, you can ping me with updates and I'll put your latest version in the topic header.


  • 0

Modest Arcade | Alcarys Complex, a story-driven action-RPG for the PC and OS X
Tools: Offset Champion | DS Legacy DLL | Tiled Importer for Game Maker Studio


#24 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 08 April 2014 - 03:14 PM

Sure thing! I'm really glad you guys like the updates! :)

I've been playing with it a bit more, I think I can make it parse Tiled's objects, I'm just trying to figure out how Game Maker generates Instance Names.
    <instance objName="obj_die" x="32" y="64" name="inst_C56F5029" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
Basically, in Tiled, you can have shapes or images represent objects, and as long as you give that object a name, I can make the Exporter put the name in the room file and it should add the instance properly when opened in Game Maker.

EDIT:

Hey Pasty, might want to update your "Notes" section, let people know they can change the depth themselves and the image no longer has to be in the same directory.

Edited by gameus, 08 April 2014 - 03:24 PM.

  • 0

#25 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 2769 posts
  • Version:Unknown

Posted 08 April 2014 - 03:48 PM

Instance Names can be any valid id (i.e. any combination of alpha numeric characters that does not begin with a number) as long as it is unique over the whole project (i.e. does not match any other asset name or variable name) we generate the instance names as inst_<hex_number> the hex number is a CRC of all the instance data which should make it unique... but it can be anything at all (the user can name it, just right click in the room editor on the instance and select Rename Object Instance

 

Russell


  • 1

#26 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 08 April 2014 - 03:55 PM

Okay, I see, thanks for the help. So I could just probably generate instance id's like so
tiledObj_IDHERE
I think if no one objects, I'll have people select their Project Directory (this is only if you plan on importing objects over from Tiled), then the program can scan each room and scan each instance to see if the name is unique or not.
  • 0

#27 jkamcmillen

jkamcmillen

    GMC Member

  • GMC Member
  • 37 posts
  • Version:GM:Studio

Posted 09 April 2014 - 10:15 PM

Okay, I see, thanks for the help. So I could just probably generate instance id's like so

tiledObj_IDHERE
I think if no one objects, I'll have people select their Project Directory (this is only if you plan on importing objects over from Tiled), then the program can scan each room and scan each instance to see if the name is unique or not.

 

May I suggest making this as an option rather than a fixed feature? A simple toggle box could allow us to turn this on and off in case we are comfortable without having to verify within our project. ie. we just want to use the tile editing and not the objects, etc.

 

Alternately you could also have a popup asking for the foloder location only when you are converting a tmx file that has object data in it.


Edited by jkamcmillen, 09 April 2014 - 10:16 PM.

  • 0

I make games. Check them out at www.RedAntGames.com & Follow me at @jkamcmillen

 

indiedb.png Current Project: Space Mercenary


#28 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 09 April 2014 - 10:18 PM

Of course, objects are going to be optional. I'm not going to force it upon people. For myself, I see it quicker for myself if I can sit there and map my invisible solid objects on the map than just straight import it into Game Maker. Place my characters and NPCs and call it good.
  • 0

#29 jimmbimm

jimmbimm

    GMC Member

  • New Member
  • 15 posts
  • Version:GM:Studio

Posted 15 May 2014 - 06:44 PM

Wow, thanks. This tool helps a lot :D


  • 0

#30 Yokan

Yokan

    GMC Member

  • GMC Member
  • 25 posts
  • Version:GM:Studio

Posted 18 June 2014 - 04:15 AM

Great little tool ! Thank you Pasty & gameus !

 

I've some suggestions to improve the workflow, still I use it heavily :

 

- Same export tree directories than GMS !

- Set the room speed

- Well, in fact, the whole settings that we already have in the GMS room editor ... haha.

 

Two others, more "exotic" :

- Something more clear for setting layer's depth. More like : Max depth & Min Depth, the tool then handle an automatic depth spacing based on the total of layers. Something like that, maybe.

- A kind of "save setting" for each map, so we don't have to put all the value again when updating the map. Not sure if it's really doable, though ... XD

 

Anyway, it's still very handy as it is !


  • 0

#31 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 19 June 2014 - 01:10 AM

I'm not going to implement Game Maker's room settings in here personally. Maybe pasty will. That's meant for you to change when you import it into game maker. The Min and Max depth thing don't really make a whole lot of sense because the program already offers Initial Depth and Depth Spacing. And if you want more control over your depth, you can always give layers in Tiled a "depth" property instead. The "save setting" thing doesn't make a whole lot of sense since this is a batch program instead of an individual one. All settings like Initial Depth, Depth Spacing, and Destination Folder are saved. And perhaps you could explain the first feature you requested a bit more? I don't quite understand that one.


  • 0

#32 DivideByNil

DivideByNil

    GMC Member

  • GMC Member
  • 100 posts
  • Version:GM:Studio

Posted 28 June 2014 - 02:36 AM

[EDITED TO INCLUDE SOURCE CODE]

 

I made some improvements to the (excellent) tiled importer source and want share them with the Game Maker Studio community.

 

Universal fixes:
- Tile conversions now always select the correct tileset and no longer corrupt room layouts with incorrect or missing tiles... There was a missing bounding variable when checking value and key pairs which sometimes paired tilesets and gids incorrectly leading to -- disaster.

- Depth and depth spacing is now correct (this was fixed in 0.9.7.0 by gameus but the source was not available so I did it myself)

 

Orthogonal enhancements: 

- You can use any grid size for your Tiled room. The conversion to GMS rooms is now 1:1 as seen in Tiled. No more improperly positioned tiles!

- You can now use multiple tileset sizes in the same room. Everything should convert exactly 1:1 in GMS as it appears in Tiled.

- You can flip tiles about the x and/or y axes and have them import properly to GMS rooms 1:1 as seen in Tiled. NOTE you CANNOT rotate tiles (GMS does not currently support it). The importer program will throw an error alerting the user if it finds a rotated tile.

 

Isometric implementation remains unchanged as I have not experimented with or tested isometric games/tiles

 

Link to Tiled Importer 0.9.8.1: http://s000.tinyuplo...815048693613966

Source available here: http://s000.tinyuplo...975893628578682

Enjoy! :)


Edited by DivideByNil, 03 July 2014 - 09:36 AM.

  • 0

#33 Pasty

Pasty

    GMC Member

  • GMC Member
  • 38 posts
  • Version:GM:Studio

Posted 02 July 2014 - 11:13 PM

hey, thanks! you can release the source if you want, it's not a big deal. this seems to really have taken off and since i don't have the time to dedicate to it anymore, it would be better off being open-source.


  • 1

Modest Arcade | Alcarys Complex, a story-driven action-RPG for the PC and OS X
Tools: Offset Champion | DS Legacy DLL | Tiled Importer for Game Maker Studio


#34 DivideByNil

DivideByNil

    GMC Member

  • GMC Member
  • 100 posts
  • Version:GM:Studio

Posted 03 July 2014 - 09:40 AM

Updated my post with a link to the new source. Thanks for starting the amazing project Pasty.

Who will carry the torch from here?


  • 0

#35 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 03 July 2014 - 12:35 PM

I'm still trying to get objects done. I'll download your source and start re-implementing objects then. I'll have plenty of time starting this Sunday. I dunno if anyone is still interested in objects or not. 


  • 0

#36 DivideByNil

DivideByNil

    GMC Member

  • GMC Member
  • 100 posts
  • Version:GM:Studio

Posted 03 July 2014 - 08:14 PM

I'm still trying to get objects done. I'll download your source and start re-implementing objects then. I'll have plenty of time starting this Sunday. I dunno if anyone is still interested in objects or not. 

Doooooo eeeeeeeeeet!

I'll implement them at a "class" level if nothing else. 

The default room editor is pure pain. The less I have to use it, the better. :) I'm taking a few weeks off for both vacation and starting a small side project, but I'll return and will most definitely put to use such advancements.


Edited by DivideByNil, 03 July 2014 - 08:15 PM.

  • 0

#37 anomalous

anomalous

    GMC Member

  • GMC Member
  • 58 posts
  • Version:GM:Studio

Posted 14 July 2014 - 03:35 PM

I'm still trying to get objects done. I'll download your source and start re-implementing objects then. I'll have plenty of time starting this Sunday. I dunno if anyone is still interested in objects or not. 

 

Very interested!  But also curious to know how it will handle the object polygons.  Ideally if the polygon information (not just rectangle) on an object layer can get into GMS somehow after converted, then it will dramatically enhance how this can be used.

 

I went to use this today and low and behold you're talking about the exact change I was hoping for! The work you guys are doing is opening up a lot of opportunities that otherwise would require creating this from scratch.  Huge thanks to everyone involved.


  • 0

#38 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 14 July 2014 - 03:43 PM

I don't think I'll be able to do that. It's going to have to be rectangles. My whole idea on how to import objects is when you add an object in Tiled and give it a name, example "obj_solid", I'm going to make it so the Importer looks through your project directory and sees if it can find "obj_solid", if so, it'll add object properties to the game maker map file itself. If there's any scale properties applied to the object in Tiled, it'll also be applied to the object in Game Maker. Another thing I plan on doing, is importing custom properties and adding them to the object's creation code. That's really it. I mean, you can add polygon objects and objects using tiles from tilesets, but the object importer is going to be super simple and just look for an already made object within your game folder.


  • 0

#39 Ace

Ace

    GMC Member

  • GMC Member
  • 372 posts

Posted 14 July 2014 - 07:32 PM

Another thing I plan on doing, is importing custom properties and adding them to the object's creation code.

 

Would it be possible to add the ability to import a "special" object instance with a particular name from the Tiled editor that would, say, call a script in its drawing event that references the scale/color/rotation/flip/mirror/depth/z-value of the tile-part (in the Tiled export data) that would be displayed as a simple object in GM's room editor, but shown tinted, scaled, rotated, given a layer depth, and even a z-display depth (for automaticly parallaxing your large tiles via the drawing script) in Tiled (all of these features would be using data generated from Tiled's default editor features so that you'll have pretty close to a 1:1 preview somewhere at least).

 

The aim of this feature is so that one could achieve quickly-generated level maps drawn something like the no-tile editor does here:

 

 

http://javilop.com/g...-aquaria-games/

 

 

(NOTE: Download the source and there's a folder in the .zip called "Release" so you can test out the maps yourself by loading map 1. Or you can just watch the video.)

 

Personally, I don't think this would be too painful to write a script for and toss into your "creation code" generating code -- I would think the user would only need to create the object in their game with the special name, add in a premade script into the Draw Event that draws the data passed to it when the creation code imports the data from the XML file and creates the special object found in their project, passing along the necessary code in its create event containing rotation/color/depth/z-value-for-parllaxing data and you'd be the one to thank for adding in support for an amazing-looking new way to make games easily in game maker with a new special kind of "tile" people can freehand in photoshop if they wish.

 

BTW, (not trying to hijack the topic, but this needs to be said):

 

 

------------

 

 

This is to you, YOYO GAMES LTD:

 

 

Spoiler

 

 

 

---------------------


  • 0
Posted Image Posted Image Online Fighting & Roleplay Game

ZERO ENGINE
Posted Image

#40 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 4579 posts
  • Version:GM:Studio

Posted 15 July 2014 - 01:32 PM

Okay Ace, you're mistaking "tile maps", with fast sprite drawing. You may have tons of experience, but I'm hardly an noob with this stuff either. I've been making "tile" based games for over 30 years now, and lots of professional, well known titles for 25 years. 

 

Let me first tell you the problem with what ""GameMaker"" calls tiles. first, they aren't actually tiles. They are sub-textures of any size and shape, and every one has their own UV coordinates. What does this mean? Well, if you draw a a level, then decide to resize your tiles - well you can't, or rather you can't without vast amounts of work. Lets say you have art assets that don't follow the techblog on dynamically scaling tiles - but that's okay, because when you started, you decided you aren't going to scale, but wait... this little section of the game would be SOOO much better if you could just zoom in a little as it was playing. Well too bad, everything is baked directly into the art assets and you can't easily change them.

 

There are so many things wrong with the current tile system, it's hard to know where to start fixing it, but actually... it needs thrown away and started again. Doing so means you could suddenly change the size of your tilemap from 16x16 to 32x32, and level would just scale - properly. It means you would never have to worry about dynamic scaling of things, because we could do this automatically for you, allowing you to zoom in and out of a level freely, without glitching, but most of all.... it means we can speed the whole rendering of a single depth up to ridiculous proportions using a tilemap shader. This means for a single depth of tiles, we'd draw just 2 triangles (probably), and no matter how much you zoom in/out, it would never slow down. This is something that's impossible with the current system, as the more you show.... the more we have to submit to the graphics card and draw. We can also start doing "free" tile animation, colours per tile, 90 degree rotation and flipping - all for free (or very close to it). it also means you can start adding multiple playfields, again with virtually no slowdown. But only if we throw away what we currently have and start again.

 

And that's just for what SHOULD be called "tiles".

 

Does this mean we're going to suddenly stop letting you just place "sprites" in the level? No...of course not. Our plan is to introduce a very lightweight sprite type, but one that is bound by normal sprite rules, not one that stores UV coordinates directly in the project file, making it much simpler to change sprites regardless of size or shape. We can then bundle these using some kind of space aware storage - be that grids or BSPs, and this would allow us to render the very quickly - and in nice batches.

 

The other advantage of using proper tile maps - where they are regular grids, is that we could now let you collide with them quickly, speeding up world collision systems. Placing pick ups in the world map means you no longer have to try and collide with almost every object in the world, you just check the map cell your on. You could put flags into a grid that match the level, allowing you to deal with doors, locks, traps - all of which would easily map directly into a tile without any vast amounts of effort.

 

So what do you lose in all this...... Well, you'll no longer be able to pick a random section of a background as an image, you'll need to make that a sprite, but once you've done that, you can add it to the level just as easily as you have before - in fact more so, because the plan is to allow you to add an image/text etc. without the need of creating an object, and GameMaker will manage them for you, making them VERY cheap storage wise.

 

 

Out room editor will of course be rewritten from scratch, and it'll be much more in tune with what modern users need/require. Layers, easy painting/filling of tiles and adding of sprites, not to mention user flags and custom triggers and animations - and I certainly don't consider Unity's 2D system a threat in any way to what we're planning.

 

 

So please... enough with the dramatics. Like you, we've been doing this long enough to know what you'll probably need, and we WILL be able to add to this in the future if other stuff comes up, but to do so, we need a solid base - and with the current system, we just don't have that. In fact, it sucks so much I'm amazed anyone has managed to keep working with it. The IDE rewrite will update things so that it all works not only as expected - but better.


  • 0

#41 anomalous

anomalous

    GMC Member

  • GMC Member
  • 58 posts
  • Version:GM:Studio

Posted 15 July 2014 - 04:35 PM

Good to know it's known that moderate+ tile based design is inadequately provided-for  in the current GMS implementation.

 

I find that we can work around the tile editor, sadly, by going external because the GMS room file is so easy to read/edit, OK, that's workable. 

 

Tile based collisions are harder to work around, BUT it's only a few chokepoints that seem to hurt the most. Perhaps just write 2-3 collision functions for collisions vs ds_grid, and that's plenty good for a stop-gap solution.

 

Of primary importance is collision_line, but using a grid.  I think anyone can "check the tile next to me, if passable, else if obstacle", no function really needed there (for now).  But checking every grid the line intersects (supercover!) is more problematic to quickly, robustly, add.  So we end up using tiles AND adding objects with collision masks sitting on top of tiles?  It's a mess.
What other collision with grid is really needed to have a GMS function for?  Maybe just that one is all that's needed for now. 

 

Second, let us copy the mp_grid to a ds_grid.  (identical size grid, 0 = pass, 1 = obstacle?) No need for ds_grid copy to mp_grid.

 

The issue is that when one uses the nice mp_grid functions for movement,  it's *really* easy to add cells based on objects AND tiles AND shapes, and then use the built in mp functions and it's good stuff.  You can quickly get passabilty in an entire room with just a few lines of code from tiles OR objects (or anything).  But don't make us create a new ds_grid, add back in manually all the obstacles we already (quickly) added to the mp_grid.  (assuming we can then use that ds_grid with some grid-based collision functions, see above).

 

That's just the area that I can't easily see a work around for, but it seems a whole lot less work as a stop-gap to add 2-3 grid-related (aka tile) functions, rather than have to wait for the entire tile system updated, room editor update, and THEN collision framework additions.

 

Of course if someone already has an elegant workaround for those, don't keep me in the dark!


Edited by anomalous, 15 July 2014 - 04:35 PM.

  • 0

#42 Ace

Ace

    GMC Member

  • GMC Member
  • 372 posts

Posted 15 July 2014 - 11:06 PM

Response to YOYO GAMES (in order to avoid hijacking this topic).

 

(FYI -- A simple PM response would have been fine, but I don't mind sharing this with the community if you don't.)

 

Spoiler

 

 

 

@anomalous:

 

All YoYo has to do is provide a feature to where they generate an efficient polygonal mesh out of a single background / """tile""" layer and allow you to perform some raycasts with your chars to see if they intersect with it. You could even have jumpthrough slopes and all sorts of other things with just a few meshes of polygons in an entire game level to check -- and they could allow you to optimize this mesh realtime so you could see the polygon triangles it's generating. Precise sprite/"tile" collisiions could be handled this way too. They can still put in their "cell-based" method too later on if they want -- but this is how *modern* games are doing large, non-'tile'-based levels now. Just take a peek at Unity's 2D feature video below when it shows the spaceship.

 

Unity 4.3 - 2D Game Development Walkthrough

https://www.youtube....cuHI93c&t=3m10s

 

 

Why YoYo doesn't do general collisions like this, I have no idea. Too much work for the money? Who knows. It seems they want to go to an oldschool "grid" collision system anyone could program themselves with any version of GM instead of using precise sprite/tile-layer-traced polygons for collisions like modern engines use. All I know is that I want Game Maker to be more modern before I purchase Studio -- and these videos show the kind of non-game-specific editor/room features that would make it happen:

 

 

http://vimeo.com/2769377

 

 

The source code is here:

 

http://javilop.com/g...-aquaria-games/

 

 

 

 

Chime-in if you want these tile/collision features and don't want to wait anymore -- I can't be the only one.


Edited by Ace, 16 July 2014 - 12:48 AM.

  • 0
Posted Image Posted Image Online Fighting & Roleplay Game

ZERO ENGINE
Posted Image

#43 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 4579 posts
  • Version:GM:Studio

Posted 16 July 2014 - 07:26 AM

Okay, you obviously aren't that technical, so first let me say that video is basically just putting down what GM would call instances - everywhere. This is fine for PC - although you may still struggle with performance, but on mobile, you'll probably struggle like hell to make it perform, especially on larger levels.

 

Just because you want this and are interested in Deskop only content, doesn't mean everyone is - we have to deal with many platforms, not just super powerful desktops.

 

You're also either didn't read my post properly, or didn't understand it. I said aside from adding an improved proper tile system, we would be improving basic sprite addition, allowing you to do - wait for it.... exactly this kind of stuff. Want to dump sprites/images in a level anywhere? Great do it.

 

Why hasn't this been done before? Well... if you'd been paying attention, you'll know the GUI we're currently stuck with is a nightmare to use and evolve, while on top of that any major changes would simply break everyones games. This isn't something we're going to do. So when we change to GM:Next, we'll take the opportunity to  break lots of things to improve them.

 

Proper tiles are not "old tech", they are efficient tech. Something that's used to make your game run quickly and efficiently across many platforms. Theres nothing stopping you doing a base tile layer for the core image, then overlaying sprites to break things up, and make them more interesting. But because tiles can be rendered so quickly - and are so easy to paint and edit, they are still the preferred way for a huge number of developers. Don't try and pitch filling a level with sprites as the "next gen" in level editing, because we've personally been doing it since Lemmings days, which were constructed exactly like this. It's almost as old as tiles.... Each game has it's own preferred level editing style depending on what the dev wants out of the game.

 

And if you want to construct a big mesh for your level, use vertex buffers and just do it. Then you could submit the whole level in a single draw call - although you'd need to break it up into chunks if its a particularly large level. But you can still do all this from within GameMaker as it stands.Its not hard to loop through tiles and sprites and add them to buffers, just make sure each batch is on the same texture page, and you'll be all set.

 

If you're not wanting to wait on our improvements, fine.... you are always free to pick the tool best suited to you, but we believe GameMaker is THE best 2D tool around. Its incredibly fast to build with, and the newer features of Studio mean you can optimise the hell out of your game for whatever your "special case" is. And it's not just us either, lots of professional devs use it - hell, even one of the NVidia developer guys use it as it gives him the power and speed to develop where other engines - including the almighty Unity are just too slow and bloated.

 

But that's up to you what you use......

 

 

 

EDIT:  BTW Ace, I don't like responding in private if the initial comment is public (where possible), as it looks like we're either hiding things, or ignoring it. I always prefer a public debate if possible  - and no matter what the tone is, I *LOVE* a good argument, and love it even better when I'm proven wrong because it means I'm learning new things.   :)


  • 3

#44 Carnivac

Carnivac

    The Hunter

  • GMC Member
  • 3197 posts
  • Version:GM:Studio

Posted 16 July 2014 - 10:55 AM

Oh, I avoided this topic cos I thought it was the other one where you had to draw the maps at runtime but this seems to edit the GM project room files directly so I reckon I'll give this a go.   Been liking GMARE as well.  Gonna have both installed and see which I prefer or even use a bit of both depending on what features or functions they provide (like how I use both Paint Shop Pro 7 and Pro Motion 6 to create my graphics).  Either way both are huge improvements to the built in GM room editor which lacks so many basic features I just became far too frustrated to continue my projects until alternatives were available. 

Anyways downloading... :D

 

Edit:  seems cool and I imported a map with ease.  How would I go about editing the map though afterwards?   Like say I imported the map as a room and then set up all my objects and events and such but then realised I wanted to move an entire section several blocks to the right.  Easy to do in the Tiled program itself by holding right button down and selecting that whole section pasting it to the new location but would that not get imported as an all new room into GM:S and make me have to redo all the objects again?  Or am I missing something?  :P


Edited by Carnivac, 16 July 2014 - 04:58 PM.

  • 0

Spoiler

MOD EDIT: Your signature is over the maximum total permitted height of 150px and has been spoilered. Please fix.


#45 John5456

John5456

    GMC Member

  • New Member
  • 2 posts
  • Version:GM:Studio

Posted 06 August 2014 - 08:27 AM

Does this support Tiled properties?


  • 0

#46 Sylvan Rover

Sylvan Rover

    GMC Member

  • GMC Member
  • 20 posts
  • Version:GM:Studio

Posted 18 October 2014 - 10:09 PM

This is excellent. Exactly what I was looking for. Thanks a ton.


  • 0

#47 ReReSoftware

ReReSoftware

    GMC Member

  • GMC Member
  • 41 posts
  • Version:GM:Studio

Posted 19 November 2014 - 08:48 AM

I get this error

 

QDDVMcZ.jpg


  • 0

#48 gameus

gameus

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 19 November 2014 - 11:28 AM

When creating a new map, you need to select XML, not Base64 or any other format.

 

71e4e7538e.png

 

If you've already made the map, go to the File menu at the top, click Map > Properties, and change the format.


  • 0

#49 slapmybitsup

slapmybitsup

    GMC Member

  • GMC Member
  • 23 posts
  • Version:GM:Studio

Posted 23 November 2014 - 07:02 PM

Mirrors are down. 


  • 0

#50 AdmiralSwiggs

AdmiralSwiggs

    GMC Member

  • New Member
  • 19 posts
  • Version:GM:Studio

Posted 20 December 2014 - 04:31 AM

2ywsrbl.png

 

 

So I created a map in Tiled (0.10.2).  Ran the converter on it (v 9.8.1), no errors.  Got the background.gmx and room.gmx.  

 

When I "Add existing Background" to the project, I get the above error.  The background asset gets generated as a copy of the tileset I used to make the map.

If I import the room from there, it seems to use that asset to make the room, but since the background asset is the tileset, and not the map, I get tile soup in the map editor. 


  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users