Jump to content

  • Log In with Google      Sign In   
  • Create Account

Leadwerks Developer Blog

Adding Native Support for Steamworks, Steam Controller

Posted by , 21 January 2014 - - - - - - · 1,054 views

A new update for Leadwerks has been posted which adds new features that allow users to use Steam features.

Steamworks Integration
Leadwerks now has native support for the Steamworks SDK. You can make your game ready to publish on Steam by calling Steamworks:Initialize(). This also enables the in-game overlay so you can take screenshots, chat with friends, and access the entire Steam community in-game.

Posted Image

Screenshot Publishing
The new screenshot publishing window allows you to upload rendered images directly to your online screenshots library, where it will show up on your Steam profile and the Leadwerks community hub.

Posted Image

Steam Controller
We've added native support for the new SteamOS Controller. You can get input from the controller and even send haptic feedback back to the device.

You can learn more about these new features in the documentation here.

Steam Launch Recap and Steam Dev Days

Posted by , 13 January 2014 - - - - - - · 962 views
On Monday, Leadwerks Game Engine: Indie Edition was finally launched on Steam. Before the Kickstarter campaign there was a Greenlight campaign to put Leadwerks on Steam, which it got through in just 27 days. Based on the success of the Kickstarter campaign, I decided to delay the Steam launch and try to get Linux done in time. However, there was one serious deadline I could not miss, and that was the Steam Dev Days conference next week. I knew we needed to have an actual product on Steam by then, and not be stuck in Greenlight limbo, so I went ahead and put what we had up, which is Windows-only. Steam keys were sent out to all Kickstarter backers who chose a software reward.

The launch went remarkably smoothly. Due to the limitations of the product (one OS, Lua-only) it made testing and updates much easier than if we tried to do a multi-platform launch all at once. There have been two patches, one to fix compatibility with Nvidia Optimus laptops, and the other to fix a few miscellaneous problems that didn't come up during beta testing.

The response from the early users, and from those of you who have tried it on Windows, has been very good. We seem to have hit the right formula with our combination of BSP brushes, navmeshes, Lua, and the flowgraph system. User engagement is high and I can tell that people "get it". We're starting to see content trickle out on Steam, and I can tell already this year is going to bring some really cool projects made by Leadwerks users. The decision to build a friendly workflow and focus on enabling user-generated content was a good one, as we are already seeing some impressive stuff come out, after only a few days, like this high-res tessellated material from "Shadmar":

Posted Image

Now that you have a more concrete idea of what we're building, I hope you are more excited than ever to have this running natively in Linux. I am returning my full attention to Linux development now. There's nothing else I need to work on but this, and I am determined to have Leadwerks, editor and all, running natively in Linux no matter what it takes. Steam Dev Days

Next week I head up to Seattle to attend Steam Dev Days for two days. I'm not giving any lectures or doing promotion, so it will be a relaxed trip with no prep work. This is going to be Valve's conference for the Linux-based SteamOS. SteamOS is an open console operating system. 13 hardware manufacturers showed off their "Steam Machine" consoles at the Consumer Electronics Show last week.

My personal favorite is the Scan NC10:
Posted Image
Leadwerks (the engine) will reportedly run on these machines right now with no changes. I'll learn more next week at the conference and share what information I can with you. Can Linux Take Over the Living Room in 2014?
I'm going to go ahead and call it now: Linux is going to take over the living room in 2014. Why?
  • Compatibility: Steam Machines are backwards-compatible. You can play your old games forever.
  • Market Segmentation: Steam Machines will eat the market from both ends. There will be extreme high-end models as well as inexpensive compact models.
  • Visibility: Traditional consoles get a big launch every seven years. Steam Machines will have continued releases, probably on an annual basis like cell phones.
You can watch the man himself, Gabe Newell, talking about it here:

Again, I would like to thank everyone who backed our Kickstarter project and had the foresight to realize Linux gaming was about to explode.

Leadwerks is on Steam

Posted by , 07 January 2014 - - - - - - · 1,816 views

Well, I finally got Leadwerks onto Steam with an "indie edition" focused on Lua.

