Live data from Hacker News

I learned Unity the wrong way

darkounity.com

111–120 of 124 posts

Re: I learned Unity the wrong way

#111
post #102

The very first mistake you made was using Unity. Start from scratch. A game loop is really just draw(), update() positions in a loop. Even smaller effects can be done with simple programming. Recently I played around with ChatGPT for some effects for JS game, the results were interesting and very experimental. 3D game is another beast altogether and linear algebra needs to be very solid for that.

Start from scratch means your doing all of your own asset loading and handling, physics, collisions, hit boxes, animations, level editor and probably need to know some graphics library or api

I built a multiplayer 2D top-down game for my Bsc thesis. Once I compressed the rotations and movements as vectors and linear algebra the code turned out to be around 2K lines for the client and 1K for the server.

And it included assets, PvP, crafting system, collisions mobs etc. For collisions it's just dist center of assets <= sum of their radii. Requires geometry and some thought but not impossible Far from perfect game of course but got very far using simple concepts.

Re: I learned Unity the wrong way

#112

Earlier quoted context omitted.

Are you interested in the graphics (how to render 3d, opengl/directx, shaders etc), in the “game engine” aspect (all of the various parts of a game coming together), game design, networking, or something else? All of it? As people used to say on stack overflow - what have you tried so far? Also - this might be a good starting point: https://www.gameenginebook.com/

- i have started brushing my c++ and learning 3d math for now - i am interested to know for starters what does the 10000 ft landscape look like - what are the major steps involved? - what have I tried? I spent a lot of time looking into what kind of libraries exist. Rust has something called bevy which I would not touch given it is new and I dont want to work with double unknowns - C++ has a library called raylib tha…

A 3D game, like any interactive program, is a REPL over a state machine:

1. Setup initial game state

2. Render graphics in accordance to game state

3. Read input and update state in accordance with it

4. GOTO 2

The purpose of C++ is to prevent you from realizing this. Don't use it and don't talk to anyone who uses it. Same for Java, C#.

Re: I learned Unity the wrong way

#113

Earlier quoted context omitted.

That list missed the biggest mistake all Game Programmers make: They write code for the games industry. If you can program a videogame, you can program a shitty webapp, and the shitty webapp industry pays twice as much. Video games are great, but that's an argument for making your own game, not working for the soulless meatgrinder that is the games industry.

Not everything is about money.

Working a job is about money, but even besides that the gaming industry has downright abominable conditions relative to the rest of tech. You get treated worse, paid worse, and none of it matters because there's an endless line of dumbass college kids behind you who are absolutely stoked to be treated like shit because they learned to program because they loved Call of Duty.

Re: I learned Unity the wrong way

#114
post #9
post #5

What nobody told him is that it doesn't matter. The most beloved games have the shittest code. The goals of getting a job in the industry, and making a game people love, have completely different requirements, with surprisingly little overlap. --- As for the latter (game industry requirements) I read this article a while back. https://lazyfoo.net/articles/article11_top-ten-mistakes-game... There's a great list of Fun…

There's numerous studios across the games industry that have high coding standards, mandatory code reviews, and expect upskilling. Game complexity keeps increasing, and live service games in particular need to be stable and well maintained and very well engineered in the first place. For many games, the days of games being pressed to disk, shipped out and done with (where bad code is fine) are long gone.

I think it's odd to say that pressing to disk was more permissive of bad code. Releases like Cyberpunk suggest the opposite- that development teams selling games that can be updated take that into account as they plan and release, and the quality suffers upon launch for it.

Re: I learned Unity the wrong way

#115

- as a non gamedev i keep asking this question since i dont get a satisfactory answer like ever - if i want to make a 3d third person tactical shooter from scratch) without unreal, unity, godot etc what is the exact flow - i know c++ and have a decade of programming experience. i am revising 3d math from that awesome 3d math primer book - what are the steps? if you asked me to write a program to take a postgres backu…

It's an incredibly inefficient way to make a game, but you could check out Handmade Hero by Casey Muratory. I'm not speaking at all to the overall quality of the work. But he definitely bootstraps the game from scratch and there is a ton to learn about the low level graphics and input systems.

https://guide.handmadehero.org/

