4

Any Unity3D devs out there?

My thoughts: Unity3D is an amazing game engine. It lets you really quickly go from concept to implementation and allows you to prototype very quickly. My concern is that I find it incredibly hard to write good code using it. It's very difficult to write in a test driven way, especially if you put any logic in a MonoBehaviour. It is possible to work around this by using Zenject or another DI framework. You could even use entitas which is an entity component system. But these all have their downsides too. Zenject I find to be quite boilerplatey and not that easy to test either. I also find it really frustrating to be using a really old very of C# (maybe C#4 equivalent but I think it's customised in some way for the engine).

Anyone else struggle to enjoy writing code for Unity3D games?

Comments
  • 1
    I found that I enjoyed coding more with unreal engine, but neither is perfect. Programming for games can get ruined by the fact that we also want it to be easy to prototype and mock up, but without those, you can lose the game making enjoyment too. It's always going to hit a wall on enjoyment simply because that is development :/
  • 0
    I've not used Unreal before. What makes it more enjoyable? The language? It's C++ right? Is it as quick to prototype?
  • 0
    @stevorobs3 It can be as quick, because you can use the "blueprints" to test behaviors without coding. It just seems that if you are just going to code, you do more of it and it's not with a old subset of the language, like unity. I prefer C# over C++, but being stuck at version 4 or so sucks.
  • 2
    With Unity for me I've just gone with the manual way of testing and that has worked out so far. Though it's true being able to write decent code in a proper way is a bit difficult, though I've read c# is meant to be more towards scripting rather than having some form OOP. (At least in the case for Unity)

    But I don't know I try to create functional code that is also not riddled with hard coded values. I've also only ever been self taught so I'm probably doing something wrong lol
  • 0
    @f03n1x eh, I bet you're doing fine. The fact that you try to avoid hard coding helps a ton, and it gives you the ability to have a settings menu where things get changed based in what they want.
  • 2
    @iam13islucky yeah I take advantage of the prefab functionality and use them for setting up classes and such, and I also have a class for building recipes (similar to Minecraft in a way), which gets check for correct recipes.

    I have to stop procrastinating lol, gonna try get some work done today on the crafting system.
  • 0
    @f03n1x so you do any tips to keep track of what you want to add? Using trello helps me be a little less lazy
  • 2
    @iam13islucky that's a good question lol, I'd say trello but for me, since what I add is a bit more complex than what is said in trello, I'd have to say it doesn't really help.

    I think I need to find a good way to track things, though I guess a git repo would help (but I've been lazy on that department, since I've working on the same feature for awhile now)

    If anyone finds a good way to track things in unity, maybe without it being in the pro version then I'd definitely want to know

    I guess one way is the file structure, I've set it out as per different features, that maybe it though not sure.
  • 1
    Jesus guys, your not using version control. I literally just shat myself thinking about that. Get on it now. I use git, it's great. It will save you time. It will make collaboration easier. It will give you a history of changes to learn from, revert to if shit breaks. Please use git. Please.
  • 2
    @stevorobs3 I use git, but since the changes I've made since the last push has literally been a couple of lines, well I haven't decided to push it. I was wondering in terms of documentation wise a way of checking what has been done.

    Didn't realize my post made it look like I was lazy to setup a git repo, I have one lol, I just meant lazy as in haven't pushed the changes to the few lines of code.
  • 0
    Phew, yeah I was a bit confused. What sort of things do you want to track? The roadmap for the game? Which feature to implement next? How to implement a feature?
  • 2
    @stevorobs3 well for majority of my features there are a couple of c# scripts that do multiple things that all together make the feature work, I was just wondering if there was some sort of tool that would help with tracking what script is done or more so parts of a feature are done.

    Though I guess the trello to-do list works just fine for me. I guess if there was some other way I'd probably use it. I'm using bitbucket and I know atlassian have a couple tools, so I guess I'll do some research on that later.
  • 0
    I've mostly done it either in ticklist or jira ticket form. But for a personal project your way sounds fine. Do you ever find your forgotten what you've done or lost progress? The curious side of me is wondering if you have a problem / what your problem is.
  • 0
    @stevorobs3 dude, calm. I use version control at work, and on my personal projects. I tinker with unity, and I'm likely going to try a different anyone for my next personal project. I know about VC, take a deep breath lol
  • 2
    @stevorobs3 nah I haven't forgotten what I've done it's just more so if I decide to not touch a project for a long time and forget where I left off, but I guess I'll try out the things you suggested
  • 1
    @iam13islucky oops, looks like I had one to many beers last time, well it was my birthday so I hope you forgive me.
  • 0
    @F03n1x yeah, if i leave a project for a while, when I come back I normally find some sort of develop branch which just the change Ive been working on. So maybe branching per feature and then merge back to master is what you're after?
  • 2
    @stevorobs3 yeah I guess I could do that
Add Comment