Archive for July, 2011

Here’s something I started playing with today, and finished just a few hours later, satisfied. Premake. In essence, it’s a build script and project file maker, just like CMake and Scons. It uses Lua scripting, to contrast custom and python for the others (CMake a Scons respectfully).

If you weren’t me, you could save yourself a slew of portability headaches with this simple script.

Want it building elsewhere? Walk over to your Linux box, or your Cygwin/MinGW shell, and do this:

premake4 --file=myfile.lua gmake

You now have a makefile.

Of course, anyone that’s done project management knows that the above is just your most basic of projects. Standard C/C++ libraries, and whatnot. Per platform you still need to link versus external libraries (OpenGL, SDL, etc). No problem, just add new sections to your targets. includedirs, libs, libdirs, and so on. Want to apply a setting to both? just place it a level up in the hierarchy. Nearly everything you would normally do on a platform, there’s a means of adding content to that.

Honestly, there’s little point having me regurgitate how to start using it, as the docs have a wonderful tutorial that steps through it. And once you get to the files stage of the tutorial, you can generate a usable project file with just that. Here’s the link:

My one last tip though, is that the scripting interface is doing some housekeeping behind the scenes. The functions Solution, Project, and Configuration specifically. Calling them changes the scope of the calls that follow. This is important to note if you try to use normal Lua scripting activities, a “printf” will write to the console as the project is generated, but not while it runs. There’s a command for setting the actions at each stage.

Oh, and you can invoke MSBUILD from the command-line if you want to live in shell land (like me). Start a Visual Studio 2008 shell (under Start Menu/Visual Studio 2008/Visual Studio Tools/..), then browse to and invoke it as follows.

msbuild MySolution.sln /property:Configuration=Debug

And presto. Your actual errors will be logged to the console window.

* * *

So hey, ahem, back on topic. If you’re not me, you can use something like this to do your project management work. I however have and REALLY LIKE a fancy GNU make based build system I wrote. Unfortunately, this only helps me when I’m developing for Windows, Linux, and certain devices. It does no good when I am actually required to use Visual Studio (certain libraries, DRM, SDK’s), or Xcode on Mac. But that’s where Premake comes in, to take care of that stuff for me.

I have some wild plans ahead, but I wanted my original working script available somewhere. Hit the jump for the full listing.

Smiles has wrapped, so yes sir, I am working on my new game. Let the AWESOME begin!

Today I plowed through the massive task of finishing the redesign of my new build system, and moved the WIP game code over to it’s lovely new home. Lots of work, not much to show (at least, not in the mood to show yet).

But hey, I have this other thing.

Yesterday I received a Hydra motion controller from Razer in the mail. It’s a fantastic dual Wii-nunchuck-like motion controller… actually, far better than that.

It uses a magnetic field in addition to the usual sensors to detect position and orientation relative to the base station. What does that mean? Think Wiimote without the need for line of sight. Not to mention, the precision is fantastic.

So here’s me goofing around with the SDK:

The SDK comes as a set of Visual Studio compiled libraries, and fortunately, the important one is a C library/DLL. I got it working with MinGW easily (pass the .lib file directly to the GCC). Fun stuff.

I’ll have more to say soon. I just wanted to post something quickly resembling progress before the month ended. 🙂

From Monday, Gianfranco (whom I abbreviate as GB) was concerned that some of the guys might have been fear-mongering after a recent set of very sad sad videos. That catapulted me in to a rant about… well… yeah, it’s actually that way. Indie truths a-plenty.

The first begins on the subject of “big games are extremely risky”, despite doing one myself right now.

I had some upload issues with the prior video, which lead me to watching my video a few more times, and expanding on the subject of indies and failures.

Finally, I explicitly DON’T apologize for fear mongering, because we need it.

And there we have 17 some minutes of rant. I’m left feeling a little worried about some of the things said, but I’m glad to have said them.

Today is Wednesday now, so like I touch upon in that first video, I might have an announcement… or not… CMON YES!!!! I WANNA HAVE GOOD NEWS!!! RRRRRRRR!!!!

About tooNormal

tooNormal is the digital notebook of Mike Kasprzak. Some may call it a blog, but it's more a collection of notes and thoughts, when Twitter just isn't verbose enough.

Mike is a long time veteran game developer, having done time at various game studios plus "the indie thing" for well over a decade. He owns and operates SYKRONICS. He also organizes and runs Ludum Dare with some awesome people.