Jump to content
  • entries
    941
  • comments
    5,894
  • views
    868,133

About this blog

Learn about game development technology

Entries in this blog

Writing the Treeview Widget

I've begun a Lua script for a Treeview widget. This is arguably one of the most complex widgets to implement, but after having done this in another language I have a design that I think is pretty simple. The script sorts all tree view nodes into a linear list-like table so that they can be drawn quickly. Like other widgets, the script will calculate where the starting point in the list is to display just the visible nodes. This is very important because it prevents the program from slowing d

Josh

Josh

Thoughts on the last game tournament

Most of the prizes are now shipped, and I am just cleaning up a few pieces of missing information for shipping. In order to ship posters, I need a full name, which I have requested from onaid, MDGunn, Evayr, and Graham. I also am missing a shirt size for Garlic Waffle and MDGunn. I have not received any shipping info from MartyJ, or else I missed it.   I found some mailing tubes from ULine to send posters in, at about $0.75 each. If you are receiving a sticker it will be included in the tu

Josh

Josh

Beta update available

An update is available which fixes compatibility with newer versions of GCC with the fix discussed here. Thanks to aiaf for finding the solution.

Josh

Josh

C++11 for Linux

The beta branch now contains an update that adds C++11 support for GCC on Linux. To use this you must enable C++11 support in the compiler settings in Code::Blocks. Select the Settings > Compiler and Debugger... menu item and then check the box indicated below.     All new projects created from the Leadwerks templates will work correctly out-of-the-box.   Your existing projects need a couple of new libraries added to them. The easiest way to do this is to open the CBP project file i

Josh

Josh

Workshop Store Updates

The Workshop Store interface has been updated. These changes will go out to the in-editor store interface soon.     Clicking on the "Buy" button now opens the item directly in the Steam client, so you no longer have to log into the Steam website. No credit card is needed if you already have one on file in your Steam account.  

Josh

Josh

Automate your social media accounts with the Steam web API

Keeping your social media accounts active with screenshots, videos, and updates is important, but as an indie developer you probably don't have time to post on there every day. In this blog I will show you how to easily automate your social media accounts so that a constant stream of new content is going out to your fans.   First, you will need to create a free account with dlvr.it. Connect your social media accounts to it. Facebook, Twitter, and Google+ are the important ones.   Now you

Josh

Josh

Update available

A small update is out, on all branches, that fixes the vehicle wheels not being positioned correctly: http://www.leadwerks.com/werkspace/topic/15405-problembug-with-vehicles-cars-wheels-dont-move-since-update-4-2

Josh

Josh

Beta update available

I've updated the editor and Lua executables on Windows with the following fixes: http://www.leadwerks.com/werkspace/topic/15399-rc4-editor-hints-get-built-in-probe-reflections/ http://www.leadwerks.com/werkspace/topic/15646-prefabs-child-entity-scripts-start-function-not-called/ http://www.leadwerks.com/werkspace/topic/15644-latest-43-beta-causes-crawler-to-rotate-at-wrong-direction/ http://www.leadwerks.com/werkspace/topic/15593-releasecleanup-vehicle-error/   The game launcher beta branc

Josh

Josh

Loading Assets from Streams

Since the GLTF file format can pack textures into a single file with the model, I needed to implement asset loading directly from a stream: auto stream = ReadFile("image.png"); auto tex = LoadTexture(stream); This was interesting because I needed to add a check for each supported image type so the loader can determine the file type from the contents instead of the file path extension. Most file formats include a string or "magic number" at the beginning of the file format to indicate what

Josh

Josh

GLTF Materials

I'm now able to load materials from GLTF files. These can use external textures or they can use textures packed into a GLTF binary file. Because we have a standardized material specification, this means you can download GLTF files from SketchFab or Turbosquid, and your model materials will automatically be loaded, all the time. There's no more generating materials or messing around trying to figure out which texture is the normal or specular map. An extension exists for DDS texture support, fort

Josh

Josh

Next Steps

A big bug fix update just came out for 4.5. Unless there are any major problems then I am going to go back to Europe for a while. I will be focusing on multiplayer features, specifically the P2P, lobby, and voice chat features in Steamworks, as well as converting lots of models to make them ready-to-use with Leadwerks Game Engine. I am just going to bring my little Gigabyte Brix mini PC. If I need to I can have my big monster machines shipped to me overseas, but I'll start with this one and

Josh

Josh

4.5 Beta Updated

The beta branch has been updated with a new build of version 4.5 beta.  VR support is implemented and documented here: https://www.leadwerks.com/learn?page=API-Reference_Object_VR Linux C++ projects will currently not build in the beta (working on it now). See this thread on updating your C++ projects: https://www.leadwerks.com/community/topic/16838-upgrading-44-c-projects-to-45/  

Josh

Josh

Zip File Import

Leadwerks Engine 4.5 will add ZIP files to the list of file formats you can import into the editor.  This isn't really anything special except that it works in a very specific way.  Source art files will be extracted first, followed by final game-ready formats (mdl and tex), followed by .meta files, which contain thumbnails and conversion settings for each file.  The resulting behavior is that you can import a zip file of game assets, with source art files, and the files will be copied in a way

Josh

Josh

Creating a VR Teleporter

