So a couple of weeks ago now Epic released the Unreal Development Kit and lots of people rushed to download it (some 50,000 apparently).
They all then rushed to the forums to ask how you make a game.
Fortunately I’m an old hand with Unreal, starting back in 2000 modding Deus Ex and then progressing pretty much hand in hand with the engine through each version to the current one often being paid for the pleasure. I’m one of the few people in the world who can say they have worked with every version of Unreal that doesn’t work for Epic.
So rather than rush to forums asking how to make games I just made a game.
BEHOLD! One short weekend of fiddling with UDK later and I have something that can be very loosely called a game…
Ok so it’s a ball that rolls around a simple level collecting glowy yellow things.
More beneath the cut…
If I’m honest I spent more time fiddling with particle effects and lighting than I did actually writing code. Some people liken it to Pacman, other mention Marble Madness. At this point I didn’t really have any plans of what I was going to make and was really just poking the code to get something to happen with a minimum of effort.
However as more people encountered my little endeavour I was encouraged to maybe make something a bit more interesting.
Here is my list of restrictions that I’m bound by:
- Project can only use content that I can create myself.
- Project must support online multiplayer.
- Project should epitomise Systemic Game Design.
With this in mind I decided to expand on the physics theme and spent a few hours on monday and tuesday implementing support for buoyancy (which PhysX doesn’t support out of the box) and fiddling around with Fluid Surfaces.
It’s during this phase that I relise how lucky I am to be an Unreal Developer by day as I stumble across one of the more annoying features: The C++ Black Box.
UDK doesn’t give you the C++ source code. This means that there are times when the engine is doing something that doesn’t make sense and has disappeared into the Black Box of Native code. In this case it was the calculation of a physics objects mass.
This means that some constants and formulas are locked up beyond the prying eyes of the UDK programmer.
To cut a long story short however it turns out that Mass in Unreal is calculated as:
(Volume x Density)^0.75 x MassScale
The argument being that it reduces the difference between small and large objects because PhysX behaves funny when you have wildly different Masses involved.
Whatever the formula though so long as you know what it is you can at least be sure your simulation is internally consistent even if it isn’t a 100% accurate recreation of the real world.
With this version I change the Balls physics to apply Torque rather than an impulse which gives a more satisfying and “Physicsy” feel and even allows the ball to climb walls a little (hurrah for friction!).
So far however I’m still just playing around with tech and not really concentrating on the “Game” part. I have vague ideas involving fire, wind and fracture meshes. I also have an idea for making enemy cubes that stomp around the map but it’s early days yet.
Watch this space.