The response has been quite good. It's pretty surprising to see it in the top ranking place for software, and on the front page of Steam, especially right now when there is so much interest in Valve. I guess January is a great time to put news out!

Attached Image

If you want the whole razzle-dazzle news story, you can read it here:
Leadwerks Game Engine Arrives on Steam, Turns Players into Makers

Next week, I head up to Steam Dev Days. I have resolved to either come back with a SteamOS controller or Gabe Newell's beard.

Thanks to everyone who voted for it on Greenlight!

Leadwerks 3.1 Pre-orders Now Available, Indie Edition coming to Steam January 6th

Posted by , 16 December 2013 - - - - - - · 1,815 views

Leadwerks 3.1 is nearly ready for release! In Leadwerks 3.0, we focused on making a solid cross-platform art pipeline and editor. In 3.1 we're adding graphics that go above and beyond the capabilities of Leadwerks 2.

New Features in 3.1
  • OpenGL 4.0 deferred renderer with up to 32x hardware MSAA.
  • Geometry and tessellation shaders.
  • Support for the Linux operating system, for both the engine AND editor.
Posted Image

Leadwerks 3.1 is now available for pre-ordering in the Leadwerks store. Existing 3.0 customers can pre-order the upgrade to 3.1 for $99. New customers can pre-order Leadwerks 3.1 for $199. Order before January 6 and get the Indie Edition on Steam for free.

The upgrade to an OpenGL 4 deferred renderer is a big step. To make the process smoother and put Leadwerks in your hands sooner, we're rolling Leadwerks 3.1 out in stages.

