Jump to content
  • entries
    941
  • comments
    5,894
  • views
    870,272

About this blog

Learn about game development technology

Entries in this blog

Apple and Leadwerks

I was thinking this morning how Apple has influenced my life and the company Leadwerks. You might ask why I am talking about this, since we are only now coming out with our first product for any Apple operating system. Well, before Windows existed, back in the 1980's, this was my first computer:     The first "game" I ever made was in Macintosh Paint. I drew a road from a top-down view, with barriers randomly placed on either side. I drew a race car, zoomed in the image, and used the se

Josh

Josh

Apple Adopting OpenGL3

This is great news. I was a bit worried about the state of OpenGL on the Mac, since they presently only support version 2.1. With OpenGL3 support, we can have a uniform graphics API on Macintosh, Linux, Windows XP, Windows Vista, and Windows 7. http://www.theinquirer.net/inquirer/news/1585830/apple-slowly-opengl

Josh

Josh

Another Design Puzzle

I have the basis of CSG editing written into the engine. It was a bit challenging to figure out just how to structure the Brush class. We have a lightweight ConvexHull entity, which is used for the camera frustum. This is an invisible volume that changes frequently, and is used to test whether objects intersect the camera's field of view. I didn't want to bloat this class with a lot of renderable surfaces, texture coordinates, vertex normals, etc. I initially thought I would derive the Brus

Josh

Josh

Another beta update available

A new build is available on the beta branch on Steam. This fixes a couple of issues. Oculus view projection is fixed. Added VR.AButton, VR.BButton, VR.GripAxis for compatibility with Oculus Touch controllers: https://www.leadwerks.com/community/topic/17052-vive-and-oculus-controls/ Fixed terrain collision bug: https://www.leadwerks.com/community/topic/16985-character-controller-falls-through-terrain/

Josh

Josh

Animation Tweening

Leadwerks 5 uses a different engine architecture with a game loop that runs at either 30 (default) or 60 updates per second. Frames are passed to the rendering thread, which runs at an independent framerate that can be set to 60, 90, or unlimited. This is great for performance but there are some challenges in timing. In order to smooth out the motion of the frames, the results of the last two frames received are interpolated between. Animation is a big challenge for this. There could potentially

Josh

Josh

Animation speed in Vulkan vs. OpenGL

I created a test of 1000 animated crawler models to see how the performance of Vulkan stacks up against our older OpenGL renderer. Here it is in OpenGL running at 37 FPS, which is pretty respectable considering how many animations are playing (and about 4 million polygons). With Vulkan the same test yields a framerate of 66 FPS, 78% faster than the OpenGL version. Here is a video of the characters animating. Each skeleton is its own unique animation system, there are no sha

Josh

Josh

Animation Pipeline Improvements

I've been doing some work with animated models lately, and encountered some of the difficulties people have mentioned with model animations. It's not really hard to do, but there are things we can do to make the process faster when dealing with lots of animations. This video explains some of the changes I made to make it easier to get animated models into Leadwerks.   These include: Animation name in extraction dialog. Animation tab with all sequences displayed at once. Import animat

Josh

Josh

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

Animated Textures

One of my goals in Ultra Engine is to avoid "black box" file formats and leave all game assets in common file formats that can be easily read in a variety of programs. For this reason, I put a lot of effort into the Pixmap class and the DDS load and save capabilities. In Ultra Engine animated textures can be stored in a volume texture. To play the animation, the W component of the UVW texcoord is scrolled. The fragment shader will sample the volume texture between the nearest two slices on

Josh

Josh in Articles

Android Progress

I got touch input and text rendering working on Android. Happily, I have not encountered any issues with different behavior on any tested OpenGLES devices, including iOS. The framerate on my HTC Evo jumps around quite a bit, which appears to be an issue with the Java garbage collector. Framerate on iOS is a solid 60 FPS, so we should be able to get this sorted out.   Here's a video: http://www.leadwerks.com/werkspace/page/videos/_/leadwerks-engine-3/android-progress-r100   I also discover

Josh

Josh

Android Guts

I spent most of today getting the Android library more polished, especially when handling application switching. It's a little tricky because Android doesn't automatically manage your sound channels and OpenGL resources, so these need to be reloaded when an app regains focus. Here's a video, which I obviously had way too much fun with in iMovie:

Josh

Josh

Android File System

Today I am working out the file system for Android applications. In the past we just manually copied all our assets to a "/Leadwerks" folder on the device itself. This approach is okay for testing, but it won't work for distributing apps in the Google Play store.   Android uses APK files to store all applications in. An APK file is really just a ZIP file, and all your assets go in a /res/raw directory in the ZIP package.   To access the Android file system from C++, we had to take the fol

Josh

Josh

Android Ahead

I hired a local Android developer to get Leadwerks 3.0 running on Android devices. We don't know a lot yet, other than that we have an OpenGLES renderer, and everything should be cross-platform compilable. The Android version of LE3 is using a minimum requirement of Android 2.2, which is the lowest version that supports OpenGL ES 2.0. This will run on about 75% of Android devices:     As you can see here, the proportion of 2.1 devices is steadily dropping. If a linear rate of decrease i

Josh

Josh

And now the fun begins

