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
The standalone enterprise edition has been updated to the now-stable version 4.5. The new installer is available in the client area when you are logged into your Leadwerks account on our website.
My Gigabyte Brix pro lacks an audio in port and I was not able to find a USB microphone yesterday. However, I found a cheap webcam with audio support and have been using this to test voice recording, and it works great. Here is the final voice recording API:
bool Sound::StartRecording(const int frequency = 22050, const int format = Sound::Mono8, const int buffersize = 20480)
Sound* Sound::StopRecording()
bool Sound::StopRecording(Lobby* lobby)
lobby->SetVoiceFilter(const uint64 steamid, c
Previously I talked about a voice recording API done through Steamworks. However, OpenAL already has a simple recording API that handles this. The only thing the Steamworks API adds is compression (presumably OGG) to send the data.
I quickly implemented an OpenAL-based recording API, although I do not presently have any recording hardware device to test with. OGG compression can be added with the Ogg library that is already built into Leadwerks.
Here is my modified recording API:
s
Being able to communicate with a gaming headset or microphone is an important part of fast-paced multiplayer gaming. Therefore, Leadwerks 4.6 will feature easy to use voice recording features that allow you to talk to your teammates or taunt your opponents, in addition to a new peer-to-peer networking system.
The system is largely automated so that you only have to call a single command:
Voice::SetRecording(true)
Or in Leadwerks 5:
SetVoiceRecording(true)
In practical usage, y
Previously, I talked about the new peer-to-peer networking system that handles Nat punch-through and allows a sort of "floating" server that stays alive as long as at least one player is in the game.
The lobby system allows you to broadcast to other players that you have a game available to join. The name might be somewhat misleading, as it does not require players to hang out in a chatroom before starting the game. My implementation functions more like a standard game server list.
To
My latest entry for the Leadwerks Tournament "Dwarf Beard". This entry is really the product of a merge of a lot of work I have done over the many years.
The code template I used goes all the way back to my first game created in Leadwerks "Mages Alchemy". The Template has seen many iterations, updates as my skills increased or I just work out a more better way of doing things. For this tournament I've made many new improvements focusing on character controls, AI and handling animations. Mak
Leadwerks Game Engine 4.6 will feature a new peer-to-peer networking system that solves the NAT punch-through problem and provides an easy way to create a public list of game servers. Together with this and Leadwerks GUI which was released last year, we will soon have the tools to make a great deal of new types of games. Previously we have been focused on single-player games but the ability to create multiplayer games with fast reliable networking opens up a lot of new and fun possibilities.
Having a good set of tools is highly important. Just ask any mechanic. A good set of tools can save you a ton of time, just to prove this, try changing a water pump with a crescent wrench.
The back story...
There is some sort of issue with my project in GIT from the windows perspective in which it doesn't let me add source files to GIT without using the -f option. The last few months of development I haven't been creating "new" things, just working on content. This means that my new chang
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
An update for Leadwerks Game Engine 4.5 has been pushed out on Steam. The following fixes have been made:
View projection for Oculus Rift VR headset is fixed.
Added VR.AButton, VR.BButton, VR.GripAxis for improved compatibility with Oculus Touch controllers.
Fixed terrain collision bug.
Added missing Workshop toolbar icons on Linux.
Fixed script editor not opening on Linux.
Fixed LoadAnimation bug.
Fixed missing fall damage on player controller.
Welcome dear reader to my first Blog entry. In the following you will get a first impression of what I am working on. So lets not lose any more time and get started!
What is the Phodex Framework?
The Phodex Framework is created with the intention to provide common systems and mechanics to be able to create cool first person and especially role playing games within the Leadwerks Game Engine.
"Leadwerks Game Engine is the easiest way to make 3D games." and "It's everything you need