"Leadwerks: Indie Edition" will be launched on Steam January 6th. This will be on Windows only, with support for Lua scripting. The following groups will receive a free Steam key to add this product to their Steam account:
  • Leadwerks 3.0 customers who pre-order the upgrade to version 3.1.
  • New customers who pre-order Leadwerks 3.1.
  • All Kickstarter backers who backed Leadwerks for Linux for $49 or more. (Even if you don't run Windows, hold onto this as the Linux version on Steam will have special features.)

Leadwerks 3.1 for Linux and Windows will be released together next, with the exact release date to be determined. Leadwerks 3.1 for Mac will follow this, with mobile add-ons for iOS and Android coming last. (There is no upgrade purchase necessary for the mobile upgrades for Leadwerks 3.1.)

  • Leadwerks 3.1 beta testers will receive the 3.1 upgrade for free.
  • Leadwerks 3.0 customers who backed the Leadwerks for Linux Kickstarter project for $99 or more will receive the 3.1 upgrade for free.

Leadwerks 3.1 is a very strong product, with great graphics and a fantastic art pipeline. I'd like to thank all the users, both old and new, who offered their input on product design and the direction of the company. I can't wait to see what the community does with Leadwerks 3.1.

Leadwerks 3.1

Posted by , 02 December 2013 - - - - - - · 1,233 views
linux, ubuntu, steamos
It's December, which means Leadwerks for Linux is nearly here! Last week I had to get into more depth with our tutorials. We're creating a series of maps that demonstrate simple game mechanics. The goal is to show how to set up game interactions by attaching scripts to objects and connecting them in the flowgraph editor, without getting into any actual programming. These lessons center around a first-person shooter, but are applicable to many types of games.

I had to get my hands dirty in the lessons another programmer was developing because there were a few bugs preventing them from working right. As we started getting into some more advanced interactions and physics we found some things that had to be fixed. Most of this revolved around the character controller physics and all the different situations the player can encounter. It's now working correctly, and we will be able to demonstrate some fun physics puzzles you can set up in the editor.

There's just a few more steps to getting Leadwerks for Linux out. The new tutorials need to be written and recorded, which is actually the easy part. The final lesson needs a full mini-level designed. I'm still having trouble with the GTK UI, but it's the kind of thing that I just need to keep plugging away at. Since the Nvidia and ATI drivers for Linux work flawlessly, we aren't dependent on any third parties fixing their code, which is a big relief.

Before Kickstarter, we ran a Greenlight campaign to put Leadwerks on Steam. Originally, this was going to be released last summer, but I decided to focus on Linux development and release them around the same time. Leadwerks for Steam is a more limited version of what the Kickstarter backers are getting, and will initially only be available for Windows.

Building FPS Mechanics
Getting into the lessons was fun for me because I got to work on some gameplay design. When building a game, it's important to decide what to focus on. There are an infinite number of ways you can waste your time, so it's critical that you decide what is important and focus on that. We could have implemented an endless number of little interactions in our gameplay lessons, and it's easy to do with our flow graph system, but I decided I wanted to focus primarily on the basic combat and feel of the player. There's a big difference between a demo where you walk around in a game level holding a gun, and a first-person shooter that feels like you are interacting with the game. I wanted to capture that feeling of being in the game, because it will benefit all the derivative games and demos for Linux that are built off of this. With that in mind, I set out to analyze exactly what it is that makes a first-person shooter feel interactive.

Player Movement
The first basic thing you can do to enhance the player experience is add footstep sounds. Don't use just any footsteps. if they don't sound good, it won't feel right. IndieGameModels.com happened to release a pack of footstep noises that are excellent. I negotiated a special license for some of the sounds and will include them in Leadwerks 3.1, free for use. One subtle thing I learned from Valve games is that it's better to play the "landing" sound when the player jumps, not when they land. It gives a much better feeling of interaction with the level, for some reason.

A very slight camera bob was added so that when you jump, it feels like your arms have inertia. I also tried smoothing the rotation of the arms so they lag a little as you look around, but it looked terrible and they were jumping around on the screen. So while a little inertia can be a subtle indicator of motion, too much is definitely not good.

How do you really tell when a gun is being fired? What makes it "feel" right? I had to look at some games from the all-time masters of first-person combat, id Software. I added a muzzle flash sprite that appears for a fraction of a second when you fire, as well as a point light at the tip of the barrel. The deferred renderer in Leadwerks 3.1 makes the light cast dynamic shadows, giving a convincing feeling of space and depth.

When a bullet strikes a wall or other surface, you need some visual cue of what happened. A set up two emitters that get copied and played with a one-shot animation whenever a bullet collides with something. One emitter throws off solid chunks with a high gravity value, while the other is a software smoke that slowly emits from the point of impact. A secondary blood effect was created for when living objects are shot.

When i initially implemented combat with our crawler character (the new AI navigation system makes this great!) I found the action to be...strange. I had a pistol with unlimited ammo and no reloads, and taking down a pack of crawlers was extremely easy. I assumed I had just not given them enough health, or made the bullets too powerful, and just kept working on it. It wasn't until I added two other aspects of gameplay that I realized how big of an influence they have on the game mechanics.

Posted Image

Reloading your weapon doesn't just give you a feeling of "realism". It actually introduces a whole new aspect of gameplay. Not only do you have to ration your ammo, but you have to ration your clip and not fire too many shots too quickly. Once you get surrounded by a pack of crawlers and you are trying to reload your weapon to get another shot off, you can quickly get taken down. So the speed of reloading and size of the clip actually become critical design decisions on what kind of game you want.

The second thing I added was making the camera bounce around when hit. When a crawler slaps you, the camera will be pushed off to the side. You can see this in Doom 3 when the player gets hit by a monster. I found this enhancement has two effects:
  • First, it's unpleasant. Having your view suddenly disoriented is a jarring feeling that comes through the game to effect you in real life. It's almost as good as the pain vest I see someone besides me also had the idea for. When you have the possibility of an unpleasant experience, it makes you afraid, and changes the way you play and makes enemies feel much more menacing.
  • Second, it adds a new gameplay mechanic. Getting slapped around makes it harder to aim. If you get surrounded by a pack of enemies, it gets very difficult to hit anything. So not letting them get near you becomes very important.
I think that by focusing on these core elements and providing a structure Linux game developers can build on, we can foster development of a great many derivative projects that make use of these mechanics. The fact that it's happening on Linux is exciting, because it feels like we are doing something truly new, almost like the early days of first-person shooters.

It's hard to predict the exact release date of Leadwerks for Linux, but we're getting close. My original estimate for the development timeline turned out to be pretty accurate on almost everything. Stay tuned!

Leadwerks 3.1 Enters Beta; Heading to Steam Dev Days

Posted by , 29 October 2013 - - - - - - · 1,192 views
Linux, Ubuntu, SteamOS
Leadwerks 3.1 has entered the beta testing phase on schedule according to our development plan laid out in the Leadwerks for Linux Kickstarter campaign. Supporters who chose the SUPER BACKER reward have been granted access to try the early builds of Leadwerks for Linux.

We chose to use the excellent Code::Blocks IDE for Linux development. Beta testers can access the full Leadwerks API to program graphics, physics, and gameplay, along with a few new functions like Camera::SetMultisampleMode(), which sets the render antialiasing level.

Posted Image

Although the beta is not a complete finished product, we've already learned a lot about building high-end graphics for Linux. First of all, the Linux OpenGL drivers for ATI and Nvidia hardware are fine. We've encountered no graphics drivers bugs (so far). This may be due to the streamlined nature of OpenGL 4, as it removes a lot of legacy functionality. Whatever the cause, OpenGL drivers for Linux work great, much better than Windows drivers did a few years ago in the dark days between OpenGL 2 and 3.

The biggest remaining challenge is to get the editor running in Linux. We anticipate two difficult parts to this. First, although we have a GUI abstraction layer that uses GTK on Linux, we expect some amount of fiddling to be necessary to make it work right. Second, the case-sensitive nature of the Linux file system will cause issues that need to be dealt with since there are many placed where our editor stores file names in lower-case format. This will require a lot of effort to resolve, but it's not any harder than some of the other issues we have dealt with so far in the development of Leadwerks for Linux. The benefits of having a Linux game editor with a native look and feel will make it worth the extra effort it takes.

Steam Dev Days
Leadwerks founder Josh Klint has been invited and will be attending Steam Dev Days in Seattle, Washington. Steam Dev Days is a two-day game developer’s conference where professionals can meet in a relaxed, off the record environment. Developers will share their design and industry expertise, participate in roundtable discussions and attend lectures by industry veterans on topics ranging from game economies to VR, Linux/OpenGL, user-generated content and more. Developers will also have direct access to Valve’s Steam Team, and will be given a chance to test-drive and provide feedback on Steam OS, prototype Steam Machines and Steam Controllers.

Posted Image

Building Leadwerks for Linux and SteamOS

Posted by , 05 October 2013 - - - - - - · 692 views

Building Leadwerks for Linux and SteamOS Compiling Leadwerks for Linux using the Code::Blocks IDE wasn't very hard. I particularly like the way Code::Blocks handles files in projects. Instead of creating your own "fake" file system in the project explorer, you just add the folder or files you want, and they are organized in a hierarchy that matches the file system.

I found the X windowing system to be extremely easy to work with. I've implemented windowed OpenGL contexts on Windows, OSX, iOS, and Android, and Linux was by far the most straightforward and simple.

One problem I ran into was that some Leadwerks classes conflict with Linux classes. Our Windows, Font, and Time classes match other classes in the Linux headers. I got around this by prefixing the classes with the "Leadwerks::" namespace, but some better solution should be found.

Upon my first attempt to run Leadwerks, all I got was a blue screen. I fell back from OpenGL 4 to OpenGL 2 and started playing with the OpenGL matrix commands (a relic of the fixed-function pipeline I never even use anymore). When I called glOrtho() with the context width and height, I produced an OpenGL INVALID_VALUE error. From there it wasn't hard to figure out the cause...

int Window::GetClientWidth) { return 0;/*don't forget to add this later*/ }
Once I implemented the missing function, everything worked fine. So I am pleased to unveil the very first screenshot in the history of the universe of Leadwerks running in Linux using OpenGL 4:

