Jump to content

Blogs

C++11 Shared Pointers Make Leadwerks 5 Simpler

This shows the fundamental difference between shared pointers and manual reference counting. Leadwerks 4: void Material::SetTexture(Texture* texture, const int index) { if (this->texture[index] != texture) { if (this->texture[index]) this->texture[index]->Release(); this->texture[index] = texture; if (this->texture[index]) this->texture[index]->AddRef(); } } Leadwerks 5: void Material::SetTexture(shared_ptr<Texture> texture, const int index)

Josh

Josh

A look at C++11 Weak Pointers in Leadwerks 5

Previously, I talked a little bit about shared pointers in C++11.  These use automatic reference counting to track how many variables are pointing to an object.  When the object is no longer being used, it is automatically deleted.  This is similar to garbage collection, but doesn't involve the massive overhead of garbage-collected systems.  In fact, shared pointers simply automate something we were already doing with the Release() and AddRef() commands in Leadwerks 4. A weak pointer is lik

Josh

Josh

Widget Fields

Finished and added Field functionality meaning its now possible to set the Fields for each widget. for example the style for a button (Push,Link,Checkbox), or backgroundcolor for panels etc. below is a screenshot of the fields in action   Next will be finishing support for custom widgets which i already started on as you can see in the screenshot above(colorlabel). At the moment the way to add your custom widgets is a 3 step process. First step is adding the widget nam

GorzenDev

GorzenDev

Exporting to code/script

