Tuesday 9 December 2014

Tech Feature - Visuals and Performance

 . I wasn't using FBOs at the time so performance is not as good as it could have been

This is the first entry in my tech feature series, which will help give you a better understanding of the tech powering Legacy. Legacy is built on top of the Jenesis Engine (JE) which is written in Java. The Jenesis Engine uses an OpenGL wrapper library called JOGL to render 3D graphics.
The specific version of OpenGL being used is 3.2 Core along with GLSL 1.5. In Windows terms, this is the equivalent of DirectX 10 with Shader Model 4. This spec is fully supported across Linux, Mac OSX and Windows. If you have any GPU from Nvidia or AMD then your machine is probably capable of rendering with OpenGL 3.2. Only the most recent iterations of Intel GPUs fully implement this spec.
The following features of OpenGL are used in Legacy.
VAOs are used to render all geometry within the game. FBOs and PBOs are used in conjunction with GLSL to implement various post effects. Hardware Instancing is used to create believable “particles effects” (fire, flames, smoke).
The game is still in Alpha, and currently has 4 graphics quality presets: Ultra, High, Medium, Low. The screens below show their effect in game and their FPS at 1080p. These are the development machines specs, hardly top of the line yet more powerful than your average off the shelf PC.
  • 1GB GDDR5 AMD Radeon 5670HD
  • 4GB DD3 RAM
  • AMD Bulldozer 4100FX 3.6GHz Quad Core
  • Tested in Ubuntu 12.04 64bit on JRE 1.7_3 platform
The summary of each spec is shown below
UltraHighMediumLow
Character SpritesHighHighMediumLow
Environment SpritesHighMediumMediumLow
Particle(Instance) DensityUltraHighMediumLow
Post EffectsOnOnOffOff
Depth of FieldOnOffOffOff
BloomOnOffOffOff
Radial BlurOnOnOffOff
Sketch PaintingOnOnOffOff

Illustration 1: 1080p :: Ultra Spec :: 29 fps average

Illustration 2: 1080p :: High Spec :: 60 fps average

Illustration 3: 1080p :: Medium Spec :: 82 fps average
Illustration 4: 1080p :: Low Spec :: 88 fps average

The table below shows a summary of the results, as well as scores for a resolution of 1024 x 768.
UltraHighMediumLow
1920x108029608288
1024x76864154244264


The Ultra Specs Depth of Field effect hammers performance, though it runs at a solid 60 fps at lower resolutions. The games performance is dependent on your selected resolution and your graphics cards raw horsepower. I suspect most will play this game at 1366 x 768 up to 1680 x 1050 at High Settings. Legacy wont be released until 2013 but I don't expect drastic changes to made to the rendering tech.

I hope this brief feature gave you an idea of what to expect from the final version of Legacy. If you have any comments, queries or suggestions please feel free to comment below. Im particularly interested to hear your opinions on the scaling of its graphics presets.
Take care.

Tech Feature - Time to drop DirectX 9/OpenGL 2

Note :: Originally Published On  

In case you missed it my current game is being written in OpenGL 3, which is basically the equivalent of DirectX 10. When I made this decision in 2011 part of me was worried that Id come to regret that decision. Why? Even the most high budget mainstream games at the time were still shipping in with DirectX 9. A huge bunch of online OpenGL tutorials were based strictly on version 2.0 to boot. I was worried that I wouldn't have an audience, and that my fairly basic 2D game simply would not run on most peoples PCs.

Fast forward 2 years however, and Im glad I made the investment, glad I ported my code to JOGL, glad I wrote those darn matrices all by myself. Both the PlayStation 4 and XBox One are launching later this year. Both of those systems have DirectX 11 level graphics hardware. Even the weaker Wii Us GPU is based on DirectX10.1 level hardware.

OpenGL 3
OpenGL 3


In the PC space most peoples machines are more than capable of supporting OpenGL 3.0. According to Unitys Web Player stats [link] as of 25th August 2013, DX10 accounts for 51.8% of users GPUs while DX11 accounts for 23.8%. Given that DX11 supersedes DX10, the actual amount of DX10/GL3 capable hardware is 75.6%, assuming their OS supports it.
The same is similar for the Unity Editor [link] as well, with DX11 accounting for 49.4% and DX10 for 41.7% for a total of 91% DX10/GL3 ready hardware. Steams hardware stats [link] arent far off either, with 26.47% DX10/GL3 and 62.21% are DX11/GL4, a total of 88.68% DX10 capable hardware. This will only increase as the rest of the 8th generation gaming consoles finally launch and time goes by.

Powered by OpenGL 3.2
Powered by OpenGL 3.2



If you plan on, or are already developing a game, I highly recommend using DX10 or GL3 as your rendering API. Most systems already support it and you'll be able to take advantage of many optimizations as well as implement several graphical enhancements. Furthermore, both APIs can be seamlessly upgraded to DX11/GL4 in a few years time, versus inevitably having to rewrite from scratch if you insist on sticking with GL2/DX9.

If you don't plan on making the jump, I'd love to know the reasons why. Please feel free to comment below. Cheers