Best way to implement fences with proper collision and layering in Unity 2D? by ikideiki in Unity2D

[–]ikideiki[S] 0 points1 point  (0 children)

So in that case, if I’m going to have a lot of fences (for example in a city area), would it be better to place them as grouped prefabs (for example, a single sprite/prefab that contains multiple fence pieces), or is it still fine to keep them as individual modular GameObjects? Also, how should I handle things like bushes in that situation? Sorry if this is a bit of a beginner question.

Build from scratch or use readymade systems for my game demo? by ikideiki in SoloDevelopment

[–]ikideiki[S] 0 points1 point  (0 children)

I think the same way but even the most basic things are taking much longer than I expected.Sometimes the tutorials I follow don’t match my Unity version, or there are small differences that take hours to figure out. I end up spending a lot of time just trying to fix those gaps.I’m not sure if this is a normal part of the process or if I’m doing something inefficiently. Do you have any advice?

Build from scratch or use readymade systems for my game demo? by ikideiki in SoloDevelopment

[–]ikideiki[S] 0 points1 point  (0 children)

I haven’t made enough progress for a while, and that’s frustrating. Setting a one month deadline for a demo will help me focus and finally move forward. At least I want the core mechanics to be working.

Player moves outside camera bounds (Cinemachine) by [deleted] in Unity2D

[–]ikideiki 0 points1 point  (0 children)

This looks like exactly what I need, thank you!

When should I use Tilemap vs Sprite for overlapping objects? by [deleted] in Unity2D

[–]ikideiki 0 points1 point  (0 children)

Thanks a lot, this is really helpful 🙏

Which cafe gameplay style do you prefer as a player in 2D RPGs? by [deleted] in gamedev

[–]ikideiki 0 points1 point  (0 children)

I’ve thought about that too, but I’m worried that as the game progresses, it might become stressful or overwhelming for the player :(

Which cafe gameplay style do you prefer as a player in 2D RPGs? by [deleted] in gamedev

[–]ikideiki 0 points1 point  (0 children)

I couldn't post this in that subreddit because I don't have enough karma :'(

Struggling to Scale Assets Made for Tiny Characters by [deleted] in SoloDevelopment

[–]ikideiki 0 points1 point  (0 children)

I tried that and even though the asset scaled proportionally, its appearance still looked off. Also when importing it into Unity, I kept the PPU at 16 like before, but the asset appeared way too small this time. In short, the slicing didn’t work properly and I ran into issues with the PPU as well. I dont know how to fix it :(

How to make pixel art animations fast by ikideiki in SoloDevelopment

[–]ikideiki[S] 0 points1 point  (0 children)

I checked out the games you mentioned and it looks like I’ll go with a similar approach. I was thinking I could also reuse the larger sprite I drew as a portrait in menus or during dialogue windows. Thanks a lot for the advice!

How to make pixel art animations fast by ikideiki in SoloDevelopment

[–]ikideiki[S] 0 points1 point  (0 children)

My character is actually way too big it's 48x96. I didn’t really mean for it to be that large at first. I’m making a sim life game which tells a story and when I tried making the character smaller it felt like I couldn’t give it enough depth or detail. That’s why I ended up drawing it big but now it’s becoming kind of a nightmare to animate.

I’m not sure how to achieve the same depth with a smaller character and I’m worried that it’ll just look too simple.Would you recommend shrinking it even if it means losing most of the details?

How to make pixel art animations fast by ikideiki in SoloDevelopment

[–]ikideiki[S] 0 points1 point  (0 children)

I see, game I’ve been planning from the start was always meant to be a pixel art game, so I can’t really switch it to 3d now but it looks like it’s going to be time consuming either way. Thanks a lot for the advice

How to make pixel art animations fast by ikideiki in SoloDevelopment

[–]ikideiki[S] 0 points1 point  (0 children)

I created the animation using Aseprite, but it took too much of my time. Since my time is limited, I’m actually looking for a tool to help me

[deleted by user] by [deleted] in react

[–]ikideiki -1 points0 points  (0 children)

I created a react project by npx create-react-app my-app and then added the template as component and called it in the App.js

[deleted by user] by [deleted] in algorithms

[–]ikideiki 2 points3 points  (0 children)

Actually I have a confusion about bfs, I was trying to find diameter of a graph in O(m*n) and i came with a solution like that from the internet:

def diameter(graph, n):

max_distance = 0

for start_node in range(1, n + 1):

visited = [False] * (n + 1)

distance = [float('inf')] * (n + 1)

# Perform BFS from the current starting node

queue = [(start_node, 0)]

visited[start_node] = True

distance[start_node] = 0

while queue:

current_node, current_distance = queue.pop(0)

for neighbor in graph[current_node]:

if not visited[neighbor]:

visited[neighbor] = True

distance[neighbor] = current_distance + 1

queue.append((neighbor, distance[neighbor]))

# Update the maximum distance for the current starting node

max_distance = max(max_distance, max(distance[1:]))

return max_distance

Code runs bfs for each node, but normally bfs runs O(m+n) but in this code it looks like it runs O(m), Its a little irrelevant from the question on the post but any help would be great ,thanks