Jump to content
  • entries
    941
  • comments
    5,894
  • views
    867,539

About this blog

Learn about game development technology

Entries in this blog

Visual Studio 2017 Support

The beta branch of the professional version is upgraded to use Visual Studio 2017. You can download the release candidate for free here: https://www.visualstudio.com/vs/visual-studio-2017-rc/   Your existing projects should work with VS 2017 with no changes, but you might want to hold off while we test if you are in the middle of a project. New projects you create should open with VS 2017 by default.  

Josh

Josh

Visual Studio

I experienced some problems this week when I tried to create an executable with Visual Studio 2008 for deployment. On Windows 7 test machines I would get this error:   I finally tracked the solution down to a Visual Studio project setting. In Project Settings > Configuration Properties > C/C++ > Code Generation there is a property called "Runtime Library". By default it is set to rely on external DLLs. Change these values to non-DLL settings (like MT or MTd) and they will include

Josh

Josh

Viewport Navigation

I've got orthographic viewport navigation done. I decided to build some grid commands into the camera class so that the graphics driver itself can handle the grid rendering, rather than having the editor make a bunch of OpenGL calls in a callback function. The grid can be rendered from any angle, and the math was a little tricky, but I got it worked out. I paid extra attention to showing the border where the world ends. The sliders that pan the viewport are very accurate, and stop right at t

Josh

Josh

Very Low-Level Advancements

There are three low-level advancements I would like to make to Leadwerks Game Engine in the future: Move Leadwerks over to the new Vulkan graphics API. Replace Windows API and GTK with our own custom UI. This will closely resemble the Windows GUI but allow new UI features that are presently impossible, and give us more independence from each operating system. Compile the editor with BlitzMaxNG. This is a BMX-to-C++ translator that allows compilation with GCC (or VS, I suppose). This w

Josh

Josh

Version 4.5 release plan

Version 4.5 will feature official support for VR (Vive and Oculus) and a new super realistic vehicle system.  These features are more or less already done, but need some work to make them release-ready.  The new vehicle system is so good, and I am so grateful to Julio for his help making this happen, that I think we might do a racing-themed winter tournament.   I am trying to think of a clever pun to call it. At the same time, I have implemented the first build of version 5 in the same sour

Josh

Josh

Version 4.5 Beta Update

The beta branch on Steam is updated with some fairly big changes. Leadwerks Engine is now compiled with and uses Visual Studio 2017. It is now compiled on Ubuntu 16.04.  I do not know yet what changes this means for the end user but I had to add some dependencies in the editor. In addition to that, ZIP import is now working (File > Import). The VR command set is finished and documented.  A VR project template is forthcoming. The new vehicles are not yet ready.

Josh

Josh

Version 4.4 beta update

Leadwerks Game Engine 4.4 has been updated on the beta branch on Steam. Networking finished and documented. GUI finished. All new physics features finished. The character controller physics and picking up objects has been improved and made smoother.  There is a problem with the player sliding down slopes, as seen in the FPS Character Controller example map.  I will work this out. I also noticed during testing that picking up some objects in the FPS / AI map will f

Josh

Josh

Version 4.3 Release Candidate

I've uploaded a release candidate of version 4.3 on the beta branch. This is a full build, for Windows and Linux. The Game Launcher beta branch is also updated.   If all is well this will go onto the stable branch in a few days.

Josh

Josh

Vehicle Improvements in 4.5

The revision of our vehicle system has been a long time coming, and I am happy to say the wait will soon be worthwhile.  The new system uses a hyperrealistic slip differencial system to adjust the power given to each wheel. The results are a clear cut above any game vehicle physics you've ever seen. I am also taking steps to make the vehicle system easier to use.  The AddTire() command can now accept an entity as a parameter for the tire object.  This would typically be

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

Vegetation Update

An update is available on the beta branch which adds the new vegetation system. You can open the attached map in the editor to see the system in action. Be sure to create a new project, or update your existing one, in order to get the new shaders and models. vegetationsample.zip   To get this update early you must opt in to the beta branch on Steam.   The new vegetation system is special because it does not use persistent objects stored in memory. Rendering and physics are executed accor

Josh

Josh

Vegetation Research - Pt 2

The Leadwerks 2 vegetation system used a grid of "cells" that each contained a quantity of vegetation instances. If the cell was close enough, each instance was checked against the camera frustum like a regular entity and then all visible instances were rendered in a batch. Cells that were further away were collapsed into a single surface consisting of a quad for each instance. This is how we were able to draw massive amounts of foliage in the distance at a fast framerate:     This w