Posted Image
Behold, the green square of triumph!

Though this is a simple example, we have a full 3D engine with deferred lighting and a really unique terrain system, so I don't think it will be long now before we can start showing off some great Linux graphics. Linux has the fastest possible performance for 3D rendering, so it will be interesting to see what we can do with it.

Build a Killer Linux Gaming Machine for $430

Posted by , 04 October 2013 - - - - - - · 889 views

Several people have asked me for my hardware recommendations for a new Linux gaming machine. I get rather frustrated by PC manufacturers who load computers up with expensive Intel CPUs and extra RAM you don't need, and then forget to include a graphics card. Or they proclaim PC gaming is not deadand proudly announce their "gaming machine" with a shoddy GPU, that costs more than my first car. I've been building my own PCs since high school, and I know you can build a PC with superior performance and lower prices than the garbage PC vendors are selling today. So I am writing this article to tell you what I would buy if I wanted to build a high-quality future-proof gaming PC with big performance on a small budget.

These components were chosen to give great performance at an affordable price, with maximum upgradability. I expect this computer would run any PC game today with maximum settings at 1920x1080 resolution. Components were chosen specifically for gaming, thus more importance is placed on the GPU and the CPU is relatively more lightweight. If you do not want to assemble the components yourself, any computer shop will do it for less than $100. I only chose components from reputable brands I have purchased hardware from before, no cheap brands or refurbished parts.