Day 004 is where he actually starts drawing on the screen. So about five hours in if you skip the C intro. Or you could start writing to the screen in under 30 minutes with some basic libraries like SDL. In my experience most game devs, even those who want to write the code and not live inside Unity are using some OS/Graphics/Input abstraction library.

https://examples.libsdl.org/SDL3/renderer/02-primitives/

Re: I learned Unity the wrong way

#116

Earlier quoted context omitted.

Ugh... we have a new colleague who does this repeatedly. Most recently, I said in order to build, you need to do this: - git clone - git clone - git clone What do they do? git clone repo1, 2, 3 without giving parameter, which clones into default folders named after the repos. Build fails of course because repo1 depends on repo2 and 3 being named specifically. He sends me the error log (remote colleague, yay) and I sa…

Available now, can follow directions, and yes write scripts to automate that: https://news.ycombinator.com/item?id=47609859

Nice try :) Actually the hard part isn't creating a script to automate 3 git commands - it's that there is no root repo to put such a script, hence the need to manually do it.

Re: I learned Unity the wrong way

#117
post #100

Earlier quoted context omitted.

I agree, and there are other fun gotchas that even more frustrating and convoluted. But everything is thoroughly documented and I even explicitly pointed out those potential issues before I gave them the assignment. When the errors first occurred, I pointed out the fix, which was ignored, multiple times. Should it be that difficult to rename a couple folders? The compiler errors were fairly easy to understand: can't…

at the very least there's no excuse for not having a shell script to check everything out in the right places! I've been the new person in teams with this sort of fragile setup and it's no fun whatsoever.

The "excuse" is that there is no root repo :)

It's not fun to copy/paste 3 git commands? What a truly gilded engineering life you must live! :)

Re: I learned Unity the wrong way

#118
post #9

Earlier quoted context omitted.

There's numerous studios across the games industry that have high coding standards, mandatory code reviews, and expect upskilling. Game complexity keeps increasing, and live service games in particular need to be stable and well maintained and very well engineered in the first place. For many games, the days of games being pressed to disk, shipped out and done with (where bad code is fine) are long gone.

I think it's odd to say that pressing to disk was more permissive of bad code. Releases like Cyberpunk suggest the opposite- that development teams selling games that can be updated take that into account as they plan and release, and the quality suffers upon launch for it.

Yeah I understand what you mean. For bad code in that sense, I'm mainly thinking back to games work colleagues have worked on (in the era when patching wasn't possible) where horrible one-time hacks and weird workarounds get quickly thrown into a codebase under deadlines and crunch just to get things fixed, platform certified, and shipped. Games in the past were more often using in-house/proprietary engines too where this would happen too under pressure. With patching ubiquitous, QA still have a really difficult job especially with nearly every release being multi-platform.

Re: I learned Unity the wrong way

#119
post #110
post #9

Earlier quoted context omitted.

There's numerous studios across the games industry that have high coding standards, mandatory code reviews, and expect upskilling. Game complexity keeps increasing, and live service games in particular need to be stable and well maintained and very well engineered in the first place. For many games, the days of games being pressed to disk, shipped out and done with (where bad code is fine) are long gone.

They aren't long gone. There's a ton of very successful indie or AA games with shoddy development practices: https://www.reddit.com/r/programminghorror/comments/e0bub9/t... A game isn't a fundamental or structural part of a system. In the end, it is just a game. The goal of a game is to deliver an experience. It doesn't need to be scalable or robust. If the experience isn't marred by bad coding or bugs, then it can s…

Yeah all of that is always going to be true across hobbyists, indies and small studios. But for commercial game development at scale, where there's multiple studios or outsourcers/co-devs brought on, there's real expectations that people can be on-boarded quickly and work productively on projects with tight schedules. A poor quality, fragile codebase (usually with technical debt) is a recipe for disaster when things are at being worked on at that level.

Re: I learned Unity the wrong way

#120
post #100

Earlier quoted context omitted.

at the very least there's no excuse for not having a shell script to check everything out in the right places! I've been the new person in teams with this sort of fragile setup and it's no fun whatsoever.

The "excuse" is that there is no root repo :) It's not fun to copy/paste 3 git commands? What a truly gilded engineering life you must live! :)

it's not fun to have to follow a bunch of finicky manual processes because no one in an actual software company could be bothered to automate them!
Post reply on HN