Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • entries
    901
  • comments
    5,558
  • views
    743,072

About this blog

Learn about game development technology

Entries in this blog

Build a Killer Linux Gaming Machine for $430

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 dead and 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 performa

Josh

Josh

Building maps with modular props

The beta branch on Steam is updated with a new build. Fixes and Enhancements The camera movement options have been made more sane. The range of possible values is a little more practical now. A mouse smoothing option has been added that makes the camera motion in the perspective viewport feel a lot more smooth and natural. I also found a bug that caused the camera move speed to change when a map was loaded. It was an annoyance that was almost unnoticeable but it feels much better now.  T

Josh

Josh

Some sample LE3 code

Here's some LE3 code for a simple program. The Graphics / Window stuff is not worked out 100%, and it's a little tricky because of the different operating systems and different kinds of windows.   I think we'll see a little more consistency across various languages with the LE3 syntax. It was suggested that the C syntax use the following scheme: verb-class-noun SetEntityPosition() GetMaterialTexture() I agree with this suggestion.   SetGraphicsDriver( OpenGLGraphicsDriver() ); Cre

Josh

Josh

Clustered Forward Rendering

I decided I want the voxel GI system to render direct lighting on the graphics card, so in order to make that happen I need working lights and shadows in the new renderer. Tomorrow I am going to start my implementation of clustered forward rendering to replace the deferred renderer in the next game engine. This works by dividing the camera frustum up into sectors, as shown below. A list of visible lights for each cell is sent to the GPU. If you think about it, this is really another v

Josh

Josh

Common Bottlenecks

Leadwerks 4.3 brings a big performance boost to your games. In this blog I am going to talk about some of the common problems you can eliminate to make your games run faster. When slow performance is encountered, it is typically one really bad mistake that is slowing everything down. Here's a few common bottlenecks for performance you can create in your games, how to identify them, and how to fix them. Shadow Updates Shadow rendering is cheaper than regular renders because no text

Josh

Josh

The PC is changing

PC towers have been about the same since they became popular in the 1990's, replacing the previous horizontal form factor:   Cases have gone from beige to black, but very little else has changed.     PC towers tend to be designed for the old ATX style motherboards, which were first introduced in 1995:   PC cases are still designed primarily for this form factor, ignoring the fact that many internal components have changed. The sound and ethernet card are now typically built into

Josh

Josh

Refocusing on the PC

Back when Leadwerks 2 was first launched, it was just a BlitzMax programming SDK, intended to be a modern replacement for Blitz3D. It turned out Blitz users generally did not want it, and instead the audience it attracted was C++ programmers who like graphics. A visual editor was introduced and it was made as good as possible for a product that started with the intention of just being a programming SDK.   Leadwerks 3.0 was launched with a strong emphasis on the tools that Leadwerks 2 lacked,

Josh

Josh

Using Multiple Entity Scripts in Turbo Game Engine

During development of Leadwerks Game Engine, there was some debate on whether we should allow multiple scripts per entity or just associate a single script with an entity. My first iteration of the scripting system actually used multiple scripts, but after using it to develop the Darkness Awaits example I saw a lot of problems with this. Each script used a different classname to store its variables and functions in, so you ended up with code like this: function Script:HurtEnemy(amount) if s

Josh

Josh

Screen-space directional occlusion

Screen-space directional occlusion (SSDO) is the next logical step after simple screen-space ambient occlusion. This routine uses a raytracing approach to approximate global illumination. You can get my shader here.  

Josh

Josh

Multithreaded Rendering

After working out a thread manager class that stores a stack of C++ command buffers, I've got a pretty nice proof of concept working. I can call functions in the game thread and the appropriate actions are pushed onto a command buffer that is then passed to the rendering thread when World::Render is called. The rendering thread is where all the (currently) OpenGL code is executed. When you create a context or load a shader, all it does is create the appropriate structure and send a request over

Josh

Josh

Lua binding in Leadwerks 5

The Leadwerks 5 API uses C++11 smart pointers for all complex objects the user interacts with. This design replaces the manual reference counting in Leadwerks 4 so that there is no Release() or AddRef() method anymore. To delete an object you just set all variables that reference that object to nullptr: auto model = CreateBox(); model = nullptr; //poof! In Lua this works the same way, with some caveats: local window = CreateWindow() local context = CreateContext(window) local world =

Josh

Josh

How infinite terrain can be implemented in Leadwerks Engine 5

Gamers have always been fascinated with the idea of endless areas to roam.  It seems we are always artificially constrained within a small area to play in, and the possibility of an entire world outside those bounds is tantalizing.  The game FUEL captured this idea by presenting the player with an enormous world that took hours to drive across: In the past, I always implemented terrain with one big heightmap texture, which had a fixed size like 1024x1024, 2048x2048, etc.  However,

Josh

Josh

Convex Decomposition Made Useful

Physics simulations typically require physical geometry to be provided in a series of convex hulls that approximate the shape of the object. This is because the intersection of two convex objects can be calculated fast enough for use in real-time simulations.   One solution for creating this type of physical geometry is to create a low-detail model of the object in a modeling program. However, this process can be tedious and is often overlooked by artists. Auto-generating this type of geome

Josh

Josh

One Last Thing

