January 8th, 2016Codeventure Time!

Yeah it is! Especially since I just realized that it’s been more than 5 years since I last took the time to get cracking on something overly complicated and wholly unnecessary for which already established and infinitely better solutions exist and have existed for just about forever! Boy, do I miss those days… And so, in order to treat myself during these trying times, I’ve decided to give OpenGL another go. And when I say another, I mean I’ve glanced at it briefly while altering a friend’s code just enough for me and my roommate to pass a uni assignment without getting caught. Which we didn’t, so I guess moving that sphere a little to the left and rendering it in wireframe did the trick.

Anyway, like any self-respecting adventure enthusiast, I’ve been following along Thimbleweed Park’s development, and right there in the beginning, Ron Gilbert talks about his choice for an engine, a 2D graphics engine of his own making with Squirrel for a scripting language. So that’s what I want to do, naturally. Write myself a basic OpenGL engine and integrate Squirrel for scripting. It’ll be exciting because of course it’ll be, and I’ll name it:

CORE

Crabman’s OpenGL Render Engine! And it will be the CORE of whatever little game I’ll make with it! I feel so clever!

Now then, I’ve been on this for almost two days, so let’s talk progress: I downloaded and installed CMake. I remembered that I don’t know what I’m doing. I downloaded and installed Visual Studio Community. I acquired GLEW, GLFW, GLM, and SOIL, some of which I had to (and managed to, yay!) compile myself. I figured out how to add and link them to the project and learned how to draw a house. You see what I meant by excitement!

Well, so far, so good. There’s a lot of stuff I recognize in there, luckily, though some of the buffers and the way to handle shader attributes confuse me a bit. We’ll see how I’ll hold up under greater challenges than a single colorful pentagon. Also, I really need to brush up on my C++. I do not understand the * and & operator. Or I sorta do, but I’m pretty sure if I wasn’t looking at example code, I’d get it wrong all the time.

Still, so far it’s a lot simpler than I feared it might be (though I’m not sure what I thought could be so difficult about connected a few vertices). It’s even a little too easy at times. Creating the window, loading an image, basically whatever these helper libraries do. I’d love to be able to do it without them, but I suspect that this really is something far too complicated for me at this point and perhaps better saved for a later date when I, again, feel the need to go a level deeper.

Thankfully, there’s other excitement waiting! Instead of obsessing over reading in PNGs manually, I applied my newfound knowledge to get and build, rebuild, rebuild again and rebuild a few thousand times more, Squirrel and Sqrat. Seriously, integrating it is again hella simple, but figuring that out, together with what those weird mismatch errors where about, took hours on end (spoiler: it was the runtime library). Anywho, pointlessly long story short, my little engine already has scripting! Hooray!

And with that, I guess there’s nothing left to do but actually build the functionality I need. Although I am still very curious about porting… But I guess having something to port might be helpful there. Something to look forward to then.

Crabman out.