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

Pages: [1] 2
Support / Isometric Hack and Slash Map?
« on: November 22, 2014, 03:55:37 pm »
I'm having a real hard time finding any info about a diamond isometric tile map for a Diablo 2 style game. Can tk2d do this in any way and if so is there any info that can help get started?

Support / Isometric 8 Directional Movement Options?
« on: November 21, 2014, 02:35:55 pm »
We are in the process of choosing technology for our next game which is an isometric hack and slash (Diablo style) tile based movement game and not quite sure if Unity 2D and/or tk2d will give us what we want.

- For 8 directional movement is the only option to create spritesheets of literally every armor weapon combo in the game you want for every animation and then make animations out of all of them manually in the editor?
-- Male_Plate_Chest_Leather_Helm_1h_Sword_Up_Idle, Male_Plate_Chest_Leather_Helm_1h_Sword_Up_Running, Male_Plate_Chest_Leather_Helm_1h_Sword_Up_Attack

This seems much easier than trying to swap the equipment at runtime and making layers for Plate_Chest_Up_Idle, Plate_Chest_Up_Attack but hopefully both are just completely wrong and there's an easier way.

The biggest issue we ran into on our last game with adding sprites to the characters at runtime was all the Z layers.. we had eyes, head, body, chest equipped, head equipped, mainhand, offhand, beard.. so like 9 z depths ranging from -.4 to .4 in local position on the character which really makes you have to fight to make sure things overlapping dont look crazy.

Edit: So it appears the possible proper way to do this is to create the 8 directional animations with empty hands, helm, and body.  You would then need to create all the armor on a personless spritesheet so it would be like Plate_Chest_Up_Idle like I mentioned, but how would you guarantee that the "character" animation for attacking matches the exact frame for "armor" animation for attacking frame for frame?


Support / Polygon colliders disable on parent object disable?
« on: May 14, 2014, 11:04:47 pm »
I have a scene that I have created polygon colliders on objects for like an anvil etc and when I close the window through the editor or use a script (Door collider sends a gameObject.SetActive(false) to parent) and try to come back into the scene the colliders are not displaying data any longer.  Clicking on the objects in the scene view shows no editor "green" lines for a mesh collider.

Edit: To add to this, what we've done is create a large canvas for our 2d scene and the images are all exported as full canvas transparent space included.  This allows pixel perfect adding of the images to the scene without having to line anything up even with trimming I've noticed.  In the atlas I made polygon colliders and they work great unless you disable and then enable the object again.

I changed the colliders to box trimmed and it works with zero issues, so there's something going on when you make a polygon collider and then disable and re-enable the sprite.

Support / Sprite edge glow?
« on: May 06, 2014, 02:18:16 am »
Is there any OnMouseEnter and exit type implementation I could do to make a sprite have a glow around it without having to make exact size glow for each sprite?

Support / 1 "Actual" pixel off?
« on: March 03, 2014, 11:04:32 pm »
Currently I have all images in 1 atlas using the same settings and am seeing things like the above where the hair doesn't quite go flush with the head.

The PSD these are exported from is the exact same image, 64x64 canvas size and straight to PNG.  What is happening is not 100% of the time and depends on position on screen, so it seems as if the resolution is trying to adjust images drawn by pixels and calculates that the hair should be shifted left 1 column on your screen and the main head not.  If the character moves across the screen the issue disappears and depends where he stops.

Support / Flashing line between vertex snapped sprites
« on: February 23, 2014, 03:53:55 am »
I have 4 GameObjects that each have a child GO with a tk2dSprite on them.  I have used vertex snapping in game to link them all together in a horizontal row.

In FixedUpdate I am moving the entire parent that all 4 GOs are in to the left to simulate the world moving underneath my characters feet.  This all works well except on "SOME" platforms I'm seeing a 1 pixel seam flash continually between where the 2 sprites join.  When movement stops sometimes the line is there and sometimes it is not. 

This problem seems to have gone away on the Web player in unity but has come back now that I've built for OSX.

Support / "Grounding" sprite characters?
« on: December 30, 2013, 02:52:40 am »
I've got characters made up of a body (includes feet), head, equipped chest and head etc all stacked together by Z and I'm having trouble grounding the characters in my scene without the use of physics.

I've got a Final Fantasy style screen so I've created spawn points in the form of GameObjects on the level and then use the following code to position them:
Code: [Select]
Bounds bounds = baseSprite.GetUntrimmedBounds();
AdventurerSpawnLocation apl = dungeonInstance.adventurerSpawns.Find(spawn => spawn.partyPosition == a.partyPosition);
Vector3 pos = apl.transform.position;
pos.y += bounds.size.y / 2f;
a.transform.position = pos;

This works out pretty well, but I'm having problems using it in paper dolls in character screens and other areas where I'm resizing the baseSprite at run time to mimic new races like dwarves, giants etc... I have a base sprite that has the whole body and then change the scale to 1.1 1.1 1.0 for example on a Giant as well as all equipped items.

Is there any better way to do this? Perhaps re-do all my characters with a new pivot at their feet so I can simply set position to the spawn point if the spawn point is at the ground location I want?  The main issue is changing the baseSprite scale at run time and then maybe the bounds are not calculated correctly? Not sure why I'm getting results where the "feet" aren't at the same position.

