Leadwerks Company Blog

  • entries
  • comments
  • views

About this blog

Entries in this blog


I have proven beyond a shadow of a doubt that I am very bad at shipping posters.  The Winter Game Tournament was completed in January and I have yet to deliver your prizes.  If you have a job opening for someone to ship prizes, or to ship anything at all, I am probably the worst candidate you could ever hope to find to fill said position.  Seriously.

Part of the problem (although it's still not an excuse) has been that it is actually incredibly difficult to have custom USB keychains made.  These took a long time because my description of black monochrome printing with the text vertical aligned was too apparently too complicated.


The first proof I got used a beautiful white-on-silver-so-light-it's-practically-white color scheme.


The second attempt's failure was slightly more subtle.  Slightly.  Is it just me, or does the logo obviously beg to be centered by the vertical center of the text, instead of the image dimensions?  Is this really that hard?:


At this point I was all like:


So I drew them a picture of something that to me seemed extremely obvious.  Finally, I got the corrected proof of our glorious USB keychain and have authorized a limited production of this one-of-a-kind item.  I will give props to the graphics designer for choosing the dark gray (subtle blue?) print color, which is much better than #000000:


All I wanted was a little taste in design.

So here's what I am going to do.  Each entrant in the Winter Games Tournament will receive one limited-edition poster, with one limited-edition Leadwerks USB keychain inside the poster tube, plus one Leadwerks sticker (which I have a ton of).  Because of the delay and the fact that I suck at shipping prizes, I am bumping up the 4GB USB drive to a whopping 16GB.  That's four times the jigglebytes, and enough to back up the entire Leadwerks.com website on.

In other news, the acquisition of American Apparel by Gilden Activewear has actually affected our supply chain for the fabulous Leadwerks line of clothing.  The official Leadwerks hoodie in our signature gray color is currently only available in sizes small and extra small.


I contacted SpreadShirt.com about the matter and received the following explanation:


Hello Josh,

Thank you for your email.

Unfortunately this item is currently out of stock in some sizes and colors.

Our product manager has not informed us of when more stock will be arriving as the company American Apparel is currently going through a transition phase while ownership is transferred to the brand Gildan.

The sizes and colors will be available online again once we've received the stock from the new supplier.

Please feel free to contact us if you have any further questions.


Customer Service

The first and most pertinent question is why is the little mermaid working in customer service for SpreadShirt?


The second question is when will the official Leadwerks hoodie become available again?  The garment can be gotten in other colors, but I do not feel that any of these less appealing colors adequately represent the brand of our game engine.  This is most distressing and I will continue to look for a solution.

The 2017 Summer Game Tournament will proceed once I have shipped the prizes out from the previous tournament.  However, as I have proven that I am not a reliable shipper of prizes, the tournament is going back to our original prizeless model.  A roundup of entries from all game developers will be posted at the end and fun will be had by all.


Leadwerks 4.x will see a few more releases, each remaining backwards compatible with previous versions.  Leadwerks 5.0 is the point where we will introduce changes that break compatibility with previous versions.  The changes will support a faster design that relies more on multi-threading, updates to take advantage of C++11 features, and better support for non-English speaking users worldwide.  Changes are limited to code; all asset files including models, maps, shaders, textures, and materials will continue to be backwards-compatible.

Let's take a look at some of the new stuff.

Shared Pointers
C++11 shared pointers eliminate the need for manual reference counting.  Using the auto keyword will make it easier to update Leadwerks 4 code when version 5 arrives.  You can read more about the use of shared pointers in Leadwerks 5 here.

Unicode Support
To support the entire world's languages, Leadwerks 5 will make use of Unicode everywhere.  All std::string variables will be replaced by std::wstring.  Lua will be updated to the latest version 5.3.  This is not compatible with LuaJIT, but the main developer has left the LuaJIT project and it is time to move on.  Script execution time is not a bottleneck, Leadwerks 5 gains a much longer window of time for your game code to run, and I don't recommend people build complex VR games in Lua.  So I think it is time to update.

Elimination of Bound Globals
To assist with multithreaded programming, I am leaning towards a stateless design with all commands like World::GetCurrent() removed.  An entity needs to be explicitly told which world it belongs to upon creation, or it must be created as a child of another entity:

auto entity = Pivot::Create(world);

I am considering encapsulating all global variables into a GameEngine object:

class GameEngine
  std::map<std::string, std::weak_ptr<Asset> > loadedassets;
  shared_ptr<GraphicsEngine> graphicsengine;
  shared_ptr<PhysicsEngine> physicsengine;
  shared_ptr<NetworkEngine> networkengine;
  shared_ptr<SoundEngine> soundengine;
  shared_ptr<ScriptEngine> scriptengine;//replaces Interpreter class

A world would need the GameEngine object supplied upon creation:

auto gameengine = GameEngine::Create();
auto world = World::Create(gameengine);

When the GameEngine object goes out of scope, the entire game gets cleaned up and everything is deleted, leaving nothing in memory.

New SurfaceBuilder Class
To improve efficiency in Leadwerks 5, surfaces will no longer be stored in system memory, and surfaces cannot be modified once they are created.  If you need a modifiable surface, you can create a SurfaceBuilder object.

auto builder = SurfaceBuilder::Create(gameengine);
auto surface = model->AddSurface(builder);

When a model is first loaded, before it is sent to the rendering thread for drawing, you can access the builder object that is loaded for each surface:

auto model = Model::Load("Models\box.mdl", Asset::Unique);
for (int i=0; i<model->CountSurfaces(); ++i)
	auto surface = model->GetSurface(i);
	shared_ptr<SurfaceBuilder> builder = surface->GetBuilder();
  	if (builder != nullptr)
		for (int v=0; v < surface->builder->CountVertices(); ++v)
			Vec3 v = builder->GetVertexPosition(v);

98% of the time there is no reason to keep vertex and triangle data in system memory.  For special cases, the SurfaceBuilder class does the job, and includes functions that were previously found in the Surface class like UpdateNormals().  This will prevent surfaces from being modified by the user when they are in use in the rendering thread.

A TextureBuilder class will be used internally when loading textures and will operate in a similar manner.  Pixel data will be retained in system memory until the first render.  These classes have the effect of keeping all OpenGL (or other graphics API) code contained inside the rendering thread, which leads to our next new feature...

Asynchronous Loading
Because surfaces and textures defer all GPU calls to the rendering thread, there is no reason we can't safely load these assets on another thread.  The LoadASync function will simply return true or false depending on whether the file was able to be opened:

bool result = Model::LoadASync("Models\box.mdl");

The result of the load will be given in an event:

while (gameengine->eventqueue->Peek())
	auto event = gameengine->eventqueue->Wait();
	if (event.id == Event::AsyncLoadResult)
		if (event.extra->GetClass() == Object::ModelClass)
			auto model = static_cast<Model>(event.source.get());

Thank goodness for shared pointers, or this would be very difficult to keep track of!

Asynchronous loading of maps is a little more complicated, but with proper encapsulation I think we can do it.  The script interpreter will get a mutex that is locked whenever a Lua script executes so scripts can be run from separate threads:

//Do Lua stuff

This allows you to easily do things like make an animated loading screen.  The code for this would look something like below:

Map::LoadASync("Maps/start.map", world);
while (true)
	while (EventQueue::Peek())
		auto event = EventQueue::Wait();
		if (event.id == Event::AsyncLoadResult)
	world->Render();// Context::Sync() might be done automatically here, not sure yet...

All of this will look pretty familiar to you, but with the features of C++11 and the new design of Leadwerks 5 it opens up a lot of exciting possibilities.


C++11 introduces shared pointers, a powerful language feature that provides easy memory management without the overhead of garbage collection.  The example below should look familiar to you:

#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
	shared_ptr<Leadwerks::Window> window = Leadwerks::Window::Create();

	shared_ptr<Context> context = Context::Create(window);

	shared_ptr<World> world = World::Create();

	shared_ptr<Camera> camera = Camera::Create();
	camera->SetRotation(35, 0, 0);
	camera->Move(0, 0, -6);

	shared_ptr<Light> light = DirectionalLight::Create();
	light->SetRotation(35, 35, 0);

	shared_ptr<Model> model = Model::Box();
	model->SetColor(1.0, 0.0, 0.0);
	model->SetPosition(-4, 0, 0);

	while (true)
		if (window->Closed() || window->KeyDown(Key::Escape)) return false;
	//Everything will get automatically deleted when we return from this function
	return 0;

Using the auto keyword simplifies everything (and it makes this code compatible with Leadwerks 4):

#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
	auto window = Leadwerks::Window::Create();

	auto context = Context::Create(window);

	auto world = World::Create();

	auto camera = Camera::Create();
	camera->SetRotation(35, 0, 0);
	camera->Move(0, 0, -6);

	auto light = DirectionalLight::Create();
	light->SetRotation(35, 35, 0);

	auto model = Model::Box();
	model->SetColor(1.0, 0.0, 0.0);
	model->SetPosition(-4, 0, 0);
	while (true)
		if (window->Closed() || window->KeyDown(Key::Escape)) return false;
  	//Everything will get automatically deleted when we return from this function
	return 0;

Now things get interesting.  This function would normally cause a horrible memory leak, but with shared pointers everything is fine:

void SaveTexture(shared_ptr<Texture> tex)
	auto bank = Bank::Create(tex->GetMipmapSize());

Yet shared pointers can still equal nullptr:

auto bank = Bank::Create();

You can even simply set a shared pointer to nullptr, and if that was the last pointer that referenced it, it gets deleted!

auto bank = Bank::Create();
bank = nullptr;// auto deletion here!

How to Delete an Entity
The code below will not delete the entity, because a shared pointer is still stored in the world.

auto entity = Pivot::Create();
entity = nullptr;

The entity must be have its world set to NULL, and the shared pointer must be set to NULL or go out of scope:

entity = Pivot::Create();
entity = nullptr;

Children use a weak pointer to the parent, so they will not cause self-referencing.

Asset Management
You no longer have to worry about calling Release() when loading assets:

auto material = Material::Create();
auto texture = Texture::Load("mytex.tex");
texture = nullptr;

Unused assets will automatically be deleted if they go out of scope:

auto material = Material::Create();
auto texture = Texture::Load("mytex.tex");
texture = nullptr;
material = nullptr;

But if they are in use, they will be retained in memory:

auto material = Material::Create();
auto texture = Texture::Load("mytex.tex");
texture = nullptr;
material = nullptr;

In conclusion, shared pointers automate many of the tasks we have been doing manually with the Leadwerks reference counting system and the AddRef and Release commands.


 Leadwerks Software today announced the release of version 4.4 of their topselling game engine on Steam.  This version adds a new GUI system, support for inverse kinematics, and enhanced visuals.  The free update goes out today to over 20,000 paid users on Steam.

Leadwerks Game Engine 4.4 sees the introduction of Leadwerks GUI, a system for creating resolution-independent in-game menus.  Custom GUI elements can be created with Lua script, or an item can be selected from a number of pre-built GUI scripts including buttons, tabbed panels, slider controls, and more.  Leadwerks GUI is designed for the future, with support for 4K and 8K displays, as well as VR menus of any resolution.


Inverse kinematics are now supported, with two new joints that provide fine control over the orientation of physics bodies.  These can be used to control the end effector in an IK setup, or for precise control of moving objects.  The Leadwerks physics system has been updated to the latest Newton Dynamics 3.14.


Post-processing effects have been updated to enhance visual quality.  Bloom, HDR iris adjustment, SSAO, and fog have all been updated for improved graphics.  A new shader has been added to the vegetation system that scattering millions of rocks across a landscape to make terrain more detailed and realistic.


The Leadwerks learning materials have been converted into an all-new documentation system.  This allows easier searching and browsing of tutorials, API documentation, and examples.  A new series of tutorials has been added to teach the basics of C++ programming, in addition to the existing lessons on Lua scripting.

Leadwerks Game Engine can be purchased at a discount during the Steam summer sale.  All Leadwerks games have Steamworks support integrated out-of-the-box and are ready to publish through Steam Direct.


Distance fog is one of the most basic visual effects in 3D graphics, going back to the 1990s.  Here is the effect in the Quake 3 Arena map "Fatal Instinct", which was shrouded in a dense orange fog:


Leadwerks Game Engine 2 had this available as a built-in effect, while the more flexible effects system of Leadwerks 3/4 had several Workshop shaders available to use, including one by Klepto and another one more recently added by myself.  However, this has not been part of the official SDK until version 4.4.  Why is that?

The Problem
When water is rendered in Leadwerks, a low-quality render is performed of the world with the camera scale inverted on the Y axis.  Because the reflection is distorted by ripples, we render to a lower-resolution buffer with all settings on low and effects disabled.  This is important because it gives a faster performance and image quality that is still acceptable.  The water plane also uses occlusion culling so that the extra pass is only rendered if part of the water plane is visible.  All post-processing effects are disabled in the reflection pass, which makes good sense, except in the case of fog.  If the world is shrouded in dense fog but the reflection in the water is clear, it creates an obvious problem.  In the screenshot below, a post-processing effect is applied to the world.  Although the water does have fog applied to it, the reflected image on the water does not have any fog, creating a stark problem, because post-processing effects are disabled in the reflection pass.


Pre-Rendering Fog
One option would have been to allow the user to mark some post effects as visible in reflection passes, but that seemed complicated and error-prone.  I came up with the idea build a simple fog calculation into the first ambient or directional lighting pass.  Here it is applied in the directional light pass:


And here is what happens when the fog effect is applied in the directional light pass in the water reflection as well:


We can modify the water shader itself to add the same fog calculation to the surface of the water.  Now our water matches the world.


Removing Artifacts
There was still more to do.  We are rendering fog first and other stuff later.  Anything rendered after the main lighting pass has to use the fog calculation to substract its effect from the scene.  For example SSAO will add shaded areas on top of fog, which we definitely don't want.  See the bridge and trees in the distance.


The solution is to add the same fog calculation into the SSAO shader:

	float fogeffect = 0.0f;
	if (fogmode==true)
		fogeffect = clamp( 1.0 - (fogrange.y - length(worldCoord - cameramatrix[3].xyz)) / (fogrange.y - fogrange.x) , 0.0, 1.0 );
		if (fogeffect==1.0f)
			fragData0 = outputcolor;

And then use the fog level to lessen the impact of the effect:

fragData0 = outputcolor * fogeffect + outputcolor * (sumao / float(passes)) * (1.0 - fogeffect);

The underwater artifacts are a separate issue that were solved by adding another calculation.  Here is the result:


The same fog calculation had to be added to all light shaders, light volumes, and probes, to make sure lights faded into the fog.  Other effects can make use of four new built-in uniforms which will provide all the fog information the shader needs:

uniform bool fogmode;
uniform vec2 fogrange;
uniform vec4 fogcolor;
uniform vec2 fogangle;

On the client side, eight new commands have been added to the camera class to control the fog appearance, which are also available in Lua:

virtual void SetFogColor(const float r, const float g, const float b, const float a);
virtual void SetFogAngle(const float start, const float stop);
virtual void SetFogRange(const float start, const float stop);
virtual void SetFogMode(const bool mode);
virtual Vec4 GetFogColor();
virtual Vec2 GetFogAngle();
virtual Vec2 GetFogRange();
virtual bool GetFogMode();

This was the solution I've had in mind for some time, but I haven't had a chance to implement it until now.  It works really well and provides robust fog that looks correct under a wide variety of settings.



Leadwerks Game Engine 4.4, scheduled for release soon, features some updated and enhanced visual effects.  In this blog I will talk about some of the adjustments I made.  Having "The Zone" scene that Aggror recreated actually helped a lot to see how shaders could be improved.

Bloom / Iris Adjustment / HDR

The bloom and iris adjustment shaders have been updated to give bloom a wider and softer blur.  Iris adjustment is faster and more intense now, which will make the outdoors areas seem very bright when you are indoors, and the indoors areas will look very dark when you are outdoors.



The SSAO shader has multiple passes added to it, resulting in a much smoother yet crisp result. 



Vegetation Shaders

A new vegetation shader called "groundrocks" will make objects align to the terrain.  This lets you easily paint clusters of rocks all across a landscape, resulting in a nice chunky look that breaks up boring heightmap terrain.


Built-in Fog
Although several fog shaders have been available in the Workshop for some time, version 4.4 adds a built-in distance fog you can use to make spooky scenes.


The fog is built into several shaders in order to give correct reflections.  It works great with water.  Notice the reflection is also foggy, and the water itself is affected by fog, giving a nice misty look to the far side of the lake.


You can try Leadwerks Game Engine 4.4 right now by opting into the beta branch on Steam.


This tutorial demonstrates how to create a high-quality skybox for Leadwerks Game Engine using Vue.


Required Third-Party Programs

Loading the Example

Run Vue and select the File > Open menu item.  Extract the zip file above and open the file "Cloudy Blue Skies.vue".


Atmosphere and Clouds

You can modify the appearance of the sky with the Atmosphere Editor. Select the Atmosphere > Atmosphere Editor menu item to open this dialog.


The clouds tab lets you adjust various properties of the cloud layers and add new ones. Skyboxes look best with multiple layers of different kinds of clouds, so don't expect to get the perfect look with just one layer.


The load button to the right side of the cloud layer list will let you select from a wide range of different cloud types.


Experiment with different cloud layers to get the look you want. The "Detail amount" setting in particular will really enhance the image, but don't overdo it. You can right-click and drag the mouse to look around in the main panel, so be sure to take a look around to see how the clouds affect the entire sky.


To edit the sunlight properties in Vue, select the sunlight object in the World Browser on the right side of the main window.


You can match the exact rotation of the default sunlight angle in Leadwerks to make your skybox line up exactly to the scene lighting. The default sunlight angle in Leadwerks is (55,-35,0). In Vue this corresponds to the values (145,0,215). To get these values we add 90 degrees to the pitch and subtract the yaw from 180. Note in Vue the order of the yaw and roll are switched.


The sun color is very important for the overall composition of our image. In real life we're used to seeing a very high range of light levels in the sky. Computer monitors cannot represent the same range of colors, so images can easily become washed out and lose details. We want to adjust the sun color so we can get the most detail within the spectrum of a 32-bit color display. Like the rotation, the sun color can be modified in the sun properties.


If the sunlight color is too bright, the image will be overexposed and the cloud shape will become washed out.


If the sunlight is too dark, it will look gray and desaturated.


The right sun brightness will give a balanced look between bright spots and shadows. This is the part in the process that requires the most artistic sense. It's a good idea to look at some screenshots or photos for comparison as you adjust your settings.


You will get quite a lot of variation in brightness across the sky, so be sure to take a look around the whole scene when you are adjusting lighting. You can also adjust the main camera's exposure value to vary the brightness of the rendered image.

If you want to hide the sun from view you can do this by setting the "Size of the sun" and "Size of the corona" settings both to zero under the "Sun" tab in the Atmosphere Editor.


To export our skybox the exporter module must be installed. Select the File > Export Sky menu item and the export dialog will appear.


The "Supporting geometry" setting should be set to "Cube". Set the X value to 1536 and the Y value to 2048. This controls the width and height of the saved image. When we press the OK button, the sky will be rendered out into a vertical cube cross with those dimensions. Each face of the cubemap will be 512x512 pixels.


By default, your skybox will be exported to the file "Documents\e-on software\Vue 2015\Objects\Atmosphere.bmp". The exported cube cross is a nonstandard orientation. To convert this into a cubemap strip ready to load in Leadwerks, use the FixVueCubemap.exe utility posted above.  Drag your exported image file onto the executable, and it will save out a cube strip in PNG format that is ready to load in Leadwerks.



To import your skybox into Leadwerks, just drag the cubemap strip PNG file onto the Leadwerks main window. Open the converted texture from the Leadwerks Asset Browser. Set the texture mode to "Cubemap", uncheck the "Generate Mipmaps" checkbox, and check the clamp mode for the X, Y, and Z axes. Press the Save button to reconvert the texture and it will appear in a 3D view.


You can use the skybox in the current map by selecting it in the scene settings.


Disabling mipmap generation will reduce the size of a 1024x1024 cubemap from 32 to 24 mb. Due to the way the image is displayed, mipmaps aren't needed anyways.

Final Render

For the final render, we want each cubemap face to be 1024x1024 pixels. However, we can get a better quality image if we render at a larger resolution and then downsample the image. In Vue, select the File > Export menu item again to open the export dialog. This time enter 6144 for the X value and 8192 for the Y value. Don't press the OK button until you are ready to take a long break, because the image will take a long time to render. When you're done you will have a huge image file of your skybox with a 2048x2048 area for each cubemap face.

If we resize the image file in a regular paint program, it will create seams along the edges of the cubemap faces. Instead, we're going to pass a parameter to the conversion utility to tell it to downsample the image by a factor of 50%. The "downsample.bat" file is set up to do this, so just double-click on this to launch the executable with the correct parameters. The resulting cubemap strip will be 6144x1024 pixels, with a 1024x1024 area for each face. However, due to the original rendering resolution this will appear less grainy then if we had rendered directly to this resolution.

Import this texture into Leadwerks as before and enjoy your finished high-quality skybox. Always do a low-resolution pass before rendering the final image, as it can take a long time to process.


An update is up which saves all menu settings into your game's config file.  When your program calls System:SetProperty() the inputted key-value pair is saved in a list of settings.  Your game automatically saves these settings to a file when it closes, located in C:\Users\<USERNAME>\AppData\local\<GAMENAME>\<GAMENAME>.cfg.

The contents of the config file will look something like this:


When your game runs again, these settings will be automatically loaded and applied.  You can override config settings with a command line argument.  However, command lines arguments will not be saved in the config file.

This has been my plan for a long time, and is the reason why your game is not set to use the editor settings.  Setting for running your game in real-time should be separate from editor settings.


In-Game Menu

Along with Leadwerks GUI, Leadwerks 4.4 adds an in-game menu that is available with the default Lua scripted game.  You can use this to allow your users to adjust settings in the game, or provide a more sophisticated way to quit the game than simply pressing the escape key.


The default window size has been changed to 1280x720 when run from the editor.  Your game will now run in fullscreen mode by default when it is launched outside the editor.

All of these changes are contained in the Main.lua and Menu.lua scripts, and can all be modified or removed to your heart's content.

A full build is available now on the beta branch.


In Leadwerks 4.3 we integrated GameAnalytics.com into our software, both in the editor and in the engine, as a tool developers can use to track their player statistics.  A number of events were set up in the editor to fire when certain actions were performed, in order to gain better insight into how people were using Leadwerks.  Here are the results.

The most popular primitives

Unsurprisingly, boxes are by far the most popular primitive created in Leadwerks Editor.  The community has created more than 20,000 boxes since analytics were enabled.  What blows my mind is that cylinders are actually the second-most commonly used primitive, rather than wedges.  Users created 1753 cylinders but only 1358 wedges in the given time period!  Even more shocking is that spheres are more popular than cones, with 985 spheres created versus just 472 cone primitives.

This causes me to question my assumptions of how people use Leadwerks, and how items in the interface should be prioritized.


The Workshop Store is used heavily

Leadwerks users installed more than 5000 items from the Workshop.  It also looks like people install many items, as sometimes the number of installs exceed the number of times the Workshop interface is opened.


People buy Workshop items directly through the Steam Client

Although users are buying Workshop items in high quantities, it appears that their primary route is through the Steam store interface, rather than the built-in Workshop browser.  People browse the items in the Steam client and then use the Workshop browser to install their purchased items.  The numbers for Workshop Store purchases are much higher than the number of people clicking the buy button in the editor.

If you're interested in selling your 3D models or textures through the Leadwerks Workshop Store, it's easy to get started and you can earn money directly from Steam.  Contact us to learn more or stop by the forum.


Leadwerks Game Engine 5 is a restructuring of Leadwerks Game Engine 4 to adapt to the demands of virtual reality and leverage the full capabilities of modern and future hardware.

Basically, the main idea with VR is that if you don't maintain a steady 90 FPS in virtual reality, you will throw up.  Nausea may be the worst physiological feeling you can experience.  In fact, nausea has been rated by cancer patients as worse than pain.  Being sensitive to motion sickness myself, this is a problem I am very motivated to solve.

In a conventional renderer, running both your game logic and rendering at 60 hz (frames per second) seems reasonable.  However, when we up the framerate to the 90 hz required for fluid virtual reality experiences, it seems like an excessive demand on the game code.  Game logic normally handles AI, player input, and various other tasks, and those things don't have to be updated quite that often.

Distributing Tasks
The solution I have come up with is to decouple the game loop from the renderer.  In the diagram below, the game loop is running at only 30 hz, while the physics, culling, and rendering loops are running at independent frequencies.


Think of this as like gears on a bicycle.  Your pedals move slowly, but your wheels spin very fast.  The game logic loop is like your pedals, while the rendering loop is like the rear wheel it is connected to.


Previously, your game logic needed to execute in about 8 milliseconds or it would start slowing down the framerate.  With my design here, your game code gets more than 32 milliseconds to execute, a lifetime in code execution time, while a steady framerate of 90 or 60 FPS is constantly maintained.

I actually came up with this idea on my own, but upon further research I found out this is exactly what Intel recommends.  The technique is called Free Step Mode.  The diagram below does not correspond to our engine design, but it does illustrate the idea that separate systems are operating at different speeds:


If all threads are set to execute at the same frequency, it is called Lock Step Mode.


Data Exchange
Data in the game loop is exchanged with the physics and navmesh threads, but is passed one-way on to the culling loop, where it is then passed in a single direction to the rendering loop.  This means there will be a slight delay between when an event occurs and when it makes its way to the rendering thread and the final screen output, but we are talking times on the level of perhaps 10 milliseconds, so it won't be noticeable.  The user will just see smooth motion.


Rather than risk a lot of mutex locks, data is going to be passed one-way and each thread will have a copy of the object.  The game loop will have the full entity class, but the rendering threads will only have a stripped-down class, something like this:

class RenderObject
	Mat4 matrix;
	AABB aabb;
	std::vector<Surface*> surfaces;

The original entity this object corresponds to can be modified or deleted, without fear of affecting downstream threads.  Again, Intel confirmed what I already thought would be the best approach:


In order for a game engine to truly run parallel, with as little synchronization overhead as possible, it will need to have each system operate within its own execution state with as little interaction as possible to anything else that is going on in the engine. Data still needs to be shared however, but now instead of each system accessing a common data location to say, get position or orientation data, each system has its own copy. This removes the data dependency that exists between different parts of the engine. Notices of any changes made by a system to shared data are sent to a state manager which then queues up all the changes, called messaging. Once the different systems are done executing, they are notified of the state changes and update their internal data structures, which is also part of messaging. Using this mechanism greatly reduces synchronization overhead, allowing systems to act more independently.

-Designing the Framework of a Parallel Game Engine, Jeff Andrews, Intel

But wait, isn't latency a huge problem in VR, and I just described a system that adds latency to the renderer?  Yes and no.  The rendering thread will constantly update the headset and controller orientations, every single frame, at 90 hz.  The rest of the world will be 1-2 frames behind, but it won't matter because it's not connected to your body.  You'll get smooth head motion with zero delays while at the same time relieving the renderer of all CPU-side bottlenecks.

Even for non-VR games, I believe this design will produce a massive performance boost unlike anything you've ever seen.


Leadwerks Game Engine 4.4 features an upgrade to the latest version of Newton Dynamics, along with a bunch of new features to enhance physics.

Kinematic Controller
The new kinematic controller is a joint that lets you specify a position, rotation (Euler or quaternion), or a 4x4 matrix to orient the body to.  You can set the maximum linear and angular force the joint may use to orient the entity.  This allows you to create a kinematic controller that only affects position, only affects rotation, or one that controls both at once.  In the video below I am using a kinematic controller to create a simple IK system with two hinge joints.  The end effector is controlled by the mouse position, while the base entity stays in place, since it has zero (infinite) mass:

The kinematic controller provides much more stable collisions than the Entity PhysicsSetPosition() and PhysicsSetRotation() commands, and should be used in place of these.  In fact, these commands will be removed from the documentation and should not be used anymore, although they will be left in the engine to ensure your code continues to work.  The FPS player script will be updated to use a kinematic control for objects you are holding, which will eliminate the energetic collisions the script currently produces if you pick up a crate and push it into the wall.

The new joint commands are as follows:

static Joint* Kinematic(Entity* entity, const Vec3& position);
virtual void SetTargetMatrix(const Mat4& mat);
virtual void SetTargetPosition(const float x, const float y, const float z, const float blend = 0.5);
virtual void SetTargetPosition(const Vec3& pos, const float blend = 0.5);
virtual void SetTargetRotation(const float pitch, const float yaw, const float roll, const float blend = 0.5);
virtual void SetTargetRotation(const Vec3& rotation, const float blend = 0.5);
virtual void SetTargetRotation(const Quat& rotation, const float blend = 0.5);

For improved constistency in the API, the joint SetAngle function will be renamed SetTargetAngle, but a copy of the old command will remain in the engine:

virtual void SetTargetAngle(const float angle);

Joint Friction
Hinge joints can now accept a friction value to make them more resistant to swinging around.  I used this in the example below to make the joints less "loose", while a kinematic controller positions the green box:

New Vehicle Model
Newton 3.14 features a new vehicle model with a realistic simulation of a slip differential.  Power is adjusted to each wheel according to the resistance on each tire.


Watch closely as the wheels below act just like a real car does when its tires slip:

The realistic vehicle models gives vehicles a much more visceral and fun feeling.  The new vehicle also uses actual bodies for the tires, instead of convex raycasts, so the sudden bouncing the old vehicles could exhibit if the chassis didn't encompass the tires is eliminated.


Slider and hinge joints now have optional spring behavior you can enable with one command.  Use this to make our own custom suspension system, or anything else you need.

void SetSpring(const float spring)

These changes will be available next week on the beta branch on Steam.


A new easy-to-use networking system is coming soon to Leadwerks Game Engine.  Built on the Enet library, Leadwerks networking provides a fast and easy way to quickly set up multiplayer games.  Each computer in the game is either a server or a client.  The server hosts the game and clients can join and leave the game at will.  On the other hand, when the server leaves the game, the game is over!


Creating a Client

You can soon create a client with one command in Leadwerks:

client = Client:Create()

To connect to a server, you need to know the IP address of that computer:


To get information from the other computer, we simply update the client and retrieve a message:

local message = client:Update()
if message.id == Message.Connected then
  	print("Connected to server")
elseif message.id == Message.Disconnected then
  	print("Disconnected from server")
elseif message.id == Message.Chat then
  	print("New chat message: "..message.stream:ReadString());

You can even send messages, consisting of a simple message ID, a string, or a stream.

client:Send(Message.Chat,"Hello, how are you today?")

There are two optional flags you can use to control the way your messages are sent.  If you specify Message.Ordered, your packets will arrive in the order they were sent (they won't necessarily otherwise).  You can use this for updating the position of an object, so that the most recent information is always used.  The Message.Reliable flag should be used for important messages that you don't want to miss.  UDP packets are not guaranteed to ever arrive at their destination, but messages sent with this flag are.  Just don't use it for everything, since it is slower!

When we're ready to leave the game, we can do that just as easily:


A dedicated server does not have anyone playing the game.  The whole computer is used only for processing physics and sending and receiving information.  You can create a dedicated server, but it's better to let your players host their own games.  That way there's always a game to join, and you don't have to buy an extra computer and keep it running all the time.

Creating a Server

Your game should be able to run both as a client and as a server, so any player can host or join a game.  Creating the game server is just as easy.

local server = Server:Create(port)

Once the server is created, you can look up your IP address and ask a friend to join your game.  They would then type the IP address into their game and join.

The server can send and receive messages, too.  Because the server can be connected to multiple clients, it must specify which client to send the message to.  Fortunately, the Message structure contains the Peer we received a message from.  A peer just means "someone else's computer".  If your computer is the client, the server you connect to is a peer.  If your computer is the server, all the other clients are peers:

local message = client:Update()
if message.id == Message.Connected then
  	player2 = message.peer

You can use the peer object to send a message back to that computer:

server:Send(peer, Message.Chat, "I am doing just great! Thanks for asking.")

If you want to boot a player out of your game, that's easy too:


The broadcast command can be used to send the same message out to all clients:

server:Broadcast(Message.Chat, "I hope you are all having a great time in my cool chat program!")

Public Games

You can make your game public, allowing anyone else in the world who has the game to play with you.  You specify a name for your game, a description of your server, and call this command to send a message to the Leadwerks server:

server:Publish("SuperChat","My SuperChat Server of Fun")

All client machines, anywhere in the world, can retrieve a list of public games and choose one to join:

for n=0,client:CountServers("SuperChat")-1 do
	local remotegame = client:GetServer(n)

This is a lot easier than trying to type in one person's IP address.  For added control, you can even host a games database on your own server, and redirect your game to get information from there.


After a lot of research and development, Leadwerks GUI is almost ready to release.  The goal with this system was to create an in-game GUI that was customizable, extendable, and could also serve as a windowed GUI for application development in the future.


The GUI system is based on the Widget class.  Once a GUI is created on a rendering context you can add widgets to it.  Each widget is a rectangular container with a padding area.  The widgets can be arranged in a hierarchy and their bounds will clip the contents of their child widgets, both for rendering and mouse interaction.

The GUI is automatically rendered onto the screen inside the call to Context:Sync(),

Widget Scripts

Each widget has a Lua script to control rendering and behavior, similar to the way Lua scripts work in our entity system.  The script assigned to a widget controls what type of widget it is, how it looks, and how it interacts with mouse and keyboard input.  A set of widget scripts are provided to create a variety of controls including buttons, checkboxes, text entry boxes, list boxes, text display areas, choice boxes, sliders, and more.

You can create your own widget scripts to add new types of controls, like for an RPG interface or something else.  The script below shows how the tabber widget is implemented.

if Style==nil then Style={} end
if Style.Panel==nil then Style.Panel={} end

--Initial values
Script.tabsize = iVec2(72,28)

function Script:Start()	

function Script:MouseLeave()
	if self.hovereditem~=nil then
		self.hovereditem = nil
		local scale = self.widget:GetGUI():GetScale()
		local pos = self.widget:GetPosition(true)
		local sz = self.widget:GetSize(true)

function Script:Draw(x,y,width,height)
	local gui = self.widget:GetGUI()
	local pos = self.widget:GetPosition(true)
	local sz = self.widget:GetSize(true)
	local scale = self.widget:GetGUI():GetScale()
	local n
	local sel =  self.widget:GetSelectedItem()
	--Draw border
	--Draw unselected tabs
	for n=0,self.widget:CountItems()-1 do
		if n~=sel then
	--Draw selected tab
	if sel>-1 then
	---Panel background

function Script:DrawTab(n)
	local gui = self.widget:GetGUI()
	local pos = self.widget:GetPosition(true)
	local sz = self.widget:GetSize(true)
	local scale = self.widget:GetGUI():GetScale()
	local s = self.widget:GetItemText(n)
	local textoffset=2*scale
	if self.widget:GetSelectedItem()==n then
	local leftpadding=0
	local rightpadding=0
	if self.widget:GetSelectedItem()==n then
		if n>0 then
			leftpadding = scale*1
		rightpadding = scale*1
	if self.widget:GetSelectedItem()~=n then
	if self.hovereditem==n and self.widget:GetSelectedItem()~=n then


function Script:MouseDown(button,x,y)
	if button==Mouse.Left then
		if self.hovereditem~=self.widget:GetSelectedItem() and self.hovereditem~=nil then
			local scale = self.widget:GetGUI():GetScale()
			local pos = self.widget:GetPosition(true)
			local sz = self.widget:GetSize(true)
	elseif button==Mouse.Right then
		if self.hovereditem~=self.widget:GetSelectedItem() and self.hovereditem~=nil then

function Script:KeyDown(keycode)
	if keycode==Key.Right or keycode==Key.Down then
		local item = self.widget:GetSelectedItem() + 1
		if item<self.widget:CountItems() then
			local scale = self.widget:GetGUI():GetScale()
			local pos = self.widget:GetPosition(true)
			local sz = self.widget:GetSize(true)
	elseif keycode==Key.Left or keycode==Key.Up then
		local item = self.widget:GetSelectedItem() - 1
		if item>-1 and self.widget:CountItems()>0 then
			local scale = self.widget:GetGUI():GetScale()
			local pos = self.widget:GetPosition(true)
			local sz = self.widget:GetSize(true)
	elseif keycode==Key.Tab then
		local item = self.widget:GetSelectedItem() + 1
		if item>self.widget:CountItems()-1 then
		if self.widget:CountItems()>1 then
			local scale = self.widget:GetGUI():GetScale()
			local pos = self.widget:GetPosition(true)
			local sz = self.widget:GetSize(true)

function Script:MouseMove(x,y)
	local prevhovereditem = self.hovereditem
	self.hovereditem = nil
	local scale = self.widget:GetGUI():GetScale()
	local sz = self.widget:GetSize(true)
	if x>=0 and y>=0 and x<sz.width and y<self.tabsize.y*scale then
		local item = math.floor(x / (self.tabsize.x*scale))
		if item>=0 and item<self.widget:CountItems() then
	if self.hovereditem==self.widget:GetSelectedItem() and prevhovereditem==nil then
	if self.hovereditem==nil and prevhovereditem==self.widget:GetSelectedItem() then
	if prevhovereditem~=self.hovereditem then
		local pos = self.widget:GetPosition(true)
		local sz = self.widget:GetSize(true)

Widget Rendering

Widgets are buffered and rendered with an advanced system that draws only the portions of the screen that need to be updated.  The GUI is rendered into a texture, and then the composite image is drawn onscreen.  This means you can have very complex interfaces rendering in real-time game menus with virtually no performance cost.

By default, no images are used to render the UI so you don't have to include any extra files in your project.

Widget Items

Each widget stores a list of items you can add, remove, and edit.  These are useful for list boxes, choice boxes, and other custom widgets.

GUI Events

Leadwerks 4.4 introduces a new concept into your code, the event queue.  This stores a list of events that have occurred.  When you retrieve an event it is removed from the stack:

	while EventQueue:Peek() do
		local event = EventQueue:Wait()
		if event.source == widget then

Resolution Independence

Leadwerks GUI is designed to operate at any resolution.  Creation and positioning of widgets uses a coordinate system based on a 1080p monitor, but the GUI can use a global scale to make the interface scale up or down to accommodate any DPI including 4K and 8K monitors.  The image below is rendering the interface at 200% scaling on a 4K monitor.


A default script will be included that you can include from Main.lua to build up a menu system for starting and quitting games, and handling common graphical features and other settings.


Leadwerks GUI will be released in Leadwerks Game Engine 4.4.



Back around February I started working on a website update that included the following:

  • Responsive design everywhere.
  • SSL everywhere.
  • Visual improvement of website.
  • Updated documentation system.
  • Tutorials for C++ programming basics.
  • Update forum software to new major version.
  • Forum moved to new URL.

All of that is now pretty much done.  These changes improve the online Leadwerks experience and are independent from the software itself, so it was a good idea to get them done now.

Since September I've had more time to think about Leadwerks Game Engine 5, and although I am not completely sold on Vulkan, I think it's a good plan.

Leadwerks 5 is all about performance and user experience with VR as a prime target.

Multithreaded Architecture

Separate threads for navmesh updating, physics, game logic, culling, and rendering.  The rendering thread loops at a constant 60 or 90 (for VR) frames per second regardless of what your game is doing.  This gives your game logic four times more time to run, while independently maintaining a constant framerate.  The design I have in mind will make Leadwerks 5 the fastest game engine, ever, and choosing Leadwerks for VR will be a no-brainer.

Leadwerks Editor 5

A new editor will be written in C++ using Leadwerks GUI, which will give us the same appearance on Windows, Linux, and Mac.  Functionality will be pretty close to the existing editor, but with more room to grow and a few improvements.  Because it's written in C++ parts of the editor can be exposed to Lua, and an editor API will be provided for making Lua mods and plugins.  By default, it will use a dark theme to be easy on the eyes.  A standalone script editor may be provided as well.

PBR Material System with Substance Support

The lighting model will use a more advanced lighting equation and substance PBR materials (metalness and roughness) will be loaded natively.

Shared Pointers

The reference counting system in the Object class will be replaced with C++11 shared pointers.  This gives you the performance of C++ with ease of use like a garbage-collected language.


The engine and editor will be released as a 64-bit build only.

Game Templates

More game templates will be provided.  Fortunately we can add these now and updates for Leadwerks 5 will be minimal.

Open-Source Components

Source code to some parts of the engine and editor may be provided on the Leadwerks GitHub account.  For example, I may make a standalone open-source script editor or publish some of the engine classes for the community to play with.


Leadwerks 5 will launch on Windows, Linux, and Mac.  The improved compatibility of Leadwerks 5 means we could do crazy things like run the editor on an iPad, but I'm going to stick with what I know sells.

Enterprise Edition

A standalone version that does not use Steam will be sold in bundles to companies that require this.


A monthly plan may be introduced at around $5-20 per month.  Pricing for a perpetual license for the standard and pro editions would most likely be the same as now ($99-199), with a discount for early adopters / upgrades.  The enterprise version would probably be about $1000 per seat with a discount for schools.

If you found this blog interesting, please consider using the social media share buttons below to share it.


An update for version 4.4 beta is now available. The Newton Dynamics library has been updated to the current version. Vehicles are temporarily unavailable, but everything else should work. The Newton DLLs have been moved into external DLLs, which allows the author of Newton to debug his own physics code in Leadwerks from Visual Studio.


You can get the update by opting into the beta branch on Steam.


Visual Studio gives two options for creating C++ applications. Console applications use printed text to communicate with the user, harkening back to the pre-GUI days of DOS. The other option is a windowed application with a GUI interface, simply called "Win32 Project" in the Visual Studio project creation dialog.




A console application will use the regular old main function you know and love:

int main(int argc,const char *argv[])


This is cross-platform compatible and runs on any operating system. A "Win32 Project", however, will use a special WinMain() function that only works on Windows:

WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR, int) 


So if you don't want a black rectangle printing a bunch of lines of text, you have to use the WinMain() function. But, there is a way to fix this. We can change a console application to a windowed application in the Linker settings in the Visual Studio project settings. Change the Linker > System > Subsystem property to a windowed application.




There's also a way to force the program to use the cross-platform main() function. Change the setting Linker > Options > All Options > Entry Point to mainCRTStartup.




Although the application will no longer show a black text box, the printed output is still detectable by a parent application like the Leadwerks script editor.




However, if you create a .bat file to run your application, you can only pipe the output to a text file. The text will not be shown when the .bat file runs:

MyGame.exe > output.txt


Of course, any Leadwerks game will automatically write it's output to a text log already, so this is sort of redundant. Another consideration is you will not be able to see the output when you run your application from Visual Studio. Strange that VS doesn't support one of the most basic needs of an IDE, and has no known method of viewing the printed output of your program when you run it. However, if you want to get rid of that annoying black popup box, and you want your code to be cross-platform compatible, this is the way to do it.


Leadwerks Game Engine 4.4 beta is now available on the beta branch on Steam. This adds support for virtual reality with the OpenVR library. OpenVR supports both the HTC Vive and the Oculus Rift headsets.




To enable VR mode in your Leadwerks game, simply call the command below. If a VR headset is detected and initialized, this function will return true:



Any cameras not attached to a rendering target will render directly to the headset views. Both eyes will be rendered to automatically. The camera's position and orientation will automatically be tracked, and will override any positioning you give it in your code. You can switch between room-scale and seated VR tracking with the following command:



Where mode is one of the constants VR.Roomspace or VR.Seated. Use the command VR:CenterTracking() to re-center the camera, in seated VR mode only. The VR system will automatically shut down when your game exits. You also no longer need to call System::ShutDown in your C++ code, as this will be done automatically when the main() function returns.


Controllers will automatically be detected and render in your view. You can use the VR::GetControllerButtonDown(devicenum, button) and GetControllerAxis(devicenum, button) commands to get button presses and movements. The devicenum parameter will typically be zero or one, and the button argument can be one of the following constants:

  • VR.TouchpadButton
  • VR.GripButton
  • VR.MenuButton
  • VR.TouchpadAxis
  • VR.TriggerAxis
  • VR.TriggerButton


At this time, you cannot hide the default controllers. Button motion will not be rendered in the virtual world. Camera culling does not exactly match the VR render frustum, and some objects will pop out of view at the periphery of your vision. Post-processing effects should not be used in VR, as they don't always look right, and the VR renderer uses a half-float RGB buffer to store screen positions, since depth reconstruction cannot be used with sheared projection matrices. The current build is a beta and may change before the final release.


You can read more about Leadwerks VR here.


An update to version 4.3 is now available on the default branch. This fixes it so the editor is not DPI-aware and will be scaled correctly if scaling on Windows is used. Some small shadow update bugs were fixed, and the animation shaders were improved.


If you are having trouble running your game from the editor in debug mode, you need to install the latest VC++ redistributable from Microsoft found here:



The version distributed with Steam is outdated and will not work correctly. Valve has been notified of this issue.


Leadwerks Game Engine 4.3 is now available.


This release adds support for Ogg Vorbis audio files. Ogg Vorbis is a compressed audio format specially designed to shrink the size of large audio files. Using Ogg for large music files can significantly reduce your game's size.




Leadwerks Game Engine 4.3 features numerous performance updates, with performance improvements up to twice as fast as Leadwerks 4.2.




Finally, numerous small bugs have been squashed to make Leadwerks more reliable than ever.


Version 4.3 is a free update and is available on Steam now. C++ projects made with Leadwerks 4.2 can be updated by adding the following header search paths:

  • $(LeadwerksHeaderPath)\Libraries\libvorbis\include
  • $(LeadwerksHeaderPath)\Libraries\libogg\include


The Winter Games Tournament is complete, with a long list of fun mini-games made by the community. This tournament saw the release of many new and innovative types of games you want to be sure to try. To claim your prize, go to "My Profile" in the drop-down box that opens when you click your name in the upper-right part of this website:



On your profile page, click the button that says "Edit My Profile" and enter your name, shipping address, and shirt size.


Lone Water: Prologue


Lone Water tell a history about a flooded world. You are a lone survivor in this world and you must find clues to figure out why the world is now all flooded with water.



On the Road Again


On the road again is a little racing game where a track is randomly generated

with a given seed. You either use a car or a ball to complete levels. Compete with others as you can see their highscores via the Steam leaderboards.





Build your own base and defend it against evil snowmen!

This game was built just for fun, and is still a little buggy. It has 11 waves of snowmen, and 13 different structures you can build. The controls and instructions are in the game. Feel free to comment if you find anything wrong, or one of those dreaded misspelled words.



The Van


Just another slow day at the biotech firm. You work at the main research facility as a mechanic for vehicle maintenance and general odd jobs around the place. You don't exactly know what they manufacture here. Very secretive need-to-know stuff and the non-disclosure papers seemed pretty clear about not talking about what you see here, otherwise the consequences are severe.



Ball Hopper


Bounce across platforms to reach the finish, but make sure you get all the checkpoints along the way!

The controls are really simple, but don't think it's going to be easy!



Water Bottle Flip


America’s latest craze is now brought to PC! You heard that right – Water Bottle Flip captures the thrill of lobbing perfectly good drinking water in plastic bottles through the air and trying to land it upright on various surfaces. This authentic polymeric encapsulated aquatic simulator realistically captures the exquisite arc of the bottle as it sails effortlessly through the air and onto the target! Throw as many water bottles as you like in the comfort of your own PC gaming chair without having to worry about spilling actual water and soaking your carpets! How many can you land consecutively on the table? Can you trick-shot onto the vending machine? Can you simply just land one before casting yourself out into the void out of frustration? Try it out and see!



Home Sweet Home


You wake up to find you are on a deserted Island.



Rick Powers


After waking in an unknown facility, you find and connect psychically with a future tech orb which allows you to teleport to places you throw it to. Use the sticky ball powerup and the ball sticks to anything. Use the bomb powerup to create an energy blast to break things. Can you escape?



A Long Journey


Now whether that's what I've created for a WinterTournament is enough, no clue. But I hope you have fun. So far, there are only two maps. But there will be more. In total there are 10 maps with different scenarios, effects etc.



Pig's Adventure Dodgeball

837269229_preview_Pig&#39;s Adventure Dodgeball - Title.jpg

This game started out as a typical dodgeball game but then morphed into something a bit different. At any rate, the object of the game is to try to break down all of the boxes on the target platform before you run out of balls.



Jimmi the Rabbit


Guide Jimmi to his house before time runs out. Collect as many carrots as you con.





Evil snowmen are planning to invade your planet! Quick, hop into your rocket ship and blast them away! Make sure to steal their hot choco for some Health & Power boost!



Sot Kaal


It works, but it's unfinished. Second level isn't there, I'll update soon.



Snow Riders


Snow Rider is an arcade snowboarding game.



Enemy Z


Prepare your defense against waves of the undead.




Race against your friends and the AI and be the last one standing! Up to 8 racers at a time.



Mass Micron


The game is supposed to be a boss battle within a single room. The boss will be invulnerable to direct fire but elements in the room will allow you to take him down. E.g disable missiles, reduce boss reaction time etc.





Game type real time strategy game.



Leadwerks Game Engine 4.2 is now available on Steam. This update adds new features to make game development easier than ever. The free update goes out today to over 10,000 paid users on Steam.


Version 4.2 integrates analytics into Leadwerks games with a free gameanalytics.com account. This allows developers to view statistics on player behavior and identify any trouble spots their game might have as players progress through levels. By viewing a summary of all player behavior, developers can make data-driven decisions and get real-time information instead of relying solely on written feedback.




New graphical features make Leadwerks games more beautiful, including fast ray-traced reflections with a new post-processing effect called screen-space reflection (SSR). Easy heat haze, glass refraction, and soft particles can now be added to games just by dragging a prefab into the scene. Textures can now be added to spotlights to project an image onto walls.




New animation commands and a built-in animation management system make it easier to display game characters with fluid movements. Just set the sequence to play, add a transition time, and the engine will auto matically manage and play a queue of blended animations. A bug that sometimes caused animated characters to render incorrectly on Linux has also been fixed.


It's now easier to purchase items in the Leadwerks Workshop Store. Clicking on the buy button in the editor will open the selected item in the Steam client, instead of requiring you to log into the Steam website through a web browser.


The professional edition has been upgraded to Visual Studio 2015, and is now compatible with the latest version of GCC with C++11 support.


The Leadwerks Winter Games Tournament is running until January 15th, and there’s still time to create a mini-game and publish to Steam Workshop. All participants receive a prize, including stickers, posters, shirts, hoodies, and even Steam controllers.


Leadwerks Game Engine and the Professional Edition DLC are both on sale during the Steam Winter Sale with an 80% discount. Leadwerks Game Launcher can be downloaded for free on Steam.



Leadwerks Software was founded in 2006 to make game development easy and fun. The company launched Leadwerks Game Engine on Steam in January 2014 and has experienced steady growth with over 10,000 paid users. Leadwerks Game Launcher was released as an early access title in September 2015, allowing developers to publish games to Steam Workshop for free, with no waiting period and no approval process.


At last, it is time for the 2016 Leadwerks Winter Games Tournament! This is going to be a big one, for a few reasons.

  • We're very likely to reach 100 games in Leadwerks Game Launcher, which means it will be ready to move out of early access mode and be an official release on Steam.
  • As an experiment, you're getting two extra weeks to polish your games, with an extended deadline lasting until January 15th.




WHEN: The tournament begins Monday, December 5, and ends Sunday, January 15th at 11:59 P.M.


HOW TO PARTICIPATE: Publish your wintery-or-other-themed game to Steam Workshop or upload it to the games database before the deadline. You can work as a team or individually. Use blogs to share your work and get feedback as you build your game. If you need models for your game, we've got a Christmas props model pack for you to use for free from Leadwerks Workshop.


Games must have a preview image, title, and contain some minimal amount of gameplay (there has to be some way to win) to be considered entries. It is expected that most entries will be simple, given the time constraints.


PRIZES: Rather than a competition, this tournamant is a "co-opetition". Everyone who participates gets a prize!


If this is your first game tournament entry, you will receive a cool Leadwerks sticker in the mail.




If this is your second game tournament entry, you'll receive a collection of three limited-edition professionally printed postcards featuring beautiful Leadwerks screenshots. Send them to a friend or put them on the wall.




If this is your third game tournament entry, you'll receive the new Leadwerks USB stick, which is perfect for storing projects, code and artwork! The items will be printed with the Leadwerks logo for a distinctive look.




If this is your fourth game tournament entry, you'll receive a rockin' Leadwerks T-shirt in the mail. Wear it to show how cool you really are.




If this is your fifth game tournament entry, you'll receive the new Leadwerks hoodie! This gorgeous garment makes you look like a Silicon Valley startup geek. This light jacket is perfect for air-conditioned spaces that are just slightly chilly.




If this is your sixth game tournament entry, you will receive a Steam Controller. The Steam Controller lets you play your entire collection of Steam games on your TV—even the ones designed without controller support in mind.


Bonus Prize

Everyone who participates also gets this bonus prize: an 11x17" poster mailed to your door! These posters will be printed only once, only for this event. This is your only time ever to get one, so make it count!

With the Summer Games 2016 Tournament completed, it's time to review the entries. This tournament brought a new level of quality, with several small games that could be considered Greenlight-ready, made in just four weeks!



Sound Game



Test your spatial reasoning skills in this unique and challenging game. Navigate with your map and lit up clues to get to the end of the maze.







Solve the mystery in this atmospheric puzzle adventure.







Race through this futuristic yet retro world with a rockin' 8-bit soundtrack.




Log Riders



Jump from log to log in this fun physics-driven game.




Realm of the Lamb



Explore the afterworld in this atmospheric adventure. A great example of storytelling and pacing.




Little Dagon



Run. Glide. Shoot fireballs. Any way you do it, you're going to have a blast in this polished and fun game.




Leadblocks Jump n' Run



Slafstraf is back, not with horror, but with a psychadelic first-person jumping experience. Test your skills with this challenging and (presumably) LSD-driven adventure.







Blast through hordes of enemies in this frantic fast-paced action title. Steam Leaderboards let you see how well you're doing compared to other players.




Spookemon Go!



Race an RC car around your beach house and collect all the Spookemons. You've got to catch them all!




Robo Platformer



Jump your robot from platform to platform in this challenging third-person game.




FPS Nightmare



Fight for your very soul. We couldn't have said it any better.




The Hankinator's House of Darkness



A blend of action and puzzle-solving with excellent game mechanics makes this a must-play!




Dino Land



Collect photos of dinosaurs in this unique adventure! Also features completely awesome water. Did we mention there's dinosaurs?







Race a tiny remote-control car through a fun and active setting.




Pew Pew Bang Bang



Red vs. Blue team-based battles. What more do you need to know? Go play it!




Run! Jump! Crawl!



A classic side-scroller with satisfying graphics and a fun vibe. Try it out!




Crawler's Den



Replay the Leadwerks AI and Events map with this reimagined implementation done in pure C++. There's also an interesting blog about the development experience.







Sneak through the corridor and avoid the enemies. Excellent map design makes this a great entry to check out.




World Factions



An MMO RPG game where the online is similar to Minecraft in that players can host their own server.




Now that you've had time to get acquainted with Leadwerks, it's time for the Summer 2016 Game Tournament.



WHEN: The tournament will start Monday, July 25, and end Sunday, August 21th at 11:59 P.M. (Pacific Standard Time).


HOW TO PARTICIPATE: Publish your summer-or-other-themed game to Steam Workshop or upload it to the games database before the deadline. You can work as a team or individually. Use blogs to share your work and get feedback as you build your game. If you need models for your game, we've got a summer model pack for you to use for free from Leadwerks Workshop.


Games must have a preview image, title, and contain some minimal amount of gameplay (there has to be some way to win) to be considered entries. It is expected that most entries will be simple, given the time constraints.


PRIZES: Rather than a competition, this tournamant is a "co-opetition". Everyone who participates gets a prize!


If this is your first game tournament entry, you will receive a cool Leadwerks sticker in the mail.




If this is your second game tournament entry, you'll receive a collection of three limited-edition professionally printed postcards featuring beautiful Leadwerks screenshots. Send them to a friend or put them on the wall.




If this is your third game tournament entry, you'll receive a rockin' Leadwerks T-shirt in the mail. Wear it to show how cool you really are.




If this is your fourth game tournament entry, you'll receive the new Leadwerks hoodie! This gorgeous garment makes you look like a Silicon Valley startup geek. This light jacket is perfect for air-conditioned spaces that are just slightly chilly.




If this is your fifth game tournament entry, you will receive a Steam Controller. The Steam Controller lets you play your entire collection of Steam games on your TV—even the ones designed without controller support in mind.


Bonus Prize

All participants will receive an 11" x 17" printed poster for the Summer Games 2016 Tournament! This limited-run item will be printed only once, only for this event. This is your only chance to get this poster, ever.




Make games and have fun!