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

About this blog

Learn about game development technology

Entries in this blog

Code, babes, clowns, and an inflatable dinosaur. Just a typical night at Hacker Lab.

I've been following Eric's progress with this idea since last spring, and it's really great to see what started as a fuzzy concept turn into reality.   http://www.youtube.com/watch?v=pK_yjZpOs6w   About Hacker Lab We believe that technology can change the world and the starting point is education. Hacker Lab aims to educate folks and seed startups with community driven resources. Collectively we can build a brighter future using lean methods in both education and business.   We Provide

Josh

Josh

Lua Interpreter on OSX

I've got the editor and Lua interpreter communicating on OSX, but am having trouble creating a window...some weird Objective C problem. I've got to go get my local Xcode expert.

Josh

Josh

Terrain Test

I borrowed Shadmar's terrain splatting shader. This is the result after fiddling around with it for a few minutes in Leadwerks 3. (No normal mapping yet, but that's easy to add.)   Physics can be added by generating a physics shape from the terrain model. It doesn't allow heightmap editing in the editor, but I think this will serve as a good solution until our super uber mega streaming terrain system is built.   Thanks to Shadmar for the assets.   Klepto is also looking into a few OpenG

Josh

Josh

Icing on the Cake

I recently made two small improvements that make the editor much more fun to work with.   A shader consists of two pages of code, for the vertex and fragment programs. I originally designed the shader editor to use tabs to divide up the two code chunks. However, this meant the shader editor could have only one shader open at a time. This made copying and pasting from one shader to another rather tedious.   To improve this, I merged the shader and script editors into a single window. Mult

Josh

Josh

Leadwerks 3 on Windows 8

I picked up an Intel SSD for fairly cheap and installed the Windows 8 Release Preview on it. With this configuration boots up in about 5 seconds. I actually spend a lot longer waiting for BIOS to finish than for Windows to start, which is fantastic.   Anyways, it makes sense to me to take screenshots for the docs from the newest version of Windows 8 since Windows is still the dominant operating system. I couldn't find a driver for my ATI 3850, so I swapped it out for a GEForce 480. Here's

Josh

Josh

Visual Studio

I experienced some problems this week when I tried to create an executable with Visual Studio 2008 for deployment. On Windows 7 test machines I would get this error:   I finally tracked the solution down to a Visual Studio project setting. In Project Settings > Configuration Properties > C/C++ > Code Generation there is a property called "Runtime Library". By default it is set to rely on external DLLs. Change these values to non-DLL settings (like MT or MTd) and they will include

Josh

Josh

How to make a prefab

Step 1. Build the object you want to make into a prefab. Here I have staircase I want to make into a reusable object.   Step 2. Drag all the objects onto one, to make it a parent of the others. Prefabs need one top-level entity.   Step 3. Click on the top-most object in the hierarchy and select the "Save as Prefab" menu item. You'll get a file save dialog so you can choose the file to save.   Step 4. Begin using your prefab by dragging it into the scene from the asset browser

Josh

Josh

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

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

Final touches on the script editor

I've been working with "Klepto2" to integrate the Scintilla text control into the new Leadwerks editor. Scintilla is very powerful and feature-rich, but is somewhat insane to work with. You've got to have a Scintilla expert onboard to integrate it successfully, which we fortunately do.   Previously, I was relying on calls to a Debug:Stop() function to control breakpoints. This was hard-coded into your script program, and breakpoints could not be dynamically added or removed. Since Scintill

Josh

Josh

How to create a material

Step 1. Add your image files into the project directory. I just added a bunch of TGA files, and they show up in the editor right away:   Step 2. Right-click on a texture and select the "Generate Material" menu item.   Step 3. There is no step 3. Your material is ready to use. The normal map was automatically detected and added to the material.   Here it is in the material editor.

Josh

Josh

A tale of optimization

I'm really shocked by how fast C++ can be. iOS and Android do not support GPU skinning, so I had to implement vertex-weighted skinning on the CPU. It took about a day to get running, and then I started optimizing code.   My test case was an 8400 polygon model. Each vertex could be attached to as many as four bones, but most just used two or three bones. To make it more interesting, I put the vertex weighting code inside a loop so it would be performed ten times instead of once.   When I

Josh

Josh

Hello, Crawler

This year, Halloween makes an early arrival. Either that, or Josh is working on animation!   Obviously this is wrong, but it's only a few lines of code away from being right, and I'll figure it out.   Skinning in the new game engine is done on the CPU. You don't have to assign a special shader to make an animated model appear, but it is slower than GPU skinning. I can distribute the load across CPU cores, but no matter what we're not going to have free skinning like we do with Leadwerks E