Support / Animations with sprites of varying sizes
« on: November 30, 2013, 11:41:04 pm »
I am having major problems telling my artist how to give me a sequence of frames for an animation for use in Unity and tk2d.

We have a large 1000x400 ish map and on it he has made several layers to use in animations.  I could export layers to files trimmed but that would mean an animation exports 1 frame as say 30x40 and another 30x43 if the flames animating are higher than the original frame.

Is this ok and if so how do I get it into tk2d correctly so that the images stack exactly on each other and the extra vertical height is correctly handled?  Ideally if he exported all layers to png I would grab them like Cave1, Cave2, Cave3 and put them in an animation and then manually place it on the map.

Support / 2D Clothing Items
« on: November 06, 2013, 04:07:57 pm »

Is there any better way to either design the art or inform my artists of a way I can "equip" clothing items onto players? The idea is the items need to fix the white area pixel perfect, but currently they are tasked with creating a whole new sprite for every single size of character in the game, so all art is duplicated 5 times so far for chest and head items.

Support / Equipped Character Items & Z-Depth
« on: October 11, 2013, 01:49:39 am »
I have an RPG type game and characters laid out like the following:

Main Body sprite - z=0
Head equip item - z=-.2
Chest item - z=-.1
mainhand item - z=.1
Offhand item - z=-.3

This all works great except obviously when characters start walking among each other since up to 4 can be on the screen at once and then as you can expect very weird things happen visually with all these depths weaving between each other.

Is there any other better way to do this?

Support / ScriptableObject for sprite reference
« on: September 09, 2013, 05:24:45 am »
I want to use ScriptableObjects for my monsters in my game so that I can load up the data from them.  The issue I can't seem to figure out is how to get the sprite to show up in the inspector besides just using a public tk2dSpriteCollectionData monsterData ref to my monster atlas and then do a workflow that all monster names exactly match a sprite in the data and do SetSprite(monsterData, monsterName), but I was hoping for something a bit more concrete and not error prone.

Support / Adding Folders of sprites to a Collection Workflow
« on: July 27, 2013, 03:49:54 pm »
Hopefully I'm doing something wrong here.... If you have 100 sprites sitting in your project folder Armor let's say, you then bring over 50 more and need to get them into the collection but have no idea which they are you end up dragging the entire folder into the collection resulting in a bunch of 1's after the duplicates and any updates you made won't be reflected because it copied them.

Is there another way to do this task over the course of my project?  I need something like "Add all these images and overwrite existing"

Support / NGUI Clipped Panel shader and tk2d
« on: July 20, 2013, 05:18:50 am »

In the above post I asked how clipped panels worked in NGUI and it's apparently with a shader.  When I try to use this on a tk2d material it makes the sprites not show up at all.  Curious if you had any suggestions at all on your end.

I'm trying to use the same atlas to re-create a character in ngui so I can use it in the HUD and other GUI things.

Support / Z Depth Draw Calls
« on: July 14, 2013, 01:35:19 am »
I've got 3 atlases that make up a player in my game.  Armor, Weapons and Characters. 

Each Adventurer contains child objects for each of these sprites on different z depths to create a layering effect.  If the player animated sprite is at Z = 1, the helmet GO with tk2dsprite on it is at -.1 and the chest -.1 and weapon is .1 so that it is behind the "hand" and everything else. 

This workflow works great as it's only 3 DCs for a character, but the problem comes when I put one at Z=20 in the world, one in Z=21, 22, 23.. this creates 3 MORE draw calls per character even though the sprites are in the same texture.

Can you please tell me why this is happening or suggest another way to create depth?  Each player has to be able to pass the other creating a "this guy is behind this one" type effect when they walk behind, so I need some way to make that happen when they walk over to attack an enemy on the right side of the screen.


Support / Graphic anomalies at different resolutions
« on: June 12, 2013, 04:29:27 am »
I'm seeing what looks like a strip of black pixels across the very top of my images and odd lines here and there when doing animations as the spites flip in and out.

I've tried literally every combination of settings I can think of but nothing works universally.

What I have is 40x40 pixel art characters that load right into a tk2d sprite collection.  I have the target height set to 126, tried 128... same results but at different resolutions.  I've tried uncompressed, trim alpha on, off, reduced 16 bit... but no matter what settings I use depending on the device resolution I'm seeing extra lines drawn inside my sprite images.  The web build I have seems to look perfect if i export to 1024x768 but if I try something like 1280x720 all a sudden I get the lines.

This is really putting a kink in our plans for a pixel art game so any help is appreciated.  I created our previous game which had 100x100 images and had zero problems, so I don't know if it's because the target height is so small or what the problem is...

Edit: To confuse matters more I've removed all sprites from the scene so that there are none overlapping or anything else that might be causing issues.  The black line of pixels or odd vertical ones, etc appear based on a combination of res and position on screen.  Example is I can set up 4 characters with the same sprite on the screen with target size 128 and maybe only 2 will have the weird line of pixels, but if I move them all then all might have it or none.  If I then change the resolution of the build or build to my iOS device the same occurs... 1-4 may have the weird issue depending on screen position etc.

Edit edit: Adding manual padding of 1 to my character sprites seems to resolve the issue, any explination for that?

Edit edit edit: The artist didn't put 1px empty space around the sprites.... I'm going to assume this is best practice and is what caused the entire 4 hour headache.  Can you please confirm?  I'm going to have him move all the art away from the edges of the image if so.

Pages: [1] 2