The Daily Click ::. Forums ::. Klik Coding Help ::. Why doesn't MMf2/Fusion2.5 have a tileset editor like Game Maker?!
 

Post Reply  Post Oekaki 
 

Posted By Message

J.C



Registered
  22/03/2013 05:18:14
Points
  118
19th January, 2016 at 19/01/2016 19:37:56 -

I've been wondering this just now...

I can't believe Clickteam never thought to incorporate this into their application! This is a very useful and time saving mechanic that allows us to build tile sets from one huge sprite and select portions of a background/backdrop soooo much more easily!

I have my ground sprites that was given to me as one huge sprite, and to clone and crop each and every individual sprite is way too time consuming...

Does anyone else feel my pain as well? Or is there an extension or separate method of using tilesets into MMF2 the same way Game Maker does that I am not aware about?

 
n/a

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
19th January, 2016 at 19/01/2016 19:47:36 -

Hi J.C
On a active object doubleclick it
At top left there is a "Import" select the picture and set spritesheet to the size example 32x32
And import as animation. select how many frames you want to Import.
DONE!

 
n/a

J.C



Registered
  22/03/2013 05:18:14
Points
  118
21st January, 2016 at 21/01/2016 07:18:33 -


Originally Posted by LordHannu
Hi J.C
On a active object doubleclick it
At top left there is a "Import" select the picture and set spritesheet to the size example 32x32
And import as animation. select how many frames you want to Import.
DONE!



Huh...so that's how it's done...kind of.

You forgot to mention exporting the frames as well, which does work, but it a tad bit time consuming to make multiple backdrop objects out of, if only there were a way to place all those exported sprites into the frame at once...

Edited by J.C

 
n/a

hapsi



Registered
  13/11/2003
Points
  775
21st January, 2016 at 21/01/2016 08:04:12 -

I think you mean as a seperate backdrops. I didn't even know this option exist but you'd think that's possible too..

 
[Signature][/Signature]

J.C



Registered
  22/03/2013 05:18:14
Points
  118
21st January, 2016 at 21/01/2016 23:40:26 -


Originally Posted by hapsi
I think you mean as a seperate backdrops. I didn't even know this option exist but you'd think that's possible too..



Yes, exactly. That's what I meant.

If only there were a way that I am probably not aware of...

 
n/a

Wilderness (Ultra Soft)



Registered
  23/06/2003
Points
  94
24th April, 2016 at 24/04/2016 02:46:26 -

On the same topic, sorta... Is there any way to do this through events when running the game?
It would save some time to have the game automatically update from the tileset.png file rather than me having to go in and repeat this process at (currently) three different places every time I change some small detail.

 
i hate moderators

LordHannu

Crazy?

Registered
  22/04/2007
Points
  7910

VIP MemberStarTeddy BearRibbonGame of the Week Winner2021 Halloween Competition Winner2022 Hi-Score Mash-up Competition (Bronze)2023 Halloween Competition (Bronze)2023 Halloween Competition Entrant
30th April, 2016 at 30/04/2016 15:37:46 -

You can also use the clipboard copy and paste directly. between paint program and mmf.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
2nd May, 2016 at 02/05/2016 16:48:52 -


Originally Posted by Wilderness (Ultra Soft)
On the same topic, sorta... Is there any way to do this through events when running the game?



There are a couple of ways to achieve this.

The best way I think is to build your own editor and use the active backdrop object to cut tiles from an external image and paste them into the frame via events. You'll need to build an editor to make this easier, and have the editor save the position data about each tile to a file.

You can organize the tile data any way you want. You can use the array object, or the ini object, and I think there is even a binary data object.

This is a little advanced though if you don't come from a programming background already.


Another way to semi-automate loading in external images would be to number them, and then import them as an animation each time you make a change. I've done this to load in bitmap fonts and such, but also tile based games that use a single active to represent all of the different tiles.

 
n/a

Wilderness (Ultra Soft)



Registered
  23/06/2003
Points
  94
3rd May, 2016 at 03/05/2016 19:36:32 -


Originally Posted by UrbanMonkAnother way to semi-automate loading in external images would be to number them, and then import them as an animation each time you make a change. I've done this to load in bitmap fonts and such, but also tile based games that use a single active to represent all of the different tiles.


