March: Had an idea for a coding project. Felt it was insane to start from scratch. Got Unity.

Stared at the mountain of setup and learning work. Stalled for months.

Today: File->New->Empty Project. Opened Vulkan tutorial.

Typed more code in 2 hours than in the last 6 months.
Really drove home to me that programming is two things: One is writing code. The other is everything it takes to get to where you can write the code.

I love the former. I loathe the latter: Platform details, package management, build config, sparsely-documented plugin APIs.
It was both humbling but also illuminating to realize that I would rather write another entire vector math library, resource manager, logging system, and all the rest, from scratch, if it means I spend 100% of my time able to fully wrap my head around the codebase I'm working in.
I really have a powerful aversion to the sort of "fumble around in the dark and get things apparently working and move on without fully understanding" approach necessary to work with a large existing system I don't fully understand.

Here's an example:
I wanted to just write C++ code for my app. So I thought I'd use Unity's native plugin API to push control into a C++ DLL and do all my stuff there.

Docs are pretty light and I couldn't find good examples. I decided to use the style where you call in from C# script code...
After much fumbling and build steps (trial and error finding where the DLL should go, etc) I got it working. My app could print an integer given to it from C++, hooray!

Except I couldn't rebuild the DLL with the Unity editor running because it kept it loaded. So I googled that..
... found someone had a solution on github that added a middle layer, you name your DLL with an underscore, etc. Grabbed that and hooray, it seemed to work.

Mentioned to a friend who knows Unity well and he said "Oh that shouldn't be necessary, you must have set it up wrong."
I know this is all solvable and I would have eventually figured it out. But I realized just how unpleasant I find it in the meantime. Coding as chicken sacrifices / chewing gum / bailing wire makes my skin crawl.
This reinforces my preference for code reuse via *modules*, not *engines.* I'm not really going to write a new math lib, because they exist and are easily understood with clean interfaces. This is the @radgametools approach I've always loved.

I want to type my own main loop.
I'll admit, though: It bothers me that I'm this way. I wish I had the discipline to power through all the time in uncertainty and half-understanding, because I know I'd get the thing done faster.

At some point you just have to call it and work with what you got, though.
You can follow @bhsharp.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: