Jump to content

  • Log In with Google      Sign In   
  • Create Account

Leadwerks Developer Blog

Leadwerks 3.0 Terrain Update Now Available

Posted by , 01 September 2013 - - - - - - · 1,015 views

A new update to Leadwerks 3.0 is out. Registered developers can run the Leadwerks updater to download and install the patch. This update adds terrain, bug fixes, and a few small feature enhancements.

Our new terrain system, described in our Kickstarter campaign to bring Leadwerks to the Linux operating system, is based on a unique "dynamic megatextures" approach. This technique renders sections of the terrain into virtual textures and places them around the camera. The terrain presently allows a maximum size of 1024 meters and 16 texture layers, but these constraints can be lifted in the future once it's been thoroughly tested. You can see an example terrain the the "terrain.map" scene included in the example project folder.
Posted Image

With the increased scene geometry terrain brings, I found it necessary to precalculate navmeshes in the editor. To calculate a navmesh for a map, select the Tools > Build NavMesh menu item to being up the Build NavMesh Dialog. The navigation data will be saved directly into your map file for pathfinding. Two values have been exposed to control the navmesh calculation and the appearance of the navmesh has been improved to allow easier visual debugging. Additionally, the new World::BuildNavMesh command lets you calculate navigation meshes in code.

The bug report forum contains info about recently fixed problems. The most notable fix was for character controller physics. Some frame syncing issues were fixed which were causing entities to sometimes pass through walls and floors. This problem was very apparent in the recent game demo GreenFlask.

A new command World::SetPhysicsDetail allows you to balance the speed and accuracy of the physics simulator.

The Transform::Plane command has been enhanced to work with Lua, which had trouble understanding the syntax of the command.

Development of Leadwerks 3.1 for Linux remains on schedule for the December release. With the (highly experimental) terrain system out of the way, my attention is turning towards the OpenGL 4 renderer and getting my Linux expert started with the porting process to make Leadwerks run natively on Linux.

Procedural Terrain

Posted by , 29 July 2013 - - - - - - · 1,910 views

I wanted to add some default procedural generation tools in the Leadwerks 3.1 terrain editor. The goal is to let the user input a few parameters to control the appearance of their terrain and auto-generate a landscape that looks good without requiring a lot of touch-up work.
Programmers commonly rely on two methods for terrain heightmap generation, Perlin noise and fractal noise. Perlin noise produces a soft rolling appearance. The problem is that Perlin noise heightmaps look nothing like real-life terrain:
Posted Image

Fractal noise provides a better appearance, but it still looks "stylized" instead of realistic:
Posted Image

To get realistic procedural terrains, a more complex algorithm was needed. After a few days of experimentation, I found the optimal sequence of filters to combine to get realistic results.
We start with a Voronoi diagram. The math here is tricky, but we end up with a grid of geometric primitives that meet at the edges. This gives is large rough features and ridge lines that look approximately like real mountains:
Posted Image

Of course, real mountains do not have perfectly straight edges. A perturbation filter is added to make the edges a little bit "wavy", like an underwater effect. It gets rid of the perfectly straight edges without losing the defining features of the height map:
Posted Image

The next step is to add some low-frequency Perlin noise. This gives the entire landscape some large hills that add variation to the height, instead of just having a field of perfectly shaped mountains. The mixture of this filter can be used to control how hilly or mountainous the terrain appears:
Posted Image

We next blend in some Fractal noise, to roughen the landscape up a bit and add some high frequency details:
Posted Image

Finally, we use thermal and hydraulic erosion to add realistic weathering of our terrain. Thermal erosion works by reducing the harshness of steep cliffs, and letting material fall down and settle. Hydraulic erosion simulates thousands of raindrops falling on the landscape and carrying material away. This gives beautiful rivulets that appear as finger-life projections in the height map: Rather than relying on conventional hydraulic erosion algorithms, I created my own technique designed specifically to bring out the appearance of those features.
Posted Image

Here is an animation of the entire process:
Posted Image

And in the renderer, the results look like the image below. All the parameters can be adjusted to vary the appearance, and then you can go in with the manual tools and sculpt the terrain as desired.
Posted Image

The new landscape has ridges, mountains, and realistic erosion. Compare this to the Perlin and fractal landscapes at the top of this article. It's also interesting that the right combination of roughness and sharp features gives a much better appearance to the texture blending algorithm.

Leadwerks at Cereal Hack 3

Posted by , 27 July 2013 - - - - - - · 621 views

Leadwerks is a prize sponsor for Cereal Hack 3 at the Sacramento HackerLab. I stopped by in the morning to listen to the pitches and say hi. Here are a few photos from the event:

Posted Image

Posted Image

Posted Image

Posted Image

Introducing "Death Statue"

Posted by , 26 July 2013 - - - - - - · 645 views

I've been seeing glimpses here and there over the last couple of years of a project by one of our users. He didn't give much detail in the past, but what he did show the community looked stunning. Now, after two years of work, FSR Game Development has finally unveiled the official trailer for Death Statue, and it's spectacular!

Although this was made in the old version of Leadwerks (which isn't surprising, considering how long they've been working on it), this is representative of the quality of games we can bring to Linux with Leadwerks 3.1.

Stretch goals revealed for Leadwerks for Linux Kickstarter campaign

Posted by , 17 July 2013 - - - - - - · 618 views
leadwerks, linux, OpenGL, android and 4 more...
With two weeks left to spare, I'm pleased to announce our stretch goals for the Leadwerks for Linux Kickstarter campaign:

$26,000 - Android + Ouya for All: We will provide all backers who pledged $100 or more with Android support. We’ll also add support for OUYA, the Android-based open game console. This will let you build games for Android and OUYA, without ever leaving the Linux operating system.

$30,000 - Blender integration: We want to integrate Leadwerks with the free 3D modeling package Blender. We’ll start with a Blender exporter that saves a model and all materials ready-to-use in Leadwerks, and look for other Blender features we can put to work in our engine.

$35,000 - 64-bit Builds: We’ll provide 64-bit builds of the Leadwerks engine library, along with the 32-bit library. (We decided to provide this for Linux by default. The stretch goal is for 64-bit builds on Windows and Mac.)

$45,000 - Visual GUI Editor: We want to build a fully integrated GUI editor right into Leadwerks. This will let you create game menus with buttons, sliders, switches, and more, in a fully skinnable GUI system. GUI elements will even integrate with our flowgraph system, so you can visually attach GUI elements to scripted events and C++ callbacks.

$55,000 - Oculus Rift + Omni in Linux: We want to integrate the great virtual reality headset Oculus Rift with Leadwerks, all running natively in Linux. We’ll even include support for the Omni VR treadmill, so Linux developers can create the full VR experience.

$85,000 - Broaden Your World: We’ll implement full 64-bit floating point math and streaming terrain data to create worlds beyond the limits of 32-bit floating point precision. Want to create detailed worlds ten times bigger than Crysis maps? We can make it happen.

$150,000 - Choose Two Flavors of Linux: Variety is the spice of life, and Linux is baked with plenty of it! We’ll work with the top two distros backers choose to provide full Leadwerks integration and ongoing support for two years.

$200,000 - Plugin-Free 3D Web Games: We’ll work with asm.js to compile Leadwerks in web-ready format so you can distribute 3D web games for supported browsers, with no proprietary plugins required.

You did it! Native game development is coming to Linux

Posted by , 10 July 2013 - - - - - - · 692 views

In just three weeks, the Linux community has successfully funded the development of Leadwerks for Linux. This means we're going to bring Leadwerks 3.1 to Linux, with native support for developing Linux games...so Linux games can now be completely free from Windows.

It's been an amazing few weeks. During this time, we also successfully completed our Greenlight campaign to make Leadwerks available on Steam and take advantage of features like the Steam Workshop. You can see from the graph below that our campaign did better than any other software in Steam we had data for. The votes look like they would have gone a lot higher, but Valve approved us early!

Posted Image

I also had a chance to prototype the major feature of Leadwerks 3.1 I was most concerned about. I wanted to implement a new terrain system that would remove the limitations of our old one, and thought that a technique I call "dynamic megatextures" would be a good solution. Basically, this works like id Software's megatexture technology, only the virtual textures are generated on-the-fly rather than being paged from the hard drive. This means the entire terrain can be uniquely textured, but it doesn't require the hard drive space megatextures usually need:

Posted Image

Getting that knocked out of the way makes me confident we can deliver Leadwerks 3.1 for Linux according to our original vision.

Congratulations, Linux community! I'm happy to make Linux a core part of our company's focus moving forward.

Leadwerks gets Greenlit for Steam

Posted by , 02 July 2013 - - - - - - · 630 views

Leadwerks has been successfully Greenlit for Steam, meaning we can integrate great features like the Steam Workshop and Valve file formats right into our game engine! Thank you so much to everyone who voted.

We saw an incredible response from the Steam Linux community, both here and on our Kickstarter campaign for Linux support, which is nearly 85% funded. If the campaign reaches the first stretch goal, we're throwing in Android and OUYA support for everyone who pledged $100 or more to the campaign.

Valve is one of my earliest influence in design and coding, and I'm really excited to be working more closely with them in the near future. Again, I sound like a broken record, but a big THANK YOU to the Steam, Linux, and Leadwerks communities!

OUYA GameJam Results

Posted by , 24 June 2013 - - - - - - · 768 views

Over the weekend I attended an OUYA game jam and got to play around with the OUYA dev kit for the first time. My goal was to see if I could get Leadwerks running on it. I had problems with the USB driver, but compiling went smoothly:

Posted Image

I didn't have any problems with controller latency, but did not finish mapping the controls or updating our project to use some newer functions we need. In the end, I had to manually copy the compiled .apk file to the device to deploy it. All in all, it was a good proof of concept.

Posted Image

Last week we launched a Leadwerks for Linux Kickstarter campaign. As we now pass the 60% mark, we're ready to unveil our first stretch goal. We want to put OUYA development in the hands of every Leadwerks developer, so we're making that our first stretch goal. There's still a lot of work to be done, but my tests last weekend prototyping Leadwerks on OUYA proved it was possible. When our campaign reaches the $26,000 mark, we will provide all backers who pledged $100 or more with OUYA support, delivered at the time Leadwerks for Linux is ready. This will let you build games for OUYA and Android, without ever leaving the Linux operating system.
Posted Image

Although the OUYA is new and the firmware still has a few rough spots, it's a lot of fun deploying games straight to your big-screen TV, and we've already prototyped it. We're looking forward to bringing OUYA game development to Linux users.

Crowdfunding Experiment: Leadwerks for Linux

Posted by , 16 June 2013 - - - - - - · 2,328 views
leadwerks, linux, ubuntu
Last week we launched our Steam Greenlight campaign to get Leadwerks into the hands of the Steam community. This week, we're rolling out the second stage of our plan with a Kickstarter campaign to bring Leadwerks to Linux. This will let you build and play games, without ever leaving Linux. The result of this campaign will be Leadwerks 3.1 with a high-end AAA renderer running on Linux, Mac, and Windows, with an estimated release date before Christmas.

Valve has given Linux users a taste of PC gaming, so now it's up to us to reach the Linux community with our message. If you dig this, please help spread the word that someone is trying to put game development on Linux:

Leadwerks for Linux
Linux is a solid and secure operating system that’s perfect for gaming, but at this time Windows remains the lead platform for PC games. We want to change that by putting the game development process right on Linux, with Leadwerks for Linux. This will allow you to build and play games without ever leaving the Linux operating system.

Leadwerks is a visual tool for building any kind of 3D game, including dungeon crawlers, first-person shooters, and side-scrollers.. We want to put game development on Linux with Leadwerks for Linux. Our campaign has three goals:

Linux Game Development. On Linux.
It’s not enough just to export games to Linux. We want to put the game development process on Linux, so you can build and play games, without ever leaving the Linux operating system. We have a complete visual editor that handles all aspects of the game development process, and we’re porting it to run natively on Linux. We’re using GTK for the user interface, so our editor will look and feel like a native Linux application.

We're targeting Ubuntu 12.04 to start with, and will support other distros as we make progress. You'll also be able to compile games for Windows and Mac...if you feel like sharing.

Posted Image

Expand the Linux Library of Games
Our second goal is to facilitate expansion of the Linux library of games, and encourage the production of Linux-exclusive titles. The Linux community is pretty intelligent, and they have a lot of good programmers. We think by putting the appropriate tools in their hands, it will enable them to make great Linux games.

Posted Image
Hoodwink by E-One Studio

AAA Graphics on Linux
Leadwerks is known for having great graphics. We want to push Linux graphics beyond anything that’s ever been done. Linux is the perfect platform for triple-A graphics, because it has OpenGL performance faster than Windows or Mac. We’re taking advantage of this performance with deferred lighting, hardware tessellation, and up to 32x multisample antialiasing.

Posted Image
The Zone by Dave Lee

Steam Integration
When Valve announced Steam was coming to Linux, that was a clear sign to us that Linux is ready for PC gaming. We’re working to integrate Leadwerks with Steam and take advantage of new features Steam offers for developers.

Posted Image

Steam Workshop
We’re hooking into the Steam Workshop to deliver game assets. This includes models, textures, scripts, and maps, so you can get everything you need to make games. When you find an object in the Steam Workshop you want to use in your game, just hit the “Subscribe” button and it will show up right away, ready to use in Leadwerks. We’re also adding support for Valve’s asset formats, so you can access lots of great content from the rest of the Steam Workshop, and add it to your game.

Export for Steam
We’re working with the Steam SDK to make it easier to submit Linux games to Greenlight. Just press a button, and your game files will be packaged up, ready to send to Steam.

Leadwerks is a powerful yet easy to use game engine with thousands of users worldwide. Here are just a few of the main reasons we think Linux users will love Leadwerks.

C++ Programming
Programming with Leadwerks is a breeze. Underneath our visual editor lies a powerful yet easy to use programming API that can be accessed in C++, Lua, and other languages. With documentation and examples for every single command, you’ve got everything you need to make any kind of game.

