playMaker

Author Topic: Tidy Tile Mapper  (Read 4686 times)

Krileon

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Tidy Tile Mapper
« on: January 08, 2013, 05:41:12 PM »
I've turned all the "BlockUtilite" API calls into PlayMaker Actions. All are tested as working. Please understand most of them ask for x/y/z as per the Tidy Tile Mapper API and those coordinates are Tidy Tile Mapper coordinates, which are not standard x/y/z world space. To convert world positions to Tidy Tile Mapper positions just use the Get Mathematical Coordinates action.

Tidy Tile Mapper "BlockUtilite" API: http://api.dopplerinteractive.com/tidy-tile-mapper/runtime-api/blockutilities

I have plans to convert the rest of the API calls as well and will release them when they're done (next on my list is BlockMap API). If you've any questions or issues please let me know.

To install simply unzip and add the entire folder to the actions folder of PlayMaker.

Enjoy!

Update: See below post.
« Last Edit: January 09, 2013, 03:43:01 PM by Krileon »

Krileon

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Re: Tidy Tile Mapper
« Reply #1 on: January 09, 2013, 03:44:23 PM »
Ok, I've completed PlayMaker actions for all of TidyTileMappers runtime API found below.

http://api.dopplerinteractive.com/tidy-tile-mapper/runtime-api

See attachment. Simply add the TidyTileMapper folder included in the zip to your PlayMaker/Actions folder. They're all named to prevent conflict and in accordance to their exact API function.
« Last Edit: January 10, 2013, 06:27:35 AM by Krileon »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12098
  • Official Playmaker Support
    • View Profile
Re: Tidy Tile Mapper
« Reply #2 on: January 10, 2013, 03:41:33 AM »
Hi,

 Excellent!! I had a glance at your scripts, and they are really clean and well executed, and all commented out with the tooltip, congrats! It's very solid ( not tested tho, I am just looking at your code, but I am confident given what I saw so far).

 I will make a new page for this on the wiki, it deserves it. If you want to do it, let us now, and you wil gain access to the user wiki to create your own pages and docs for this kind of work.


one thing ( for the sake of it really), I noticed TidyTileMapperIsPoolingEnabled that you would fire events everyframe. I don't really recommend this, as it as only very limited usage, and is in my opinion not optimal. Instead, interested fsm, should implement global events to listen to the pool being enabled or disabled when it happens, else querying the bool variable if not implementing any events for that matter. This will allow you to create far more stable fsm.

 If you do have a use case, I willing to study it tho.


Also, I would recommend also to put custom actions in a separate folder, like "PlayMaker Custom Actions/TidyTileMapper/", then it's a lot easier for the developer to manage assets, and clean up if necessary.

Finally :) could you make it as a package? a zip file is not really convenient, and creating package makes distribution and maintainability for future updates and bug fixing a brease.

bye,

 Jean

Krileon

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Re: Tidy Tile Mapper
« Reply #3 on: January 10, 2013, 06:20:03 AM »
Quote
I will make a new page for this on the wiki, it deserves it. If you want to do it, let us now, and you wil gain access to the user wiki to create your own pages and docs for this kind of work.
You can add to wiki if you want, doesn't particularly matter to me.

Quote
one thing ( for the sake of it really), I noticed TidyTileMapperIsPoolingEnabled that you would fire events everyframe. I don't really recommend this, as it as only very limited usage, and is in my opinion not optimal. Instead, interested fsm, should implement global events to listen to the pool being enabled or disabled when it happens, else querying the bool variable if not implementing any events for that matter. This will allow you to create far more stable fsm.
It fires the event based off the results of the pooling returned value (true or false). The every frame is default off as you don't have to use the events and instead can just update a variable with the results. It's mimicing other PlayMaker actions and is optional. I don't have a use for it, but someone might.. for example if every frame they want FSM 1 to check for pooling and set a global variable then FSM 2 checks that global variable somewhere in its usage, etc..

Quote
Also, I would recommend also to put custom actions in a separate folder, like "PlayMaker Custom Actions/TidyTileMapper/", then it's a lot easier for the developer to manage assets, and clean up if necessary.
They're already in the TidyTileMapper folder. They're then separated into additional folders based off the runtime API they use.

Quote
Finally  could you make it as a package? a zip file is not really convenient, and creating package makes distribution and maintainability for future updates and bug fixing a brease.
Sure, will include both in my post encase someone wants as zip.

Update: added unity package to the same post with the zip for those that want it in that form.
« Last Edit: January 10, 2013, 06:28:18 AM by Krileon »

justifun

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 227
    • View Profile
Re: Tidy Tile Mapper
« Reply #4 on: January 30, 2015, 03:19:18 PM »
I've been playing around with these actions but am having no luck getting the blocks to appear / disappear based on a players position.

Here's what i've tried.

I have a character that can move around a top down map.

I'm storing his X and Y as INT's then using the "Tidy Tile Mapper Get Mathematical Position" to determine which block he's standing in (PlayerBoxLocationX and Y)

Then upon a keypress i switch to a state that has the action " TIdy Tile Mapper Add Block to Map"

Map game object: "Testmap" (the map object in my scene)
Block Game Object : TT_Standard_Bottom
Randomize: Unchecked
Varient:0
Refresh Upon Addition: Checked
X: PlayerBoxLocationX variable
Y: PlayerBoxLocationY variable
Depth: 0
Destroy Existing Immediately: Unchecked
Add Empty When Null: Unchecked.

I'm expecting that it should create a box at the location where the player is standing, but nothing happens.

same goes with trying to remove and existing box using the Remove Block from Map action.

What am i doing wrong?

Thanks

Krileon

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Re: Tidy Tile Mapper
« Reply #5 on: January 30, 2015, 03:57:36 PM »
I've no idea. I haven't used Tidy Tile Mapper in like a year. I use Rotorz Tile Mapper now.