Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - srivello

Pages: [1]
1
Releases / Re: 2D Toolkit 2.2 beta 1
« on: August 22, 2013, 01:20:32 pm »
Hi! I'm loving tk2dTileMap and excited for the next public release. I'm using this beta and have an architectural question.

I'd like to lock a camera to a spiral shape made of tiles. At runtime I'd like left/right to rotate the spiral shape (as one unit) and have a player which falls with physics. The user will rotate the spiral to guide the falling player to the center of the spiral.

QUESTION
1. What is the best setup for this? 2k2DTileMap (with colliders in the sprite collection) for the spiral and 2k2dsprite (with box collider and rigidbody)?
2. Or a  layer within 2k2DTileMap (with colliders in the sprite collection) for the spiral and 2k2dsprite (with box collider and rigidbody)?

2
Support / Re: Recommended Changes to TK2D Folder Structure
« on: June 12, 2013, 05:08:51 pm »
...1. so you can delete them...

I wouldn't imagine people would cherry pick that functionality, but ok. I've updated my suggestion.

  • Assets/tk2d/source/code
  • Assets/tk2d/source/editors
  • Assets/tk2d/source/goodies
  • Assets/tk2d/source/shaders
  • Assets/tk2d/source/tilemap
  • Assets/tk2d/source/ui
  • Assets/tk2d/examples/(1 scene per demo*)
  • Assets/tk2d/examples/(1 folder per demo*)

...2. The real problem is with Unity though - you're basically stuck with the first folder layout you pick...

Is that specific to asset store items? Either way is this a reported bug fix I can vote on?

3
Support / Recommended Changes to TK2D Folder Structure
« on: June 12, 2013, 03:45:59 am »
To facilitate logical organization I recommend changing the folder structure (including those related to maps and ui) of TK2D to;

  • Assets/tk2d/source/code
  • Assets/tk2d/source/editors
  • Assets/tk2d/source/goodies
  • Assets/tk2d/source/shaders
  • Assets/tk2d/examples/(1 scene per demo*)
  • Assets/tk2d/examples/(1 folder per demo*)

*Matching the scene name to the folder name

4
2DToolkit does indeed support tile-based games. Typically a game is either tile-based or not. It is not a mixture. I assume your game is not tilebased.

TILEBASED

If tilebased you can define the map via tk2dTileMap Class and do the lookup and type-check for the tile in the space the player is about to walk into.

NOT TILEBASED

Unity is VERY fast in its computation. A developer can do more expensive techniques than he/she could do in other, older, slower platforms. So your idea to put 'trigger collider' objects (invisible with just a collider) to do testing is a great idea. Often there is just 3 at the players feet (center x, left x, and right x) and you test just the one in the direction you are going (left/right/down). If you need more tests you can do more.

5
@dpk, your link http://bybeardy.com/game/project8/Build.html is great. It perfectly illustrates the problem that a change to Unity's default gravity is required yet undesirable.

--

@unikronsoftware, If your question is to me, then you can simple add a 'tk2dCamera' to your own example scene '8- Polygon Colliders' and see the problem that a change to Unity's default gravity is required yet undesirable.

Thanks for your answers to me. Per #3, Rather than be required to change Unity's default gravity settings, I'll wait for the release of tk2dOrthoCamera before using 2DToolkit any further. Thanks for info about that.

6
Hi,

  I'm new to 2DToolkit, but hope to use it as my defacto plugin for all 2D games. I'm using the latest public release of Unity Free and 2D Toolkit as of the time of this post.

It seems in Unity the following can affect the users perception of the speed (i.e. floatiness) of a falling object;

IMPORTANT SETTINGS

Edit-> Project Settings -> Physics;
  • Gravity
Hierarchy->Camera;
  • Perspective (Let's assume Ortho is set)
  • Size (Note: Unity Camera's default is 1 and t2tkCamera's default is 480 in my case)
t2tkSprite (falling because of rigid body component)
  • Mass
  • Scale
  • Drag

By changing any of those values I can affect the perceived falling speed of the sprite. I *think* that no other properties affect the perceived falling speed of the sprite.

CONTROLLED EXPERIMENT

* a. I create a new empty unity scene with a falling sprite. Touching no other settings. Falling looks like a 'good' speed.
* b. I create a new empty unity + 2DToolkit scene with a falling tk2dSprite. Touching no other settings. Falling looks like a 'good' speed.
* c. I open the 2DToolkit demo scene '8- Polygon Colliders' (which uses Unity Camera) Touching no other settings. Falling looks like a 'good' speed.
--
* d. I open the 2DToolkit demo scene '8- Polygon Colliders' (which uses Unity Camera). I add a tk2dCamera and remove the Unity camera. The sprites are not large enough to see well (or at all I forget). I change the camera size and the sprite scale so that I can see.  I change no other settings. Falling speed looks very slow (i.e. floaty).
* e. I create a new empty unity + 2DToolkit scene with a falling tk2dSprite and a tk2dCamera instead of Unity camera. Sprite not visible in 'game'. I change the camera size and the sprite scale so that I can see.  I change no other settings. Falling speed looks very slow (i.e. floaty).

PROBLEM

It seems per a,b,c that default unity settings give you a default (i.e. desirable) physics simulation, and that something in the setup of d,e give floaty results. Floaty results can be 'fixed' by increasing gravity a huge amount. I feel that is a hack workaround that will hurt the accuracy of my overall project and potentially other plugins I may want to use.

Update: I notice that if I set all settings of a tk2dCamera to match a working Unity camera the issues above exist. Then if I remove the 'tk2dCamera' script from the tk2dCamera object, then the game rendering 'works'. So perhaps that script causes the 'problem'.

QUESTIONS

1. Are my assumptions correct in IMPORTANT SETTINGS?
2. Is using tdtkCamera recommended in all projects for 2D Toolkit (I.e. it has no known bugs or issues)? If so, I recommend all demo projects be updated to use it.
3. What is the best way to use 2DToolkit's camera to get the physics results seen in 'c' above (without dramatically changing sprite scale and world gravity?



Pages: [1]