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.
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.
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& #39;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& #39;t fully understand.
Here& #39;s an example:
Here& #39;s an example:
I wanted to just write C++ code for my app. So I thought I& #39;d use Unity& #39;s native plugin API to push control into a C++ DLL and do all my stuff there.
Docs are pretty light and I couldn& #39;t find good examples. I decided to use the style where you call in from C# script code...
Docs are pretty light and I couldn& #39;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& #39;t rebuild the DLL with the Unity editor running because it kept it loaded. So I googled that..
Except I couldn& #39;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& #39;t be necessary, you must have set it up wrong."
Mentioned to a friend who knows Unity well and he said "Oh that shouldn& #39;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& #39;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& #39;ve always loved.
I want to type my own main loop.
I want to type my own main loop.