For Linux gaming, I recommend buying AMD CPUs. The integrated graphics chips in Intel CPUs may cause problems with detection of a discrete graphics card and make it very difficult to install graphics drivers. AMD CPUs also give a better price/performance ratio with somewhat slower single-threaded speeds at a much lower price. For gaming, the single-threaded CPU speed isn't actually that important since the intensive tasks like rendering and occlusion culling are typically offloaded onto the GPU, and modern game engines like Leadwerksmake extensive use of multi-threading.

Disclaimer: I have not built a machine with these exact components. I am not responsible if it doesn't work, do so at your own risk, blah, blah, blah. Now on to the parts...

Asus M5A78L-M LX3 Desktop Motherboard (Socket AM3+):
Price: $44.99

AMD FX-4300
Price: $109.99

Corsair 4GB DDR3
Price: $39.99

Graphics Card
MSI Nvidia GEForce 650
Price: $94.99

Cooler Master Elite 350 with 500w power supply
Price: $59.99

Hard drive
Seagate Barracuda 500GB
Price: $59.99

Optical drive
Price: $19.99

Total cost: $429.93

Other cost-cutting tips
  • If you have any old computer, chances are you can reuse the hard drive, memory, optical drive, and even the case. Eliminating these items would bring the cost down to a ridiculously affordable $249.97.
  • I could have got the price down to about $350 if I used really cheap parts, but I don't recommend doing this.
  • TigerDirect.com may have some prices even lower than NewEgg.com, but I find their pricing information to be confusing. I don't ever consider manufacturer rebates, since you have no guarantee you will ever actually receive a check.
