Proportion November Update

Zakary Strange Dec. 1, 2016, 8:02 p.m.
Hello everyone, time for the monthly update! So, since last month I have not made much progress as I had HandmadeCon, and when I came back I was sick, but I still did a little bit of work! So throughout the last month I laid the entire windows platform layer, part of the Linux platform layer (because I was really tired of windows shit), and created the Renderer PushCommand system.

The Windows platform layer creates an OpenGL context, processes input from the keyboard, mouse, Xbox and PlayStation 3 & 4 controllers, creates an audio buffer to send to the game layer for mixing, creates a RenderBuffer to send to the game layer, processes render commands sent from the game layer and renders them via OpenGL. With all of these things I will call the Windows platform layer done for the time being.

The Linux platform layer currently just creates a window with an OpenGL context and processes render commands. So audio and input still need to be done before this is a usable platform.

A few cool things I did in the platform layer consist of:
  1. The executable and DLL both building without linking against the CRT
  2. Listening for buffer under runs and buffer overflows
  3. Restoring to a previous dll if the currently running dll crashes
  4. Switching audio output devices if you set a new default output device in the windows mixer
  5. hot-reloadable:
    • game code
    • controllers (so you don't have to restart the game when you plug a controller in, like you have to in most game)
    • shaders
    • textures

No CRT
A few notes on not linking against the CRT, as it might be interesting to some programmers.

To figure out how to just compile without the CRT I followed @mmozeiko's guide. Once I got it compiling I needed a few math functions – Sin, Cos, Exp and Log – so I could get HandmadeMath building without the CRT. As I really didn't feel like writing all of these I found a great piece of code online which had all of these written for me in SSE2 under the ZLIB license! So I took that and modified it, removing all of the stuff I didn't care about, then had HandmadeMath call those functions instead. And everything just worked!

Ah finally, since we are over all of the stuff I have done, time to talk about the stuff I'm working on now. Right now I am writing my own snprintf. As of last night I am parsing the format correctly according to the specification, and am now going through and inserting the data where it is needed. Overall this has been pretty easy so far, but I think that is mainly because I have not handled floating point numbers. However, I am prepared to handle them thanks to this paper which seems to have a nice way of doing it, so I plan on following that paper after I finish handling all of the format arguments that are not floating point.

Next month I will start streaming development on Proportion and hopefully I will have something to show. But that's all for now, folks! See ya in the next blog post!
2 comments

Proportion update

Zakary Strange Nov. 3, 2016, 12:23 a.m.
Hello Everyone!

I've been meaning to write this for a while, but have been so busy with work that I just have not had time. Since we released Alpha 8 of Squad yesterday, I finally have a bit of time today.

So here is the deal with Proportion. While I was looking for a job a few months ago I went full time job hunting, giving me no time to work on Proportion. Then when got a job we were in sprint mode trying to finish off Alpha 8 for release. Basically all around I just had no time at all. Excuses aside, a few weeks ago I took a look at the Proportion codebase after not having touched it for almost three months and released that, honestly, it is a mess. So I started to tear through it and as I went through it a lot of what was going through my mind was, "This is not how I write code anymore". At that moment I decided it was time to restart and program this game the way I like to program now. So I fired up my stream a few days ago and started work on the platform later. You can find the VoD here.

With this announcement of the restart on the project I will be going back to the original release cycle I wanted to do the first time. Which means my Patreon backers will get a build of Proportion every 15th and 30th of the month (starting in January after the madness that we call the Holiday season is over). For the first few months I really can't promise much besides just basic systems being implemented, but with this you will get to experience the evolution of the game from start to finish.

That's it for this update. If you have any questions don't hesitate to ask!

You can back me on Patreon here.

Edit: Also this is an open invite to anyone, if anyone wants to work on this with me i love to have a helper :)
0 comments