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 - Afro-Ninja

Pages: [1] 2 3
1
Support / Re: Paint to tile map layer at runtime.
« on: June 28, 2014, 05:05:52 pm »
Ah, gotcha.

Just in case, is it also possible to access the raw bitmap data? I'm not sure if the tilemap layers are flattened into one big, actual bitmap. painting to the tiles could result in a uniform look, I was hoping to get more of a splatter/painted feel.

If not I can certainly make the tile method work by making several blood tiles and choosing the right one(s) based on contact position.
It looks like I can add the blood layer programatically (at runtime) so I don't have to go through and manually do this for each tile map. Is that correct?

2
Support / Paint to tile map layer at runtime.
« on: June 27, 2014, 06:52:36 pm »
Hi, I just want to know if this is possible. If so I should be able to dig around and get it working myself.

Let's say I have one tilemap with two layers- foreground and background.
Example: http://i.imgur.com/w2OpbR3.jpg

I want to be able to paint blood spatters to the foreground tiles.
Since we can specify separate sorting numbers for the tilemap layers I assume each layer is batched together as one big sprite at runtime.
It would stand to reason that after detecting collision I could place a blood spatter graphic at the collision point and copy the pixels that overlap any non-transparent ones.

3
Releases / Re: 2D Toolkit 2.4.0
« on: June 27, 2014, 06:40:04 pm »
Any updates on making use of the layer locks? Sorry if it's already been mentioned
http://2dtoolkit.com/forum/index.php/topic,4109.msg19385.html#msg19385

4
Support / Re: Proper steps for bump-map lighting on a tilemap?
« on: June 23, 2014, 08:56:53 pm »
which .cs file is that found in?

5
Support / Re: Proper steps for bump-map lighting on a tilemap?
« on: June 23, 2014, 07:10:16 pm »
as a side note, it seemed like I could get this working on a stand-alone sprite that wasn't part of a tilemap. It's not a big priority, just something I was curious about. If this is a large undertaking you don't need to go into specifics.

6
Support / Re: How to combine tk2d shaders with my own shaders
« on: June 22, 2014, 11:20:48 pm »
Gotcha. I was just confused because the second part of that shader has a subshader and inside it doesn't seem to make use of a surface, vert, or fragment function

http://pastebin.com/pACwRVwK

7
Support / Proper steps for bump-map lighting on a tilemap?
« on: June 22, 2014, 09:27:20 pm »
I've searched and found a lot of topics on the subject but sometimes it's hard to figure out what is the most up to date method.
I have a collection that I use only for tiles, and I would like to apply a normal map shading technique to it.
Here's what I have done so far:

1. I set the normal generation for the collection to "normals and tangents"
2. I duplicated the collection's atlas and turned it into a normal map, and UNchecked 'create from grayscale' (the map has a blue hue to it)
3. I changed the collection's shader to unity's 'transparent - bumped diffuse' and applied my new normal map to it.

It certainly changed the way the lighting looks, but something is just odd about it. I move my lights around and the shadows don't really fill in like I would expect.

Should I be taking a different approach? Thanks.

8
Support / Re: How to combine tk2d shaders with my own shaders
« on: June 22, 2014, 08:17:06 pm »
from my understanding in a shader such as 'litblendvertexcolor', the top part of the shader takes care of mapping the uv coords, and the bottom part takes care of the lighting.
As long as I leave the bottom part alone I should be able to modify anything in the top part and retain the lighting afterwards?

9
Support / How to combine tk2d shaders with my own shaders
« on: June 20, 2014, 04:15:06 am »
So far for all of my sprites I have used the 'LitBlendVertexColor' shader that comes with tk2d. This allows me to add basic lighting effects to my sprites.

What if I want to add custom effects in addition to the existing lighting shader? I understand that I can edit the shader and add my own snippets in. But what if I make a second shader? I would have to keep copy/pasting the original tk2d Shader code into it, which is very redundant.

I also understand I could implement my own decision tree inside of the shader (if effect = this, do that) but from what I understand, using conditionals in a shader is a bad idea. especially if I want to support many different effects.

Is there a way to "include" the necessary parts of the tk2d shader so I don't have to rewrite or copy paste it every time I want to work on a new effect?

10
Support / Respecting layer locks?
« on: May 26, 2014, 11:36:40 pm »
I searched and found an issue on this in the past, so I wasn't sure about the status of it.

As I'm sure you're aware, tk2d objects can still be selected even when the layer they are associated with is locked.
Will there be a fix for this in the future at all, or will we have to make do without?

11
Support / Do I need to use a static sprite batcher or not?
« on: May 24, 2014, 06:39:45 pm »
So I have three sprites that represent different fence pieces.
I can arrange these three pieces in different ways to create chunks of a fence system.
The problem is that these fence chunks must appear at different scales. (background and foreground)

I can simply change the gameobject's scale, and it will work fine. Though this incurs more draw calls...?

I can drop them into a static sprite batcher, but I seem to encounter a lot of weird behavior with the batcher. The global coordinates of the batcher object don't seem to match up with my other game objects, and when I try to scale the batcher it seems to pop off into another section of the screen. It also turned one of my sprites dark for some reason. From what I understand the batcher also doesn't really support order in layer correctly, so should I just stick to scaling the pieces with unity's game object? Is the performance hit going to be that rough?

12
Support / How many sprite collections to have?
« on: December 06, 2013, 09:22:53 pm »
I know there is no hard and fast rule on this subject, but I'm trying to feel it out and plan accordingly for my game.

Right now my main sprite collection takes about ten seconds to commit when making changes. I'm about to add a very large boss to the game with a lot of sprites and odd shaped-moving parts. I feel like this will take a large toll on my existing collection. I think it makes sense to put the boss in his own collection because he only appears in one scene of the game, no need to have him loaded at all times.

So that begs the question- should each boss be in their own collection?
Is there any inherent risk to having too many collections altogether?

Right now I have a collection for my tiles, a collection for elements that don't need lighting, and then everything else. I just don't want to go overboard with the collection process. Much akin to how someone new to OOP starts making a class for everything they can think of.

13
Support / Re: Stop a looping animation
« on: November 22, 2013, 08:15:53 am »
anim.Pause(); ?

14
Support / Re: Error when creating a new TileMap
« on: November 20, 2013, 10:10:16 pm »
ok, that's what I've been doing. just wanted to make sure it was an acceptable way.
Since I'm doing it this way is it safe to say that my 'ortho size 1 and target height 720' don't really affect anything? and I don't need to worry about them?

15
Support / Re: Unity 4.3 + tk2d Sprite depth
« on: November 20, 2013, 09:17:42 pm »
on your tk2d sprite component there is a field called 'order in layer'
you can use that to determine what gets drawn on top. this works in conjunction with the unity 4.3 'sorting layers'

Pages: [1] 2 3