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

Pages: [1]
1
Support / Re: Procedural Tile Map Issues
« on: October 20, 2013, 10:43:32 pm »
I'm just generating a static background--completely uninteractive in terms of collision.  It just grows/shrinks overtime.  Thanks for the heads up!

2
Support / Re: Procedural Tile Map Issues
« on: October 20, 2013, 08:17:55 pm »
Great, thanks!  Think there's a way to anchor the center of the tile map from its center instead of the bottom left?  With 1024x1024 tiles there could potentially be a variable "center".  The idea would be to build from the center out as opposed to the bottom left to the top right.

I'll write up a tutorial on this I think.  I've encountered a couple people who have tried to roll some procedural effects with the tilemaps in tk2d but have run into a few hiccups here and there.

3
Support / Re: Procedural Tile Map Issues
« on: October 20, 2013, 02:22:54 am »
Fantastic, I think it will be hard, if not impossible, for any player to reach the limits if I have it set to 1024x1024.

When the scene starts though all the objects change to the default render layer and their transforms set back to the origin; I'm rendering this with its own background camera and they need to be on a BG layer.  Is there a work around from the tk2d side of things?

4
Support / Re: Procedural Tile Map Issues
« on: October 19, 2013, 11:26:47 pm »
I could make an arbitrarily large map to begin with.  In my game it is theoretically possible to go on forever though; the background would grow in size exponentially as well, not linearly.  It's also mobile, if the partitions become large enough is it possible to run into some of the limitations mobile platforms have with texture size?  Maybe I'm not thinking about it straight.  If my map is 1024x1024, does that translate to 1024x1024 tiles or 1024x1024 of 'pixels'.

5
Support / Procedural Tile Map Issues
« on: October 19, 2013, 09:15:21 pm »
I'm trying to do a basic random tile map to generate a space background.  At a certain point, when I need to generate more of the map I increase the size of the map and then I want to iterate over the whole map and set tiles on all new spaces.

Code: [Select]
        int oldHeight = map.height;
int oldWidth = map.width;
int newHeight = (map.height *= 2);
int newWidth = (map.width *= 2);
print (oldHeight + " " + oldWidth);
print (map.height + " " + map.width);
int tileCount = map.data.tilePrefabs.Length;
map.Build();
int a;
for(int i = 0; i < map.height - 1; i++) {
a = 0;
for(int z = 0; z < map.width - 1; z++) {
print (a);
a++;
if(map.GetTile(i,z,0) < 0)
map.SetTile(i,z,0,Random.Range(0,tileCount));

}
}
map.Build();

That code has some of the debugging stuff in it, but you should see the process.

Anyway, the problem I'm having is that GetTile throws an array out of bounds exception whenever I get past a value of 64 on the x/y coordinate of the tile.  I'm not entirely sure why this is happening and more importantly how I can fix it.  Since I've reset the height of the map shouldn't this not be a problem?

6
Support / Re: Black Textures on iPad and some android
« on: October 10, 2013, 05:20:30 pm »
The sprite that is working, is the only object in its atlas.  The sprites that are not working share multiple sprites in a single atlas.

I'll give your suggestion a go when I can.  The devices the problem is present on I don't quite have the quickest workflow with yet.  My personal device it works just fine on (a galaxy s3) but on some people's S4s, other android devices, and an iPad I have built to, this problem is present

7
Support / Re: Black Textures on iPad and some android
« on: October 10, 2013, 05:16:12 pm »
As far as I can tell, the only unique thing about the working sprite is that it is in its own atlas.  But that atlas has the same settings as the two others that are broken.

How do you mean unload sprite collections?  I've been hacking together my 2dtk knowledge to an extent.

8
Support / Re: Black Textures on iPad and some android
« on: October 10, 2013, 03:49:22 pm »
Being out of memory seems unlikely to me.  The sprite that is loading is instantiated quite a few times and I see newer versions of this just fine whereas the black boxed textures are pooled on app launch for the most part; there is a couple non-pooled sprites that are still drawn black.  This problem existed before I pooled these sprite objects so I don't think that's the root of it either.  So the Instantiated objects, which would be grabbing more and more memory, are mostly fine.

One thing I noticed in the inspector that is unique to the sprite that is working just fine, there is no material in its inspector view.  The mesh filter lists the material for the atlas, but the material isn't in the inspector.  On the sprites that are broken, the mesh filter lists the material and the material itself is in the inspector free for me to modify.

9
Support / Black Textures on iPad and some android
« on: October 10, 2013, 02:59:22 pm »
Some sprites from my atlases are showing up black when I actually go to device.  At the same time though, some sprites DO work.

I have built all atlases to be 1024x1024 (or less) and am fairly certain that is not the problem.

The sprite that does work is using the same shader as the sprites that don't.

Basically the whole texture is just a black box.

Pages: [1]