Considering just last week you made a topic on not having enough energy for gamedev, I think its worth reframing the problem. One big thing I noticed at my time at university is that hours could become ultimately meaningless. Obviously, the more time you can put into something, the more likely you are to get results, however it can also fast-track you to a quick burn out if you are not careful. Equally, not hitting an hour "quota" can make you feel bad and reduce motivation further. Often this comes associated with imposter syndrome, and once you start having thoughts like that, the whole work ethic will collapse.
Instead, one thing I often say to people when talking about this subject is that being efficient is by far more important than the amount of raw work you put in. Often times, I was able to get far more done than my course mates by simply taking a more efficient approach and being smarter with my time. This meant doing things like:
- - Not testing every micro-change you make, doing a few things at once and testing all of those things independently when you run the app. In the case of gamedev, this means not doing something like changing the colour of text, or moving some sprite on the HUD and running just to verify the new position.
- - Good initial planning. You should have a good idea of what your code is going to do before you start writing it. If you have a plan, then it can be quick just to write functions all in one go, adhering to a specification. This often means you can write loads of small functions that make up a system and be confident in the overall behaviour. This both increases efficiency and reduces the need for testing.
This could also mean dedicating one entire days worth of time to planning, which would mean that a smaller block of time would end up being suitable for implementation tasks.
- - Make time count. Sometimes, when setting aside large blocks of time for work, this can ultimately lead to people faffing around, doing micro-procrastination such as browsing the forums. My personal approach tends to be more along the lines of setting aside tasks, and completing a task in full but then having a break after that.
- - Be more pragmatic in your approach to complex problems. Sometimes it is okay to solve problems emperically, by creating a simple solution and randomly testing values. Sometimes this can be okay, but sometimes, it is more time efficient to spend a little bit of extra time working out the maths, reasoning about any problems your system has and finding the correct values/equations that better model your problem. A good example of this is something like getting AI to shoot projectiles and land their targets correctly.
- - Identify when things are slowing you down, try and work out why (Whether its because you are conflicted on the game design behind a mechanic, or whether it's harder than anticipated and bringing up technical challenges). Try and avoid wasting time when you are mentally blocked, and perhaps either do something else (unrelated to programming), have a break or move onto a different task. Ultimately, banging your head against a wall won't solve the problem. Normally with these things, approaching the problem again on a different day can bring you in with a fresh perspective. Sometimes you also need to sleep on a problem.
- - Identify when you are becoming burnt out/becoming less efficient. It's all too easy to feel the pressure of gamedev and try and power through, but sometimes this just results in a loss of productivity. Generally, when the motivation dips, the ability to execute sound development practices goes down the toilet aswell, meaning slower development and ultimately no opportunity to recharge. Taking time off in the short term can often result in increased productivity down the line. Forcing yourself to try and do too much is a recipe for disaster and will ultimately lead to bad things down the road. I had an awful month in March, getting into a bit of a rut and not achieving much, but equally, not allowing myself to recharge properly.
- - On really busy days, sometimes just chipping in a small 30 minute feature can make you feel really good, as you are then doing work that otherwise wouldn't have made it in. Whilst I prefer to work in big chunks, I tend to use small windows of time to get my motivation rolling, setting myself a challenge of trying to finish something in 20-30 minutes. I rarely do finish a task that quickly, but it often motivates me, making me want to get back to it asap. Meaning whilst I am out, I am constantly thinking about it and often doing a bit of subconcious problem solving/planning in my head
So yeah, I think the best course of action isn't to think about this in terms of "hours", but rather to think about how you can make efficient use of your time. You can make one hour into two hours if you are really efficient. No need to beat yourself up if you only manage an hour or two in an evening, those could end up being really productive hours and ultimately, that's more beneficial for both your project and your mental state than forcing yourself to sit there for x number of hours just to tick some imaginary box. You can also apply this line of thinking to your every day life. Naturally, it doesn't bode too well with the conventional attitude of working in terms of hours. In jobs, I often find myself getting mugged off because I work hard to get the work done, but ultimately, that just means more work for no extra pay
I'd also chip in and say depending on what kind of job you have, sometimes you can squeeze in time for planning and problem solving there. I used to work as an IT support technician at the University. Whilst it was busy most of the time, i'd get days where barely any problems cropped up and I could spend that time getting a head-start on planning so that when I got back, I was ready to go