In this blog I'm going to explain the evolution of the entity and physics system in Leadwerks 3.   In Leadwerks Engine 2, physics bodies and character controllers are both separate entity classes. If you want a model to be physically interactive, you parent it to a body entity. If you want a model to walk around with physics, you parent it to a character controller body.   In Leadwerks 3 I decided to give physics properties to all entities. This means all entities can use commands like Ge

Josh

Josh

Vehicle Development

I've made progress with the new vehicle system and it is shaping up nicely. The vehicle wheels consist of a slider joint with a spring (the strut) connected to a pivot, connected to the wheel by a hinge joint (the axle). If the wheel can be steered, an additional pivot is inserted between the strut and axle, with a motorized hinge to control steering. There were two big problems in addition to this that need to be solved in order to make a vehicle that is stable at high speeds. First, the m

Josh

Josh

Terrain Test

I borrowed Shadmar's terrain splatting shader. This is the result after fiddling around with it for a few minutes in Leadwerks 3. (No normal mapping yet, but that's easy to add.)   Physics can be added by generating a physics shape from the terrain model. It doesn't allow heightmap editing in the editor, but I think this will serve as a good solution until our super uber mega streaming terrain system is built.   Thanks to Shadmar for the assets.   Klepto is also looking into a few OpenG

Josh

Josh

Tech Update: OpenGL 4 Deferred Renderer

The OpenGL 4 renderer for Leadwerks 3.1 is well underway. I began implementing deferred lighting in earnest last Friday. Previous work included setting up MSAA on deferred buffers, as well as implementation of the Leadwerks Buffer class, which functions as a thin wrapper around OpenGL FBOs (frame buffer objects). The engine already tracks relationships between objects and lights, and this system was able to be used to provide a list of shadow-casting objects for each point and spot light.  

Josh

Josh

Unit Testing

I've spent the last few days writing simple examples for every single command in Leadwerks 3. Not only does this make the documentation more friendly, it also acts as a final test to make sure all the commands work the way they say they should. I make the C++ example and then Chris converts it to Lua (and tells me what I did wrong!).   I didn't realize it at first, but this really showcases the strength of API design of Leadwerks. Since you get full control over the execution and flow of a

Josh

Josh

Peer-to-peer Networking and the Floating Server

I have Steam peer-to-peer networking commands implemented into Leadwerks 4.6. Here are the commands. Note this complex system has been boiled down to just three simple commands: class P2P { public: #ifdef LEADWERKS_5 static bool Send(uint64 steamid, const int messageid, shared_ptr<BankStream> data, const int channel = 0, const int flags = 0); static bool Send(uint64 steamid, const int messageid, shared_ptr<Bank> data, const int channel = 0, const int flags = 0); static shared_

Josh

Josh

Water beta now available

An update is now available on the beta branch which adds water. This can be controlled in the scene properties or in code with the following commands: World::SetWaterMode(bool mode) World::SetWaterHeight(float height) World::SetWaterColor(float r, float g, float b, float a) bool World::GetWaterMode() float World::GetWaterHeight() Vec4 World::GetWaterColor()   You must update your project to get new EXEs and shaders. All model shaders have been modified to handle the slice plane used whe

Josh

Josh

3.4 Recap and Beyond

I've got a couple days sales data from the 3.4 launch and it went well. Our conversion ratio and all that boring businessey stuff is good, and I know more now than I did last week. I think our intro video could use some updating and a little more professional polish, so I am looking for a video production company to create something new.   I was planning to make a trip back to Caifornia soon. I was going to skip the GDC, but I then got invited to the Valve party. I guess they're hiring the

Josh

Josh

Game Launcher and SteamUGC

I'm working to move our Workshop implementation over to the newer SteamUGC API. There were recently some things updated, and that is still being sorted out. I'm also finishing up the game player.   The first incarnation of Leadwerks Game Launcher was pretty utilitarian (and ugly):   I realized this was pretty drab for a product aimed at consumers, so I designed a more outlandish colorful interface that was purely web-based:   This one looks nice, but you can tell it will start to fee

Josh

Josh

Moving forward with Leadwerks Engine 2.4 and Leadwerks 3.0

I feel like you guys are owed an explanation of our long-term strategy, and now that I have definite plans I am happy to reveal them to you.   I've been spending a lot of time in the Silicon Valley area, and have learned a lot about business. We've been investigating external investment. I believe we could raise pretty much any amount of money we want, based on the fact we already have an existing business that is self-sustaining, and we have a great strategy. However, money does not necess

Josh

Josh

Vegetation Demo

I'm really happy to see all the great and scary games coming out for the Halloween Game Tournament. I have something of my own to share with you.   The Leadwerks 3 vegetation system is a groundbreaking new technology. All vegetation instances are procedural and dynamically placed, so that physics and rendering of any amount of instances can occur with zero memory usage. This demo proves that the idea actually works!   This demo shows the new Leadwerks Game Engine 3 vegetation system in ac

Josh

Josh

Three improvements I made to Leadwerks Game Engine 5 today

First, I was experiencing some crashes due to race conditions. These are very very bad, and very hard to track down. The problems were being caused by reuse of thread returned objects. Basically, a thread performs some tasks, returns an object with all the processed data, and then once the parent thread is done with that data it is returned to a pool of objects available for the thread to use. This is pretty complicated, and I found that when I switched to just creating a new return object each

Josh

Josh

×
×
  • Create New...