#๐Ÿ–ผ๏ธโ”ƒ2d-tools

1 messages ยท Page 17 of 1

rough crown
#

you know what that's a great idea

twilit vault
#

you should probably go give this link a read

rough crown
#

wait but then I need to calculate a firepoint for every weapon

#

are you absolutely sure that what I wanted to do originally isn't possible?

twilit vault
#

might be possible, but it's really going about it backwards

#

you need 2 points anyways - 1 to position the gun, another for the firepoint

#

since you want the gun position to vary independantly of the firepoint, having the pivot actually do its job is the more reasonable method

rough crown
#

I know, but if the pivot was always at the end of the gun, it would double as both

#

oh wait no it wouldn't

#

you're right

twilit vault
#

yeah since the firepoint would need to move closer to the character too

#

if you have some kind of stat storage - an SO or a script on a prefab or something like that - you could have the firepoint offset defined there

#

or in the case of a prefab, you could have an empty child gameobject positioned where you want bullets to originate

rough crown
#

yeah that's the plan

#

a bit bummed out that I have to add another field to an already massive SO lol

twilit vault
#

welp yeah, flexibility comes at the cost of complexity

rough crown
#

true that, thanks for the help!

fallen nexus
#

making interesting story.

#

funny game.

lean estuary
#

@fallen nexus You've been pointed out !collab channels already.

barren orbitBOT
#

:loudspeaker: Collaborating and Job Posting

We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
โ€ข Collaboration & Jobs

fallen nexus
#

Can i help you?

lean estuary
fallen nexus
#

yes

#

not spam, i don't know about that.

lean estuary
#

Note this as your last warning then.

fallen nexus
#

Can I chat at this channel?

lean estuary
viscid plinth
#

hi yall, i wanted to ask something, i am starting with some 2D game dev but i dont know how to start making assets for it, like backgrounds characters, animating them making sprites etc

anyone can help me out w it ?

jolly narwhal
#

If you want to in general do gamedev it's better to start with ready made assets and worry about custom assets later. But if you specifically want to focus on making your own art assets then googling "pixel art beginner tutorial" (or whatever style you want them to be) gets you started. Note that if you're starting with no previous experience it can take months to years of practice before the assets stop looking like they were drawn by a beginner

devout birch
#

hi guys

#

i have an issue with the tilemap random brush

#

tiles made by the random brush cannot be erased and show up in the inspector as none

#

those "broken" tiles made by random brush show up normally when i focus on the "flower" tilemap

#

but they show up as "none"

#

reopening unity doesn't fix this

#

and sorting order on these flowers act as they would still be there

#

wdid

devout birch
crude mango
# devout birch hi guys

delete the whole grid, or delete tile selection in tile pallete and tile art in the folders you have in asset, then restart unity after doing all that. Then perhaps refrain from using random brush ig.

devout birch
keen ingot
#

Let's say, I want to create a football pixel style 2D game. Should I create the football field (stadium as a whole) as a Sprite or use tiles to create the same ?
Any suggestions.

#

At the same time, I want the stadium to be a replica of real life stadium

jolly narwhal
nocturne kindle
#

Hey guys! I want my cursor to look pixelated like in Gunslinger, and I kinda have a solution, but it has a big problem. So what I did is I made a 64x64 cursor sprite, I imported it into my game, I set the PPU to 8, no filtering, no compression, I made a script that rotates and moves the sprite, and I scaled it down to look really small. This way, it looks pixelated, but now I can't see it. Is there a way to make it bigger and still look pixelated?

itch.io

Shoot monsters, open crates, run fast.

crude mango
nocturne kindle
#

Yeah it didn't work, here's what I want it to look like:

All I did was resize the sprite from 64x64 to 32x32, I left the PPU as is, and then made the sprite bigger, and it didn't work.

crude mango
nocturne kindle
twilit vault
#

pixel art with filter point and compression none is correct

devout birch
nocturne kindle
#

Oh I fixed it now ty for your help!

devout birch
#

that worked or you found another solution?

nocturne kindle
devout birch
#

can you tell me how you did that?

#

I might use it someday

nocturne kindle
#

Using a fullscreen shader, I just need to figure out how to make it render only on one sprite

reef mesa
#

