Jump to content
  • entries
    943
  • comments
    5,899
  • views
    923,759

About this blog

Learn about game development technology

Entries in this blog

iOS 6 Blues

Apple's problems in iOS 6 aren't limited to maps. Their OpenGL drivers in iOS 6 are absolutely non-functional.   First I was experiencing a BAD_EXC_ACCESS error when rendering certain surfaces. Feedback on the Apple dev forum suggests I am not alone in this. I took a guess and switched my position vertex buffers to use vec4s instead of vec3s, and it appears to have solved that problem (even though both should be fine).   Second, all 3D objects just stopped appearing, completely. I've deb

Josh

Josh

Not So Fast

In my previous blog I talked about the Android file system and APK package system. The end result was I copied all the project assets into the res/raw folder. However, I learned two additional things that changed my plan a little: Android files can only be lower-case. Any folders in the res/raw folder will not get copied...it just packs in the files in that directory, with no sub-directories! That's a big problem if we want Leadwerks to be able to load files the same on each operati

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

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

How to be a great programmer (or whatever)

I am going to share my tips on how to be a great programmer, or anything else for that matter.   The first thing you need to do every day is eat properly. I recommend the following:   Breakfast 2 pieces of toast (whole wheat bread, the heavier the better). One banana or orange. Finally, eat pure egg whites until you can't eat anything more. They have no cholesterol, no fat, they are pure protein, and they will give you tons of energy. Lunch Get a deli sandwich. Chicken, tur

Josh

Josh

Halloween Horrors with Objective-C

It's November 1, and this is the longest summer I can remember in a while. Jokes about the seasons aside, last week I had trouble deciding what to do first, so I decided to attack the remaining tasks I was most scared of. This has been my strategy throughout the entire process, and it results in my work becoming progressively easier as we near the finish line.   I finished one big task today that was holding us back. We need a file system watcher for Mac computers to detect changes to the f

Josh

Josh

A Red-Letter Day

No matter what, tomorrow is a big day for the tech industry. What do you think will happen? http://windows.microsoft.com/en-US/windows-8  

Josh

Josh

One of the weirdest bugs of my life

So inexplicably, two days ago animation stopped working on all my Mac machines. I checked out the graphics module, looked in the surface class, the animation routine, and couldn't fine anything wrong. The same code ran fine on Windows, and all the animation is on the CPU, anyways, so it couldn't be a graphics issue.   I noticed if I explicitly set the frame number instead of using the time as the frame, it worked fine. So I start printing out the frame number in the animation routine. The

Josh

Josh

Preparing C++ Projects

I've been doing a lot to create the final Leadwerks projects to build static libraries, and the corresponding Visual Studio, Xcode, and Eclipse projects to load those libraries and start coding with Leadwerks 3 in C++. We're also making progress with our sample game "Darkness Awaits". The community came up with an awesome logo for the game that captures the spirit and feel of the original concept, which first formed as a mod for the original Quake engine. I uploaded gamecreator's Photoshop fi

Josh

Josh

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

Building Deployable Projects

It's quite a challenge to get something semi-deployable to work on four platforms. I never intended to become an expert on the subject, but here are some of the interesting things I have picked up recently.   Code generation mode in Visual Studio By default, Visual Studio builds programs in debug mode that won't run on consumer's machines. Fix it by changing the code generation mode: http://www.leadwerks...grams-cant-run/   Static Libraries in Xcode Xcode has no "exclude from build" opt

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

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

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

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

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

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

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

×
×
  • Create New...