OpenAL: an object-oriented approach

in Game Programming, OpenAL

We have already discussed several topics related to OpenAL. This week we will investigate how we can structure the concepts of OpenAL to fit nicely with the object oriented paradigm, so we can write elegant C# code to play sounds and manage sound effects.

In this post we will quickly go over the three main concepts of OpenAL as discussed in my introduction post: listeners, sources, and buffers. In addition, we will also introduce a type for sound data, which comes in handy for sound effect management.

Managing a library of sound effects

in Game Programming, OpenAL

Last time we stepped through the process of loading and playing a sound using OpenAL. In the example we only played a single sound once. In practical applications, in particular games, will have a larger set of sounds they use, and they will be playing these sounds multiple times. They might even play the same sound multiple times simultaneously.

In this post we are going to look at managing a larger set of sound effects.

Random dungeon generation

in Game Programming

Last weekend was spent on creating a game in 48 hours for the Ludum Dare. The final results can be found here. In this post I will highlight on of the techniques I used during the game jam: random dungeon generation.

Orbital physics for games

in Game Programming

Space, the final frontier and a recurring theme in games. The funny thing about space is that things rarely move in a straight line – then again, that all depends on your reference point. Gravity – and in particular orbital physics – forms an important aspect when it comes to movement in space. Many space games include some form of orbital mechanics or even depend on them as gameplay mechanic.

In this post I will talk how orbits in games can be implemented. In particular we will tackle some non-trivial orbits. This post will be very goal-focussed, and we will only discuss the underlying mathematics minimally, since it is primarily aimed to provide an easy reference to implement orbits yourself.