Anyone have experience with using custom physics shapes with 2D sprites in a tilemap? The thing I'm trying to do is retrieve the origin tile on collisions, but I don't know how to do that as physics shapes are arbitrary and can extend outside the boundary of the origin tile (so e.g. GetTile on the cell that the contact point is in doesn't work), and it doesn't seem like there's an API to get either the origin tile or sprite from the physics shape in the collision.

olive peak
#

Can someone help me with why when i split the tileset on sprite editor, it appears fine

#

but the second i throw it into tile palette

#

the houses are split

crude mango
chilly elm
#

Help! It's supposed to be an idle animation with just the hair flowing and the body being still, but the rect tool seems to not get the idea and is moving the whole body so that it can keep up with a scale...

#

Is there any faster way to settle this other than having to open up the Sprite Editor and eye all of its borders for every single frame?

#

Even the windows Photo Viewer gets the idea!

crisp knot
#

Ideally all frames would be the same size (either pow 2 or in a spritesheet)

#

But if not possible as long as the pivot + sprites are configured correctly it should work out okay

modest cargo
#

Import settings, etc

#

If each one of them is 256x256, then as far as I understand the pivot point should always be at the center of the whole square so no drifting happens
But here it looks like the pivot has been placed at the center of each sprite's graphical area withing the sprite itself

#

Something that afaik could only happen with multiple type sprites / sprite sheets

chilly elm
#

they are all separate sprites

modest cargo
tough arrow
#

I tried making two flags, with the background transparent in GIMP. I made the one on the left first, and then the one on the right. The one on the right has some weird blue artifact on it, what can I do to fix it?

main trail
#

idk if this is the right chat to ask that, but idk how to arrange the objects layers so the player's perspective with the PC works correctly

#

the upper images are the correct way it should be and the lower ones are wrong

#

if I put the player from image 1's layer in the chair it gets like image 4, and image 2 goes to 3

tough arrow
#

looks like this

main trail
#

yea that's what I'm talking about

#

but like

#

I have the table and PC on layer 0, player 1 and chair 2

#

that's the arrange in images 2 and 3

#

but 3 is wrong

#

if I move the PC to 1+, it turns into image 1 and 4

#

and 4's wrong

#

the correct layering of the player and PC changes depending of the player's position

modest cargo
# main trail the correct layering of the player and PC changes depending of the player's posi...

2D renderers use the sorting rules of 2D sorting in priority order:
https://docs.unity3d.com/Manual/2d-renderer-sorting.html
To sort sprites based on their position, you'll need custom axis sorting, which is a bit different whether you're using built-in render pipeline or universal render pipeline
If your objects have multiple sprites, but must be sorted as one, you can use the sorting group component to sort them all as one with one pivot point:
https://docs.unity3d.com/6000.1/Documentation/Manual/sprite/sorting-group/sorting-group-landing.html
Custom axis sorting heavily relies on sprites having the right pivot point, typically at the feet or otherwise at the ground contact point

main trail
#

tysm for this answer man

modest cargo
# main trail tysm for this answer man

If you set up the Y axis sorting, worth to note that layers and orders in layer take priority over position, overriding it as per the list in the first link
Except within sorting group components, you're free to do any kind of sorting in them and they're still treated as one object by other sprites

chilly elm
# modest cargo Type is multiple when it should be single

Hello! I've set them all to Sprite Mode: Single and it seems to have fixed the problem! Now the body remains still while the hair flows. ๐Ÿ˜ Thank you very much.
Just one thing... should i be concerned about the rect border's size increase? or will it hold no problem for the future?

modest cargo
graceful bluff
#

Anyone know the best way to import pixel art to Unity? I cant figure out how to match one sprite to another the pixels are always off

chilly elm
graceful bluff
chilly elm
#

thats why im just telling you to watch out

#

in case something like that goes wrong

graceful bluff
chilly elm
#

Yup im using the default camera the editor starts with

#

it looks pretty good

graceful bluff
chilly elm
#

I mostly use them for the pixel characters im working with, but there may have been a time i also used it for actual images like backgrounds and whatnot

graceful bluff
#

I finally figured it out it was only showing on the game not the scene the pixel perfect option bruh i dont know how long i fixed it too

modest cargo
# chilly elm well if you check here https://discord.com/channels/489222168727519232/763500535...

What actually happened there was due to how Multiple sprites are expected to work
Single sprites place the pivot at the center each time
But multiple type sprites with default settings in sprite editor would slice each individual graphical element on the sprite sheet into ints own sprite and place the pivot at the center of that element
So even if you only had one sprite on the "sprite sheet", the pivot was placed on it which wasn't consistent between each frame
If your sprites were on a sprite sheet rather than separate and you wanted the pivot point always in the same position for each, you'd slice using non-automatic slicing method to ensure consistency

stoic crater
#

Can anyone recommend software for creating high resolution isometric tiles, with a configurable grid with snapping? Krita snapping isn't working for me (bezier curves or rulers) and Procreate's iso grid isn't adjustable in angle (hard coded to 30 degrees). I don't care if it's paid software, as long as it has a good feature set for isometric workflows.

sly basin
#

Hello guys, i am a beginner at creating 2d art and wanted to know how you guys can create these wonderful assets (like the one in the image) for your games. i am currently trying to make a grass texture, but i dont really know where to start. like, what program do i use, do i have to draw, or are there other alternatives? thank you ๐Ÿ™‚

faint lark
modest cargo
# faint lark why is this happening?

You potentially aren't using isometric sorting
Tile sprite pivots might not be right
But certainly the tile sprites are too large / have the wrong PPU for the size of your grid

faint lark
modest cargo
#

Maybe that's the only issue there

faint lark
faint lark
modest cargo
modest cargo
faint lark
#

alright

modest cargo
#

Your grass tiles are offset one unit up, maybe the blue tile is too so you would be selecting the cell below it in the palette

faint lark
#

well

#

its not only for the blue tile too

modest cargo
#

Which you can't see if the palette's grid is disabled

faint lark
#

its like any tile

modest cargo
faint lark
modest cargo
#

The grid button in the tile palette

faint lark
#

checked it but i dont see any grids

modest cargo
#

Check where the pivot is using the sprite editor and move it if it's in the wrong position
Not complicated

faint lark
#

alright

modest cargo
#

Knowing what PPU and sprite editor are and where to find them should be topics in basic 2d tutorials

faint lark
#

the ppu is 8

modest cargo
#

By should I mean they are

faint lark
#

yeah just realized

#

i get the ppu but the whole sprite editor thing still makes me confused

#

where does the piviot need to be?

modest cargo
faint lark
#

alright

#

so what could be the problem?

modest cargo
#

But I would make sure that if you maximize the sprites under the sprite texture asset, there are no duplicate sprites of the same tile
In the project window*

faint lark
#

well

#

one thing does happen

#

im not sure if its supposed to happen

#

if i place multibe tiles and then unselect them they all become one tile

#

one selection

#

like multible tiles but its one part

#

heres some footage

#

create new tilemap is selected wich is weird

#

@modest cargo ?

modest cargo
#

The problems you have there seem more complicated than anything you should encounter when following the steps, which may be a result of trying a bit too many things as potential remedies

#

For sure you didn't do it right the first time because the PPU wasn't right
And I think tutorials do give you advice for placing the pivot in a good position too

modest cargo
#

When starting out I used to screw up things in ways I wouldn't know how to fix even now

#

And sometimes there's random editor glitches in the way that you won't yet recognize

faint lark
#

alright

#

@modest cargo i think im doing something wrong because i created a new project redid the thing and i still got the problem

mild lagoon
#

What is the recommended way to create multi-sprite setup for a character?
I have a character and I would like to be able to either have or not have a helmet, body armor, pants, shoes, etc.
And it's all supposed to be animated with the character.
One way I can think of is to create a different game object for each part: main character, body armor, etc.
And then run the animation I want to run on all of them. But the doesn't sound productive to work with and efficient to execute.

modest cargo
mild lagoon
#

Also my character and uniform is in different texture files.

modest cargo
mild lagoon
#

I'm using sprite library assets, sprite library component and sprite resolver component but it's for a single sprite right now.
I just want to do that but for multiple sprites where I won't have to have multiple sprite library assets, sprite library components, sprite library resolvers, sprite renderers and have to animate all of that separately for each part I want to be swappable.

modest cargo
#

Especially since the parts need to be both swappable and have frame by frame animation
That'd be a nightmare with separate gameobjects

#

If I knew "animation" on the parts referred to frame by frame animation, not just transform animation I would not have suggested that in this case

mild lagoon
# modest cargo Especially since the parts need to be both swappable and have frame by frame ani...

That'd be a nightmare with separate gameobjects
Well, in this case that's what I'm trying to avoid here: a separate game object with sprite library assets, sprite library component and sprite resolver component, sprite renderer component per body part and separate unrelated animations on each body part.
So what the skeletal framework provides but for the frame by frame sprite animations instead.
But I don't understand how to do that for frame by frame animations. The docs only shows it how to do this for skeletal animations and all YT videos, too. One for example:
https://youtu.be/kAPIWJJ6NQI

BMo

In this Unity Tutorial we'll cover the difference between spritesheet and skeletal animation to better inform ourselves when engineering a system to handle character customization in our games.

The example we'll end up building in this tutorial is a 2D Character Creation or Character Customization menu, with bonus features of a Randomize butto...

โ–ถ Play video
modest cargo
modest cargo
#

The animation is "skeletal" in the sense that it moves the transforms, but it must have separate GOs for each sprite renderer just the same

#

Whether you move your transforms in your animation or not makes no difference
In this case though the sprite swapping only needs to happen in one dimension, because the alternative sprites in the list don't also need to animate by swapping

#

And the sprite swapping doesn't need to be controlled by animation, but technically nothing stops it from doing that
Could be poses instead of color variants, for example

#

The only distinct advantage is that it's one component that manages an array of sprite renderers which skips the need for components for each sprite gameobject

#

Unless the library and resolver components are computationally heavy, it doesn't make a difference that there's more components for each part

#

Whether it's worth it in your opinion to code your own "resolver" that can override an array of sprites, and your own "library" that can store sprite sheets for both animation and swapping, is up to your preference

mild lagoon
#

Yes, so that's what I'm trying to achieve but I don't understand how. For example, I don't understand how to get different sprites like this onto the same screen:

#

Where I can then swap hat, face, scarf, etc.

#

As I understand, all of those aren't just on the same texture, it's importent from PSD with PSD importer package but I don't see why I can't do the same by myself manually.

#

And I just don't need the skeletal information

#

And I Just want to play the animation once and not play it on each component manually in code

#

I assume this is what this workflow allows to do

modest cargo
#

The principle is the same whether it's sprite resolver or your custom sprite sheet controller, a component that sits between the animator and the sprite renderers
Rather than animator overriding the sprite renderer's sprite reference, it requests a sprite index from the inbetween component, which picks one from a swappable array of sprites and sends that as the sprite renderer override

modest cargo
#

Even with a skinned rig, every swappable part must have its Resolver component

#

And a Library component as well, unless the alternative sprites were already included in the skinned sprite's PSB as seen here:
https://youtu.be/wBGykdKd80w

#

The extra transforms that are used in skeletal animation are required for how sprite swapping works, even if they don't move at all in the case of non-skeletal animation

#

Simply because you can't have more than one sprite renderer per transform/gameobject
You can only swap whole sprites or whole skinned sprites

#

Whether you use unity's sprite swapping or your own custom component for it, I believe you have to have a separate gameobject per each part that will need to be swapped, to override sprites from animation indirectly through that component, and for the component to keep track of both sprite frame index and variant

mild lagoon
# modest cargo And a Library component as well, unless the alternative sprites were already inc...

Yeah so this is what I'm trying to achieve but for frame by frame animation and so I don't have to have a separate animator, sprite library asset, sprite library component, sprite library resolve and sprite renderer.
Right now it appears I'd have absolutely separate systems working separately while they're really a part of the same and I'd even have to play animations with the same name manually from code.

mild lagoon
#

Also in the case with skeletal animations it works like a single system

#

But here with frame by frame animations it will work like unrelated separate systems

modest cargo
#

Sure, you only need one Animator
Your animation is also "skeletal" technically, you just aren't moving the "bones"
An Animator overrides component properties in its own hierarchy
There's no technical difference between a "skeleton" and a hierarchy of gameobjects

mild lagoon
# modest cargo Sure, you only need one Animator Your animation is also "skeletal" technically, ...

Oh, OK, so I can just animate sprite resolver properties for each body part from the animator and I only have to call Play once still.
Ok.
But you can see how it can further be abstracted for frame by frame animations where I don't have to animate sprite resolver properties for each body part and I only have to animate 1 property, it just gets passed down to the component that resolves everything.
Assuming all of my body parts can play the exact same animations, of course. Which they can.

#

It seems like this part is missing from Unity

modest cargo
modest cargo
# mild lagoon It seems like this part is missing from Unity

More or less, all components require scripting to be fully utilized
An Animator can animate the Resolvers like you might animate Sprite Renderers normally, but now you can also swap the Library, on a per prefab basis for example even without getting into scripts

#

But in your case probably you'll want to swap the Library in a custom script to be able to do it at runtime
It's also an option to have a script control both Libraries and Resolvers, and have the Animator drive that script
If you need some special logic into the sprite swapping that goes beyond the Animator

mild lagoon
# modest cargo More or less, all components require scripting to be fully utilized An Animator ...

An Animator can animate the Resolvers like you might animate Sprite Renderers normally, but now you can also swap the Library, on a per prefab basis for example even without getting into scripts
Yep, this is what I'm doing right now but for the entire character. It's time now to make the character customizable, and so we separated the character sprites into different parts: the body and the cloths. But once I read into the docs and tried to find how to do it on YT, I couldn't understand, because all of them do it for the skeletal animations without sprite resolvers and sprite libraries and the sprite sheet is for a single character with all the body parts imported from PSD, not sprite sheets with all the frame by frame animations.

modest cargo
mild lagoon
# modest cargo But in your case probably you'll want to swap the Library in a custom script to ...

I feel like I want to have something like SpriteResolverNotifier(there's probably a better name for that) component or something with a list of SpriteResolver to notify, and then I animate my SpriteResolverNotifier instead of animating all the different SpriteResolver components for each animation.
This way I only have to animate 1 property once first. And then, if I decide to add a hat to the character, with the default way of animating each SpriteResolver separately, I'd have to go and animate that in each animation.
With the SpriteResolverNotifier component, I only have to add the newly created SpriteResolver to the list of sprite resolvers to notify and it's done.

#

I think that's what's missing from the current Unity framework to have customizable multi-sprite actors with frame by frame sprite sheet animations, right?

whole hamlet
#

hey im working on my 2d pixel art game and i realised that in my game window my pixels appear more inaccurate in a way? anyone know why?

twilit vault
modest cargo
whole hamlet
#

alright thanks guys

full ether
#

the character getting stuck on the edges and i think the problem is with the collider of the tileset AND IDK WHAT TO DO I TRIED EVERYTHING LITERALLY

solemn latch
#

(First step I suggest is toggling the caps lock off.)

twilit vault
#

that sounds like a friction issue

marsh solar
#

Hey guys!
Question, what's something you want to exist in a 2D sprite animator asset that replaces animation controllers?

marsh solar
#

Sneak peak of what am working on

frosty palm
#

bro can someone help me , i just started to learn how to make 2D game ( im new ) and i want to know how can i make light additive and that not everything goes black when i put a light , like if they adds up

gentle python
frosty palm
#

i add a sorting layer but just doesnt work

small pivot
#

I need help. Im trying to add what I think is called tilemap sorting, but it won't work. The tiles on the grid I want this to work on and the player are on the same sorting layer.

small pivot
#

I tried to fix it, but this just happened

#

can anyone tell me why this is happening?

lean estuary
small pivot
lean estuary
#

Tile base is on the bottom, everything about it will be under it.

modest cargo
modest cargo
marsh solar
#

So it should have states and other similar properties like Triggers, bools? if the animator didn't have states on its own, but can be complemented by actual player controllers or enemy scripts, would you still use it?

#

The story is, when I worked on my own 2D game on mobile, I found out that setting up animations for 20+ enemies, each animation has 4 versions one for each direction, it felt like a tedious hassle, so I started creating my own sprite animator that got extended and now I've extended it again with editor tools to be intuitive

#

So then I would just drag and drop the sprites for each direction into it's entry

modest cargo
marsh solar
#

Yeah basically, my enemies and player have a typical enum state machine
They just call Play on the animator to play the animation they want

modest cargo
#

A sprite sheet animator is plenty useful, but wouldn't consider it a replacement of the Animator

marsh solar
#

I believe I'll see the feedback when I publish the asset, any requested feature I'll add for sure
But first I will try to look out for the internal state management

#

I think my asset will work fine for top down 2D games because you can set direction with SetDirection(Direction.Left) for example and the animator plays the same animation but for the specified direction Move_Up ---> Move_Down

#

I might need to make some adjustements or mode switches for other types of 2D games like platformers

#

An example for movement

#

This example and the player controller will be included in the package for Demo purposes

modest cargo
#

In sprite sheet context "direction" wouldn't have to be explicitly called that, just any arbitrary swap in the array of sprites being played by the existing animation clips

#

Animator's power is that it can make state transitions automatic and contextual, so very few parameters or calls from code are required to make a lot of animation happen

marsh solar
#

Just need context on how I can implement the same convenience in my asset

modest cargo
#

For example when you have a jump sequence with states jump->upward(loop)->apex->downward(loop)
going to landing(hard), landing(soft), or skip either with small enough fall, all you need to do all that is one trigger or bool to start the jump, then just a vertical velocity parameter

#

So upward goes to apex when the vertical velocity goes from positive to negative, which is a totally hands off process from code perspective

marsh solar
#

Nice thanks, I guess my first step is chaining animations, trigger an attack with a bool the it goes to idle automatically without the need to use code

modest cargo
#

It sounds like you're remaking Animator's features, but not the state machine part
Which is half the point of using the Animator to avoid having to code one

#

But I might not be seeing the full picture

marsh solar
#

Pros of my asset is that it works out of the box with minimal setup, and its light weight

#

but I can definitely work on adding state features as well

#

even if its simplistic

modest cargo
#

Animator's disadvantage when it comes to sprites is that there's no sprite sheet functionality, like the type you have there, like swapping sets of sprites
But that's not animator's fault exactly, rather how unity handles sprite references by unique ID only

#

If I was making such a component it'd just sit between the sprite renderers and the animations, replacing the sprite reference by an index from arbitrary sprite array which the animation clips would control
Animator would do its thing as usual

#

Coincidentally unity does have the sprite swap feature already

marsh solar
#

So tl:dr should I move forward with my asset or not bother at all? its also included in a bigger asset I am working on

#

Sorry if I cut you off ๐Ÿ˜

modest cargo
#

Sprite swap does exactly that but not in a very powerful way, as it handles only one array at a time
Not very scalable if you have multiple sets of animations to swap between
For example not just swap between different directions of the same clip, but different stances or different characters in addition to direction

modest cargo
#

Somewhat tragically I think you'll find users also by virtue of very few understanding the Animator really
It's so very common to see people giving up on it just to code their own FSM for puppeteering the animator's FSM in a very redundant way

marsh solar
#

I will keep that in mind, I guess then I have a partial sprite swap based on direction

#

My next step would be implementing basic state machine handling and parameters

modest cargo
#

I'd want something leaner, a more modular and powerful version of Sprite Swap
But if you compete with Animator, as you seem to do, you could learn from its features and learn from its failures too
There's something that makes people overlook and skip it, even when they need its features

marsh solar
#

I'll keep this thread updated with my progress if its ok with you, I make progress almost daily

#

Also btw my asset is called Simple Sprite Animator so I guess I shouldn't also overcomplicate things XD

marsh solar
#

State management

#

Skin swapping, for example the player is level 2, plays different sprites

marsh solar
#

A separate window to edit states

boreal frost
#

Why when I duplicate my bishop multiple times inside a GridLayoutGroup, it doesn't spread in a grid like way please ? Here they're still on top of each other for some reason ๐Ÿค”

modest cargo
modest cargo
modest cargo
boreal frost
modest cargo
boreal frost
boreal frost
modest cargo
#

It should have no bearing on what you're doing

boreal frost
modest cargo
boreal frost
modest cargo
# boreal frost I don't understand the difference between the 2

The only thing they have in common is that they use sprite type texture assets
Canvas is a renderer component which uses Rect Transforms, Images and other UI components to render a stack of textures using Canvas scaling settings and Rect Transform anchor points in relation to the screen
Sprites Sprite renderers individual renderers like mesh renderers, they use Transform components and are always rendered in world space

#

Because Rect Transforms are similar enough to Transforms, non UI components can exist in Canvas hierarchy without breaking everything, but nothing the Canvas does for rendering or UI input and navigation can interact with non-Canvas components
Typically they don't even show up in the same space

boreal frost
modest cargo
# boreal frost What should I use for a chess game then ?

Any, as long as you use it as intended
UI tools are designed to easily create elements with flexible screen size and order, so it's rarely a good fit for the gameplay itself
If you're only making a flat board game and won't need much any effects or animations, then I don't see a reason why making it in UI wouldn't work also
But you'd only use it for rendering, not for the gameplay logic

#

Sounds like overcomplicating for no reason if you give Layout Group control over the piece positions

boreal frost
modest cargo
#

Rule of thumb is if it's gameplay, don't use UI for it

#

There are exceptions but only if you really know why it should be UI

boreal frost
modest cargo
boreal frost
modest cargo
# boreal frost is there any equivalent for the Non-UI ?

No, you'd code similar functionality by yourself
The component is designed to display a one dimensional array of objects in a flexible two dimensional grid
A chess board would be a two dimensional array to begin with, and not flexible in any way so I don't personally see the point of trying to use that component

boreal frost
#

true

swift knot
#

Think sharing videos about Unity related features is okay with guidelines, sorry if this doesn't qualify under it.

Unity's Physics2D team made a sandbox demo (thank you Melvyn May), that shows off the new Unity Physics 2D Low Level System.

High performance, custom collider creation coding, determinism, fragmentation/slicing colliders, destructible terrain, car physics demo, and a lot more can be made easily with it.

I am just going through it a little bit and talking about it in a very rough overview.
Still going through information in the manual, so some of the things mentioned in the video might be a bit off and as it gets developed more by Unity some API, components, or workflows might change through out Unity 6.3 alpha.

Thank you Melvyn May for making the documentation, samples, and giving a lot of information about it.

https://www.youtube.com/watch?v=a-UwjCHPdsQ

Special thanks to Unity Technologies developer Melvyn May for making an entire new Physics 2D low level system and also making this sandbox scene for people to try out.

The new physics 2D low level system is a high performance, more accurate, and highly customizable physics system built on the latest version of the Box2D physics engine that has...

โ–ถ Play video
cerulean cape
#

Hi i have a big problem can someone please help?

#

Iโ€™m making a 2D game in Unity and I made a wall "3D border" sprite that I want to use in the Tile Palette.
I set the sprite pivot to Bottom Center, and in the Tile Palette preview it looks correct.

But when I actually paint it onto the Tilemap, the tile appears about 3 pixels higher than it should be.

Has anyone run into this issue or know how to fix it so the tile aligns properly?

#

thanks in advance

modest cargo
cerulean cape
crude mango
solemn latch
swift knot
vast reef
#

We've been having this common problem in tilemaps where there's transparent gaps in-between the tiles

I used the sprite atlas with 8 padding but it still didn't solve it.

the only thing that solved it was disabling mip-maps.

why? why does the sprite atlas tool not do padding correctly (pad with the edge pixel of the tile)? wouldn't that solve every bleeding problem?

modest cargo
#

Another problem is that an actual gap can appear between the tile geometries
This is typically extreme when using a type of AA that smoothes out edges of tiles
Depending on method, the smoothing blurs them with background behind the tiles instead of the adjacent tile

#

But also that often occurs without any AA due to GPU inaccuracies again
When the tile edges are between screen pixels, their positions may be rounded away from each other so the pixel renders a gap instead of either tile

vast reef
#

can MSAA do that?

modest cargo
#

Yes

vast reef
#

that's wild

modest cargo
#

I think MSAA is the worst offender, but potantially all types can make it worse, except FXAA and maybe SMAA

vast reef
#

well we might not need any type of AA, it's a 2d game

modest cargo
#

Usually you don't

#

Lowering tile sprite PPU by a small amount so they spill out a bit outside their tile can help ensure the rounding or an AA method will not catch the gap

#

The only official method to fix it is to use the pixel perfect component which rounds sprites to correct pixel increments so GPU inaccuracy can't cause a problem at the edges

#

Downside is that pixel perfect rendering also restricts you to a pixel grid which may or may not be desirable, and it has to be used in a specific way to work right

vast reef
#

yeah i'd rather not resort to that. not sure what that implies or what we'd need to change

it's a hand drawn style of 2d game

vast reef
modest cargo
#

An external tool can do that task just as well, like Aseprite with its sprite sheet export function

vast reef
modest cargo
#

I don't really know what the intended way to avoid that is
It's a problem with texture sheets regardless of engine

vast reef
#

thank you. this is illuminating. i will read the article

#

so.. do people not generate mipmaps for tilemaps, commonly?

modest cargo
#

You do have the option to import each tile as a separate texture
That guarantees the mip maps are generated right
Somewhat worse for optimization, but maybe not by much

#

With a custom shader you could sample the sprite sheet as a texture array, which is just one asset but with correct mip map generation
So that'd be the best of both worlds, but the disadvantage is having to make a custom renderer work with the tilemap renderer
I assume you'd have to read the UVs the tilemap renderer outputs to pick a sprite from the sprite sheet and interpret them arbitrarily as corresponding sprite array index, which seems tedious and prone to failure

solemn latch
modest cargo
lilac ore
#

can anyone help me with the fact theres lines that randomly appear in the game render

twilit vault
modest cargo
ebon pumice
#

Hello I'm trying to make the minimap icon follow the player in real time but I cannot figure out why the icon is not syncing to the minimap correctly. I have the world min and max set with the green gizmo but its still outside the map

jolly narwhal
#

You'll have to show the relevant code for the minimap and the icon

frosty palm
#

plz why is my character flying

jolly narwhal
#

I'm guessing because the variable groundCheckLeft of PlayerMovement has not been assigned

frosty palm
#

xd

fossil pasture
#

Does anyone know how to fix this? Iโ€™m getting some assets into Unity but Im noticing a problem. To animate it in engine I have to import it as a PSD file. When I look at it on my iPad everything is fine but after I upload it to one drive there are artifacts around the edges. The artifacts stay when I upload it to Unity. If I save it as a PNG this doesnโ€™t happen but it needs to be a PSD to animate. Have any of u guys seen something like this before๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ Iโ€™ve tried looking online but nothings helping

solemn latch
twilit vault
#

oh wow im blind

#

im confused then - the images show google drive...?

solemn latch
#

In any case, my point is that you should nake sure that whatever method you are using to transport the file isn't doing file conversion without telling you. Google is fucking notorious for doing that.

#

And we want to rule that out.

#

It might also be your software saving psd incorrectly.

twilit vault
solemn latch
#

ah right, sorry. Reading on a tiny phone ๐Ÿ˜„

modest cargo
solemn latch
#

Well, one thing to make sure of is that you download the original file and not saving the preview it generates for the web

fossil pasture
#

Ok sorry for late response but I think I solved the problem. I think the issue was stemming from my iPad. I used and online file converter to just turn the pngs to psd and everything worked fine. The psd that I would upload to google drive from my iPad almost looked like a different file type so I wonder if procreate compressed it or something somehow?

fossil pasture
cloud karma
#

how can i make a 2D world object overlay some specific UI elements?

crude mango
modest cargo
#

The UI elements could also be on a screen space - camera canvas, which you can specify the sorting depth for

#

So it'll be rendered in world space but glued to the camera's view like a screen space overlay canvas would be

cloud karma
crude mango
flat anchor
#

Hi I'm recreating pacman using tile map. I'm having the issue where when I paint the sprite, it appears in the Scene tab but in the game tab. As u can see in the first in the first image (scene tab) it appears perfectly however in the second image (game tab), in the first row - they seem to be blank. Could someone help?

modest cargo
flat anchor
modest cargo
# flat anchor Ah, I changed the resolution to Full HD. would you be able to recommend size for...

Game window resolution should be the resolution you expect the game to be played on
Tile grid should be one unit wide and tall
Camera size should be based on how many grid cells you want to be visible at once, and their relative size on screen
Sprite import PPU should be whatever value so the tile sprite correctly fills the grid cell, so the height/width of one tile sprite in pixels in other words

cloud karma
#

only in scene

#

did i do something wrong?

modest cargo
# cloud karma now i cant see that ui element in game

World space UI must be placed in world space in which case the position and size units are meters relative to other gameobjects
Screen space UIs instead use units as pixels, so the scale and position will be quite different

cloud karma
modest cargo
#

It should be scaled down and positioned among your scene objects

cloud karma
#

ohhhhhh

#

ok ok i get it now

modest cargo
#

Screen space camera canvas could be simpler to use than world space canvas, but it depends on whether you want it to be fully camera relative or positioned and rendered like any object in the scene

cloud karma
#

right?

cloud karma
modest cargo
# cloud karma what are the pros and cons for both?

A screen space camera canvas is no different from a screen space overlay UI you've used until now, so it's fully 2D from the camera's point of view but it has a specified physical depth relative to other objects the camera is looking at
A world space canvas is not relative to camera at all, it exists independently in the scene like non-UI objects do

cloud karma
#

you are right, i think screen space camera is better for my game ive made my world canvas a screen space camera and attached a camera to it its in the world space now, but still when im dragging my world object to the ui it still goes behind the world canvas has a bigger order in layer than my object

#

thanks for your help so far

#

oh wait

#

my bad my bad

#

when i was trying myself yesterday i made it change the order layer when the world object is being dragged

#

thank you so much!! it worked

#

sorry if my english caused any problems

modest cargo
#

When using screen space camera canvas, "plane distance" is what determines the physical distance used for depth sorting against other objects

flat anchor
# modest cargo Game window resolution should be the resolution you expect the game to be played...

Hey so I just wnated to update you. I set the game window resolution to 16:9, grid is one unit wide and tall, I set the camera size 15 since the game board is 31ish tall and 28ish wide. and I set the sprite ppu to 32 which was 100 before and thats why the cells looked so cooked in previous images. However, still after these changes some sprites to be faded or not visible. I have attached both the scene and game tab.

modest cargo
#

So you're seeing the game similar to someone playing it in a quite a small window
If you set Game window to 1920x1080p instead for example, and Scale to 1x the appearance of the tiles will match to the game played full screen on a fullHD display

#

The lines in your sprites being only one pixel wide means you will lose information if they are displayed on screen at all below the native pixel size

flat anchor
modest cargo
#

With pixel graphics like that using no mip maps, to prevent disappearing/stretching pixels the display size on screen should exactly match the pixel grid of the screen

#

Usually you'd either enable mip maps on the texture, so they get blurry rather than distorting when their display size is not pixel perfect

#

But that doesn't really work with pixel style graphics, and the math to figure out what combination of resolution and camera size results in the perfect pixels given your sprites' PPU
For that there's the Pixel Perfect Camera component to do the math for you

#

Pixel Perfect Camera is a more complex set of rules to set up, and locks you to specific possible resolutions that are correctly divisible to avoid rounding errors like the one that causes your sprite pixels to disappear

#

So I recommend get familiarity of how exactly camera size, PPU and game resolution relate to sprite rendering on their own first

flat anchor
#

Okay sure will do, I'm sorry for these kind of questions btw, I just started learning ๐Ÿ˜…

modest cargo
astral panther
#

I'm trying to build my characters with variable body parts so I thought I'd use PSD Importer with each part on a separate layer, but now I'm having issues putting them back together for rendering.

The prefab it generates is the only way I can get it to have the parts in the correct offsets, but then it includes all the variable parts at once.

Using sprite library and sprite resolver sounds ideal, but then the offsets aren't changed along with the sprite, and since the sprites aren't all the same bounding size, things break even if I'd give it a manual position.

Any tips?

#

If only PSD Importer could position the sprite anchor relative to the center of the PSD, instead of only changing the transform pos in the prefab...

slate vault
#

Why is there no way to combine camera stacking with pixel perfect render upscale with perspective camera with subpixel smooth camera movement smh

#

Any good suggestions for being able to pixelate the screen, have parallax, and smooth camera and minimal jittering?

trim panther
#

WHO know game Agent Heinz?

#

sorry for bad english

surreal spruce
#

Hi there! Apologies if this is not the right place, but I tried to make a post on the unity forums and got no answers regarding this issue after more than a week, so I figured Discord was worth a try:

I've been trying to setup an isometric tilemap palette utilizing the built-in Unity stuff, but I'm having a hard time making things actually work as they should. I've been closely follow a video tutorial and even though I'm pretty sure I followed all the steps thoroughly, it still won't work.

Iโ€™ve imported the sprites, made sure the settings are all correct (sprite set on โ€œMultipleโ€, renderer on individual and not chunk, properly spliced the original sprites and adjusted the pivot to 0.5/0.25, camera setup on ortographic with the right size based on size of the sprites, etc) but for some reason whenever I try to place anything above (or below) the z=0 level, it just doesnโ€™t work.
Itโ€™s like the sprites get placed, but theyโ€™re not where they should be, or they simply donโ€™t show up.

The sprites are 32x32, hence why I set the grid to 0.32/0.16โ€ฆand z=2 because the video mentioned putting it close or at 2 so that when you went up/down in elevation (while working with the palette itself) you would automatically โ€œjumpโ€ to the next level of elevation, instead of having half-measures & such. Iโ€™ll attach some screens in case they can better help troubleshoot a potential issueโ€ฆ

Hereโ€™s a screen with Sprite Editor (32x32 sprites with a custom pivot to account for the grid), Tilemap Settings (Top Right order and Individual), Grid Settings and Camera Settings (apologies for them being all smushed into 1 image, but โ€œnew accounts can only put 2 links in their postsโ€:

https://europe1.discourse-cdn.com/unity/original/4X/3/c/6/3c674f73ec7ff628a9f610d089ed128bf93f06fb.png

And here's what the issue looks like:
https://gyazo.com/2d14ceafed51059829c3f9b05ff0a6b5

Thanks in advance for anyone who can help! ^^

solemn latch
surreal spruce
#

Not sure if it can help, but I was following this video: https://youtu.be/xpL44Ztyy1Q?si=vkTdwx4r9iGfFP8y

Hey Pals! Here's another video on isometric pixel art in Unity. I really love how this one came out, as I get to share a lot of the lessons I learned that were actually very frustrating to set up for me. There are a lot of pitfalls in this process so thankfully I can save you from all of them lol.

2D lights with normal mapped isometric looks so...

โ–ถ Play video
solemn latch
surreal spruce
bronze crag
#

do you want it physically on top, or rendered on top

surreal spruce
bronze crag
#

So rendered on top you can do through the layer and rendering layer options. Physically on top, play with perspective a little "on top" could be slightly behind but rendered in front

#

two examples one without someone one the roof, the second with someone on the roof

#

on the right you can see sorting layers, with different layers, you can also use the Custom Axis option in the render2D settings

bronze crag
#

whenever you work in 2D, you work on X or Y axis, the Z doesnt technically exist. So something that is "On top" is usually higher on the Y axis. if its behind try shifting the X to the left and then put it slightly above to give an impression of behind

solemn latch
surreal spruce
# solemn latch So did you follow the very next step in the very tutorial you link where it show...

You're talking about the "z fighting" issue? Because if you read my post, saw the screenshot and my video of what's happening, you would have seen that I did :)

Tilemap renderer is on "Individual" mode and how the tiles seem to get placed while on a higher/lower z-level don't look like z-fighting (= you don't see multiple faces trying to "fight" for the foreground, like in the example the guy in the video-tutorial shows).

surreal spruce
# bronze crag two examples one without someone one the roof, the second with someone on the ro...

I appreciate the help, but I don't think your example really applies to my case, since I'm working with isometric and not top-down. Adding custom/different sorting layers would probably work, but very quickly become a mess while designing a level...and at that point I might just do the levels by hand on a software like Tiled or similar.

I know there is a Tiled2Unity utility, but I wanted to utilize the tools in Unity itself pretty much how it is shown in the videotutorial, since it seemed easy enough and was fairly close to what I'm used to with other tilemap/sets editors...but yea, I was simply asking why by following all the steps to a T (supposedly), I'm seeing what I'm seeing.

solemn latch
surreal spruce
solemn latch
modest cargo
#

I think the custom sort axis for isometric depth is something like 0, 1, -0.5
Because the "height" of an isometric tile is an offset in both Y and Z

#

Otherwise there'd be no way to resolve height sorting against sprites on the isometric surfaces when the iso tiles could have the same screen position whether they are virtually offset horizontally or vertically

surreal spruce
# solemn latch Your sorting axis is quite different from his

Where do you see that (timestamp)? In the video they never go over the settings on the URP nor mention anything about sorting order save for the "Chunk vs Individual" as far as I could see. The only discrepancy I could see was on the tilemap tile anchor, which I changed to mirror what they had in the video (0, 0, 0.5), but that didn't do anything.

@modest cargo Thanks. That's exactly what I was missing. Changing the z to -0.5 did the trick!

turbid kernel
#

Hello all, I am a pixel artist/beginner game dev, and I am looking for the answer to a question I have had for a VERY long time and that I have decided to dive into now.
I did some digging and found the original post that prompted this: https://x.com/TheRujiK/status/1182292155383078915

Like in the gif above (my personal favorite implementation of this), I have seen numerous developers utilizing realistic water than doesn't clash with the environment within their games.
I'd love to know:

  1. Bit of a basic one, is this achieved thru URP 2D?
  2. Are shaders + noise/flow maps the standard approach here? How would I use them? (My first approach was drawing the isometric background + on a seperate layer, a white, semi-transparent outline of where the water would be. Then I overlaid two moving noise textures on top and used shaders to pixelate and change the color).
  3. How would you folks typically implement waterfalls, splashes, and refraction/distortion under the water (I'm assuming a sine wave, but I'm not sure how to approach it)?

Any pointers, resources, or project examples would be hugely appreciated, and thank you so much in advance!

(1/3) Two weeks of water progress: Waterfalls, water types, splash ripples, and player water trails (More gifs in comments) #pixelart #gamemakerstudio2

wide stag
#

Hi im new to 2d game development and I'm trying to create a background, but whenever i try to increase the height it just copy and pastes the image instead of making it continuous. width is ok just height any help would be apreciated.

river rampart
#

How come the saw in the scene view is so much higher above the ground than in the game? Is this a bug with the camera system? Someone please explain

modest cargo
#

The most likely reason why that'd occur is that either Scene or Game is using perspective projection, so foreshortening affects size and position of sprites that have a Z offset
Which might not be apparent in sorting if other objects are using sorting layers instead of depth

pastel trout
#

do you guys have any recommendations for free software i can make 2d pixel art sprites in?

solemn latch
pastel trout
pastel trout
modest cargo
#

Optionally export as sprite sheet if you have animation frames

pastel trout
#

where do the sprites end up when i save them as pdf

modest cargo
pastel trout
#

ok

#

it worked thx

south bay
#

Is there a way to keep the gizmo of Pixel Perfect Camera on all the time so I can see the bounds of my scene?

cloud karma
#

Hi, im making a 2D clicker game (no player etc.) i have a room as a background and i came up with an idea as i cant fit all the room in 1 single image i will split the background image (room) into pieces like a puzzle and merge them in unity and the player will be able to explore the room with scrolling how can i achieve a system like that?

outer phoenix
#

How do I access sprites from a spritesheet through code using a number index? As in, individual slices from here.

modest cargo
outer phoenix
#

ah well

#

that's a tiny bit inconvenient but workable enough

#

thanks

twilit vault
modest cargo
#

Unless doing editor only stuff

crisp knot
bronze crag
# cloud karma any help, please?

You could have the images in a 3d space and rotate the player based on the direction you want by a fixed angle (90โฐ) for 4 images

bronze crag
#

A 2d game can still incorporate a 3d world

cloud karma
#

For background im gonna make it an hallway of an apartment room i cant fit all the hallway in 1 image so i will make multiple images that match the previous image and merge them like puzzle and the player will be able to explore the room with scrolling left and right

bronze crag
bronze crag
# south bay bump

If it's a gizmo you can usually use the OnDrawGizmos etc.. or if you really want and it's testing purpose. Use a collider and make that visible

south bay
#

And the collider would not be synchronized with the PPC if I happen to change settings on the PPC.

bronze crag
#

I can have a play around later if you want, see what I can work out if nobody else provides solution, just got to get to work and wait for people to sleep...

south bay
#

all good

south bay
#

Also, is there a way to anti-alias the LineRenderer lines or is there a better tool for this? Like, this is not okay.

#

at least changing the camera's post processing to TRUE and AA to SMAA seems to kinda "solve" the topic but it's still ass to look at in the scene view fwiw

modest cargo
#

Line renderer is textured geometry, so it's antialiased by the same logic as everything else

#

So typically you enable some AA from the renderer, or use a texture that has the antialiased transition to transparency on it

#

AA on a semitransparent texture with the help of mip mapping skips the need and cost of real AA, and can be more controllable

south bay
ornate owl
#

Hey, does anyone know why this is happening? The 2d Rule tile works as intended initially. (Creating a 3x3 block floor)
But when painting in a different location, it ruins my previous 3x3 floor. Why is this happening?

It only goes back to normal once I complete painting the second 3x3 block floor

cloud karma
#

i have a door and character world object character has an order layer of 0 and door has an order layer of 1 so the door is on top of character both has colliders but when i click to the doors collider click goes to the character how can i solve that?

vague void
#

Ancient Kingdoms is a classic 2D RPG game meticulously crafted to evoke the nostalgia and charm of beloved RPGs from the golden era of gaming.
I personally created a wide range of visual elements for the game, including:
Character designs โ€“ heroes, NPCs, and enemies
Backgrounds & environments
Assets & icons โ€“ interactive items
Visual effects โ€“ spells, attacks
Character skins & variations

runic oracle
#

ok this is gonna sound like a weird question but how would I know what size tiles I'd need to make so that it blends with the background better? the bg here is a bunch of 248 x 248 px backgrounds I got off the asset store scaled up x22 on all axis, whereas the blocks are from the kenney asset pack and are like 148 x 148 px each. if I were to grab aseprite and make my own is there a way to know what size tile is appropriate for this?

civic knot
runic oracle
#

i'm still trying to wrap my head around how unity handles this, I get that PPU defines the size of the grid though

modest cargo
modest cargo
#

Because they are arbitrary, you have to start determining them based on something, like if your gameplay happens on a grid more or less, how much of the unit grid you want the camera to see at once
Then determine how many sprite pixels look appropriate per each unit grid cell (PPU)

#

Or alternatively you could start with art, if you've got pixel art assets already that you want to present in a specific way relative to physical screen size, that informs the PPU and the camera size

runic oracle
#

ok. i think i'm getting there. i should probably start with art since that makes the most sense to me right now

#

thanks

modest cargo
#

Then determine how many (or few) pixels your art needs to fit in each grid cell

south bay
#

Is it possible to re-bind Unity's tile palette to erase on rightclick? Kinda seems redundant to have rightclick AND middle mouse button bound to panning scene view when in 2D mode.

olive peak
#

Hi guyys, how can i split the tiles so i add one additional sprite

#

If you look at my image, some images are not split correctly.

#

I can manually adjust

#

but this just leads to another sprite not having the split

bronze crag
#

The sprite sheet layout doesn't help... If you are wanting each sprite to have it's own box, you'd have to do that manually. Theres either usually sprites on a grid bases IE 32x32 and you can tell editor to cut every square to be 32x32 or it's done in rows and columns... The sprites on that sheet have some awkward placements and sizes

modest cargo
olive peak
#

then it splits nicely

#

๐Ÿ˜ญ

modest cargo
#

"Slicing" is the process of splitting a sprite sheet into individual sprite assets
A "sprite" is an ambiguous term between a slice / sprite asset and the pixel information on the sprite sheet
A "split" has no exact meaning in sprite importing terminology

#

Should help to ask more precise question next time

olive peak
true kestrel
#

Hello, I am new at Unity. Does anyone know why I can't set tilemap's tile anchor values? I cannot add a new layer because of this.

modest cargo
#

Unless you specifically want to use another offset tile grid for it

#

Otherwise you can just change the height of the tile per tile when painting with the tile palette

true kestrel
#

I dk anything about tiles so how am I gonna stack tiles in height?

#

omg, there is another option z as y...

#

nope didnt work

modest cargo
# true kestrel nope didnt work

With Z as Y tilemaps you can control the height of the tile with plus and minus keys
But it also requires you've set up the correct isometric custom axis sorting (such as 0,1,-.5) and for the tilemap to use Individual sorting rather than Chunk

true kestrel
#

Thanks but I dont understand what you are saying... Can't you just direct me how to do it in a way like Inspector/Local Position Z +1

#

It's just like I am trying to talk as a baby I really can't understand what and where and how custom axis sorting things and this keyboard killing me not have a plus/minus key

#

exactly where am I be looking at? unity slowly drives me crazy

#

It can't be that hard to just make a single piece of tile to be above the other

modest cargo
#

Not unexpected if you have not read instructions for what you are trying to do

true kestrel
#

I don't wanna read millions page of unity docs, it must be easy to do or not?

modest cargo
true kestrel
#

(It says) With the Isometric Z as Y Tilemap, **Tiles **with different Z-position(link below) values are offset along the Y-axis and appear to be at different heights

https://docs.unity3d.com/6000.2/Documentation/Manual/tilemaps/work-with-tilemaps/isometric-tilemaps/create-tile-palette-isometric-tilemap.html#:~:text=Adjust the Z Position by entering the desired value (only whole numbers).

Even the manual is outdated here, in unity 6.2 there are two z position fields in tile palette, and I also tried both of them, the tiles didn't just placed again. What do you expect from me to do so? I say I need help and you ask me what's the point of typing here? is to help dude! Do I gotta jump through hoops to get you to say one word? If you don't want to help just end the conversation and don't reply that's all.

modest cargo
# true kestrel (It says) With the Isometric Z as Y Tilemap, **Tiles **with different Z-position...

Wanting's not the issue, but you can imagine how it feels to me when you announce you're willing to reject documentation arbitrarily
I don't want my advice to be rejected for the same reason
Anyway, as the page says you need to have created the tilemap according to linked instructions including custom sort axis (note different workflow for URP)
The documentation is no more outdated than not including that you can now control the tile depth for Scene and Palette separately, and lock it if needed (You can also hover cursor over properties in editor windows to get a description that explains what they do)
The shortcuts keys for changing tile height can be remapped from the Shortcuts window to something more suitable for you

stiff oracle
#

if I have a question about tilemaps, is this where i should ask it?

#

in my tile map, I am trying to layer tiles using the sceneview z position. when I do, it doesnt work if i put another tile in some area below it

stiff oracle
#

the same thing happens while editing the tile palette where putting the cursor over a certain area will change how they look in the tile palette

wooden ivy
#

best way to set up a collider ona shape like this?

#

i tried composite but it was a nightmare and wouldnt let me round the edges thin enough

solemn latch
wooden ivy
#

composite doesnt work on circles i thought

#

they all gotta be the same collider

#

or else id use two capsules

solemn latch
wooden ivy
#

no way

#

where i read it said only box and poly

#

thank you!

modest cargo
stiff oracle
#

I'll try a different version today

neat hollow
#

i made a map using Tiled with this asset , now I'm trying to import it to unity with supertiled2unity but apparently the image size is too big and unity wont handle it (512 x 31488). Is there a workaround i could do ?

itch.io

Import Tiled map files to Unity

#

as it said in the description has a repack that changes the resolution but then i will have to remake the exact map again with that tileset. is there a way to quickly "reassign" the tiles in a map so it uses new tileset ?

modest cargo
#

Or make a script that reassigns the all the sprites into the Super Tile Layer or Tilemap or whichever component is responsible for holding the sprite references in the end

#

If the addon also does its own type of sprite slicing then it won't work like that, but I doubt it would do that

dim stag
#

Can sprite shape have multiple sprites that it randomizes automatically?

mint epoch
#

hello guys

#

I want to make movement like in old Mario games map

#

grid movement

#

but that I can move the 2d objects wherever I want, not a hard coded grid

#

what should I look into for this? some type of pathfinding or... event system?

#

but yes, I want to be able to drag them like this

#

it's my first time making a 2D game, I'm cooked

#

I want to know what asset or... maybe guide I should look for to achieve this

modest cargo
# mint epoch grid movement

Assuming you're referring to nodes rather than a grid, if the points aren't guaranteed to be on a grid
Movement from node to node is one feature
Pathfinding calculations through a node network are another feature
Automatic connections between nearby nodes are a third feature
In other words break the challenge down into smaller parts which you can find resources on individually
And ask in the code channels, these are not connected to any 2D tools or components

mint epoch
#

huh?

#

well yes nodes connecting

#

what step should I take next to do it?

mint epoch
#

oh got you to ask it somewhere else

modest cargo
# mint epoch oh got you to ask it somewhere else

Yes
It doesn't matter that much which of the three features you tackle first, but in any case you'll need to research and familiarize yourself with those concepts to understand how you'd start implementing them
The coders might already know some resources, but they'll want to see you've started looking for the relevant information already

mint epoch
#

bet :/

pure blaze
#

As a part of a tutorial I need to make a particle system but when I make the material for the clouds they became squished and I dont know how to un squish them, I also have no idea on how to prevent them from spawining on top of one another

solemn latch
pure blaze
#

Oh sorry I forgot to update here I managed to make them longer by changing the tiling on the material, not as good as having some sort of tool to directly scale the particles but it worked

solemn latch
#

You CAN set the scale, though...

#

You might need to enable 3d scale

languid matrix
#

Does anyone know how to properly splice my 2d character? I tried to animate it and the frames arent in the same spot so it looks very janky (as shown in recording below)

#

Would appreciate any help

crude mango
#

check your borders in the sprite editor and make sure the character is always in the centre.

#

all borders should have the exact same width and height. for e.g. (64x64)

modest cargo
languid matrix
#

ok thx got it fixed

light elk
#

hey btw is there any more development of the sprite shape tool?

#

Anyways Iโ€™ve been using SpriteShape quite a bit recently and really appreciate the idea behind it โ€” drawing flexible 2D terrain or paths without relying on tilemaps.
However, a few areas still feel incomplete or limited in real production use. I wanted to share some practical improvement ideas that could really help artists and level designers.

๐Ÿงฉ Key Pain Points

  1. Corners sometimes behave unpredictably or lack manual control โ€” we need per-corner overrides and offsets.
  2. Edge segments canโ€™t use different sprites or be flipped/mirrored individually (e.g. alternating rock/grass edges).
  3. Grid snapping works but isnโ€™t precise for custom cell sizes (like 128ร—128); tighter integration with Unityโ€™s grid tools would help.
  4. Colliders donโ€™t always sync perfectly after spline edits, and offset controls are limited.
  5. Interior holes / negative regions (like lakes or courtyards) arenโ€™t supported yet.
  6. Limited scripting access to change corner modes or regenerate geometry via code.
  7. URP 2D lighting & batching could use better support for SpriteShape materials.

๐Ÿ’ก Suggested Improvements

  • Per-segment edge overrides and flip/mirror options.
  • Manual corner selection + offset controls.
  • More accurate grid snapping tied to scene/grid settings.
  • Collider auto-update with padding/thickness options.
  • Support for interior holes in SpriteShape regions.
  • Public API for corner/edge manipulation and mesh rebuilds.
  • Improved batching and lighting compatibility in URP 2D.

SpriteShape is already powerful โ€” it just needs these extra touches to become a truly artist-friendly alternative to tilemaps for both side-scrollers and top-down games.

Would love to hear if others have hit similar issues or found solid workarounds ๐Ÿ™

#

๐ŸŽฎ Where SpriteShape is used successfully

A handful of studios (especially smaller or mobile teams) do use SpriteShape โ€” mostly for:

Background terrain / roads / vines / clouds (non-collidable art)

Organic level shapes where pixel precision doesnโ€™t matter

Smooth hills / slopes / curved roads in stylized games

Examples seen in dev blogs & showcases:

2D runners with smooth ground like Altoโ€™s Adventure-style slopes

Stylized platformers with painterly terrain (e.g. indie URP 2D demos)

Racing or โ€œpath-traceโ€ games (roads defined by splines)

But in most cases, SpriteShape is a support tool, not the full level backbone.

๐Ÿšง Where people avoid it

Most devs switch to Ferr2D, SplineMesh, or custom spline systems because:

SpriteShape corners stretch or flip unpredictably.

No per-edge control, no hole support.

Collider + geometry bugs (especially with big or dynamic maps).

Editing performance slows down with many points.

Missing runtime APIs for procedural generation.

So: it can be used, but in real production, people often say things like:

โ€œSpriteShape works great for simple stuff โ€” but we had to patch half of it ourselves.โ€

#

perhaps it can get some love again hopeful

cinder kestrel
#

Hey for Tilemap does anyone know how to make the wall here line up with the other tiles instead of being between 2 of them?

modest cargo
balmy coral
#

Hello! I mainly focus on 3D development but for some reason 2D as made me taken interest. So I am a complete beginner at 2D. My question is does anyone know any good programs for pixel art that's for free?

modest cargo
balmy coral
#

Im using Libresprite what size would you recommend for making high quality sprites?

long lava
#

Hi,

I cannot show RigidBody adjustment rectangle flame.

#

Excuseme, I forget to add clollider 2D.

twilit vault
opal kettle
#

Anyone know why my sprite has another outline when I export it into unity? It happens as soon as I put it in unity so the settings are all default.

twilit vault
opal kettle
#

It worked thank you

placid peak
#

Hello, I'm a bit confused as to why when I draw my tilemap it slows my editor so much. Is there a way to fix this?

waxen comet
#

If I have a skinned gameobject - say a person with its skeleton - and I want to add physics to the gameobject, do I do the implementation on the bones themselves or the elements that render the sprites?

crude mango
#

and if u still do then remove tilemap colliders

#

they cause lag

solemn latch
#

Though unless you need per bone collision I would usually put colliders on a separate object from either bones or sprite.

silent lynx
#

Hey guys anyone has used the new TileSet ?

#

I cant edit my palette using the new TileSet, so my tiles are all messy

errant elk
#

So I am trying to set this tile to be walkable behind and in front , I have sorting layers and such, and custom axis Y to 1 and the others to 0, and been watching countless YT videos, I am unable to get this to sort correctly or work to my point im after, help would be so great if possible! these unity 2d tools are very handy but complex at times

modest cargo
#

And what kind of collider should it have relative to player

ember comet
#

2d Art is so hard

#

how do u guys learnd it?

#

evertime im sitting on my Game i dont have the Motivation because of drawing

modest cargo
ember comet
#

its a really hard art style

maiden shore
#

Does anyone know how to fix this issue? I donโ€™t know why my grass sprite isnโ€™t following the move tool. The problem happens when I drag the shader graph in.

maiden shore
#

My bad, I forgot to show the graph.

queen radish
#

hi, there is an automatic way to make this tile map configure with the rule tile map? Or I need to do it manually ?

solemn latch
#

Perhaps an invisible tile to use to help it determine which pieces are interior and which are exterior could work...

modest cargo
#

I guess the point is to have unity build the rules of a "typical" set of 47 tiles
Which is not a feature it has
The Rule Tile is meant as an example of how to implement a rule tile using scriptable tiles so any extra features are kinda up to you

amber pasture
#

Added custom tile attributes in Sprite Fusion, with native support for the built-in Unity exporter (which will create custom Tiles assets) ๐Ÿ™‚

tepid cypress
#

i made a shape from my tiles how can i duplicate the tiles into the same tilemap

tired tusk
#

Hi, I'm pretty new to Unity and for my first project I want to make a simple real time grand strategy game.
I already made this simple map (2560 x 1280) but now I don't know how can I import it to a sprite and make it so the countries can play it. I separated the sea in white and the terrain in green already but I don't know if that's a good idea.
Thanks for helping me.

olive peak
#

Hi there, May i check if there's anyway in Unity to move this tile that i have already placed to another location (I want to move it slightly to the left) but there are multiple layers in it.

solemn latch
tired tusk
solemn latch
#

Sounds ambitious. What part are you actually having trouble with?

tired tusk
solemn latch
#

Ok, that makes more sense.

tired tusk
#

As this is a handmade map, I don't know if I need to change things so the countries will know if this is the sea or land

#

and I just started Unity yesterday so it will take a long time so if I need to change things I prefer to do it now

solemn latch
#

Without knowing more about how you plan to determine countries, how you plan to display it, etc, it is hard to say.

tired tusk
#

nvm there is no VC I'll explain here

tired tusk
#

pretty pixelated

#

or like this you see

solemn latch
#

I'm at work, friend.

#

I post when I can.

#

Those do seem to have some predefined regions, at least to start.

I'd probably focus on msking s eotking prototype for the mechanics and use th as t to determine how to handle the map. Per pixel stuff, you perhaps won't want to use a sprite at all but just textures, especially if you'll be getting and setting pixel values a lot.

tired tusk
#

I didn't know that

#

you could've just told me and I could just stop bothering you

solemn latch
#

Well, I do try to help when I can, like lots of folks here.

inland nova
#

guys I want to make mod for my fav game I need to read skel data I extracted 2d texture and all other data animation and skel but I can't import them to unity can anyone help me?

vagrant citrus
#

I can, send me a dm

modern light
#

(6.2, Aseprite Importer)
Hey guys, so after updating from 6.0 to 6.2 I noticed that adding a new frame to the end of an .aseprite file now completely breaks the sheet, previously it would automatically integrate the new frame for you just fine as long as the frame was at the end of the animation and not the middle.

I also noticed this new dialog about feature deprecation... I hope this change isn't intentional, hopefully I have this wrong? This is a massive part of my workflow. Due to the incorrect slices I'm unable to use the animations generated from the Aseprite file, which was the entire point of using this system. As I see it right now I'd have to manually recreate the animation clips in Unity.

modest cargo
modern light
#

Thanks, I'll post that when I get the chance. My project is already on 6.2 but at least this is the only issue I've noticed. ๐Ÿคท For now I can work around it by using new separate files instead of updating the original

modest cargo
modern light
#

Yes I am?

modest cargo
#

Then you would be able to revert the major version change

#

Without backups it'd be much more difficult

modern light
#

Iโ€™m only noticing this a couple weeks after upgrading, but itโ€™s really not a big deal tbh

#

I appreciate it tho

modest cargo
#

Is there some feature on 6.2 that you really need?

modern light
#

Not that I know of, I just updated from 6.0 to the latest after the security vulnerability occurred

modest cargo
#

Makes sense, but a choice I've seen many regret

#

Thanks to VCS you also have the option to downgrade to 6.0
Or you always do but you can then revert that if it breaks even more stuff
But let's hope you don't run into more issues even if you stay on 6.2

modern light
#

I considered the possibility of issues when upgrading but I didnโ€™t see any when I tried it and poked around for a while. I feel like random specific issues like this would inevitably pop up anyway tbh but once again it isnโ€™t a big deal

modest cargo
modern light
#

I didnโ€™t even see that there were LTS versions tbh but again itโ€™s besides the point. I didnโ€™t need upgrading help, just reporting an issue

light smelt
foggy horizon
#

Hi all. For a sprite pixel art animation (i'm going for octopath traveller camera angle), is there a way to define the hand position of each frame?
The pivot per sprite can be defined, so this is useful for the weapon
But that's just half of the solution

twilit vault
#

what exactly are you asking? im confused

#

the pivot generally shouldn't change per sprite - make sure you're slicing by grid rather than smart slicing

foggy horizon
foggy horizon
twilit vault
#

right, but it generally shouldn't change for each sprite in a spritesheet

foggy horizon
#

My weapon anim sprite sheet. They're all down swing but with different angle (all 15 degree tilted). From top to bot: N, NE, E, SW, S

foggy horizon
#

This is a rule for charaacters generally, not for weapon that "flies"

twilit vault
#

spritesheets - at least, those on grids - aren't usually drawn like that afaik

#

i see what you're going for now though

foggy horizon
#

The pivot of the sprite can be anywhere, and the weapon in this case will need to utilize all the space, so it's free to have pivot anywhere

#

Anyways it doesn't matter about the weapon. My question is, if there's a way to define a pixel in the character's sprite, per frame, for where the hand is. So the weapon (or item or whatever) can be attached there

twilit vault
#

ah, ok, not within the sprite metadata afaik

foggy horizon
#

What if i make another sprite anim, with, say magenta #ff00ff to define the position of the hand

#

Cache map this with each anim frame's sprite name, to the location, and this is where the weapon gets placed

#

The magenta pixel is only 1 dot

modest cargo
#

Unity is a modern 3D engine so normally it doesn't even "know" what data it's dealing with when sending sprites to GPU for rendering

#

If it's possible to modify the sprite meta data format itself to include additional pivots or attachment points that'd be perfect, but no idea if it is or is possible without breaking compatibility with other stuff

#

In any case you would want to store this data in a meta data file of some kind, and may be able to associate them with the original sprites as sub-assets for convenience
Your components that need this extra data will need a way to access it somehow in the end

#

If you want to store this data as sprite pixels, it's possible but introduces an extra step because each sprite's pixels will need to be looped at that stage to look for the special pixels and then produce the meta data asset based on that
It can be done at runtime whenever the frame changes to avoid making a new type of asset, but reading textures from code is very wasteful

#

A lot of sprite drawing/editing software do already have a method to define extra pivots and export them as .json or similar format

foggy horizon
#

I wasn't planning to do this in GPU btw. Just CPU. And the mapping of which sprite with its extra data, will just be kept in an SO. Isn't unity's sprite flipbook animation done entirely in CPU, thru animator?
Like, it's possible to just check the SpriteRenderer's current sprite, and get the extra data from the runtime database using the sprite's name as key, and position the transform of the weapon's SpriteRenderer from there?

foggy horizon
foggy horizon
#

This game'll be super low scope in terms of amount of sprite frames needed
I think like final fantasy tactics, only having 1 atk animation for any weapon, use item/casting, walk, idle
Maybe direction we'll stick with 4 in the end, or 8 just for the atk dir
And.. base body system. But... hopefully implementing this means even if we don't have 1 base body for all (so, like diablo got several base bodies for each classes), it'll still work and not require so many extra art workflow

modest cargo
#

Yes
What I meant to say in so few words is that you do have to determine how you save that data and how you store and retreive it when needed

#

One database for all your sprites' extra info sounds pretty terrible to maintain and eventually could get expensive to get data from

#

If each sprite grows the database and increases the number of times it needs to be read

foggy horizon
#

I probably don't have enough experience about... maintaing database and something like global sprite's extra info (or some other better approach?)
Anything i should keep in mind?

#

Like.. how would such architecture make it expensive to get data from?

modest cargo
#

For example if you have a sprawling json file with many vectors stored per frame per sprite
And every sprite must loop through it whenever their frame changes, that can get expensive
Countless ways to optimize that though, like fewer files, caching the values when the gameobject is created, more efficient formats or lookup methods, etc

foggy horizon
#

Ya i plan to just use dictionary

modest cargo
#

But the bigger impact is to your workflow
How tedious is it to set up those values per frame and hooking them up to a specific sprite and do you need an editor or external tool to help
How much extra work is it every time you have to rearrange the sprite sheet or pack a sprite atlas

#

If your sprites are controlled by the animator, by far the simplest option is to also animate child transforms in the clip (or in a component that stores an array of relative positions if you have a reason to avoid having a lot of extra transforms)

#

It's not very scalable because it's manual work for each clip
But with custom data types and tools for them to be scalable it's up to you to make them scalable

#

If it's just as if not more clunky to define extra positions per sprite frame as animating child transform positions per each animation frame, it's not actually better in any way

foggy horizon
#

Hahahahh lemme do this first

#

I'm actually not so well versed in sprite animation + animator + animation clip. I still do the good ol "drag the spritesheet to scene tab" and it'll make a new animation asset. Then... i guess i add the keyframe for the transforms from there?
Idk something with this thing is kinda clunky but i should try it first

modest cargo
#

With this method each sprite keyframe of the clip would also override the child transform positions, set to constant interpolation if you don't want them to smoothly slide between the positions

solemn latch
foggy horizon
#

Yes that's what im gonna do

#

I hope this works but ya crazy what over engineering thing i'd make if i didn't ask around first

#

Like at least try the simple straightforward one first

solemn latch
#

Unless you wanted to go crazy and add a pixel whose rg values encoded a coordinate in some spot that gets masked out by alpha

foggy horizon
#

U kno i thought of that often

#

Like some bottom left pixel, or the 4 corners of pixels, are actually special pixel or smth

#

This is for something else but yea. WOndering if anyone else ends up making something like that and for what usecase

solemn latch
#

It is a very valid idea with one fatal flaw; actually creating the data is more work than just animating a game object

#

It would be useful in a pipeline where you were baking sprites from 3d data

foggy horizon
#

For the case of weapon attachment, yes
But i had another usecase for this. Just forgetting it right now

solemn latch
#

There are lots of use cases for encoding data in sprites.

#

Though in practice you'd want to take that data and convert it into animation data in unity anyway, to avoid all those extra CPU texture loads every frame to read the data

modest cargo
#

With a good custom feature to store and read the data, it could be pretty trivial to place the extra pivots when making the sprites and export them from sprite drawing programs in a common format that would get parsed automatically
But making those tools might be more work than either creating the data manually as needed or simply animating gameobjects

solemn latch
#

Exactly.

#

For my very first game, I did manual placement for every frame quite easily; the only real trick was using a script to quantize the interpolated keyframes to match the framerate of the sprite sheet

#

(I chose a really stupid first project, a sprite with multiple particle emitters attached to her)

#

Alas, poor Firefaux

white bough
#

hello i need help pour auto tile please I tried but I can't get the corners right.

foggy horizon
# solemn latch For my very first game, I did manual placement for every frame quite easily; the...

Btw do u or anyone use SpriteSwap?
And the PSD Importer workflow?
I use aseprite, i export to unity as 1 anim spritesheet per animation
It seems the PSD Importer is for... Spine kinda 2D workflow? But for my use, just attaching to the pivot, is there a way to use the PSD Importer? Bcoz the quad of the character sprite will stay in the same pivoted place, and the weapon's quad will be moving around

solemn latch
#

I have gone away from using primarily spritesheet animation; I mostly use rigged sprites and use spritesheets for stuff like mouth and eye swaps mostly.

foggy horizon
#

Hmm ok

#

What i need to try is pretty clear. Traditional pixel art frame by frame sprite anim, but with weapon attachment points (easy with adding transform value animations in the anim clip)
But switching these sprites to another. Like, changing all the sprites in a whole anim sheet, is what i need to figure out how

#

I never used SpriteSwap. It does sound like what i should be using

foggy horizon
#

Like, is there a quick way to assign all my MySpike_0 etc to override the sprite in MySwordSlash_0 and the rest of it?

spring idol
#

The default is Y = 0.5

#

True isometric perspective is like Y = 0.557

naive kestrel
#

@spring idol unfortunately theres no guide given in the asset pack or on the asset website

spring idol
#

i've used a really large ratio before when cloning Into The Breach's style

spring idol
#

Since these aren't pixel art, you can get away with just scaling the entire tilemap up or down

#

but looking at the sprite dimensions may still be helpful

naive kestrel
#

should I be making the tilemap large enough to fit one of the grass tiles inside one block?

spring idol
spring idol
# spring idol

I'd show an example but I uninstalled the unity version I was using for this lmao

#

i need to fix that..

naive kestrel
#

ah ok I see

spring idol
#

You can eyeball it, or you can calculate it

#

If the sprite is 64 pixels wide and the PPU is set to 32, each sprite will be 2 units wide

#

To get the Y size right, you may want to open the sprite in an image editor and measure how many pixels apart the top and bottom of the surface are

spring idol
# spring idol

This sprite is 56 pixels across and 42 pixels from top to bottom of the surface

#

it's a 4:3 ratio, so I used Y=0.75

#

(and X=1)

naive kestrel
#

whats the easiest way to measure it? when I open it in the sprite editor I cant see individual pixels

spring idol
#

Just look at the width of the whole sprite

#

For the height, in Aseprite, you can use the line tool and look in the bottom left corner

naive kestrel
#

ayy I fixed it @spring idol

#

hows this looking

spring idol
#

That seems about right!

#

You'll want to create a second matching tilemap for things like buildings

#

one tilemap layer per "kind of thing", basically

naive kestrel
#

for some reason where my mouse hovers is not where the block is placed, its placed right above that square, is that a big deal or no

spring idol
#

You need to adjust origins of the tiles. I think you can just do that for the whole tilemap..

naive kestrel
#

it looks like this

spring idol
#

you could set the Tile Anchor of the Tilemap to X=-0.5, y=-0.5

#

for me, that moves all of my tiles down one space

#

The tiles might have wonky origins in the sprite importer

#

note how my dirt tile's pivot point is in the middle of the surface

modest cargo
#

Best to fix it with import settings / sprite slicing if possible

naive kestrel
#

the tile anchor fixed it ๐Ÿ˜„

#

is there any danger of doing it that way

#

@modest cargo

spring idol
#

Yeah, you should be fixing the actual sprite settings

modest cargo
spring idol
#

This will make it annoying to use any other assets, since they'll also need to have screwed-up pivot points

#

I wonder why the pivots are wrong, though..

naive kestrel
#

oh ya it seems to only be broken with that original grass block, using my road block from the same asset pack is messed up now

#

weird

modest cargo
spring idol
#

yeah -- show us a good sprite and a bad sprite

#

(the grass block that was off-by-one tile is a bad sprite)

naive kestrel
#

hmm so what do I need to screenshot

spring idol
#

you'll want to find the asset that the sprite comes from

#

If you look at the tile asset, it'll have a reference to a sprite

#

click once on the sprite to highlight it in the project window

#

it'll be a sub-asset of another asset, like this

#

click on the main asset and open the sprite editor from the inspector

naive kestrel
spring idol
#

oh yeah, look at that pivot point

#

it's on the bottom corner

#

It should be dead-center in the surface

naive kestrel
#

ah ok so it should be center

#

ahh

spring idol
#

not the center of the entire sprite, mind you

#

(that'd be correct for a top-down sprite)

#

isometric perspective means that you see more than just the top surface

#

You can drag the pivot point to the middle

#

I would then manually set the X position to 0.5

#

Your Y position will be different, since that tile has a different ratio of height to width

naive kestrel
#

ahh ok

#

thank you!

modest cargo
#

With many sprites you can set a common pivot offset for all when slicing

#

And iirc with Aseprite importer at least define that in import settings for its automatic slicing

spring idol
#

Yeah

#

I need to figure out what I did in this project

#

I remember the workflow being nice

#

But I also did it two years ago

feral ibex
#

Hello all. I am developing a 2d game in which the player can draw (in a defined area).
The approaches that i can think of right now are either using a line renderer + raycast + layers or a line renderer + sprite mask setup. Are there any alternatives?
Thanks!

shy anvil
feral ibex
#

yes i am planning for a 28x28 texture. My game, well not exactly a game, but a machine learning project. Detecting hand written digits.

#

my thought proccess was to first use the line renderer to enable the player to draw on a defined space. Next was to somehow "bake" the player input onto the render texture and proceeed to ML

shy anvil
feral ibex
#

yes the MNISt way

feral ibex
#

related to the "player drawing into a texture" part

shy anvil
#

I can also explain the idea step by step. I don't think I have many resources on that outside the Texture2D documentation

feral ibex
#

that would be great as well. Thank you!

shy anvil
# feral ibex that would be great as well. Thank you!

The most common approach though the one that I'm not the biggest fan of, is about the following.

  1. Start by creating a texture (28x28) using the Texture2D constructor.
  2. Every frame when the mouse is pressed down, you calculate the position of the mouse mouse cursor in the texture's coordinates (how you do that depends on the way you have set up the texture display).
  3. Loop through the pixel coordinates within the texture and calculate distance from each to the mouse (Vector2.Distance).
  4. Modify the texture pixels according to the distance calculated in earlier step. The most optimal way is usually to keep CPU side copy of the texture data as a array of Color's and update that as you loop through the coordinates. Texture2D.SetPixels must then be used to update the texture based on your array.
  5. Apply the changes to the GPU side by using Texture2D.Apply.
    The way you represent the texture visually is up to you, you can use UI image, a Sprite (probably, haven't done much 2D myself) or a mesh that you apply the texture to. The only thing that this choice affects is how you calculate the mouse coordinate in the texture space
#

The only problem with this approach is that it only draws circles in each frames mouse position, which will leave gaps when the mouse is moved fast or framerate is low. One common solution is to add extra points between the last frames position and current frame position though this approach I especially hate. At this point I would much rather do it properly and calculate the distance to the line segment between last and current frames mouse position instead of distance to singular point. There are countless point to line segment algorithms available which do that

shy anvil
#

An easier solution to 4. instead of the array copy approach which requires some 2D to 1D array flattening math, is to simply use Texture2D.GetPixel(x, y) to read the pixels value and write back to the texture using Texture2D.SetPixel(x, y, newColor). This is little bit less efficient but texture sizes only up to 28x28, you won't have any performance issues (I bet you could go much higher too).

shy anvil
#

Basically the pseudo code for updating the texture would look something like this:

if mouseDown
    mousePosition = screen to texture coordinates for Input.mousePosition
    for x from 0 to textureWidth - 1
        for y from 0 to textureHeight - 1
            oldColor = myTexture2D.GetPixel(x, y)
            distance = distance between mousePosition and (x, y)
            myTexture2D.SetPixel(x, y, clamp01(oldColor + (calculate color from distance)))
    myTexture2D.Apply()

To integrate the idea of distance to line segment, you would have to keep track of the last frame mouse position (in texture coordinates) and calculate the distance as:

distance = distance from (x, y) to line segment between lastMousePosition and mousePosition

To find distance between point and line segment, you may refer to this for example: https://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment

shy anvil
#

calculate color from distance is also up to your preference how you want to implement that. Surely you want some sort of pen size variable that you can use to get different line widths. For fully black and white line, you could just do something like: py if distance > penSize color = black else color = white For smooth lines you can use Mathf.SmoothStep or some other easing function to get desired gradient from the mouse position outwards. Note that the pseudo codes above assume black as background color and white as line color. If you want it the other way around or even use other colors, you need to take it into account in the way you combine the colors. clamp01(oldColor + color) for example could be replaced by a lerp according to the distance

feral ibex
feral ibex
shy anvil
feral ibex
#

oh i think that really depends on the depth of the project

shy anvil
# feral ibex which one is more scalable?

I mean it depends in what way you want to scale it. If you want the drawable area to be placed among UI elements, then doing it as UI image is probably the way to go. If you want to use gameobjects potentially with physics and such and even interact with the area, then you want to use sprites

feral ibex
#

yes that makes sense

shy anvil
#

If your project will only have one drawable area and nothing else, it probably does not matter much

feral ibex
#

yes. only one drawable area

#

Thanks for the much needed clarity on this topic!

shy anvil
#

As an example, if you used an UI element (with he old UI system), you could calculate the texture coordinate position using RectTransformUtility.ScreenPointToLocalPointInRectangle which also returns whether the mouse is over the image

#

For sprite, using something like Camera.ScreenPointToRay with Plane.Raycast would give you a good starting point. Especially if the sprite was placed to have bottom corner at (0, 0) and upper corner at (1, 1), it would be quite trivial to calculate the texture coordinate.

#

Also you could simply attach a box collider to the sprite and use Physics2D.Raycast and calculate the texture coordinate from the hit position

shut trellis
#

Hi all, at work I needed to get some Tilesets made quickly and the tools I found were pretty lacking.

I made an improved version of TileGen
That works fully in the Editor and is 20x faster.
Wondering if this is of interest for anyone (so I can polish it for general use) or did I just reinvent the wheel.

Get the TileGen: Tileset Generator & Automatic Rule Tiles package from Iggy and speed up your game development process. Find this & other Sprite Management options on the Unity Asset Store.

feral ibex
#

but ig i did not define the area completly. will take another look at it

shy anvil
# feral ibex i did try this

Oh sorry, I forgot what Physics2D.Raycast does. You could use Physics2D.OverlapPoint to find out whether your mouse is over the area

feral ibex
#

that's new

#

oh yea

#

im looking at the documentation

#

seems promising

shy anvil
#

Now that I think about it again, assuming that you are using an orthographic camera, there's not much point in using doing the OverlapPoint check to begin with. If for example the area is placed between 0 and 1 in both axes, you could just make an if statement which checks whether the mouse is within the area. Getting the world position of the mouse can be done via Camera.ScreenToWorldPoint

feral ibex
#

no, there is a layerMask parameter to the OverlapPoint construct

#

yes

#

it works

#

OverlapPoint works

shut trellis
naive kestrel
#

can someone explain what is causing one tile to overlap another?

modest cargo
still tendon
#

i may be a complete idiot but i cant for the life of me work out how to set the bounds of a tilemap . i just want to make it so i can only place tiles within a specific area

modest cargo
still tendon
spring glen
#

hey guys so i made a custom shader but with it SpriteRenderer.flipX doesnt work anymore. when i tried to find some answers online it said using the UV to flip it and so i tried that, but i'm pretty sure its flipping the entire sprite sheet because the animations are out of order. is there an easier way to flip it or how can i make only the individual sprite get flipped?

modest cargo
modest cargo
spring glen
#

whats a sprite graph

modest cargo
spring glen
#

oh

#

ngl i barely know anything abt shader graph

#

thanks

naive kestrel
terse gorge
naive kestrel
#

If anyone has this issue in the future here is how to fix it: After three days of banging my head against the wallโ€ฆ I finally figured it out.

The issue was that I was using individual sprite files for each tile and then building the palette with them. For some reason, Unity doesnโ€™t handle that well in isometric Tilemaps โ€” the overlapping happens even when everything looks correct (same Z, same sorting layer, etc).

What solved it was creating a single PNG image with all the tiles, then slicing it in the Sprite Editor. Once I made a new palette using that, the overlapping issue disappeared completely.

No idea why Unity behaves this way, but if youโ€™re having weird sorting/rendering problems in an isometric tilemap, definitely avoid using separate sprite files.

Hope this helps someone else!

#

I found this on a random unity thread and it worked!

terse gorge
naive kestrel
#

Yes I tried changing the sort axis, it made no difference

#

I tried literally everything, I had people in another discord giving me 100 different things to try and nothing worked, but thats the only solution that worked

#

very weird issue but im glad I can finally move past it

modest cargo
#

If one of those isn't right, tiles from the same sprite sheet will still sort correctly in many cases, giving the impression that it's required

#

But it's possible a bug has been introduced to that functionality
This is how it has worked for me in 6.0.60f1 and multiple earlier versions

naive kestrel
#

im using the newest unity version, so it may have been a bug in the new version

#

ill definitely revisit it during map creation but for now ill just do it the way it works

modest cargo
snow surge
#

does anyone know why the aseprite importer creates massive empty spaces seemingly at random?

#

this is the aseprite file and mosaic padding is set to zero

barren quiver
#

i have a image i am giving outline via shader, it used to work fine before but when i add these sprites to Sprite Atlas it introduces these edges in sprites, i have checked online and i dont have mipmap on, any solution?

i have checked all combination of these settings as well

crude mango
#

when i say crop i mean not just using aseprite, crop on your laptop

#

the file itself must be cropped

modest cargo
#

This is typically a good thing
PoT textures are faster to render than non-PoT and consume less RAM/VRAM even if the size on disk is larger

#

Additionally the empty space will be effectively nullified if you configure a sprite atlas

#

So there should be no need to manually modify anything

modest cargo
barren quiver
modest cargo
barren quiver
#

The preview that is generated in sprite atlas

#

These sprites are either on the top edge or right edges that show these problem

#

Or if there happens to be a natural big gap in between

#

Due to uneven sized sprite

modest cargo
#

I would offset the texture UVs in the shader to see what happens to the outlined edges
Would they reveal another sprite after all, or show inexplicable lonely outlines in empty space?

barren quiver
#

I don't have my work laptop with me right now, I can check the day after tomorrow and will ask again with more details. Thanks

ripe veldt
#

Hi I am currently working on lighting in my 2D game project, is there a reason why my light wont show up on the intended sorting layer, but only works when my desired layer and the "default" layer are both checked?

jolly narwhal
low storm
#

Sorry

jade linden
#

Sorry for the super amateurish question, but first time 2D user here. When I have a spritesheet and a part of the animation that is supposed to be one frame is split into two sprites like pictured (a dash attack, and the little dash particle at the feet) whats the cleanest and fastest way to combine them in an animation? So that they aren't each their own frame like shown in the second screenshot.

twilit vault
#

that way you can get proper pivots as well

solemn latch
hasty schooner
#

When trying to create procedurally generated terrain in top down 2d, is it better to usr game objects or tilemaps?

solemn latch
#

Depends.

crude mango
#

u have more control over them

hasty schooner
# solemn latch Depends.

Well my terrain isnt infinitr first of all, so it only has to update once. Also Im doing it with tilemaps rn, which feels easier to work with. Problem is, theres no way for me to properly implement sprite sorting for the cliffs.

hasty schooner
crude mango
#

not if u optimize by deleting them when not near the player

#

you want procedural generation or a standard pre made map?

#

with a pre made map use tiles duhh but we talking about procedural generation

hasty schooner
#

Just not infinite

crude mango
#

then why use procedural if it aint infinite

#

might aswell make a pre made one

hasty schooner
twilit vault
#

procedural and infinite are definitely not one and the same

hasty schooner
#

Yuh

twilit vault
#

terraria, spelunky, oxygen not included, etc

hasty schooner
#

Hence Im wondering if game objects would be better instead of tilemaps

#

Also since game objects handle sprite sorting better I think

solemn latch
#

You can do a hybrid approach, too. Scriptable tiles can spawn game objects

hasty schooner
#

True

#

My only issue with tilemaps really are just the sprite sorting

lean estuary
#

Have separate tilemap from floor just for objects and set it to be individually sortable. It's somewhat more performant than separate sprites still.

light elk
shut trellis
buoyant jolt
#

Hey i don't know how to make the UI appear behind the player its in world mode and foreground objects I think It's something to do with sorting layers

modest cargo
buoyant jolt
#

I will see this

#

oooooooooooooooooooooooooh my god thanks so much it was one setting

wooden gazelle
#

can anyone help?

picture 1 is the tutorial i'm following, picture 2 is my work, anyone could explain why my auto geometry looks completely different? (trying to do a soft body and this is pretty much the only reason my soft body works very weirdly)

#

i'm in pain

modest cargo
wooden gazelle
#

but that would be the only logical reason

#

or

#

unity version changes

#

how can i even get the same ppu without knowing tho lol

modest cargo
still tendon
#

Hello! How are you?
When I move the white dots (idk how they are called) to change the shape of the sprite close shape, they move through integers, not decimals.
Is there a way to change that?
thanks in advance and sorry for my english

sacred stratus
#

turn off grid snapping (it's shown as on by being blue in the top bar with "Center" and "Local")

wooden gazelle
#

this is the closest i could get

solemn latch
#

Unity did change the algorithm they use for auto geometry a few versions back, moving to an open source one.

#

But you can just make your own geometry...

#

Those weights you have don't look ideal.

solemn latch
#

Really, you could probably get away with far fewer vertices in thecenter, especially if the sprite is fairly featureless.

wooden gazelle
jolly narwhal
#

Why don't you just make the geometry manually to match what you want

solemn latch
#

The geometry in the video isn't anything special.

rich crest
#

Why choose between easy 3D animation and crisp 2D art? Get the best of both worlds! I've recorded a quick Godot shorts reveals how to automatically switch sprites based on camera direction. Elevate your indie game's visuals today!

#PixelArt #Godot #GameDev #IndieGameDev #GameArt #Programming #Tutorial #Shorts #Godot4 | 19 comments on LinkedIn

#

i was thinking about something like this, cool to see somebody built

#

instead of drawing frame by frame

solemn latch
#

The video seems broken, at least on mobile, so can't really tell what they're talking about...

still tendon
#

2d pose issue with Skinning Editor.

solemn latch
#

@still tendon you'd probably be looking at something more like thus, unless you change format.

still tendon
#

had to change format

#

i am not moving the parts together inside unity nuh uh

#

more .aseprite support would be great

solemn latch
#

Theoretically, there shouldn't be anything stopping you from adding that functionality to the aseprite importer, BUT that might interfere with some other functionality (I'm not sure of all the details of what that importer can do)

#

Just like why they made a separate importer for psb, so it wouldn't interfere with the features of the normal psd importing.

eternal tundra
#

hi, are you guys able to import psbs with the psd importer? I exported a psb from photopea and it's blank on import.

solemn latch
#

Photopea might not include the necessary metadata

#

A while back someone made a converter for regular layered psds, can try that if you have no photoshop.

modest cargo
#

I would check if the sprites are usable in scene at all, so that it's not just the preview that's blank

#

I think Gimp can save the right kind of psb files but not totally sure

lavish abyss
#

Shouldn't unity automatically extract the sprites if I set the sprite mode to multiple? I have a 2048x2048 sprite with a fixed margin and padding made in Figma. but it is hard to extract each sprite individually

shell patio
#

Hi everyone, I've googled this but could not find any 2D specific resources.
I'm trying to achieve an effect similar to this post - to use an unlit shader over a 2D path to achieve a "slash" effect.
I'm trying to avoid using keyframes/spritesheets at all costs, and TrailRenderer by itself won't achieve this effect (or won't look as good). A lot of the 3D slash tutorials I've seen use a circle/arch mesh as the particle shape, so is there a way to do this by using a 2D sprite of a circle/arch as a shape for the slash?
https://www.reddit.com/r/Unity2D/comments/s4iiv4/attack_slash_effects_workflow/

Reddit

Explore this post and more from the Unity2D community

devout bolt
#

hey i need help in the animator part of my game.
specifically how do i merge animators, like my game right now consists of my main player with his own spriterenderer and animator controller and everything. But i want to add a weapon to the game and i created all the FBF animations for this specific weapons for all directions but im confused on how i actually merge these animations??? Like do i geniuenly have to add all the weapons animations to the same main player animator that contains the locomotion? thatll be hell if i wanna add more weapons (which i do). Any advice?

modest cargo
vagrant grove
#

What should I pixel next?

devout bolt
#

like rn my player has his own animator for his locomotion

#

but if i wanna add weapons and obv their own animations (theyre fbf animations i dont use rigging), do i really have to js hardcode and hardanimate each weapons animations into the same mainplayer animator?

#

i feel like theres a better way but im fairly new to unity and im not aware of all the tools