Josh

Josh

Debugging Lua Apps

Scripting support is very important in the new engine. The script implementation in the old engine was great for quickly adding animation and simple behavior to objects, but wasn't capable of supporting advanced gameplay. I've put a lot of work into our implementation of Lua script to bring it to a new level.   In the old engine, if a script error occurred the program would simply crash. The new engine supports detailed error handling and will automatically open files and show you where an

Josh

Josh

Lua Apps

Here's the layout for pure Lua applications. This will run on Android, iOS, Windows, and Mac, with no third-party compilers to mess around with. And because it's JIT compiled by the engine itself, it's fast: --This function will be called once when the program starts function App:Start()   --Set the application title self.title="Darkness Awaits"   --Create settings table and add defaults self.settings={} self.settings.vsync=true   --Load the user's settings self:LoadSettings()  

Josh

Josh

Directory Layout

We're getting to a point where we need to establish the final directory structure for the new game engine, and start using it. Here's what you see when you open "C:\Leadwerks" (or on Mac, "\Applications\Leadwerks"):   The "Editor" folder contains the editor executable and support files.   The "Engine" folder contains header files, compiles libraries, and BlitzMax include files.   The "Help" directory contains local help files.   The "Projects" directory is where your projects go, by d

Josh

Josh

More Physics Phun

Physics works great with scaled entities:   For joints in the new engine, I am considering something fairly radical. In Leadwerks Engine 2, joints were just a class that wasn't an extension of the entity class. I was going to make a new Joint class that extends the Entity class. The problem is you would end up inserting a ton of intermediary joint entities into your model hierarchy, which would hurt the editor's ability to reload models on the fly.   What if joints were just a feature

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

ZombieTime

AI is always a fun programming topic, and it's even more fun when you're mixing a physics-based character controller with dynamic navmesh pathfinding.   We planned on using navmesh pathfinding from the very start of the design of the new engine. Because it was integrated from the very beginning our implementation works really nicely. Pathfinding is completely automatic and dynamic. There are no commands you need to call to make it work. When part of the scene changes, the navigation data f

Josh

Josh

CSG Brushes vs. Point Entities

The built-in level design tools in Leadwerks3D are great for quickly sketching out a game level. Most of this remains unchanged from the design of 3D World Studio, with a few extras like smooth groups and new primitive types:   When a point entity object type is selected in the side panel, the object creation widget changes to a simple cross hair:   The selection box with tabs that CSG brushes use are great for quickly moving, scaling, rotating, and shearing brushes, but they aren't tha

Josh

Josh

Getting Fun Now...

One of our design principles for Leadwerks3D is to make development fast. You need to be able to iterate and re-iterate quickly, to try out ideas and make adjustments in as few of mouse clicks as possible. A real-time properties editor is definitely one way to enable that. In the screenshot below, I can adjust the intensity and color of the light dynamically, and see the results instantly. It feels so responsive and natural.   I feel like this design philosophy gets us back to our roots wi

Josh

Josh

Random Thoughts

I don't have a clear and obvious subject for this blog, but I haven't posted in a while, so I wanted to write something. I've been getting in a lot of hours of development. My schedule on most days is wake up around 7, answer emails or test code on my Mac at home, then head over to the office at 10. Chris usually comes in right around then (we aren't too strict on schedules) and usually hangs around until around 6. I leave anywhere from 6-9 (and totally miss the rush hour traffic), go home,

Josh

Josh

System Hooks Are Your Friend

Here's an example of how setting a debug hook in Leadwerks3D from a BlitzMax program saved me a lot of time stepping through code to figure out where something went wrong. When the engine encounters a fatal error, the hook is called, giving control back to the main program.   I can even step through the BlitzMax debugger and see which call to Leadwerks3D produced the error:   And it works with all supported languages. Little things like this make programming with Leadwerks3D very enjoy

Josh

Josh

Properties and the editor interface

The properties editor in Leadwerks3D is a live dialog. Your changes are shown instantly in the editor. If multiple objects are selected and their properties do not have the same values, the property interface will show an "indeterminate" state until the value is changed:   When an indeterminate value is changed, the new value is applied to all selected objects. Since they now have a matching value, it is now shown in the dialog. You can use this to move objects along a single axis, witho

Josh

Josh

×
×
  • Create New...