Jump to content
  • entries
    941
  • comments
    5,894
  • views
    871,893

About this blog

Learn about game development technology

Entries in this blog

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

Loading Binary and Embedded GLTF files

It turns out GLTF is actually three different file formats. ? Textures can be loaded from external files, embedded in a binary .glb file, but they can also be saved in an ASCII GLTF files using base64 encoding. Having three different ways to store textures is not a good design decision, but at least it's better than the disaster called Collada. (Note to Khronos: If your file format specification has more pages than a Tom Clancy novel it probably sucks.) Our GLTF loader now supports files wi

Josh

Josh

Loading Assets from Streams

Since the GLTF file format can pack textures into a single file with the model, I needed to implement asset loading directly from a stream: auto stream = ReadFile("image.png"); auto tex = LoadTexture(stream); This was interesting because I needed to add a check for each supported image type so the loader can determine the file type from the contents instead of the file path extension. Most file formats include a string or "magic number" at the beginning of the file format to indicate what

Josh

Josh

Load files from URL

I have been spending most of my time on something else this month in preparation for the release of the Leadwerks 5 SDK. However, I did add one small feature today that has very big implications for the way the engine works. You can load a file from a web URL: local tex = LoadTexture("https://www.github.com/Leadwerks/Documentation/raw/master/Assets/brickwall01.dds") Why is this a big deal? Well, it means you can post code snippets that can be copied and pasted without requiring download o

Josh

Josh

Lions, Leadwerks, and Androids, Oh My!

It took a while to figure out, but I was able to get drag and drop interaction working on OSX. (Thanks to Seb Hollington for helping with the coordinate transformation stuff.) Now the editor lets you assign textures by dragging them onto texture slots, just the same as on Windows. There's one last step before the editor code becomes totally platform-agnostic. A file system watcher needs to be implemented on Mac. On Windows, this was fairly straightforward, because there is a built-in API fo

Josh

Josh

Linux, You Changed Man

