Jump to content
  • entries
    941
  • comments
    5,894
  • views
    872,294

About this blog

Learn about game development technology

Entries in this blog

Entity Script System

We've had a lot of discussion with the community about the Leadwerks3D script system. The current design is based on a combination of user feedback, lessons learned from Leadwerks Engine 2, stealing ideas from other game engines, and my own judgement. Our goal is to make a really easy and powerful game scripting system, without overwhelming the user with complexity. With that said, I thought I would let you in on how the script system presently is working in our own builds, and the process of

Josh

Josh

Entity script fields update

A new update is now available on the beta branch. This is a refinement of the new entity script fields, which rely on the object name, rather than the awkward drag and drop motion that was originally implemented. I've modified the code so that when a map is loaded, any targeted objects will be renamed with a name that is unique in the scene. For example, if two objects named "WaypointA" exist in the scene, and one of them is linked to from another object, the object will be renamed "WaypointA

Josh

Josh

Entities and scripts

Below you can see the properties editor. When you select a script attached to an entity, the properties for that script appear on the right. Here we have a simple "Pulse" script that changes the color of the entity along a sine curve. This can be used for making lights that pulsate slowly, or continually turn on and off.   Here's what the script looks like. The "--in" tag at the end of the Pause and Resume functions indicate that these functions can be activated in the flowgraph editor.

Josh

Josh

Entering data...

I did not expect this many upgrades over the weekend! I'm entering data as fast as I can.   Already I can see the private sections are a big improvement. It totally changes the feel of the forum. It feels like it's more our own area, instead of just a random bulletin board floating around in cyberspace. If that makes any sense.

Josh

Josh

Editor Scripting API

The Ultra Engine editor is designed to be expandable and modifiable.  Lua script is integrated into the editor and can be used to write editor extensions and even modify the scene or the editor itself in real-time.  We can create a scene object entirely in code and make it appear in the scene browser tree: box = CreateBox(editor.world) box.name = "box01" o = CreateSceneObject(box) --make editor recognize the entity and add it to the scene browser o:SetSelected(true) We can even

Josh

Josh in Articles

Editor Enhancements

I've always believed strongly that a native UI presents a cleaner, more consistent, and more beautiful interface for the user to interact with. Not only do they look better, but they present less of a learning curve because the user already knows how to interact with them. When applications move beyond competing to see who can make a better home-made button, they can focus on greater underlying functionality and stop wasting time reinventing the wheel that the operating system already provides

Josh

Josh

Editor Documentation

I got the editor documentation written pretty quickly. It was hard to start, but once I figured out how I wanted to lay out the information, it all started flowing pretty easily.   Documentation in Leadwerks Engine 2 was a weakness, especially in stuff other than the programming reference. This is unfortunate, because I have come to see documentation as the final product. Everything in the development cycle leads up to the ability to write good documentation.   Good documentation starts w

Josh

Josh

Editor Development Continues

I wanted to take some time to investigate geospatial features and see if it was possible to use GIS systems with Ultra Engine. My investigations were a success and resulted in some beautiful lunar landscapes in a relatively short period of time in the new game engine. I have plans for this, but nothing I can say anything specific about right now, so now I am working on the editor again. Leadwerks had a very well-defined workflow, which made it simple to use but also somewhat limi

Josh

Josh in Articles

EAX Effects in Leadwerks 5 beta

I've been doing some work on the sound system in Leadwerks 5 beta, and I added EAX effects in. If you have a dedicated sound card this can be used to add some nice reverb effects that make your sound environment sound a lot more real: Here's the simplest usage: auto fx = LoadSoundEffect("Sound/FX/sewerpipe.json"); auto listener = CreateListener(world); listener->SetEffect(fx); This will apply the effect to all mono sources. Stereo sources are assumed to be music or GUI n

Josh

Josh

Early Z-Pass in Vulkan

Vulkan is pretty wonderful because I can take all the optimal techniques I worked out in OpenGL and it just makes everything much faster. I've successfully completed the implementation of early Z-pass, which is important for our lighting system. We are using a forward clustered renderer, similar to the technique id Software's new DOOM games use. Because the fragment shader is fairly intensive, a depth pre-pass is rendered to ensure we only process each screen pixel once. This techniqu

Josh

Josh

Early access to some 3.3 features

A launch option has been added to Leadwerks on Steam that allows you to launch the Leadwerks Game Player outside of the editor. When you launch Leadwerks Game Engine from Steam, a dialog box appears and lets you choose whether to run the editor or the Leadwerks Game Player. (If you just launch the app from a desktop or start menu shortcut, the editor is run automatically.) You can subscribe to other users' games in the Leadwerks Workshop on Steam, and play them by launching the game player.

Josh

Josh

Dynamic Voxel Updates

I've been working to make my previously demonstrated voxel ray tracing system fully dynamic. Getting the voxel data to update fast enough was a major challenge, and it forced me to rethink the design. In the video below you can see the voxel data being updated at a sufficient speed. Lighting has been removed, as I need to change the way this runs. I plan to keep two copies of the data in memory and let the GPU interpolate smoothly in between them, in order to smooth out the motion

