Gorgon - Why would you do something so stupid?

So, paulatreus asked me to give my thoughts on writing Gorgon. Normally I think about Hentai drawn by voodooraze. But I guess I'll give some bullshit about Gorgon instead...

[deleted] 1442714416

In the beginning

So, the sorted history of Gorgon began back when I was a young lad. 738 years ago, in 2000/2001 AD - The time of reckoning.  

After the climatic battle at Omicron Persei VIII, I decided to dig into Direct X 8. They had those fancy new vertex/pixel shaders, and I wanted to learn. Of course, I didn't have a video card that supported that.

Now, what you have to remember is that in those days people wore an onion on their belt, which was the style at the time... And prior to that time I had messed aboot with Direct X 3, 5, 6 and 7. There was no 4, the number 4 being illegal at the time... But I never really did anything serious.

So, I started down my path with DX8 and Delphi. Yes. Delphi. No, fuck off. You heard me.... So where was I? Yes, writing DX8 in Delphi. Yes. Delphi. No, fuck off... Anyway the first thing I realized was that there was a stupid amount of boilerplate to get it up and running (looking at D3D 12 now, boy was I ever a goddamn wimp...) and I decided to set about writing an streamlined API to utilize DirectX 8. Up until then I only tried to write games. I figured I'd become a rockstar game developer and amateur porn enthusiast. So I figured why not write an API (or engine or whatever kids call it these days) and make a game with that. What could go wrong?

Why Delphi? Are you fucking stupid? - The answer is because I was using it for the contract gig I had at the time and I needed to know it better, and the other answer is yes.

It turns out... nothing. After 99 hours of excruciating labour, Gorgon was born. I had it rendering 3D models, using multi-texture support, linear algebra, and so on. My next goal was to put in skeletal animation. And then, I said, fuck it, that's too hard. And also I was trying to find a jerb because of the Dot Bomb. That kind of took priority I guess.

Another kick at the can

When I became gainfully employed and was throwin' dolla billz around like the baller player I'm not, I decided to take another crack at it.  Direct X 9 had come out by then and I said "I'm hungry. Pizza?" and then I said "How many fists can she actually get up there?" and then I said "I would rather take a heated hair curler up my ass than use Delphi again" (ironically, I have my current job because I know that abortion of a language). So, I started rewriting it in C++ which I was pretty familiar with and also I was a complete language snob.

I got a nice window management system in place first, since Visual C++ lacked anything worthwhile, and then built up a pretty decent little API that could set up D3D in a few lines of code, load models, perform animations, etc... Again, I got stuck on skeletal animation and gave up after a botched attempt because I had better things to do like being cool.

Crushing the can out of rage

In 2005, I moved to another province (yes, I'm Canadian, and therefore superior) for a new job. I didn't really know anyone here, so I decided to learn this new fangled language that Microsoft had put out, knowing full well that it was a fad and no one would ever use it: C#. And I was right. 

I was impressed, and I thought, why not try to make something with Direct 3D in it. I mean, it's fucking Microsoft, surely I can access DirectX from C# right? Of course they'd have support for it right? VB6 had support for it! So why not C#? But of fucking course they didn't. I was dejected and gave up for the night. But, and jokes aside, not a word of a lie, the very next day MDX (Managed DirectX) appeared. 

So armed with this, I started to learn C# using MDX. I thought, well, since this is for C# the code should be a little cleaner/simpler to set up. Hell no. Of course it wasn't. So, again I started on the next iteration of Gorgon. I set up a quick and dirty API for 2D just to get a feel for what I was trying to do. I soon realized I was doing everything pretty much wrong (used to C++, not at all used to a managed language) so I scrapped that prototype when I felt confident in my C# abilities and started on the 3D crap again.  I had gotten something fairly decent up and running, but I was getting burnt out again. So, I went out and got a life.

I'm almost done, I promise

About a year later I decided to revisit the damned thing. And stripped down my previous code to the bare minimum and said "fuck this 3D noise, I hate it. Unreal is DEFINITELY better than Quake." 

So I started doing a 2D API that utilized hardware acceleration to do things that I couldn't do back in the days of DOS. Of course, this was the very first version of Gorgon that was finished, v1.0. 

I adjusted my onion and got to work. However, I realized very quickly that my learning from prototypes I created in the past would not cut it due to being horribly unoptimized. I was certainly not used to rendering 2D stuff using Direct 3D, I was an old grouchy fuck that did 2D work in DOS. With pointers. And bitmaps. And A000:0000 goddamnit!  But this way of working with graphics doesn't fly too well on a GPU. So, I did a lot of reading, and figured out that I needed to draw my sprites using a dynamic vertex buffer that would constantly be updated as a new sprite was drawn rather than issuing a draw call per sprite.

This allowed me to begin understanding just how GPUs work. They work by wishful thinking and magic of course. I built up a system that checked for redundant state changes, and kept pumping... long... and hard... triangles into the dynamic vertex buffer until a state change appeared.  This made rendering extremely fast.  I was blitting thousands of sprites using alpha blending and the like at stupid frame rates.

I'm done.

And that's it.  That's how it started. That was my reasoning for doing it: I'm lazy. And fat. And lazy. And repetitive.

Now I can't stop working on it. It's grown from that first version significantly. And it's threatening my family. Please. God. Kill it before it ends us all!

From The Chatty
Hello, Meet Lola