I'm building the VR project template for Leadwerks 4.5.  Although you can enable VR in any project, this template is specifically designed to provide some of your most common room-scale VR features: Teleportation movement, which prevents motion sickness. Picking up and throwing objects. (It's actually really fun!) To start with I am creating the art assets for the teleport effect. This is basically what I want: Your controller shoots a beam which ends in an indicato

Josh

Josh

Exporting a glTF model from 3ds Max

Autodesk 3ds Max now supports export of glTF models, as well as a new glTF material type. The process of setting up and exporting glTF models is pretty straightforward, but there are a couple of little details I wanted to point out to help prevent you from getting stuck. For this article, I will be working with the moss rocks 1 model pack from Polyhaven. Getting geometry into 3ds Max is simple enough. I imported the model as an FBX file. To set up the material, I opened the compa

Josh

Josh in Articles

Another beta update available

A new build is available on the beta branch on Steam. This fixes a couple of issues. Oculus view projection is fixed. Added VR.AButton, VR.BButton, VR.GripAxis for compatibility with Oculus Touch controllers: https://www.leadwerks.com/community/topic/17052-vive-and-oculus-controls/ Fixed terrain collision bug: https://www.leadwerks.com/community/topic/16985-character-controller-falls-through-terrain/

Josh

Josh

Three Types of Optimization

In designing the new engine, I have found that there are three distinct types of optimization. Streamlining This is refinement. You make small changes and try to gain a small amount of performance. Typically, this is done as a last step before releasing code. The process can be ongoing, but suffers from diminishing returns after a while. When you eliminate unnecessary math based on guaranteed assumptions you are streamlining code. For example, a 4x4 matrix multiplication can skip the calc

Josh

Josh

Voxel Cone Tracing Part 2 - Sparse Octree

At this point I have successfully created a sparse octree class and can insert voxelized meshes into it. An octree is a way of subdividing space into eight blocks at each level of the tree: A sparse octree doesn't create the subnodes until they are used. For voxel data, this can save a lot of memory. It was difficult to get the rounding and all the math completely perfect (and it has to be completely perfect!) but now I have a nice voxel tree that can follow the camera around and

Josh

Josh

Voxel Cone Tracing Part 5 - Hardware Acceleration

I was having trouble with cone tracing and decided to first try a basic GI algorithm based on a pattern of raycasts. Here is the result: You can see this is pretty noisy, even with 25 raycasts per voxel. Cone tracing uses an average sample, which eliminates the noise problem, but it does introduce more inaccuracy into the lighting. Next I wanted to try a more complex scene and get an estimate of performance. You may recognize the voxelized scene below as the "Sponza" scene freque

Josh

Josh

Clustered Forward Rendering - First Performance Metrics

I was able to partially implement clustered forward rendering. At this time, I have not divided the camera frustum up into cells and I am just handing a single point light to the fragment shader, but instead of a naive implementation that would just upload the values in a shader uniform, I am going through the route of sending light IDs in a buffer. I first tried texture buffers because they have a large maximum size and I already have a GPUMemBlock class that makes them easy to work with. Becau

Josh

Josh

Variance Shadow Maps

After a couple days of work I got point light shadows working in the new clustered forward renderer. This time around I wanted to see if I could get a more natural look for shadow edges, as well as reduve or eliminate shadow acne. Shadow acne is an effect that occurs when the resolution of the shadow map is too low, and incorrect depth comparisons start being made with the lit pixels: By default, any shadow mapping alogirthm will look like this, because not every pixel onscreen has an exact matc

Josh

Josh

Accidental Masterpieces

Lighting is nearly complete. and it is ridiculously fast! There are still some visual glitches to work out, mostly with lights intersecting the camera near plane, but it's nearly perfect. I turned the voxel tree back on to see what the speed was, and to check if it was still working, and I saw this image of the level partially voxelized. The direct lighting shader I am using in the rest of the scene will be used to calculate lighting for each voxel on the GPU, and then bounces will be performed

Josh

Josh

More Work on Shadows

I found and fixed the cause of the cubemap seams in variance shadow maps so we now have nice soft seamless shadows. I also changed the engine so that point lights use six 2D textures instead of a separate cubemap texture array. This means that all light types are sharing one big 2D array texture, and it frees up one texture slot. I am not sure if I want to have a hard limit on number of shadow-casting lights in the scene, or if I want to implement a system that moves lights in and out

Josh

Josh

Wrapping up at NASA

I'm in DC this week helping the folks at NASA wrap up some projects. I'm going to move back to a supportive role and focus on development of Leadwerks 4.6 and the new engine, and I am helping them to hire some programmers to replace me. We found some very talented people who I am confident will do a fantastic job, and I can't wait to see what they create using Leadwerks Game Engine. I helped a team using Leadwerks at NASA get through some big milestones and expand. I hope that someday soon

Josh

Josh

Vulkan Nitty-Gritty

I am surprised at how quickly Vulkan development is coming together. The API is ridiculously verbose, but at the same time it eliminates a lot of hidden states and implicit behavior that made OpenGL difficult to work with. I have vertex buffers working now. Vertices in the new engine will always use this layout:     struct VkVertex     {         float position[3];         float normal[3];         float texcoords0[2];         float texcoords1[2];         float tangent[3];         unsigned cha

Josh

Josh

×
×
  • Create New...