Improving performance:
  • If you want better performance, invest in the graphics card. When shopping for graphics cards, just look at the number of "Cuda Cores". This will give you a pretty linear estimate of performance. (On ATI cards divide the number of "stream processors" by five and that is equivalent. But I don't recommend buying an ATI card for Linux gaming at this time.) My next choice up would be the Nvidia GEForce 670, which provides 1344 Cuda Cores versus the 650's 384, at a price of $299.99:
  • If I were to upgrade the CPU, I would get the FX-8320, which only costs $159.99 and gives the best price/performance ratio, according to cpubenchmark.net:
  • An SSD will significantly improve game load times, and will generally make your computer feel much snappier whenever files are accessed. However, the prices are still high compared to hard drives, like this 256 gb PNY SSD for $179.99:
The companies selling PCs don't seem to have a clue about gaming hardware requirements. Fortunately, you can build your own gaming rig and get better performance for much less money than anything they are selling. A good gaming PC doesn't need to be expensive. My recommended build here costs less than $430, and can be less than $250 if you have any spare parts lying around or an old computer you can cannibalize.

The upgradability of the PC means future upgrades can cost very little and add significant performance to your hardware. My suggestions for improving performance would raise the price by about $365, giving you a mid-high machine for $795. I don't recommend buying the very highest-end parts because the price/performance balance just isn't there, and a year from now whatever you bought will be second-best anyways.

When you're done building your killer Linux gaming machine, remember to take the money you didn't spend on Windows and use it to buy some great Linux games.

A Red Letter Day: SteamOS and Leadwerks

Posted by , 23 September 2013 - - - - - - · 1,132 views

Last week Valve founder and CEO Gabe Newell took to the stage at LinuxCon and proclaimed that "Linux is the future of gaming". Gabe talked about Linux gaming capabilities and promised to unveil something "on the hardware side" the following week. Today, Valve announced the upcoming release of SteamOS, a living-room operating system designed specifically to compete directly with the XBox, Playstation, and Wii console ecosystems. SteamOS will being openness to the console gaming world. This will have a lot of benefits for indie game developers:
  • Console game development will no longer require expensive fees to publish and update games. If you can get your game on Steam, it can go on a console.
  • Hardware manufacturers can compete to deliver better Steam-powered consoles. Gaming hardware will never again stand still for nearly ten years (as it did with the last generation of consoles).
  • Steam-based game consoles will be backwards compatible and future-proof. Games you buy now on Steam will still be playable on consoles three generations in the future.
I am very excited about this development and the future of open console gaming. Since we are already building Leadwerks for Linux, Leadwerks will be available for SteamOS as soon as possible.

Posted Image

Tech Progress
The Leadwerks 3 engine has been successfully compiled for Ubuntu 13.04. However, when running the application, all I saw was a blue screen. I decided to focus on the OpenGL 4 deferred renderer for a while. While working out the depth reconstruction for the deferred renderer, I realized I was making unnecessary calls to glDepthRange(), which weren't needed at all. After removing these calls my depth reconstruction code worked correctly; this was the cause of the errors I experienced when developing adeferred renderer on iOS for GDC 2013. I also believe the calls to glDepthRange() were what caused the engine to not render anything when running on Ubuntu, though I won't know for sure until I try it out.

Leadwerks 3.1 features an OpenGL 4 deferred renderer with support for up to 32x MSAA. I was able to get this running in just a few days. I already had parts of the OpenGL 4 renderer done, and I've been working with deferred renderers since 2008, so it all came together quickly. It's easier today to write a deferred renderer for a couple of reasons.

First, the state of OpenGL and driver support has gotten much better. Leadwerks 2 was written against the OpenGL 2.1 specification, which was not designed for deferred rendering. I relied on many vendor-specific extensions (some of which changed behavior halfway through the engine's life). OpenGL 4 was specifically designed for the type of things I am doing with it, so I am no longer fighting the spec. If a graphics driver has a problem, it's easier to get it fixed today than a few years ago, now that the rest of the industry has realized the benefits of deferred rendering.

Second, hardware today is much more powerful than when Leadwerks 2 was developed. Leadwerk 2 was written for GEForce 8800-level hardware, and used a lot of optimizations to favor speed over quality. With modern hardware I don't have to rely on so many hacks and I can push the upper limits higher. For example, Leadwerks 2 used a random edge jitter that gave a grainy approximation of soft shadow edges. With Leadwerks 3 I can increase the blur kernel and display beautiful soft shadows that look more like an offline cg render than real-time graphics:

Posted Image

Leadwerks Shwag Surfacing
Leadwerks Shwag is beginning to appear in the real world. Post your photos of you modeling a stylish Leadwerks shirt or sticker so the rest of the community can see!

Posted Image

Kickstarter shipping update, Leadwerks in the Wild

Posted by , 06 September 2013 - - - - - - · 586 views

All stickers from our Kickstarter campaign have been shipped, and they look absolutely fantastic:
Posted Image

I've never been a "sticker on my laptop" kind of guy, but I am putting one of these on mine as soon as I get home.

Physical items are a little different from getting software to customers. With software, there is at most a delay of a couple hours between the time I have it ready to go, and the customer is using it. I did not anticipate much of a turnover time for the shirts, and I still don't have all the ones I need. However, I am getting the last batch Monday and will ship them out the same day, or at least get them packaged, labelled, and ready to ship for the next day.

Leadwerks in the Wild
It's time to celebrate victory with your fellow backers and Linux gamers. Let's see your creative use of Leadwerks schwag! Post a photo on Google+ of your sticker or T-Shirt with the hashtag #LeadwerksInTheWild.