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.


Topics - Afro-Ninja

Pages: [1] 2
1
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.

2
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.

3
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?

4
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?

5
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?

6
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.

7
Support / Error when creating a new TileMap
« on: November 20, 2013, 06:39:20 am »
Unity 4.3, 2dtk 2.3.0

I create a new tilemap (with no map data or editor data or sprite collection set) and get the following error:

NullReferenceException: Object reference not set to an instance of an object
tk2dTileMap.Awake () (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:107)
UnityEngine.GameObject:AddComponent()
tk2dTileMapEditor:Create() (at Assets/TK2DROOT/tk2dTileMap/Editor/tk2dTileMapEditor.cs:1267)

tilemap seems to behave fine, just not sure what causes this.
thanks!

8
Support / Specify sorting order for tilemap and tilemap layers?
« on: November 01, 2013, 08:23:04 pm »
This feature has come in very handy for regular sprites, I was wondering if there is any way to implement it into the tilemap layers.
For example my tilemap has two layers, and right now I have them set with a zOffset of 0 and .0001. This works for the most part, but I feel like I am still able to detect a small amount of flickering between the layers as they are not quite on the same z index. Is there a way for them to share the same Z with a different render order?

9
Support / Creating a 3d gui with StaticBatcher?
« on: September 18, 2013, 07:17:22 pm »
My goal is to create a 3d pause menu that floats above the game screen with a slight 3d rotation. Conceptually this isn't a problem- I just build a gui out of sprites and set the rotation of the gameobject to pop it out. All of this is filmed by a perspective camera with sort mode set to orthographic. The camera is set to appear on top in the camera stack.

However, the issue is that if I slightly rotate the menu, the objects near the back (in regards to z axis) will start to occlude objects in front. Here is an example:
http://i.imgur.com/H2d4R8B.png

In the picture you can see that the words on top are much darker. They should be the same as the white words, but the transparent 'backing' counts as closer to the camera than them at the angle, and so it appears on top.

Is it possible to make use of the static batcher (http://www.unikronsoftware.com/2dtoolkit/docs/2.20/advanced/scripting_static_sprite_batcher.html) so that the elements are all drawn together as one sprite, and always appear on top? My gui will consist of a mixture 2d sprites and 2d text meshes. Also keep in mind that the gui will change as the user cycles through the different choices.

10
Support / Will sunshafts work with 2dtk?
« on: September 02, 2013, 04:14:52 am »
I don't have unity pro but one of the reasons I would like to get it is for the image effects, especially sunshafts:

http://docs.unity3d.com/Documentation/Components/script-SunShafts.html

will these shafts show correctly through a bitmap image? like if I have a bitmap of trees and the top section is transparent, would the light beams show through correctly?


11
Support / Increasing time for commit to occur?
« on: August 27, 2013, 10:08:19 pm »
I've noticed that as my sprite collection grows that my commits become slightly longer. Right now my sprite collection has about 60 sprites (2048x2048, ARGB 32 bit, 21 MB). When I add a sprite and commit it takes a full 3-4 seconds to finish. If this is normal then that's ok, but I still have quite a few sprites to add. I will eventually break up my collections a bit more, but one collection still may contain a lot of content. Should I expect the time to grow steadily as the project size increases?

12
Support / Changing shader for tilemap (lighting)
« on: July 25, 2013, 10:31:40 pm »
I searched and found this topic:

http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1080.msg5241.html#msg5241

and just wanted to know if there was any follow up to it, or any changes/fixes since this release.
should I still do what maas suggests and just comment that line so the normals are always recalculated?

13
Support / Preparing for git?
« on: July 09, 2013, 10:23:18 pm »
I know this has been covered before but I'm paranoid and want to make sure everything is covered before I lose important files.

I have to turn on meta files to start with. Then, all I need to back up are the Assets and Project Settings directories, right? (everything else ignored with gitignore file)
just want to make sure tk2d or its newest iterations don't have any additional behavior to worry about.

I am currently the only main producer of this project, so I'm not worried about needing to merge scene and prefab files.

14
Support / TextMesh special characters
« on: April 11, 2013, 08:25:58 pm »
I have created a text mesh with a font exported from BMFont. It includes a few special romanian characters (such as ș)
The characters are there because when I type them in the 'text' property of the text mesh inspector, they show up on the screen.

but, if I set them programatically:
myMesh.text = "șpecial characterș";
myMesh.Commit();

my result on the screen would be: "pecial character"

suggestions?

15
Support / Atlasing a very large project?
« on: April 05, 2013, 09:26:05 pm »
Hi, I just want to know how to go about doing this before I get in too deep with the wrong solution.
I'm planning to create a platforming game with graphics scaled for 720p. This game will contain a lot of levels, enemies, backgrounds, etc.
each background piece itself will be 1280x720.

I've started working on the game, and with a partial first level complete my atlas is already 21 mb and uses almost half of my 2048x2048 allotment (even with a diced background)
this is a tiny fraction of how much artwork the game will have. should I already prepare to split into multiple atlases?
I know 2dtk can manage multiple atlases but I don't think I have a choice in where the sprites end up on the atlases. I imagine with a large game I would divide them by game area. Persistent sprites such as the main character would always be loaded, but I would cycle different atlases depending on what area of the game I'm in (tutorial, area1, area2, etc)

thoughts?

Pages: [1] 2