Jump to content

Blogs

Animation in Leadwerks 5

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?

Josh

Josh

Second Performance Test: nearly 400% faster!

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

Josh

Josh

First performance demonstration

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

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

Building a Zero-Overhead Renderer

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

Josh

Josh

Lua in Leadwerks 5 is Solved

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

Josh

Josh

More amazing things you can do with Lua in Leadwerks 5

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

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

Visual Studio Code for Leadwerks

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

AggrorJorn

AggrorJorn

Plugins in Leadwerks Game Engine 5

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

Josh

Josh

Lua table gotcha

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

AggrorJorn

AggrorJorn

"Cirque de Jeux" Game Tournament wrapup

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

Admin

Admin

Behind Enemy Lines

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

burgelkat

burgelkat

Announcing Leadwerks Projects

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

Josh

Josh

4.6 Beta Available with Multiplayer Support

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

Josh

Josh

Final sound recording API

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

Josh

Josh

More voice recording

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

Josh

Josh

TeamSpeak

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

Josh

Josh

Lobbies

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

Josh

Josh

Dwarf Beard

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

tjheldna

tjheldna

Two ideas I have

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.

Josh

Josh

How CLion saved 2 months of work

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

martyj

martyj

×
×
  • Create New...