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 - vargonian

Pages: [1]
1
Support / Re: Simply setting a sprite width/height - how?
« on: May 09, 2013, 05:31:27 am »
Hmm, it's possible... in fact it might be easier than I thought.  Although I imagine I might change the UI layout for a tablet versus smartphone... but maybe not!  Hmm... thanks for giving me some ideas!

2
Support / Re: Simply setting a sprite width/height - how?
« on: May 07, 2013, 06:29:38 am »
I generally try to make few assumptions about the size of the play space as I'm designing a game.  I want to be able to tweak the dimensions of the game board (for example) and have all the sprites adjust their sizes automatically.

As an example, imagine I'm making a game with a board like chess.  A chess board is 8 squares x 8 squares.  But as I'm designing this hypothetical game, I want to make the board dimensions a variable that I can change at any time.  Perhaps I decide that 10x10 is better.  I want to be able to change the size to 10x10 squares and have all the sprites adjust their sizes and positions automatically. 

3
Support / Re: Simply setting a sprite width/height - how?
« on: May 06, 2013, 07:01:58 pm »
That's beautiful, thank you. :) 

The fact that other people aren't asking about this a lot makes me wonder if I'm just approaching this the wrong way, but I'm not sure.  Maybe most people just design for a specific resolution and create all their sprite textures at exactly the size they need.

4
Support / Re: Simply setting a sprite width/height - how?
« on: May 06, 2013, 07:33:28 am »
That seems like it might be workable.  It's really a shame that there isn't an intuitive "SetPixelSize" or something straightforward like that.  I mean... setting the sprite size seems like such an extremely common operation.  I'm not sure why it needs to be so cumbersome.

5
Support / Simply setting a sprite width/height - how?
« on: May 06, 2013, 06:39:41 am »
This is something that I've learned and forgotten several times over.  It's great that I can set the scale of a sprite, but I want to know the best way to actually set its width and height.  There is no width nor height nor size property.  So in the past I've manipulated that scale of the sprite to get it to the exact width that I want based on the size of the original texture.  I always end up needing to create a separate script which serves this purpose, with a Width and Height property which perform this semi-cumbersome math.

Is there a better way?  I need my sprites of a specific size, but in my case I'm using a single pixel sprite that I am stretching into a square.  What's the best way to set the exact size of a sprite?

6
Support / Re: Very simple tk2dCamera questions - ortho size? etc.
« on: July 01, 2012, 10:43:40 am »
Thanks for that explanation.  I'm definitely familiar with orthographic cameras; I just wasn't familiar with the term "ortho size" and I'm certainly unfamiliar with how Unity's Game window works under the hood.

This solution worked!  And, as an experiment I undocked the Game window and dragged it to my other monitor and made it full screen.  Sure enough, that displayed the coordinates scaled properly (even without the Force Resolution In Editor setting checked.)

I really appreciate your help (and your quick response time!).

7
Support / Re: Very simple tk2dCamera questions - ortho size? etc.
« on: June 26, 2012, 06:18:42 pm »
Thanks a lot, I will try this tonight.  One point of confusion is that "ortho size" might be better named "ortho height" in that case, since it's not clear otherwise if it represents width or height. 

I'm always confused as to why my Game window may be set to 768x1024 and yet still doesn't seem to display those dimensions.  I never know if it's the fault of the ortho camera or some quirk in Unity's Game view.

8
Support / Very simple tk2dCamera questions - ortho size? etc.
« on: June 26, 2012, 08:12:55 am »
In addition to being a question I'm posting on the forum, I'm also requesting that this information be elaborated on in the documentation.  I have been using the 2d Toolkit for a while now and every time I revisit it, I feel like I need to relearn the particulars of how the tk2dCamera works. 

First of all, what is an "ortho size"?  What is this the size of?  What are the units?  What effect is it supposed to have?  How would I know what to do with this field without any description whatsoever of what it is?  Even the tk2dCamera documentation simply lists this as the "Non centered ortho size of this camera." 

Second, how can I simply set my camera bounds (and Game window -- this is important) to, in my example, 768x1024, aka portrait mode on an iPad, but on the PC?  I've set my Player settings to have a 768x1024 resolution.  I've set my Game viewport to be "Standalone (768x1024)".  All looks promising.  All looks good.  I create a Sprite Collection with a Target Height of 1024 (if that makes any difference) and then check the "Use tk2dCamera" checkbox.  I removed the default Unity camera from the scene (so I just have my tk2dCamera).  I click Commit.  I add a sample sprite.

But without fail, every single time, viewable bounds in my Game window are 384x512, exactly half of what I want (or 1/4th if you want to be pedantic).

Can anyone please explain what I need to do to get a 768x1024 game viewport, and more importantly what these settings mean so that I can better understand what I'm affecting when I change these values?  Thanks immensely, and sorry if I sound overwhelmed.

Pages: [1]