This is what I do currently... There's no way to do this completely automatic through events? This way is fine, just thought it'd be simpler.

 
i hate moderators

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
5th May, 2016 at 05/05/2016 17:28:58 -

Not that I'm aware of no.

 
n/a

Wilderness (Ultra Soft)



Registered
  23/06/2003
Points
  94
6th May, 2016 at 06/05/2016 07:46:19 -


Originally Posted by UrbanMonk
Not that I'm aware of no.


If someone like you doesn't know of it, then I imagine there's not. Thanks for the answer.

 
i hate moderators

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
6th May, 2016 at 06/05/2016 17:28:36 -


Originally Posted by Wilderness (Ultra Soft)

Originally Posted by UrbanMonk
Not that I'm aware of no.


If someone like you doesn't know of it, then I imagine there's not. Thanks for the answer.



That's quite the complement. Thanks.

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
10th May, 2016 at 10/05/2016 02:32:09 -

So, I've got this method that I use that might be what you're looking for. I've never been quite sure how to explain it, but I'll try to at least outline the theory.

This method involves the Text Blitter object. I don't think this object is available in all of the export modes, so use it only if it suits your needs.



So, the Text Blitter, when you place it in an application, looks something like this:

Image

It displays text, of course. But it doesn't use a font. Instead, it draws from an image that it's got stored. You can access and change that image, which, by default, will look like this:

Image

But what would happen if we replaced that default text image with tile graphics? Something like, say, this?

Image

The image is a different dimension, of course, and the tiles are a different size (the Text Blitter's default is 8x8, this one is 16x16), but there are ways to change those in the object.

So, after doing that, it displays its little default message as before, except now it looks like this:

Image

So it's displaying the tileset as distinct tiles! That's a start.

What we do then is change that default message. We need to cover the entire visible screen with tiles. At this point, it doesn't matter what tiles they ARE, so long as the coverage is complete.

After adding some repeating garbage, I got this:

Image

Now, here's where it gets tricky. You see, the Text Blitter has this function called "Callback", where you can tell each individual character (or tile, in this case), to take on its own properties. In this case, we're going to create a simple array, and then tell the individual tiles to alter their graphics by taking their position in the row and their row number, and then referencing whatever value is stored in the resulting spot in the array.

Throw in a quick means to manipulate the array's values with the mouse, aaaand....

Image

Tile-based graphics!


Doing something like this has a lot of benefits, as you can alter the tiles or the graphics on the fly. It allows for some pretty huge levels, speedy movement and layering, the ability to quickly change/reference the level data, animating tiles, etc. All those fun 8-/16-bit video game tricks.

You will run into a number of hurdles, though. For one thing, the Text Blitter doesn't include collision data, so you'll have to work out how to make objects collide with the data stored in your level array. Which is doable.
And you'll also need to work out scrolling and camera movement, but that shouldn't be a huge deal.
And then there's the matter of spawning/despawning sprites on the go, referencing the level data and managing when things should appear. Which is kind of a monster to take care of, but still possible.

You can take a look a this Ludum Dare base I put together if you want to see it in action.

http://www.l-ames.com/logan/base-33.zip

It's serviceable, but kind of a mess. It's got leftover bits in it from several Ludum Dares.
But it's got a neat little built-in editor and everything (press enter to use it).
But it's also not commented at all. So it may be a little unintuitive.

 
Go Moon!

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
10th May, 2016 at 10/05/2016 17:55:28 -

Fifth, this same functionality can be accomplished using the active picture object minus all the hacking to make it work.

Just use the action "Create Backdrop Object", and it'll let you blit a tile from a tile sheet and paste it in the frame. You can paste them on different layers. You can also remove them using the "Delete created backdrop" action that's part of CF itself.

Plus it also supports collisions!


Two other useful objects are the surface object and the animated picture object.

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
11th May, 2016 at 11/05/2016 01:11:01 -

Yeah, I'm guessing most people either use the Surface Object or else do the pasting to the background thing. And the usefulness of having your tiles in a single object like the Text Blitter method kinda lost its advantage once layers became a thing.

But I'll still stand by my Text Blitter. It still has a lot of useful properties. Like, if you want to make a field of spinning Mario coins, you could make them all through level data, animate them by altering the image source index, and collect them by comparing an object's collision value, all without having to deal with a single coin as an active object.

 
Go Moon!
   

Post Reply



 



Advertisement

Worth A Click