My Thoughts on The Essential Shape of Games Part 1: What is the Essential Shape of a Game?

My quest for an MMO is leading me down all sorts of interesting avenues, most recently Libaudioverse and self-taught digital signal processing. While Libaudioverse is my top priority project at the moment, I am still devoting a non-negligible amount of thought to some core issues with game programming.

One of these is how one might go about making a game system that has three essential properties: network friendliness, developer friendliness, and flexibility. Spurred on by a design pattern called the Entity Component System, my brain began to generate ideas specifically aimed at MMOs, and for a while it seemed that an Entity Component System was the silver bullet. But I no longer think it is, at least not by itself.

And I wasn't even asking the right question. The question I should have been asking is this: leaving aside network issues for the moment, is there some structure that seems to encapsulate most or all games? The answer seems to be possibly, but I have yet to implement it.

Herein I share my thoughts on what the structure might be. Part 2 defines the problem in terms of an MMO and part 3 will talk about the options for actually getting this up and running. But first, we need to define the structure.

Read more…

Thoughts On C++

I've been refactoring Libaudioverse for the last little while. Specifically, I've been making it C++11. The last time I looked at it, C++11 was this theoretically nice thing as far as I was concerned: if you were anywhere but windows, you could use it no problem. Otherwise, hello Boost and really long compile times. VC++ 2013 changed that. The refactor to Libaudioverse shall shortly be completed (I've got maybe 4 more hours of work). C++11 is solely responsible for a lot of headache-saving, both now and in future. C++11 has changed my opinion of the language. Here's what got me to go from "this is revolting" to "this isn't really my favorite, but it gets the job done when speed really does count". I spent a great deal of time looking at alternatives for projects that need native code. In so far as I can tell, C++ has a huge amount of libraries and is the only option that runs on everything.

Read more…

Some Quick Notes on This Site

Here's just a quick couple things that you ought to know.

First, the comment system has accessibility issues. I am working on this, but the solutions are all suboptimal and it's going to take time. I will see e-mails if you comment. This is hitting NVDA and Firefox the hardest: that combination can't comment, at all. I need to open discussion with Disqus about this as they claim NVDA and Firefox are supported; failing that, I will probably need to write my own or move to WordPress. I can probably get something together, but it's going to take time. For the record, I did manage to comment using NVDA and Firefox when I originally set it up; it has apparently broken since.

Secondly, this blog is set up for MathJax. I'm going to tell you how you view MathJax accessibly in what will probably be the first article in an articles section. It can be done and does not involve MathPlayer. I could use inline LaTeX, but I wish to actually have it look like math; also, the procedure that will work for this web site will work for a miriad of others, not least of which is Stackoverflow. The "official" solutions we're supposed to be using don't work. Specifically why this is the case, and what isn't being done is the discussion of another post.

Python: 2D Rotation and Scaling in Less Than 1 KB

This code isn't super complicated, but has the potential to be quite useful and also quite fast. For those wondering why it works, see complex numbers on Wikipedia. The specific section of interest is "multiplication and division in polar form." I cannot yet produce the formulas heere as I have just realized I have no support for LaTeX and, because of the poor state of math accessibility everywheree, I need to find one that preserves the LaTeX as alt text.

Anyhow, here's the actual code itself:

"""2D transformation library.
Vectors are tuples: (x, y).
Make_rotation takes an angle in degrees, returning a transform that can rotate a vector by degrees.  Negative values are allowed.
Make_scale returns a transform that scales a vector's magnitude.
Multiplying transformations produces a transform that does everything as if they had all been applied separately.
Call apply_transformation to actually use your transform.  Transforms are valid forever.

from math import sin, cos, pi

def make_rotation(degrees):
    rads = degrees/180.0*pi
    return cos(rads)+sin(rads)*1j

#for clarity
def make_scale(factor):
    return factor

def apply_transform(vector, transform):
    result = (vector[0]+vector[1]*1j)*transform
    return result.real, result.imag