Archive for category Game Programming
Cross-platform Game Engines
Posted by Joshua Smyth (Admin) in Game Programming, Programming on May 17, 2007
In my earlier post Is Crossplatform Development just a Myth? I mentioned the difficulty of creating truly cross-platform games. (And when we’re talking just Apple and Windows here, one could argue to what degree is that cross-platform anyway?) And I just covered a few api’s and programming languages. What I didn’t mention was game engines. There are definately cross-platform game engines out there, SDL, PTK, Irrlicht and Torque to name what appear to be the most popular engines avalible. Each one comes baggaged with it’s own pro’s and cons, and may or may not suit your particular needs as an indie game developer.
As I am looking into doing 2D games, but wanting to take advantage of 3D hardware acceleration PTK has recently struck my interest. I’ve yet to have a play with it myself, it’s probably going to be a couple of weeks before I get some free time to really assess it’s featureset. But it does come with a long list of finished indie titles that have used the engine. And in my opinion there is no better litmus test for a game engine than real shipped products.
While I’m at it, I’d like to point out that each of those engines have OpenGL/DirectX rendering support, which I’m now sure is a requirement if you want to have games that behave nicely on both PCs and Macs.
Is crossplatform development just a myth?
Posted by Joshua Smyth (Admin) in Game Programming, Programming on April 27, 2007
I’ve been experimenting with a couple of different APIs/languages so I can become more informed when it’s time to choose my Apple/Windows cross-platform strategy. And I’ve come to the conclusion that there really is no such thing as a truely cross-platform API.
One of the chief selling points of Java is that it’s supposed to be cross-platform. But if I want to design a UI using swing, Ok sure, its going to run on multiple platforms. But its going to be just as ugly on each of those platforms. I’ve yet to see a program written in java with a nice UI. Most of the time when I open up an app written in java, I just want to close it immediately, it just doesn’t look like it belongs on my system.
OpenGL is also supposed to be cross-platform, but its Windows support is severly lacking, requiring all kinds of extensions to get functionallity that is also dependant on having the appropriate drivers and hardware. It’s just a pain, always remember your target audience, and in this case I can’t be sure they have their drivers up to date.
SDL is a nice cross-platform library, but unfortunately it doesn’t have access to some 3D acceleration features that my project requires. If I was using straight 2D I could use it, But unfortunately it’s just not for me.
Then I thought about writing my own API abstraction layer and use DirectX for rendering on windows and OpenGL on the mac. But this would complicate the code greatly by having that extra layer in there. Then I decided, “Screw it, I’ll write the code for windows using DirectX 8.0″ (which comes installed with Windows XP) and just port it over to the Mac when it’s done. And replace the DX code with OpenGL code. That way I can assume different hardware specs and requirements on each system and program for each target machine rather than being reduced to the lowest common denominator for both platforms.
I’m still looking into it, but this seems to be the best bet so far.
What programming languages should you learn?
Posted by Joshua Smyth (Admin) in Game Programming, Programming, Uncategorized on April 8, 2007
More correctly what programming languages am *I* going to learn.
The domain of software development is huge and it’s next to impossible to learn everything. It’s even more impossible (if such a thing is possible to be more than impossible) to become a master at everything. In fact, the domain is so huge that its impossible to learn even 1% of all the new technologies / methodologies and programming languages that are out there.
So if I want to make games (and I do) this is my little list of technologies to focus on. Disclaimer: I am currently interested in writting cross-platform games for personal computers and my choice of languages and technologies reflects this. I also may be interested in programming for consoles at a later date. This list is completely different to someone who wants to do web 2.0 stuff, which just goes to show the kinds of disjoint bubbles even developer geeks live in.
C++ and OOP
Defacto standard for computer games. Even though C++ is loosing ground in other areas like the web and business apps. It remains the market leader for the bulk of commercial game dev. This is a huge language, a monster that will take many, many years to master, and it’s even bigger than that, it’s a way of thinking.
Total number of C++ books on my amazon wishlist : 7
C#
When I finish university I’m going to look for a job working in C#. If C++ is going to be the language that computer games are written in I’m predicting C# is going to be the language that the tools are written in. C# has many very nice features and is evolving nicely, the .net framework and windows forms gives programmers a large chunk of easy to use managed code to get apps up and running quickly. It’s also nice to use with DirectX and not to mention the fact the Microsoft’s XNA gamedev toolkit for the Xbox 360 uses C# as its development language.
Total number of C# books on my amazon wishlist : 6
C and Assembly
I’ve been thinking about doing some homebrew programming for the Nintendo DS and while these days if you’re programming for the PC there’s little incentive to write C code or assembly code. Modern compilers take care of all the nitty gritty for you. But if you wanna get low level with the hardware then you need to know all about your bits and bytes.
Total number of C/ASM books on my amazon wishlist : 3
LUA
Small, portable – written in ansi c, powerful, extensible and commercially proven (World of Warcraft, Baulders Gate) scripting language. I’m using lua for my current project and its just really nice. If you dont use a scripting language for your game projects you have to get one. It allows seperation of game logic with game engine code. Which makes life easier and allows people to program the game without touching the game engine (and potentially breaking it.) To program your own scripting language is not a trivial task, that’s why I recommend LUA.
Total number of LUA books on my amazon wishlist : 2
Graphics APIs : OpenGL and DirectX
You really should learn both, they are more similar than dissimilar. OpenGL is of course portible, but DX has its places – Xbox and windows, C#.
Total number of DX and OpenGL books on my amazon wishlist : 4
So thats my list, and that’s not including general computer science stuff that a game programmer should know. Data-structures, AI, Network programming etc…