Archive for July, 2011

Premake: My new best friend (RE: MSVC & Xcode)

Sunday, July 31st, 2011

Alright, I’ve spammed the twitterverse enough.

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.

(From here)

Stick that in a folder with code, or code found in some directories. Then from a command-line, invoke the tool premake4 as follows:

premake4 --file=myfile.lua vs2008

Blam! Your prize, a Visual Studio 2008 project file and solution. Want 2010? Just change the argument.

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:

http://industriousone.com/solutions-and-projects

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.

Remember, it’s Lua, so double dashes are line comments.

(more…)

It begins…

Saturday, July 30th, 2011

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. 🙂

Conversation: Some unusual topics

Thursday, July 21st, 2011

Here’s a couple videos from the series, some of the more odd things I’ve posted.

The first is a response to a topic of inspiration posed by Andy Moore. I try to get out for walks as often as I can, and I bring with me a camera phone… here’s what I see:

Next was something from this past weekend. I picked up an iCade, which is an arcade controller for an iPad, and I got it working with something NOT an iPad.

It’s a neat device. You can get more details about coding for it here.

This catches up my queue. I have some videos about some of my thought process on the new game, but I’ll bring those up at a later time once I have more to say.

Nope, not this time

Wednesday, July 20th, 2011

No sir. Do not pass go, do not collect $50,000.

However! All is not lost!

I am still eligible for a the $10k “Developers Choice” award, which means you, you developers! Visit GameTreeDeveloper.com and cast your vote (For Smiles HD). 😀

I might win something…

Wednesday, July 20th, 2011

The latest in the world of Mike, I might win something again.

I’m less than an hour away from finding out if it’s true, so here’s me killing minutes as I wait.

Conversation: Business and Fear

Wednesday, July 20th, 2011

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!!!!