Jump to content
  • entries
    941
  • comments
    5,894
  • views
    866,512

About this blog

Learn about game development technology

Entries in this blog

Even Deeper

Lua's debug hooks are a little funny, because they don't appear to allow line-by-line calling of your own function. The description here is pretty vague: http://pgl.yoyo.org/luai/i/lua_sethook   The line and count hooks look like they might be what I wanted, but the docs have one big caveat: This makes me wonder what the point of these hooks even is. The way I have it set up now, "Step" continues to either the next Debug:Stop() call, or to the next point where a Lua function is called. N

Josh

Josh

Back to Werk

In my last development blog, I wrote about some design problems I faced, and why I wasn't sure how to proceed. I've resolved these issues by building the debugger and game output display close to where they will be most likely to be used, the Script Editor.   I was pleased to find that my Lua debugger code I wrote about a year ago works perfectly. This allows breakpoints, code stepping, and the display of variable values in your game. It works with any Leadwerks3D executable, so you can e

Josh

Josh

On the Naming of Things

The design of the Leadwerks website involves organizing a lot of different kinds of data that are continually growing, including forum posts, blog entries, gallery images, videos, and downloadable files.   All this information was organized in categories, and sub-categories, and in some cases, sub-sub-categories. The depth of categorization made it impossible to follow all the information that was flowing through the site, and users frequently posted in the wrong place. We recently underwent

Josh

Josh

Design Confusion

Sometimes I run into situations where I don't really know how to structure things. I don't mind this, because it usually results in some really elegant design once I figure out what to do. I just play with ideas and try not to force anything, and when the right idea arises, I will recognize it.   Explaining a problem to someone else can help facilitate that process. How many times have you solved a difficult problem right after you posted a description of it on a forum somewhere? The proce

Josh

Josh

Viewport Navigation

I've got orthographic viewport navigation done. I decided to build some grid commands into the camera class so that the graphics driver itself can handle the grid rendering, rather than having the editor make a bunch of OpenGL calls in a callback function. The grid can be rendered from any angle, and the math was a little tricky, but I got it worked out. I paid extra attention to showing the border where the world ends. The sliders that pan the viewport are very accurate, and stop right at t

Josh

Josh

Moving Right Along...

I'm happily starting out on the CSG editor. The first step is to add a grid in the orthographic view modes so that you have a frame of reference. In Leadwerks Engine, the editor used some callbacks to call OpenGL commands to draw the grid. In the new system, Leadwerks3D, I added some per-camera commands to control the grid spacing, resolution, and colors. (You may safely ignore the mysterious black cube in the center.) This way the editor never has to call OpenGL commands directly, making r

Josh

Josh

In Like a Lion

I haven't actually had the Leadwerks3D editor running on OSX Lion until a few days ago. There were some underlying GUI issues that had to be updated to handle a few new ways that OSX Lion does things. The first run was pretty frightening, with random crashes and all sorts of visual inconsistencies. However, careful testing resulted in these issues being resolved one by one.   The most peculiar was a bug in which the editor would crash when a file request dialog was opened if, and only if, it

Josh

Josh

A Story of IT

I generally categorize every aspect of Leadwerks as either "absolutely required" or not necessary. If it's categorized as the latter, I don't bother with it, and if it's categorized as the first, I pursue it with a dogged determination until it is done. This has served us well in many ways, like our vegetation rendering system and character controller.   However, this assumes I have full control and mastery over the product, or at least have someone working for me who does. This is almost a

Josh

Josh

Model Editor hierarchy editing

You can drag entities around in the model editor to rearrange the hierarchy. Now I just need to add an option to collapse a hierarchy, and the basic art pipeline will be done.   I had a difficult bug that was causing model hierarchies to be duplicated. At first I thought I was saving files wrong, but it turned out my entity copy routine was duplicating the hierarchy twice! Oh well, problem solved.

Josh

Josh

Leadwerks Articles

The articles database makes a triumphant return with a beautiful new template: http://www.leadwerks...e/page/articles   The front page shows the most recent articles. Clicking on a category on the right gives you the entire list of articles for that category: http://www.leadwerks...s/_/programming   The new template I designed will help organize and present articles better. There's some great content written by the community, but I haven't provided a very clear specification for the arti

Josh

Josh

Madness? THIS - IS - MOBILE!!!

I apologize preemptively for the title.   So I picked up a Samsung Galaxy Tab today, for testing...yeah, that's it, "testing"...   I installed the USB driver for Windows, restarted my computer, and was able to start debugging Leadwerks3D on it with no trouble at all. However, the rendering showed black objects that ought not be black.   At this point in the game, having such a basic issue is very scary to me. I tracked the problem down to the lighting uniforms being passed to the sha

Josh

Josh

Model Tools

