How I Started Programming (Part One of Two)
A campfire story-time with Trent on learning C++ in Kalkaska, Michigan.
Doing a merge of a major version change in Epic’s Unreal Engine codebase — especially one where every source file has its copyright data change from 2017 to 2018 (which is, for some reason, a confusing thing to Git) — is somewhat of a time-consuming process. For the most part, I’ve gotten these merges down to about four-six hours, but the update to 4.19, which is still in preview form but this was a good time to make the majority of the merge happen, has been somewhat of a nightmare. Sometimes I work on things like Joy Create or play around with some other potentially useful tool, but generally I stay around my computer as errors come up mid-build which need to be addressed and then I do a full rebuild to make sure nothing else gets missed amidst the merge conflict resolutions. It’s a whole thing.
Right now, the fixes I’m making are a bit too much to fully engross myself in a another brain-utilizing task, and writing is somewhat of a mindless task that I can jump back-and-forth from, so it works out well. So, here’s the first of a two-part story about “how I started programming”. Part Two will focus more on post high school happenings that led to my first job as a professional game developer and, as a result, how I got into design, art, direction/production, and then starting a company. Though everything after getting that first job will be more of a summary as it’s been covered elsewhere. I think. If not, some day a part three may exist.
Disclaimer: If you think my average article goes into tangents here and there, this is essentially going to be that occasional tangent being let off its leash and running free, so… be warned?
Until then: ORIGIN STORY!
Kalkaska, Michigan
The One-Room Schoolhouse
I moved all around Michigan growing up. I went to, roughly, six schools before we moved to Kalkaska. And this is the school that I started at once we moved:
Yup. That’s a one-room schoolhouse. And that picture was probably taken in April or May, because there’s not nearly enough snow for it to be the dead of winter. That school was Kindergarten through Eighth Grade. It had a total of, I believe, 28–30 kids, and two teachers. It was split down the middle with K-4 on one side and 5–8 on the other side.
I don’t know if you’ve (yeah, you) were ever educated at a one-room schoolhouse, but in case you weren’t born in the early twentieth century, I’ll assume you weren’t. Here’s the thing: it’s really hard for one teacher to educate four different grades across a number of subjects across any given day. It’s an organizational nightmare but, also, every grade is a completely different age than others, which means you had all these vastly different maturity levels and mindsets as they’re somewhat formative years for kids. That said, the teachers did an incredibly admirable job (I obviously say this in retrospect) of starting out with the intention of keeping each grade in its own grade-appropriate realm.
That doesn’t last. Some subjects stayed segregated… Well, basically just math. And math was only separate most of the time. I didn’t learn about long division until I switched to a larger public school (Kalkaska Middle School) after two years at the one-room schoolhouse. The other subjects, however, were generally taught to all grades simultaneously with what I now assume was different grading criteria. Or maybe not. Actually, now that I think about it, I’m pretty sure it wasn’t, because all my friends were in higher grades and we all had the same papers and if we got less than an A/A- it was generally for the same reasoning. Also: much like long division, grammar — like, as a whole — was just something I missed out on completely as an instructed topic. But, literature was all eight-grade level, so I unintentionally got the gist of the whole grammar thing unless I was explicitly asked about mechanics (hellooooo middle school english tests).
The educational “model” wasn’t the only thing that was bizarre. I don’t know if this is just a thing, but if you’re a fifth grade boy who gets “asked out” by an eight-grade girl, is it as confusing as it was to me? I mean, I felt kind of bad for the other guys (or guy, singular, for the eighth graders) that a fifth-grader was a preferred option. But, let’s be honest, I didn’t feel that bad. Regardless, a pretty girl telling you that she likes you is just wonderful no matter what the circumstance. That’s not to say I had the slightest clue what was going on; the previous girl that liked me was in fourth grade and showed it by knocking on my head and saying it sounded hollow and, from then on, calling me “hollow head”. So, it was different.
QBasic
I was under the age of sixteen at this time (obviously), so I still had mandated monthly visits with my biological father. The Polack side of my lineage was always a lot more into tech and computers and hardware than my mother’s side. I basically remember those visits as being sent to arcades at bars (parenting!), playing Quake with my cousin (which blew my mind because it wasn’t running over a 28K modem and, eventually, it became GLQuake which was even more mindblowing), and one day… My cousin introducing me to some stuff he found one day made using QBasic. He showed me a bit of simple things that he could do within existing samples and it was neat.
When I got home after that visit, QBasic was my goddamn jam. It occupied me for, at the very least, a solid year. I once made a screen-filling ASCII sword animating down from the top of the screen. And I did it exactly like a kid with no internet access would do such a thing: copy-and-pasting the text that was printed over and over and over and over and changing the contents of each to fit the desired “animation”.
There was also the ability to play sound at system-level frequency values. This, I’m sure, was a beloved feature of my parents’ given that I was using the family computer.
Anyway, it was all basically text-based, choose-your-own-adventure games (though I may have managed to make a very bad version of Pong once), but it was my first time ever programming. I “learned” HTML a year later — this is a very rough timeline — which was neat for approximately 48 hours (not a rough time estimate).
Time Passes…
First Job: Bag Boy (i.e. Janitor, Bagger, Cart Wrangler). Also C++
The summer after my freshman year of high school, I got my first job. It probably would have been sooner, but it wasn’t legal until that point. I became a bag boy for a local grocery store. I thought this meant I’d be bagging groceries. And I was. I was also basically there to do whatever other people didn’t want to do. Which was fine by me; it turns out that I didn’t hate working as much as adults made it sound like I would. And at times it was entertaining to be the bag boy that was called into the back office to fix computer problems managers and such were having. And while I can’t remember his position in the hierarchy (it was high-ish), one day I had to help a guy get his mouse working. By, you know, plugging it into the computer.
Oh, for reference, something I glossed over in the previous intermission was that Michigan had passed “School of Choice” and after my sixth-grade year was done, I transferred to a more conventional public school system. Which was initially a culture shock, but it was also wonderful to have more than one other person in my grade (and that one person was mean too). This becomes relevant.
That summer I was getting bored. My parents greatly limited the allowed time I had per-day to play video games and I only ever had take-home schoolwork to do every couple of weeks at most (I had to go to school an hour and a half or so before it started, so if I did have anything to do, it was done then) and… Well, I was about post-freshman/pre-sophomore, didn’t have a car, and the nearest house was about two or three miles away from ours. The nearest friend was further. I needed something to do.
Being that I was now a contributing member of a capitalist society, I used some of the early money from the bag boy gig — we didn’t exactly make the big dollarmoneys — to buy the absolute biggest rip-off I’ve ever been a part of. Or at least on the receiving end of. A $300 computer that was not great, but it was a computer. At least that’s how it was advertised. It was more like a computer case with miscellaneous parts inside, but one or two were missing and the others didn’t work anyway. So. Shit. If you sold a computer to a kid via eBay back in 2000, you better have done your, like, one-hundred hail marys or whatever it takes (I was Catholic then, I’m being consistent here).
Learning C++
Along with that computer, though, I also bought a book on C++ (it was the third-edition then) because that’s what a google search told me is the programming language that people use to make video games. Google, thankfully, did not lie to fourteen-year-old Trent Polack, but it did neglect to mention that compared to, say, QBasic: C++ was somewhat more… Challenging.
I can’t remember what I used as a compiler; I know it wasn’t Visual Studio, because I didn’t get that until someone bought me a copy for a book I was writing on terrain rendering a few years later (thanks, by the way, André). It wasn’t what you crazy kids use now, that’s for sure.
But that was how my summer of 2010 went from then on out: go to bag groceries, learn why customers are not always right, go home, play my allotted video game time, and then plow through C++ lessons.
Until…
Pointers in C++
Yup, yeah. Yup. Nope. I tried the chapter three or four times and while I syntactically could reproduce the desired results, I could not practically understand what pointers were. School was also starting back up soon, and that means I had to face the music on something I had been somewhat neglecting all summer: the girl I was “going out with” that I never made an attempt to meet up with.
Pointers, and the rest of C++, took a backseat for many, many months.
Michigan History Class (or: the Cross Country Catalyst)
The first semester of my high school sophomore year was just awful (as was my sophomore year of college, coincidentally). For one thing, I thought taking a class on Michigan History would be fun. It was not only not fun, but it was so boring that even listening to the teacher didn’t leave a lasting memory. I bombed my first test in the class. I wasn’t a great student in terms of, say, being quiet or listening or doing all of my homework or participating in school activities (though I did do drama class and after-school drama production things) — but I did get very good grades always. Bombing a test, even if I absolutely deserved to do poorly on it, meant I had to take drastic action.
You see, the Michigan History teacher was also the coach of the school’s Cross Country team. And the only reason I knew that was because a majority of my friends were on the team. The season had started about three-four weeks prior to my actions that follow, but: I joined the team, saying “I want to show more school spirit and get involved and my friends finally talked me into it. “ You know. Like a liar. Given that the actual answer was “I want to be on the team so you’ll be more lenient on my grading in that class I hate”, but I figured that wouldn’t go over as well. And, by the way, I am not a runner, I don’t have the frame of a runner (when I was borderline-anorexic-looking, I still didn’t look like a distance runner), I have asthma. Oh, and I don’t like running. I dislike running so much that, unlike an expression that most people use, I won’t even run from people chasing me, I’d rather either win the fight or take the beating (or get shot/stabbed? what’s even the story with the chase thing?).
What matters, though: it worked. The class was still incredibly boring, but I was given more leeway in the degree to which I slacked off. At some point, I got a calculator: a TI-86. This thing:
And it did numbers and such just fine and all that. One day in Michigan History, I discovered that you could use BASIC to write simple programs on the calculator. So, how did I get through Michigan History class with a B+? I made a turn-based RPG in BASIC on a TI-86. And, thanks to the internet, you can still see that it was a thing that existed (you can apparently download a ZIP file and I hope to god that you cannot see the source; I’m too afraid to even check) with an astounding rating of 3/10, which I’m actually okay with considering I had to learn about Fort Detroit being taken over by the British during the Seven Years’ War while working on the thing. Anyway, a GIF:
After doing that, I got that whole programming-is-kind-of-neat feeling back; it was challenging and that was a thing profoundly lacking throughout high school. That feeling resulted in this: one day, after the final and absolutely most grueling cross country event of the season. Well, final one at least for me; when you continuously place within the last ten places of a race, you don’t usually go to finals (for reasons I can’t remember, I almost did have to go, which was terrifying). Anyway I got so stuck on that horror of having to run in the regional finals that I lost the important point here:
I got home that day and just picked the C++ book up in my stupor, started the chapter on pointers and… For some reason that’s when it made sense. So, after that, I just kept going.
GameDev.net
It’s amazing to me that GameDev.net is still around, but it’s definitely not the same one I grew up with; the ownership has changed over the years and it’s become a thin shadow of its former self, to say the least. But back in the day, with the original crew: it was great. I read the forums a lot, learned things, then did what you do when you’re stupid: start a thread putting together a “team” and make an ambitious RPG. This lasted about two days, but I ended up making my first C++ game as a text-based evolution of the TI-86 game and called it… Wait for it… ARENA: Evolution (the site that had it, fortunately, no longer exists).
After that, I got Tricks of the Windows Game Programming Gurus (first edition), and I learned about Win32 and DirectX 6.0 and all that jazz. It wasn’t until years later that I actually understood what COM was, I just gave up trying to understand it at the time (after many attempts at figuring it out).
All along the way, though, I stayed an active community member of GameDev.net. I eventually moderated forums, helped run the IRC channel, and, years and years later, wrote a smarmy daily news round-up on their front page every night following the work day of my FIRST PROFESSIONAL GAME DEVELOPMENT JOB. And my COO for Joy Machine was a staff members for GameDev.net back in the day. I also think I drunkenly kissed its cofounder, Dave, on the forehead at GDC this past year, but I can’t guarantee that. I also have a few friends that are now in my private slack server, so… Some things don’t really change.
Upon Getting Into 3D Programming
Ultimately, I switched to OpenGL for rendering, got into 3D, and for some reason decided to focus heavily on particle systems and terrain rendering. Particle systems, looking back, are an incredibly obvious choice of a thing to work on (I was contracting as a VFX artist on Crowfall for a while setting up their VFX pipeline for use with the ever-wonderful PopcornFX).
Terrain programming, though, I still don’t understand. It just became a thing that I liked doing and researching and getting better and better at.
Naturally, what followed at some point after my fascination with those things, I was asked to write two chapters for a book as a result of my friends at GameDev.net recommending me to the Series Editor: André LaMothe (same guy mentioned earlier and also the author of the second programming book I mentioned: Tricks of the Windows Game Programming Gurus).
So, when people tell you it’s a small industry: it’s a really small industry. And, despite the growth over time, it remains as such.
I wrote the two book chapters. I felt real special. Then I was asked to write my own “Focus On…” book that André and I had a call to talk about what topic would be a best-fit for me. It ended up being terrain programming. So, that’s what the book was about. Focus on 3D Terrain Programming came out in 2003 (I think I finished it three-five months earlier than that). It, actually, came out the same day as the first night of our three-night play: The Hobbit, in which I was Bilbo. So the media that came and interviewed “the local high-school programming author” at school that day (I promised the publisher I’d do any requests for those things, but each one was more embarrassing than the last; and one got picked up by some news organization nation-wide, but I don’t think it was ever in print, just on sites) got to get two things in one interview: a teenager that wrote a book about 3D programming and how that same teenager was also the tallest cast member of Kalkaska High School’s production of The Hobbit… Playing the hobbit, Bilbo. I’d say there aren’t pictures, but there are, I just don’t think they are online.
After that, I started and was never able to finish a second project with that same publisher and also published a chapter on terrain rendering in Jeff Lander’s Graphics Programming Methods (structured like the Game Programming Gems books; each author having one chapter for one topic). I can’t believe I’m volunteering this link, but here is likely the only preserved thing I wrote about it.
I also just discovered while searching for that link that Gamasutra actually published a very positive review of the book. Which is the only press I’ve seen on the book since it was published. I’m not rolling in a dollar-pool filled with royalties, in case you’re wondering.
Coming in Part Two: Why I Quit Programming
… Nope, I think the header works as an ending pretty well.