We have our design parameters. We know the editor should let the user control every aspect of the engine in a visual manner, without having to use any other tools or do any editing of text files. We have 3D World Studio to serve as inspiration for the design and feel of the program.   The sky's the limit. You, the users, have told me that you want to invest in a system that does more for you and makes your life easier. I'm happy to provide the basis for your next projects. Thank you for l

Josh

Josh

Anatomy of a Bug

The model editor animation bug was the second-worst bug to hit Leadwerks Game Engine in all its history. Reported multiple times, this would cause animated models to discard triangles only in the model editor, only on Linux. http://www.leadwerks.com/werkspace/topic/10856-model-editor-freaks-out/ http://www.leadwerks.com/werkspace/topic/12678-model-animation-vs-flashing-bodyparts/ Since our animation commands have worked solidly for years, I was at my wits' end trying to figure th

Josh

Josh

Analytics

I'm hoping to add analytics to both the editor and the engine API. I need to know how many people are actively using the engine on a week to week basis, and how many of those users are opening the Workshop browser in the editor. There will be an option to opt out of stats collection (a real one, not like Windows 10), and even if you do allow stats to be collected no data will be traceable back to your SteamID or IP address.   I've chosen the GameAnalytics.com API for this.   This will also

Josh

Josh

Analysis of Google Draco

Google Draco is a library that aims to do for mesh data what MP3 and OGG did for music. It does not reduce memory usage once a mesh is loaded, but it could reduce file sizes and improve download times. Although mesh data does not tend to use much disk space, I am always interested in optimization. Furthermore, some of the NASA models I work with are very high-poly, and do take up significant disk space. Google offers a very compelling chart showing a compression ratio of about 95%: Ho

Josh

Josh in Articles

An interesting fix

You may have noticed our deferred decals (presently in beta) tend to shift with distance. Something was wrong with the screen space to world space conversion, but it's a hard problem to describe. I wrote a function based on the work Igor did for his SSLR shader, like this: vec4 ScreenPositionToWorldPosition(in vec2 texCoord) { float x = (texCoord.s / buffersize.x - 0.5) * 2.0; float y = (texCoord.t / buffersize.y - 0.5) * 2.0; float z = texelFetch(texture5, ivec2(texCoord),gl_Sampl

Josh

Josh

An Eventful Weekend

The windows class on OSX has been a bit neglected, so i spent some time getting it ready for the final release. Creating a full-screen window on Mac is a little funny. There's a fullscreen mode that's been around a while, but it locks the system so that CMD+TAB doesn't work. That means if your application crashes, or you don't program it to close with the escape key, you'll be stuck in fullscreen mode, with no way out but a computer restart!   You can create a window on top of everything e

Josh

Josh

Ambient Lighting Research

Previously I talked about the idea of implementing a new "Ambient Point Light" into the engine. This would work by rendering the surrounding environment to a cubemap, just like a regular point light does. However, this type of light would render to a color buffer instead of just a depth buffer.   The light could then be rendered to display ambient reflections and soft lighting on the surrounding environment. While it would not provide perfect real-time reflections, it would give an extra bo

Josh

Josh

Ambient Light Research Pt 2

After a resolving a few odd and ends I was able to create a proof of concept of the deferred environment probe idea I talked about earlier. The environment probe is basically the same as a point light. They have a range and affect a finite area. The color property can be used to adjust the intensity of the ambient lighting / reflections. Basically, you want to cover your indoor environments with these, but it's okay if you miss some spots. The environment probes fade out gradually so you do

Josh

Josh

Amazing Tools

This is just so cool. You can generate simple primitives for any entity. A convenient "Fit Shape" button will wrap the primitive around the entity, with an option to include the entity's children. However, the real power comes when you generate physics shapes from models. You can right-click on any model and get a menu to generate a physics shape. The polygon mesh and convex hull will look familiar if you've used the PhyGen tool in Leadwerks Engine 2. There's also a new option called "Conv

Josh

Josh

Almost Android

Leadwerks 3 is compiling for Android. There's presently a problem with the file system that is preventing any 3D rendering, but we'll get that worked out shortly. We're targeting Android 2.2.   In order to compile C++ for Android on Windows, we had to install the following: -Java SDK -Eclipse IDE -Android SDK -Android NDK -CygWin -GDB   We also learned that OpenGL ES 2.0 does not run in the Android simulator. For the time being, we have to run the engine on an actual Android device.

Josh

Josh

Alles Gute

The Leadwerks.com server started acting up earlier today, and I had no idea why. Database errors were occurring, and I had not made any changes to the site. I called our server site in Chicago. First they restored the full site from a backup from 2 A.M. yesterday morning. The matter was still not solved, though. A couple hours later, they determined that an automatic CPanel upgrade had caused PHP extensions to be loaded multiple times. This was fixed, and now we are back to normal. If you

Josh

Josh

Ain't no party like a Hacker Lab party

The Sacramento Hacker Lab is a new facility of offices and shared workspace for tech startups and developers to work. They threw a party last night and Chris and I went.   I saw a 3D printer for the first time:   And I got to hold a printed replica of Admiral Ackbar's head. This lead to me randomly yelling out "IT'S A TRAP!" for the remainder of the evening:   The major players in the Sacramento game industry plotting to take over the world:   I think these 4x4's turn into robots

Josh

Josh

×
×
  • Create New...