Josh

Josh

Drag, drop, and roll

The various parts of the new editor are coming together. Today I got the properties list box drag and drop functionality working. I actually had to go back and rewrite some of the list control rendering code because I haven't used it in a while, but it didn't take long.   I'm trying to attack known unknowns first, so we're focusing on the flow graph, AI, and game logic, and everything required to build up to support that. I've already written a CSG editor and an engine with great graphics,

Josh

Josh

DPI Scaling

I've implemented DPI scaling into Leadwerks GUI (beta branch, Lua on Windows only).   To set the GUI scale you just call gui:SetScale(scalefactor). A scale factor greater than one will make it bigger, a scale factor less than one will make it smaller. There is no limit to the range you can set, but negative numbers are probably not good.   Scaling causes the GUI to be drawn at a different size, but widget dimensions and mouse events are still interpreted as though they were at their origin

Josh

Josh

DPI Drawing Issues Solved

I've updated the beta branch (Lua on Windows only) with a new build that solves the DPI scaling issues I previously described. Widget creation still works the same, using the same coordinate system regardless of GUI scale. Widget scripts must use global coordinates in the drawing commands, which means calling Widget:GetPosition(true) and Widget:GetSize(true). Here's the very simple panel script, which simply draws a solid block on the screen to frame child widgets within: function Script:D

Josh

Josh

Downtime

First, I want to apologize for the server issues we have experienced this week. With the amount of activity we have coming through the site, it is inexcusable to have any downtime.   The server is reverted to the state it was about four days ago. If you have any important information from the last week you want to save, replace the domain name of the url you want to access with "69.163.255.164". For example, here is the link to the blogs on the other server: http://69.163.255.164/werkspace

Josh

Josh

Double-buffered shadow maps

I got my idea working with spot lights! You can simply use a shadow mode of 2 to indicate an object or light should be considered "static". A light that has the static mode set will use two shadow maps; one for static objects and one for dynamic objects. In the image below, the walls and room are static, and the oildrum has the regular dynamic shadow mode set. As you can see, redrawing the shadow only requires 650 triangles. Without this feature, the whole room and everything in it would ha

Josh

Josh

Double rainbow all the way across the sky

Here is the amazing first shot of Leadwerks Engine 3. Behold not one, but TWO triangles! It's a dual display of isosceles inspiration.     Believe it or not, this screenshot actually demonstrates a feature that's new for LE3...hardware multisampling. Look carefully at the edges of the triangle:     This isn't the first time I've done multisampling, but until now it hasn't been possible to use with deferred rendering. It's now possible to combine these techniques with OpenGL4. You'

Josh

Josh

Documentation Update 2

I've taken your suggestions and incorporated the fixes into the new documentation system here: https://www.leadwerks.com/learn   All classes and commands are alphabetized, with classes listed first.   All pages in the API Reference should be working now.   If a page does not appear in the old docs, or if a command does not have an example, it will not appear in the new docs, as I am not changing the content right now.   Please let me know if the table of contents of pages have any error

Josh

Josh

Documentation Sneak Peak

I am happy to show you a preview of the new documentation system I am working on: Let's take a look at what is going on here: It's dark, so you can stare lovingly at it for hours without going blind. You can switch between languages with the links in the header. Lots of internal cross-linking for easy access to relevant information. Extensive, all-inclusive documentation, including Enums, file formats, constructors, and public members. Data is fetch

Josh

Josh

Documentation Revision

The new docs system is mostly working now: https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetPosition   Features: Treeview list of all tutorials and API classes and functions. Alphabetical index (generated automatically from the table of contents). Search (with autogenerated search index). Switch back and forth between languages, with cookies to remember your preference. Entire examples are automatically selected when you click on them. Todo: Table of c

Josh

Josh

Documentation and Code Details

Documentation in Leadwerks 5 will start in the header files, where functions descriptions are being added directly like this: /// <summary> /// Sets the height of one terrain point. /// </summary> /// <param name="x">Horizontal position of the point to modify.</param> /// <param name="y">Vertical position of the point to modify.</param> /// <param name="height">Height to set, in the range -1.0 to +1.0.</param> virtual void SetHeight(const int x

Josh

Josh

Docs

I spent the day manually setting entry categories in the new documentation database. This was needed to make the docs actually use the nice breadcrumb bar in the website header. Our content management system doesn't exactly support hierarchical pages, so some clever PHP scripting was used to make it work. The whole point is simply to make navigation easier, and it works well. I also wrote some PHP code that does a search and replace with class names, so class names are always links to the pa

Josh

Josh

Diving into Constructive Solid Modeling

It's pretty clear that constructive solid geometry modeling is a high priority for our community. I like being able to easily sketch out my ideas. In fact, when this feature went away in Leadwerks 2, that was when I just stopped making game levels. It's not that I don't know how to use 3ds Max and other programs, it's just that they're not fun. The upcoming release of Steam Workshop also fulfills my long-held dream of building a shared repository of textures and models scaled correctly to wo

Josh

Josh

×
×
  • Create New...