Visual Scripting
For scripting, we use the Lua script language, just like in Crysis, World of Warcraft, and hundreds of other games. We’ve got a built-in script editor, so you don’t have to switch back and forth between Leadwerks and an external editor. It’s even got a built-in debugger so you can step through your script and see everything that’s going on in the game. The flowgraph editor is used to connect scripted objects and make gameplay happen. This lets map designers set up sequences of events and complex gameplay, with no programming required.

Constructive Solid Geometry
Finally, we use a level editor based on constructive solid geometry. This lets everyone make game levels, without having to be an expert. If you’re familiar with Valve’s Hammer Editor, you’ll feel right at home in Leadwerks.

Posted Image
Combat Helo by Tricubic Studios

We plan to deliver a visual editor that handles every aspect of the game development process, a powerful yet easy to use programming API, with triple-A graphics, all running natively in Linux. By working with Steam and the Linux community, our goal is to make Linux the number one platform for PC gaming. Thank you for helping us take Linux gaming to the next level.

Posted Image
Big Five Game Hunter by Unidev

Risks and challenges
We expect to encounter some graphics driver bugs. This is always the case when you are pushing advanced graphics. Fortunately, we have good relationships with the major graphics hardware vendors, and have been able to get driver bugs fixed on other platforms in the past. Valve Software has done some of the heavy lifting for us here, by prompting the graphics hardware vendors to get their drivers in good shape.

Our GUI has a GTK implementation for Linux, but we expect to encounter some problems that have to be overcome. Our GTK Scintilla implementation (for the code editor) has not been written, and it's a complex library.

Since the Linux file system is case-sensitive, we expect to have to modify some code to work properly on Linux.

We're implementing a new method for terrain layers using virtual texturing. We do not anticipate any problems here, but it is one of the few features we haven't fully prototyped.

Although building Leadwerks for Linux will undoubtedly present some difficult problems, our team has a lot of experience with multi-platform development and I'm confident we can deal with all issues we encounter.

Leadwerks on Steam

Posted by , 03 June 2013 - - - - - - · 1,928 views

Leadwerks on Steam I first connected with Valve Software during GDC 2013. I recognized an opportunity to work together, so last week I paid a visit to Bellevue, Washington and met with Valve employees (no one has job titles in the company except Gabe) and discussed Leadwerks and the evolving Steam platform.

Today, I'm excited to announce our Greenlight campaign for Leadwerks 3: Steam Edition.


This software will be distributed through Steam and allow you to build games with Lua script and publish them to Windows and Mac through Steam. We think Steam users will love Leadwerks, for a few reasons.

Constructive Solid Geometry
First, we use a level editor based on constructive solid geometry. This lets everyone create game levels, without having to be an expert. If you're familiar with Valve's Hammer Editor, you'll feel right at home in Leadwerks. It's fun to make game levels, and anyone can do it.

Write Games with Lua Script
Second, we use Lua script, just like in Garry's Mod, World of Warcraft, Crysis, and hundreds of other games. We have a built-in script editor so you don't have to switch back and forth between Leadwerks and an external program. It's even got a built-in debugger so you can step through your script and see everything that's going on in the game.

Visual Scripting
Finally, we use a flowgraph editor to connect scripted objects and make gameplay happen. You can view the functions of scripted objects and just click and connect them. This lets map designers create sequences of events and complex gameplay, with no programming required.

But it's not enough to just put Leadwerks on Steam. We want to fully integrate these technologies to deliver a complete game development platform, running within Steam.

Steam Workshop Integration
We're hooking into the Steam Workshop to deliver game assets. This includes models, textures, scripts, and maps, so you can get everything you need to make games. When you find an object in the Steam Workshop you want to use in your game, just hit the "Subscribe" button and it will show up right away, ready to use in Leadwerks.

Support for Valve Asset Formats
We're also addng support for Valve's asset formats so you can access lots of great content from the rest of the Steam Workshop and add it to your game.

Export for Steam
We're working with the Steam SDK to make it easier to submit your games to Greenlight. Just press a button and your game files will be packaged up ready to send to Steam.

Our dream is to unite the entire Steam community into this big global game-producing factory, where everyone can do what they're best at. We need your help to make it happen. Please vote for us on Greenlight and show Valve the Steam community wants to build their own 3D games with Leadwerks.

We'll do our best to make sure all current Leadwerks users can get Leadwerks 3: Steam Edition added to their Steam account for free. To help facilitate this, please add your Steam ID to your Werkspace profile.

Vote for Leadwerks
To vote for Leadwerks 3: Steam Edition on Greenlight, visit www.leadwerks.com/greenlight or find us in the Greenlight software section in Steam.