finished basic exporting to lua or c++ code. the screenshot below results in the following files based on ExportType. Menu.lua --GUI Editor Generated function BuildMenu(context) local Menu = {} local scale = 1 --GUI local gui = GUI:Create(context) gui : SetScale(scale) Menu.gui=gui Menu.context=context --Panel Menu.Panel = Widget:Create("", 0, 0, 1024, 80, gui:GetBase(), "Scripts/GUI/Panel.lua") Menu.Panel:SetAlignment(tr

GorzenDev

GorzenDev

Water everywhere

This is a simplified change of this workshop item (so credits go there!) https://www.leadwerks.com/workshopitem?tags=Material&queryType=1&fileType=0&fileid=699303085 A few changes I did: 1) the water.mat:     changed Diffuse color (64,64,64,64) + refraction shader 2) The script, simplified, like this: Add this script to a box, cylinder, what you want...With the water material up there added. And here the result sorry Foots

Marcousik

Marcousik

Luawerks Update

Luawerks has been updated this morning, making the console more responsive and a new tab for the Options Menu for user's to bind keys to actions. Actions have always been part of Luawerks, but until now, there wasn't really a motive to use them. Now, the Action class look in the config to check what key the user binded to that action. You can read more on how this works here. Like the console, this may be improved more in the future.    About Luawerks Luawerks is a Lua framew

reepblue

reepblue

Aggror's devlog #3: Road splines

In a previous developer blog I showed how I use spline paths inside the Leadwerks editor. The cool thing about splines as that they are extremely multipurpose. I started working on generating meshes based on the splines.  Think about ropes, wires, rivers, rollercoasters and of course roads Ropes and wires are in progress because I find them the coolest. Especially rope bridges are awesome to make and see in play. They require a lot of finetuning so I have put that on halt for now. In the me

AggrorJorn

AggrorJorn

EuroTrip II

I am now in possession of the official Leadwerks USB drives.  Weighing in at 16 GB, they look fantastic. These will be shipped out shortly, along with the posters from the last game tournament.  I've been working behind the scenes on some big things that took my attention, but I am not yet ready to reveal any of this.  Because of the timing on this, we are going to do a Leadwerks Fall Games Festival starting in September. I am going to spend the rest of the summer in Europe, where

Josh

Josh

Game Tournaments, Schwag, and American Apparel

I have proven beyond a shadow of a doubt that I am very bad at shipping posters.  The Winter Game Tournament was completed in January and I have yet to deliver your prizes.  If you have a job opening for someone to ship prizes, or to ship anything at all, I am probably the worst candidate you could ever hope to find to fill said position.  Seriously. Part of the problem (although it's still not an excuse) has been that it is actually incredibly difficult to have custom USB keychains made. 

Josh

Josh

Tutorials and paid scripts

Paid scripts I am looking in to publishing paid scripts to the workshop. There are 2 script collections that others might find interesting: Advanced Third Person Controller Many tweakable options: from double jumping, to camera offset, camera snapping, smoothing, speed controls etc Spline paths Not just useful for camera paths, but also for instance factory belts, vehicular movement (static cars, trains etc), airial paths (birds, planes), VR on rails.

AggrorJorn

AggrorJorn

Five Programming Changes You'll See in Leadwerks 5

Leadwerks 4.x will see a few more releases, each remaining backwards compatible with previous versions.  Leadwerks 5.0 is the point where we will introduce changes that break compatibility with previous versions.  The changes will support a faster design that relies more on multi-threading, updates to take advantage of C++11 features, and better support for non-English speaking users worldwide.  Changes are limited to code; all asset files including models, maps, shaders, textures, and materials

Josh

Josh

A Look at C++11 Shared Pointers in Leadwerks 5

C++11 introduces shared pointers, a powerful language feature that provides easy memory management without the overhead of garbage collection.  The example below should look familiar to you: #include "Leadwerks.h" using namespace Leadwerks; int main(int argc, const char *argv[]) { shared_ptr<Leadwerks::Window> window = Leadwerks::Window::Create(); shared_ptr<Context> context = Context::Create(window); shared_ptr<World> world = World::Create(); shared_ptr<Camera&

Josh

Josh

New Project Idea

I'm trying to build a beautiful open world on map size 2048, where the player will have the possibility to play as a Street vendor, transporting and selling goods through the world. The world should be an unhabitable zone. Unless you have a shield. You will have manage your reccources between buying and re-selling goods, develop yourself with better vehicles, develop a little shopping industry, little bit enigm or fight to provide the shield.

Marcousik

Marcousik

Leadwerks Game Engine 4.4 Released

Leadwerks Software today announced the release of version 4.4 of their topselling game engine on Steam.  This version adds a new GUI system, support for inverse kinematics, and enhanced visuals.  The free update goes out today to over 20,000 paid users on Steam. Leadwerks Game Engine 4.4 sees the introduction of Leadwerks GUI, a system for creating resolution-independent in-game menus.  Custom GUI elements can be created with Lua script, or an item can be selected from a number of pre-built

Admin

Admin

Aggror's devlog #2: Zone optimizing

The easiest, but none the less effective, way to optimize a large outdoor scene is setting a view range for an entity. Here are some basic rules that I used during the rebuild of the Return to the Zone project. Max: Here you can think of essential buildings and large structures. Think about distant buildings, powerlines, bridges and entities that stick out above the vegetation or water plane. Far: Here we have the larger props: containers, trains, vehicles, walls, statues. This als

AggrorJorn

AggrorJorn

Luawerks For 4.4

Luawerks has been updated for Leadwerks 4.4, taking advantage of the new GUI system while adding new features and commands that allow you to develop your game better.   Developer Console Refresh The Developer Console is the stable of the framework. Thanks to the GUI, you can now scroll through your history, highlight, and move the cursor around! Page through your history using the Page Up and Page Down keys! Having a console is vital for development as it allows developers to chan

reepblue

reepblue

Fog in Leadwerks 4.4

Distance fog is one of the most basic visual effects in 3D graphics, going back to the 1990s.  Here is the effect in the Quake 3 Arena map "Fatal Instinct", which was shrouded in a dense orange fog: Leadwerks Game Engine 2 had this available as a built-in effect, while the more flexible effects system of Leadwerks 3/4 had several Workshop shaders available to use, including one by Klepto and another one more recently added by myself.  However, this has not been part of the official SDK

Josh

Josh

Leadwerks 4.4 RC2

A new build is available on the beta branch.  I am putting it out tonight because I want to give you guys as much lead time as possible. I have not tested all hardware yet, and there were a lot of shader updates, so there could easily be a compile error on AMD or Intel cards.  Will test those out in the morning. New camera commands for fog: virtual void SetFogColor(const float r, const float g, const float b, const float a); virtual void SetFogAngle(const float start, const float s

Josh

Josh

Shader Enhancements in Leadwerks 4.4

Leadwerks Game Engine 4.4, scheduled for release soon, features some updated and enhanced visual effects.  In this blog I will talk about some of the adjustments I made.  Having "The Zone" scene that Aggror recreated actually helped a lot to see how shaders could be improved. Bloom / Iris Adjustment / HDR The bloom and iris adjustment shaders have been updated to give bloom a wider and softer blur.  Iris adjustment is faster and more intense now, which will make the outdoors areas seem

Josh

Josh

×
×
  • Create New...