I recently fired up an install of Ubuntu 20.04 to see what the state of development on Linux is now, and it looks like things have improved dramatically since I first started working with Linux in 2013. Visual Studio Code looks and works great on Linux, and I was able to load the Ultra Engine source code and start compiling, although there is still much work to do. The debugger is fantastic, especially after using the Code::Blocks debugger on Linux, which was absolutely sadistic. (They're both u

Josh

Josh in Articles

Linux update: Scene browser and hidden window contexts

I've made two major improvements to the editor UI this week. The scene tree is now fully functional, and objects can be dragged around in the scene hierarchy: Models and prefabs can now be dragged into the viewports from the asset browser, so the editor is near fully functional now. The X11 windowing system cannot create an OpenGL rendering context on a hidden window. (The same happens on OSX.) On OSX I did a cheesy hack whereby the asset editor windows (the model, texture, material, etc. e

Josh

Josh

Linux Graphics

Compiling Leadwerks on Linux using the Code::Blocks IDE wasn't very hard. I particularly like the way Code::Blocks handles files in projects. Instead of creating your own "fake" file system in the project explorer, you just add the folder or files you want, and they are organized in a hierarchy that matches the file system.   I found the X windowing system to be extremely easy to work with. I've implemented windowed OpenGL contexts on Windows, OSX, iOS, and Android, and Linux was by far the mo

Josh

Josh

Linux Editor Updated

An update to the Linux build of the Leadwerks editor has been posted. This resolves a few UI issues: The way the scene browser tree renders is changed to eliminate visual artifacts. Some scroll bar behavior bugs are fixed. The popup menu that appears when you right-click on an entity in the scene browser now contains an "Add to flow graph" menu item. This odd UI bug is fixed. Double-clicking on items in the scene or asset browser trees will collapse/expand that item if it has chi

Josh

Josh

Lighting optimizations in version 2.31

I got the volume intersection tests working, and it won't be hard to extend this to make trigger and fluid volumes. The image below shows a point light divided up into six volumes. Each pyramidal volume represents the camera frustum of one face of the shadow cubemap. In version 2.3 and earlier, whenever an object moves within the spherical volume of the point light, the shadow is considered invalidated, and all six faces of the shadowmap are redrawn. This is why point lights are so expensive

Josh

Josh

Lighting in Vulkan

I have basic point lights working in the Vulkan renderer now. There are no shadows or any type of reflections yet. I need to work out how to set up a depth pre-pass. In OpenGL this is very simple, but in Vulkan it requires another complicated mess of code. Once I do that, I can add in other light types (spot, box, and directional) and pull in the PBR lighting shader code. Then I will add support for a cubemap skybox and reflections, and then I will upload another update to the beta. S

Josh

Josh

Light Strips in Vulkan Renderer

It's always fun when I can do something completely new that people have never seen in a game engine. I've had the idea for a while to create a new light type for light strips, and I got to implement this today. The new engine has taken a tremendous amount of effort to get working over two years, but as development continues I think I will become much more responsive to your suggestions since we have a very strong foundation to build on now. Using this test scene provided by @reepblue you ca

Josh

Josh

lgui screenshot

I got selection and rendering order working correctly, which is really the problem I wanted to solve with this. Here's a screenshot of the work in progress:  

Josh

Josh

lgui

I've never considered myself a fan of writing GUI code, but now that I have a small job I need to get it done for, I'm actually having a lot of fun with it. I've been tinkering around with Lua GUI code for two days, and I came up with a really neat system after lots of trial and error.   Controls A "control" is the name for a button, label, or other widget. A control is a Lua table. The programmer creates the controls they want and then inputs mouse coordinates and the left mouse butt

Josh

Josh

Let's get this vegetation party started

An update is now available on the beta branch which fixes the alt+tab problem. This works by skipping rendering when a window is minimized, since the Win32 command GetClientRect() returns a size of zero when windows are minimized.   Now I am on to the highly anticipated Leadwerks 3 vegetation system. I previously wrote about some research I was performing here: http://www.leadwerks.com/werkspace/blog/1/entry-1499-vegetation-research/ http://www.leadwerks.com/werkspace/blog/1/entry-1500-veg

Josh

Josh

Legos and Game Artwork

I recently had a strange interest in looking at Lego sets online and watching reviews. There was something about them that I felt like related to game development and level design. Something very interesting I noticed was that each set would include several extra elements that formed a story line. This added "play potential" to the set. For example, the raft below includes three pirates loaded with weapons, one who is obviously the leader, a treasure map, so the crew has an objective, and a

Josh

Josh

Left 2 Do

Here's my list, as it stands today: Lua Interpreter project for iOS and Android (iOS is done, Aria is working on Android) Improve flowgraph visual style (will finish today, probably) Documentation (Chris is filling out the syntax, then I will go in and write descriptions) Brush rendering batches (to make editor rendering faster) Brush collapse on load (in engine only) Undo system

Josh

Josh

Lean Game Development

I'm very happy with the progress our community as a whole is making. Instead of getting distracted with endless technical features, we're releasing games. Lean Game Development The Lean Startup Methodology basically states that life is too short to build a product no one wants. Companies invest years in development to release a product onto the market, only to discover that early design flaws doomed the product from the start. Lean Startup Methodology posits that one should release a minim

Josh

Josh

Leadwerks3D on Android

After some initial difficulty, Leadwerks3D is now running on Android, with the exact same code that runs on iPhone, iPad, Windows, and Mac. A big thanks for Aria for all his help and expertise with the Android platform. This means Leadwerks3D is now running on all platforms we intend to support at launch, and it can be easily extended to support new ones.     To celebrate, here's another cartoon I drew:

Josh

Josh

Leadwerks Plugin SDK

I've restructured the plugin SDK for our new engine and created a new repository on Github here: https://github.com/Leadwerks/PluginSDK The GMF2 format will only be used as an internal data transfer protocol for model loader plugins. Our main supported file format will be GLTF. As of now, the plugin system can be used to write texture loaders for different file formats, model loaders, or to modify behavior of particles in the new particle system. The FreeImage texture loader has been

Josh

Josh

Leadwerks on the iPhone

So here's what it took to get Leadwerks running on the iPhone:   Let's start at the point we had the C++ code building and running with an OpenGL 1 renderer on OSX. I was worried OpenGLES might be a dramatically different API that required a whole new learning curve, but I was pleasantly surprised. It's just a stripped-down version of OpenGL, more like OpenGL 3.3 than anything else. Making the OpenGL2ES renderer was mostly just a copy and paste operation, and then I had to comment out a few

Josh

Josh

Leadwerks Merc

Here's an update of the model sheet for our "Mercenary" character. We're spending more time in the planning phase than previous attempts, and I think the effort is really paying off.   All design is really a process of decision-making. If you don't make decisions you'll end up with something without much definition. Everything about this character was decided according to factors I set out at the beginning of this project.  

Josh

Josh

Leadwerks MaxGUI Driver

MaxGUI is an abstracted GUI system for the BlitzMax programming language. This allows Windows, Mac, and Linux native UIs to be created using the same code. The LeadwerksMaxGUIDriver module integrates Leadwerks GUI so that existing programs can be recompiled using our new UI system. Here's the first shot of it working in an actual existing program:  

Josh

Josh

Leadwerks GUI for Linux

It took most of the weekend, but I've got Leadwerks GUI running on Linux, rendering directly to an X11 window. This is the fastest possible rendering method on Linux, and I think you'll agree the results are worth it. You can try a demo here: http://www.leadwerks.com/werkspace/topic/14867-gui-demo/#entry100912     Just like the Windows implementation, I found it necessary to implement double-buffering. In X11 this is accomplished with the use of an extension called "xdbe". The document

Josh

Josh

Leadwerks GUI

Leadwerks GUI is now functioning, on the beta branch, Windows only, Lua interpreter only.     GUI Class static GUI* Create(Context* context) Creates a new GUI   Widget Class static Widget* Create(const int x, const int y, const int width, const int height, Widget* parent, const int style=0) Creates a new Widget. Widgets can be made into buttons, dropdown boxes, or anything else by attaching a script.   virtual bool SetScript(const std::string& path, const bool start = true) Se

Josh

Josh

×
×
  • Create New...