Josh

Josh

Vegetation Research

The Leadwerks 3 vegetation system is being designed to side-step the bottlenecks that limited the Leadwerks 2 vegetation system. The Leadwerks 2 system involved large collections of 4x4 matrices for each instance, resulting in hundreds of megs of data stored with the map. Eliminating this data results in small map sizes and reduction of memory usage.   Here we have 10,000 trees being rendered (with no billboards), for a total geometry count of 14 million polygons. Memory usage is...zero!  

Josh

Josh

Vegetation Physics

I just had a breakthrough with the physics. There's a lot of optimization work left to do, but I can see at this point the idea works.   Newton Game Dynamics provides a mechanism for a user-defined collision shape. This accepts a bounding box and calls a user-defined callback any time an object intersects the bounding box. The callback builds a mesh dynamically for the area that the other object occupies. Internally, Newton uses this mechanism to process heightmap terrain without having to

Josh

Josh

Vegetation Part 3

Billboards, transitions, and rendering are now done, and as you can see in the screenshot below, the idea works great. In Leadwerks 2, this application would have used hundreds of megabytes of data to store all the individual 4x4 matrices of each object. In Leadwerks 3, the instances are generated on the fly, so the application uses no more memory than a map with a blank terrain:     Still to do: Fade out billboards as they approach max view distance. Add rows to break up generated

Josh

Josh

Vegetation nation

I got my hands on the GDC showcase scene by Michael Betke, and it's much more beautiful than I thought. I used this scene to rewrite and test the vegetation rendering code. Collision isn't working yet, but it's built into the routine. The results speak for themselves.   Fortunately, Pure3D is soon offering a set of game-ready vegetation models, so you can create gorgeous landscapes like this.

Josh

Josh

Vegetation Interaction

This video shows the player interacting with vegetation objects. Vegetation objects are special because they aren't stored in memory at all, but instead are dynamically generated in real-time according to a special algorithm! You can have infinitely dense forests without using any memory.  

Josh

Josh

Vegetation Development

Today I am happy to say I worked out the problems that the vegetation system prototype had on AMD and Intel graphics. I started by upgrading the system from using texture buffers to using vertex buffers, as recommended in Daniel Rakos' excellent RasterGrid blog. He made this change for speed, but in my case it gave me simpler code I was able to eliminate the OpenGL errors with.   The most interesting part of this was discovering the glVertexAttribDivisor command. (Fortunately, it's in the 4

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

Vegetation

There's basically two kinds of vegetation, trees and grass.   Grass is plentiful, ubiquitous, dense, but can only be seen at a near distance. Its placement is haphazard and unimportant. It typically does not have any collision. ("Grass" includes any small plants, bushes, rocks, and other debris.)   Trees are fewer in number, larger, and can be seen from a great distance. Placement of groups of trees and individual instances is a little bit more important. Because these tend to be larger

Josh

Josh

Vector Image Support

Building on the Asset Loader class I talked about in my previous blog post, I have added a loader to import textures from SVG files. In 2D graphics there are two types of image files. Rasterized images are made up of a grid of pixels. Vector images, on the other hand, are made up of shapes like Bezier curves. One example of vector graphics you are probably familiar with are the fonts used on your computer. SVG files are a vector image format that can be created in Adobe Illustrator and othe

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

Using Visual Studio Code with Leadwerks

Microsoft has released a cross-platform code editor called "Visual Studio Code". It's just a lightweight text editor like Notepad++. You can get it here for Windows, Linux, and Mac.   Although the editor is focused on web development it actually does support Lua syntax highlighting. If you are curious to try to use it with Leadwerks, add this text to your launch.json file: { "version": "0.1.0", // List of configurations. Add new configurations or edit existing ones. // ONLY "n

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

Using analytics in your game

As noted previously, Leadwerks 4.2 now support built-in analytics. To enable this in your game you need to create an account at www.gameanalytics.com and create a new product. You can find your keys on the Game Settings page.     At the beginning of the main lua script, some code has been added to initialize analytics. By default this is commented out: if DEBUG==false then Analytics:SetKeys("GAME_KEY_xxxxxxxxx", "SECRET_KEY_xxxxxxxxx") Analytics:Enable() end   Uncomment this

Josh

Josh

×
×
  • Create New...