Hello Guest

Author Topic: MultiPlatform Toolkit integration  (Read 18100 times)

Jefemcownage

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
MultiPlatform Toolkit integration
« on: July 20, 2012, 09:37:23 pm »
Has anyone had any experience integrating 2D toolkit into the multiplatform toolkit (http://smuggletruck.com/multiplatform/). If not how are people handling multiplatform with 2d toolkit?

Thanks!

Jefemcownage

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #1 on: July 21, 2012, 06:28:03 pm »
Any thoughts from the dev on this?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #2 on: July 21, 2012, 08:01:01 pm »
Haven't had the time to write my thoughts down. I will do sometime soon.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #3 on: July 22, 2012, 10:11:09 am »
I haven't used multiplatform toolkit, but it is clearly very capable as they did SmuggleTruck and that works on many platforms (really well I might add). From the preview videos their approach lets you do a LOT, i.e. reposition, rescale things, use different atlases for different platforms, etc. Having not used it, I can't really say much more about it which you can't learn from the videos, etc.

What I can talk about though, are my plans with 2D Toolkit.

2D Toolkit 1.80 will add the ability to load different atlases depending on platform. Its about 50% done and it does work with VERY minimal overhead, the biggest problems holding it back so far are:

1 - Increased memory overhead building multiple atlases simultaneously. I might work around this for 1.80 by not doing the automatic atlas building part for this version - still undecided about it at the moment.

2 - Resource directory management. Its really hard to manage this as Unity detects ALL resource directories in a project, and we don't really want many "resource" directories - it makes managing builds much much more complicated than it should be.

In terms of workflow, its all done in the asset build stage, and everything else just happens transparently. You need to call tk2dSystem.SetAssetPlatform(...) when the game loads, preferably before loading in any sprites, to tell it which resources to load.

Hope that helps. Feel free to ask if you've got any further questions.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #4 on: July 22, 2012, 10:13:18 am »
I should also say I don't see why 2D Toolkit wouldn't work with Mulitplatform Toolkit. I suggest asking the Owlchemy guys if they have tried using 2D Toolkit with it if you want confirmation.

OwlchemyLabs

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #5 on: July 24, 2012, 05:29:27 pm »
Multiplatform Toolkit dev here.

2D Toolkit and MPTK work very well together. See the "Compatibility and Known Issues with 2D Frameworks" section on the documentation page for more info - http://smuggletruck.com/multiplatform/

@Unikron - PLEASE move forward with a Resources.Load solution for platform-specific atlases! (And don't lose the auto-atlas build process! My most important feature is being able to save from Photoshop, tab over to Unity, and see the assets (atlases) update, in-game, while playing. If anything, you could set a checkbox for which platform's atlases are generated by default, then build the others when you hit 'rebuild all atlases' from the menus.

We built a manual solution in code with no GUI, outside of MPTK, to handle resources.load()'ing the proper atlases per platform, but it was certainly a pain in the arse, and all materials needed to be cleared of any texture reference so you get a bunch of white squares in your scene before you hit play, which is pretty rough.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #6 on: July 24, 2012, 11:45:54 pm »
@OwlchemyLabs

The Resources based solution is coming along really well. The back end systems are getting completed one by one, and my next area of focus will be the tools. I want to make this as seamless and non-intrusive as possible. Also the way its set up currently, you can switch "targets" from within the editor to see how it'd look on any platform too.

None of the current features will be lost, that's for sure - especially the auto-atlas build. The way I'm planning it currently, each "target" gets its own automatically managed spritecollection, and only that only the dependent ones will get built when a particular texture changes.

atmuc

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #7 on: November 09, 2012, 06:00:12 pm »
i make a game for both web player and for ios platforms. so 1x,2x,4x is not suitable for me. i want to make different sprite collections for per platform. how can i switch them?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #8 on: November 09, 2012, 06:16:19 pm »
One for iOS and completely different one for webplayer? So the one in IOS doesn't get included in the webplayer?

atmuc

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #9 on: November 09, 2012, 06:19:35 pm »
yes 2 different atlasses. for ios i can use 1x,2x,4x. for webplayer i will use 760px x 570px or different.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #10 on: November 09, 2012, 06:22:38 pm »
What size atlas would you use on webplayer though? You'd want it to be power of two anyway won't you?

atmuc

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #11 on: November 09, 2012, 06:25:53 pm »
no problem with atlas sizes. what i try to do is to make all pixel perfect. i will have 4 different screen size; iphone 3gs, iphone 4, ipad3, web player. for example i have a background and i dont want to resize it improper way.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #12 on: November 09, 2012, 06:32:27 pm »
If you want arbitrary background sizes, it'll be easier to simply load the necessary texture and use tk2dSprite.CreateFromTexture(...).

The atlas swapping is for when you need to swap up & down on one platform. Maybe in a future version there will be selective atlas exporting for platforms - the system fundementally supports it, but it isn't implemented yet.

atmuc

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #13 on: November 09, 2012, 06:35:24 pm »
i have mptk. i think it doesn't support your atlases. also it doesnt support collider size.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: MultiPlatform Toolkit integration
« Reply #14 on: November 09, 2012, 06:51:01 pm »
You use colliders for the backgrounds? I need to understand a bit more about what you're doing before I can suggest anything.

The atlas swapping thing isn't trying to do what mptk does - what you're wanting looks more like what mptk does. You could swap entire sprite collections using mptk though couldn't you?