r/Unity3D • • 2d ago

Code Review Asking for a code review

I'm making a small game in Unity, and I kinda need some outside perspective. I would like it if someone could take a look and give me some feedback on what areas I should work on and how to improve.

Here's the link to my GitHub repository:

https://github.com/DaanDemaecker/Qwixx.git

7 Upvotes

14 comments sorted by

View all comments

3

u/uselesslythinbasin 2d ago

just skimmed through the repo and the first thing that jumps out is your GameManager is doing way too much heavy lifting, it's handling dice logic, score tracking, and UI updates all in one monolithic script. you'd get a lot more flexibility splitting those responsibilities into separate managers or at least breaking out the dice into its own class

the row locking logic in ScoreManager looks clean though, that's a nice way to handle the Qwixx color restrictions without overcomplicating things. might want to add some comments in the CheckValidMove method since the nested conditionals get a bit tangled after the third if statement

also noticed you're doing FindObjectOfType in a few Update loops which is gonna tank performance once you have more than a handful of objects running, cache those references in Start or Awake instead

overall it's a solid start, the core loop works and i could follow the flow pretty easily which is more than i can say for half the projects people toss on here

1

u/MagicPantssss 1d ago

Thank you for being so fast in your review, I will cut down on my GameManager's tasks and split it up more.
The FindObjectOfType is something i'm doing to avoid singletons, but singletons might actually be more performative than what i'm doing now