Tuesday, July 10, 2012

SB Engine


The Intro


I’ve decided that I want to develop a game for multiple platforms.  That decision came over time, let’s take a look at its evolution.

First, I needed to develop a prototype.  This was for a class and the prototype had to be in XNA.  I ended up creating a space combat prototype.  It was tons of fun, though it deviated a lot from the initial design.  It ended up as a game in which you would mine an asteroid during a ‘rest’ period and then fight off a wave of enemies followed by another rest period.  The asteroid mining would give you some resource which you could upgrade your ship with.  As a prototype it is great, as a game it is obviously lacking.  I’ll talk more about the prototype (called StarBase hence the SB Engine in the title, more on that later) in another post. 

For now, all that’s important is:
A)  I liked a lot about the game and it inspired me enough to make me want to develop a different, similar game.
B)  I enjoyed creating the quad tree physics the most and it would have completely blown up the Xbox 360 without it (due mainly to a lack of multithreading.)
C)  I made a cool bloom Shader for the lasers which I’ll post about (both my implementation and what I’d do differently.)
D)  I enjoyed XNA.

For a short period of time I considered going back to C++ and making an engine mainly from scratch (I can do that because I'm a student and it'd look good.  You shouldn't do it if you want to make a game.)  I ended up dismissing the idea and went back to XNA, then I heard about PSM and decided to take the challenge of going both routes.

The Thrilling First Act


With all of this in mind I decided that I should look into extending the game; well, more starting from scratch while keeping some of the main concepts alive.  The main reason I decided to go to C# instead of C++ is that it's a lot easier to translate high level ideas into C#.  The quad tree I made would have taken a bit longer in C++ for instance, it probably would have run faster but, it would have been programmed slower.

I'll discuss the specific parts of the engine later on but, for now I'm going to talk about the cross platform nature of the Engine and what that entails.

The first step is going to be figuring out the interface of the Engine.  Some parts will not require porting: the physics for instance will be all coded by me for reasons I'll get into in another post, the Game concept class (such as GameEvent) and many other subsystems which dance the line between Engine and Game.  Some parts will need to be ported, most obviously the Input, the Graphics and the Sound.  This will require me to make an abstraction layer.

The second step will be getting a build system set up.  As fun as it is to open VS, build the XNA project then open PSSuite (based on Mono) and build the PSM project, having an automated process will make my life much, much easier.

The third step will be... Actually coding those parts.  More on that later.

It's going to be very fun.  I just hope I make it through alive.

No comments:

Post a Comment