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

Pages: [1]
1
Ok. I think I have seen where my thinking went wrong. The tile ID is not a unique identifier for that specific tile at that position tile but rather refers to the pallet tile. So any tile painted from the same pallet tile will have the same Id.

2
After further research I have found that GetTileIdAtPosition is also reporting the same tileId for wildly different tiles. What could be going on?

3
This should be a fairly easy question. I'm surprised that I have not found a similar question on the forum after searching thoroughly.

I thought GetTile returned a tile Id based on graph coordinates, but inputting different coordinates returns the same int in many cases, so what is it actually for?

For example. on my 128x128 tile map called tileMap, tileMap.GetTile(2,2,0) returns 7 as does 2,14,0 and 6,14,0.      8,14,0 returns 10.

4
Support / Re: tk2d camera with scaled down sprites
« on: October 21, 2012, 06:12:45 pm »
I was scaling using the scale boxes in the sprite collection editor. As an extreme test, I was scaling down from 10x. I was NOT using a picture size that was a multiple of 2, I was using a picture size of 240 x 240.

So, I had a sprite of 24 x 24. I scaled it up in Photoshop by a factor of 10 such that every apparent pixel was made of 10 actual pixels. I dropped that into a sprite collection and set the scale boxes to .1 .1 .1. The size is right, but there is kinda a grey shadow around the edge.

As far as filtering, I may not know what that is. I am using point sampled, but not premultiplied alpha.

 

5
Support / tk2d camera with scaled down sprites
« on: October 20, 2012, 03:10:30 am »
I am making a snes type game and so, using the 2k2d camera, I have an apparent resolution of about 456 by 256, but I am actually targeting 16:9 resolutions much higher than that.

I want resolution in a few of my objects that is higher than the apparent resolution.

I thought an easy way to do this would be to simply scale down larger sprites in the sprite collection, however, this leads to artifacting around the scaled down sprite. What would be a better way to do this?

6
Support / Re: Is it possible to get at prefab data in a tk2dTileMap?
« on: September 05, 2012, 08:07:41 pm »
Yea, that should work just fine. I'll just tag the prefabs and get those objects by tag whenever a level loads. I'll keep an eye on future updates to the tilemap.

Thanks much.

7
Support / Re: Is it possible to get at prefab data in a tk2dTileMap?
« on: September 05, 2012, 07:08:15 pm »
Thanks for all the support. Your tool is great. Sorry I'm being a bit thick.

So GetTileIdAtPosition returns an int. I'm trying for say a string from a script on the relevant prefab.

GetTileInfoForTileId  returns a TileInfo which, looking at the code, has three members: a string, and int, and a float. All are general to any instance of that tile, I need the prefab instance associated with the specific tile id.

8
Support / Is it possible to get at prefab data in a tk2dTileMap?
« on: September 05, 2012, 12:17:46 am »
I have a Final Fantasy style overworld. and I use a layer of the tile map to paint zones. (zone with lots of fire monsters in it, zone with few land monster in it, etc). I access the data I painted using the players intended position and   GetTileIdAtPosition GetTileInfoForTileId.

This works great for zones, but I also have specific towns and dungeons that need specific information on what level to load etc. I assume the ability to paint prefabs is used for this, but is there any way to get at the instantiated prefab using through the tk2dTileMap?

I realize that I could make the prefab a collider or I could just place my own prefabs and check the player position against my own array of towns and dungeons, but being able to do all the map stuff through the tile map seems way cleaner.

Is there any way to do this? (even just being able to uniquely identify a tile would be enough. 

9
Support / Possible draw order bug.
« on: June 19, 2012, 05:53:09 pm »
Draw order messed up in Scene view.

Everything displays fine in game view and in game, but sprites that are clearly behind other sprites are often drawn on top in the Scene window.

Not really too big of a problem or anything, just did not see any mention of this in the forums.

If this is not a known bug, I can provide more info.

P.S. This could be a cool Fez like game idea, where things are drawn arbitrarily instead of based on their position in 3D space.

10
Support / Re: Unity GUI vs 2d toolkit for rpg menu advice
« on: June 18, 2012, 09:26:12 pm »
Ok, thanks.

Followup question. Is it better to generate the text meshes from the players inventory (as would be easier) or is it better to make a separate prefab for every item in the player inventory. (could be 500 + prefabs)

11
Support / Unity GUI vs 2d toolkit for rpg menu advice
« on: June 18, 2012, 06:15:30 am »
Need some advice from 2d toolkit veterans.

Making a Final Fantasy IV type game using the tk2dCamera so that the project will work at multiple resolutions. I decided not to use sprites for my menus because I am worried that it might not be a good solution for the 100+ items that might be in a characters inventory at any given time.

Right now I am using the unity gui and planning on doing everything based on percentage of screen and changing the font size based on detected resolution.

I should also mention that there are no mouse controls (these menus are keyboard/gamepad controlled only)

Am I setting myself up for future pain, or is this the best way to go about this?

12
Support / Re: Help me correct my thinking on resolutions.
« on: June 13, 2012, 03:06:21 am »
Ok, sound like tk2dCamera is the way to go, but thanks for the calculation too. Now I realize that ortho size is not just an arbitrary number.

I switched everything to the tk2dCamera settings and added theremin's script to the awake function of the Tk2dCamera script. Messed with the values a bit, everything looks great (after it actually compiled, you ever have unity seemingly forget to compile on you?) .


Just two questions:

1. What 'resolution' am I actually dealing with now (what height is the top of the screen)? It looks like 256. Is this understanding correct?

2. What is the best way to deal with the game window? Is there a way to set it to say exactly 1280x720 so I can see exactly what it will look like at that resolution?

Thanks for all the help.

13
Support / Help me correct my thinking on resolutions.
« on: June 12, 2012, 12:28:12 am »
I wanted to target 1280 x 720 because I wanted a 16 x 9 resolution, and this seemed like a fairly low one that most screen should be able to handle.

I am using 16 by 16 (and 16 x 32) pixel sprites in an rpg setting to give the project a snes RPG feel.

I wanted each sprite to be exactly 1 x1 Unity units so that I so that coding walking on a grid will be clear and easy.

I am using ortho 8 (so that I can see about 8-9 'squares around my character in the over world map) and I have the setting set right in Sprite collection.

In order to get the sprite the correct size, (1x1 Unity units) I have to multiply the sprite by 2.8125 in the Sprite Collection.
This leads to the 'pixels' being off. Some pixels are slightly larger than others (no fault of 2d toolkit it just does not divide evenly).

My question is, where am I going wrong with this setup? I can tell that I don't know anything about resolutions. Should I just use the default size and just somehow deal with every coordinate in my grid being a long decimal? Am I misunderstanding something about scaling? Is the resolution I have chosen even reasonable? I there anything else wrong about the way I am approaching this?

Pages: [1]