I've never coded much polygonal modeling routines, instead focusing on constructive solid geometry. I wanted to include some tools for modifying surface normals and texture coordinates. I came up with a normal calculation routine that actually uses four different algorithms, depending on the settings specified.   One thing I learned right away is you want to do away with n*n routines. That is, NEVER do this: for (i=0; i<surface->CountVertices(); i++) { for (n=0; n<surface->

Josh

Josh

S-M-R-T

I've made more progress on the model editor. I needed it to be able to resave models after making changes. First, I started with an Entity::Save function that would save all entities in the GMF format. "But wait", I thought, "I can save all entities in the GMF format!" Then I thought, even better, I can simply write a Serialize() virtual class function in the base object and extend it for each class, so that instead of writing this: stream->WriteFloat(position.x); stream->WriteFloa

Josh

Josh

No SOPA

As the founder of Leadwerks Software, software piracy is an issue that has directly affected my income. We solved the piracy problem by turning our product into a service. Only paid customers can access our community website and get full use of our product. Piracy rates dropped to virtually zero after that. I consider our piracy problem totally solved. The marketplace changed, we adapted to provide a better service, and overall both the customers and company are better off than before.   Netf

Josh

Josh

Model Editor

When you double-click a model file in the asset browser, it's opened up in the model editor window within Leadwerks3D. You can drag materials onto a model to assign them, then just save the model and close the window. You can also drag textures straight onto the model, and Leadwerks3D will do a pretty good job of guessing what material to use. If no material exists, it will create one, and take a good guess at what textures should be added to it, then apply the newly created material to the m

Josh

Josh

Project Management

Leadwerks3D has built-in project management features that assist the user to create, share, and publish projects. When you first start editor for the first time, the New Project wizard is displayed. You can select a programming language and choose which platforms you want the project to support. It is possible to add project templates for new languages, too.   Once a project exists, you can go into the project manager and switch projects. This will cause the editor to use the project dir

Josh

Josh

Back to the Art Pipeline

It's pretty amazing how long the materials, textures, and shader system is taking, but it encompasses a lot of areas: Automatic asset reloading, autogenerated shaders, GLSL syntax highlighting, texture conversion options, and more. All this attention to detail is shaping up to create what I hope will be the best art pipeline, ever.   The Asset Browser displays all files in your project directory. You don't have to use Windows Explorer at all anymore. You can rename, move, copy, cut, paste,

Josh

Josh

Over the Hump

All difficult technical challenges for the completion of Leadwerks3D are solved. This includes navmesh pathfinding, cross-platform support, Lua and C# integration, OpenGLES rendering, the abstract driver model, etc., etc., etc. Basically, all the scary stuff is done, and the only thing that remains is hard work. I'll be turning my attention back to the editor shortly, but first I wanted to address a different kind of challenge: Documentation and the website.   The present appearance of the

Josh

Josh

Should you get a Mac?

A few people have asked me about this, so now seems like a good time to talk about my experience with Mac computers. My first computer was actually an old Macintosh SE30, but of course in the 1990's Windows took over and I forgot about Mac. When I started developing Leadwerks3D I invested in a 27" iMac. It includes a 3.2 ghz quad core i3 CPU and an ATI Radeon 5750.   At the most minimal, the computer needs one cord for power, and that's it. The keyboard and mouse are wireless, and a built-

Josh

Josh

Darkness Awaits

Leadwerks3D will ship with a finished game demo to demonstrate how to use the software. Darkness Awaits is a third-person dungeon explorer with a 45 degree view. It's like a cross between Diablo and Legend of Zelda: A Link to the Past. This is an idea I had back in my very early days of game development, before I even learned to program. This was originally done in the Quake 1 engine. It didn't really go anywhere, but what we had was awesome. You could run around and shoot skeletons with f

Josh

Josh

Why Small Companies Succeed

The development of Leadwerks3D seemed like an impossible task at first. Not only did I need to write a new 3D engine entirely in C++ mostly by myself, but I had to make it run on four platforms (Android, iOS, Windows, and Mac), with a scalability all the way from the fixed-function pipeline up to the very latest hardware tessellation features. All logical sense told me this was impossible. Even large companies with 100 programmers or more haven't yet been able to put out a 3D engine with the

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

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

Friday, November 18

Well, we're through the "OMG will this even work" phase. Aria got FreeType to build on all platforms, so you can load TTF files directly on Windows, Mac, Android, and iOS devices. I set up the accelerometer input on iOS today, so you can call Device::GetAcceleration() and retrieve a Vec3 telling you which way is down. Acceleration is returned relative to the screen orientation, so you don't have to worry about which way the device is rotated. This isn't my proudest screenshot, but it demonst

Josh

Josh

Odds and Ends

I implemented direct WAV file loading, and will add OGG as well. The MP3 file format has licensing issues, and we are not going to support it. However, if you use a third-party MP3 converter, the editor will detect whatever converters you add and use them (see more below). We're using OpenAL for sound, but have a more in-depth implementation than in the past. Sound source management is important because you only get so many sound channels on most cards, and this is handled automatically, bas

Josh

Josh

×
×
  • Create New...