Hi Guys,
It has been very silent around Phodex Framework and my projects, but thats because I really focused on game development and nothing else. Posting stuff and creating content costs time and I was also very busy with studying. However as promised in my last entry I was working on an actual game. I tried to create a small, but quality experience including decent design, nice graphics and, at least for a one man indie game, complex game mechanics such as first person melee and range com
In evaluating possible company names I have come up with the following criteria which I used to choose a name for our new game engine.
Spelling and Pronunciation
The name should be unambiguous in spelling. This helps promote word-of-mouth promotion because when someone hears the name for the first time, they can easily find it online. Similarly, the name when read should be unambiguous in pronunciation. This helps the name travel from written to spoken word and back. Can you imagine telli
I've begun working on an implementation of voxel cone tracing for global illumination. This technique could potentially offer a way to perfrorm real-time indirect lighting on the entire scene, as well as real-time reflections that don't depend on having the reflected surface onscreen, as screen-space reflection does.
I plan to perform the GI calculations all on a background CPU thread, compress the resulting textures using DXTC, and upload them to the GPU as they are completed. This means t
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
The animation update routine has been moved into its own thread now where it runs in the background as you perform your game logic. We can see in the screenshot below that animation updates for 1025 characters take about 20 milliseconds on average. (Intel graphics below, otherwise it would be 1000 FPS lol.)
In Leadwerks 4 this would automatically mean that your max framerate would be 50 FPS, assuming nothing else in the game loop took any time at all. Because of the asynchronous threa
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
Leadwerks 5 uses a different engine architecture with a game loop that runs at either 30 (default) or 60 updates per second. Frames are passed to the rendering thread, which runs at an independent framerate that can be set to 60, 90, or unlimited. This is great for performance but there are some challenges in timing. In order to smooth out the motion of the frames, the results of the last two frames received are interpolated between. Animation is a big challenge for this. There could potentially
I got skinned animation working in the new renderer, after a few failed attempts that looked like something from John Carpenter's The Thing. I set up a timer and updated a single animation on a model 10,000 times. Animation consists of two phases. First, all animations are performed to calculate the local position and quaternion rotation. Second, 4x4 matrices are calculated for the entire hierarchy in global space and copied into an array of floats. To test this, I placed this code inside the ma
The design of Leadwerks 4 was meant to be flexible and easy to use. In Leadwerks 5, our foremost design goals are speed and scalability. In practical terms that means that some options are going to go away in order to give you bigger games that run faster.
I'm working out the new animation system. There are a few different ways to approach this. In situations like this I find it is best to start by deciding the desired outcome and then figuring out how to achieve that. So what do we want?
After observing the behavior of the previous test, I rearranged the threading architecture for even more massive performance gains. This build runs at speeds in excess of 400 FPS with 100,000 entities....on Intel integrated graphics!
I've had more luck with concurrency in design than parallelism. (Images below are taken from here.)
Splitting the octree recursion up into separate threads produced only modest gains. It's difficult to optimize because the sparse octree is unpredicta
I am proud to show off our first performance demonstration which proves that my idea for the Leadwerks 5 renderer works. To test the renderer I created 100,000 instanced boxes. The demo includes both regular and a mock VR mode that simulates single-pass stereoscopic rendering with a geometry shader.
The hardware I tested on is an Intel i7-4770R (for graphics too) which is a few years old.
Now this is not a perfect benchmark for several reasons. There is no frustum culling being perform
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
The Leadwerks 4 renderer was built for maximum flexibility. The Leadwerks 5 renderer is being built first and foremost for great graphics with maximum speed. This is the fundamental difference between the two designs. VR is the main driving force for this direction, but all games will benefit.
Multithreaded Design
Leadwerks 4 does make use of multithreading in some places but it is fairly simplistic. In Leadwerks 5 the entire architecture is based around separate threads, which is chal
When considering the script system in Leadwerks 5, I looked at alternatives including Squirrel, which is used by Valve in many games, but these gave me a deeper appreciation for the simplicity of Lua. There are only a handful of rules you need to learn to use the language, it’s fun to use, yet somehow it does everything you could ever need.
These were three big issues I had to solve. First, the Leadwerks 5 API makes extensive use of smart pointers, which our binding library tolua++ does not
Our implementation of Lua in Leadwerks 5 is shaping up to be a dream come true. Below are some of the great improvements that are being made.
Access STL Containers in Lua
You can access STL containers directly from Lua:
for n = 1, #entity.kids do
entity.kids[n]:Move(1,0,0)
end
while #entity.kids > 0 do
entity.kids[1]:SetParent(nil)
end
In fact, verbose commands like CountChildren() and GetChild() are no longer needed at all. On the C++ side you can use this:
for (int
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 =
I have been using Visual Studio Code for a couple of years now and it is my defacto text editor next to Notepadd++. I mainly use it however to write Lua scripts.
Opensource
Lightweight
Cross platform
Completely adjustable hotkeys (or automatically map from Visual Studio: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vs-keybindings)
Fully customisable theming (with standard themes included)
Supports all major languages. Lua is supported
Internally, Leadwerks Editor uses an EventHandler class for every interface in the program. The material editor is a class extended from the EventHandler. So is the little window that has all the controls to calculate normals. So is every viewport.
The event handler class has one important function:
Event ProcessEvent(Event)
Every EventHandler has access to events as they occur. This is how all program actions are handled in the editor.
The plugin system will work by hooking int
I recently was introduced to a bug in my game. I had 20 AI units and only 19 of them were actively doing something. Number 20 was just standing there. The problem eventually lied in using '#enemies' to get the amount of enemies.
Here is what happened:
A lua table index by default starts on index 1. This in contrary to many other languages where it starts at 0. However, you can assign a value to index '0' if you want. Since I use C# on a daily basis, I am more comfortable using the 0 in
The latest game tournament brought in a small number of games, but they more than made up for it in quality. Each title that was submitted was pretty fantastic. The tournament was held during an odd month and there was no banner across the forum to remind people about it, so that is something that can be improved in the future. Each entry will receive an 11"x17" poster in the mail. Please make sure your name, address, and phone number (for customs) are correct and up to date in your Leadwerks ac
Hi,
the last weeks in office are very bussy. But today i have some time to work on my project.
In Akt 3 i would imlement a Mortar.
I found a nice free model that i rework in blender and exported as mdl file
also i searched for some sounds and mixed them together.
For the sound i use "Audacity" becaus i get some errors in leadwerks with this sound i converted sounds with "Audio online converter"
then i work on the scirpts.
i use some parts from einlanders grena
We've added a new website feature called Projects to help teams collaborate on their games. A project can be created with several privacy features so you can use this for public open-source games everyone can participate in, or for your team's secret project. I myself have started a project I intend to develop to demonstrate Leadwerks multiplayer capabilities:
You can add a forum, blog, and downloads section to your project and use it to host files, carry out discussions, and post updates
An update is available on the beta branch on Steam that adds support for multiplayer games with the following features:
NAT punch-through with relay server fallback.
Connectionless peer-to-peer UDP messages with multiple channels and optional reliable flag.
Public server list of available games to play.
Voice-over-IP for in-game chat (and taunts).
The new multiplayer system will open up a new range of game types that can be easily created with Leadwerks Game E