I’m going to take it slowly with Python and see what I can make happen. I’m going to set a series of small milestones and see if I hit a brick wall anywhere. First test is to get a Quake MAP file reading into a Python program and then drawing, in wire frame, on an OpenGL canvas. This will give me a somewhat decent idea if the rendering is going to be tolerable or not. Once that’s done, I’ll add textures into the mix and code up a decent flying camera. That should give me enough of a feel if this is going to be doable or not. Wish me luck!
OK, Back On Python For The Time Being
September 27th, 2009I’m -This- Close To Saying “Fuck It”
September 23rd, 2009Honestly, this is ridiculous. All I want to do is write some Python code and it’s like the universe itself has risen up in defiance.
From setting up the paths (which still isn’t working) to downloading the right versions of everything (good luck) to installing it all properly (where did it go again?), this is a nightmare. I really am NOT understanding how the raw Python shell can import a module but code run from inside Komodo can’t. The best part? The shell I run INSIDE OF KOMODO can import the modules just fine, but the code I write in the code window can’t. I mean, really? Come on.
Maybe I’m expecting too much. Maybe I’ve been spoiled by years of Microsoft’s amazing compilers/IDEs and having fun in XCode. Or maybe Python development is not for the casual person who just wants to play around. I dunno.
At any rate, I’m going to take a few more runs at getting PyGame set up properly before throwing in the towel. My life is too short to deal with this shit for much longer.
WxPython And The IDE Quest
September 19th, 2009I was hoping to use TextMate as my python editor but it quickly became apparent that not having code completion and intellisense was going to be a complete non-starter for me. I’ve grown too accustomed to them. It has syntax highlighting but that’s about it. I think I CAN add code completion to it through a series of painful steps but I wasn’t prepared to venture there.
I decided to go for the gold and download Eclipse next. Everyone raves about it so it seemed good. And it was. Until it started crashing when trying to suggest code completion for wxWidgets functions. Technically python itself was crashing but the net result for me, the user, was the same – bullshit hassle.
So after another search I ended up downloading Komodo. Ahh, this seems nice. I really like the feel of the IDE and typing into the code window which is a large part of feeling comfortable with an editor. The code completion is a little spotty but at least it’s trying (heh) and not crashing. I’m working my way through the “wxPython In Action” book and so far I’m having a good time. I can’t get the example program to run that draws an image to the screen but that’s not the end of the world, yet. Other ones work so I’m going to learn what I can in other areas before spending too much time worrying about what the image issue is. This seems to do what I want. Easy code writing combined with cross platform coding. Here’s a simple sample app that runs on both platforms without a single byte of code change:

I’m going to carry on with tutorials and see if this is still looking nice in a few days. If so, it’s on to OpenGL and then we’ll see about some cross platform Quake utils.
Python, Snow Leopard, And The 32/64 Bit Dance Of Shame
September 18th, 2009Fuck. I hate dealing with this stuff. Apparently wxPython has issues with Snow Leopard since it’s written in Carbon and that’s not 64 bit but the default python installed on Macs expects 64 bit and blah blah blah die. This command in the terminal will fix it if you’re having trouble getting wxPython running on Snow Leopard:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
You’re welcome!
(found here)
Python
September 13th, 2009I’ve decided to go on a side quest and learn a little about Python. wxWidgets has a wxPython option and that says to me that I have an opportunity here to branch out a little and learn something new.
Working with Python so far has been … shall we say, retro? I’m running command line tools to get it ready for use and it feels like it did back when I was learning C++ for the first time all those years ago. Not a bad thing, I guess, although it would be nice if they would polish this up a little. It’s weird to have to worry about paths and install directories and junk like that again.
I’m using Python3 and am working my way through a “Programming in Python” book on my Kindle. So far, so good!
Still Searching For A Good UI Library
September 7th, 2009Qt looks promising but every time I try to do something it throws up a wall of pain that I need to figure out how to either scale or accept. I hate that. Currently I’m struggling to get it to link to an external library that I created in Qt. So I can’t get a Qt created exe to easily link to a Qt created library – not promising. That gives me hives thinking about the future implications.
I guess I’ll take a look at wxWidgets as it’s the only other reasonable one out there. I looked at a ton of other libraries but, man, some people just don’t know how to create a web site that looks appealing. I mean, I don’t care about the HTML or what the screen actually looks like but take this one piece of advice to heart – if you’re peddling a cross platform UI library, include screen shots of your sample apps running on each platform you support. That sounds obvious, I know, but it’s apparently an unknown strategy to almost every UI library author out there.
I may end up using Qt in the end but I think wxWidgets deserves a shot now.
Oops, Now I See!
September 3rd, 2009Oh, whoops … OK, Parallels creates a drive letter that I didn’t see before. Z:. Using Z:, I’m able to do exactly what I want – keep the codebase on the Mac hard drive and use Parallels to compile the Windows version whenever I need to. Perfect. Now to figure out how this QT thing works!
Why Is Nothing Ever Easy?
September 2nd, 2009I decided to give this cross platform project a try but I’m going to go with a UI solution for it. I considered maintaining a separate UI for each platform to make each one as native as possible but from reading experiences online that will only lead to tears and maintenance nightmares. I want a unified codebase that only needs to be recompiled for each platform to work.
I’m going to start this project with QT (http://qt.nokia.com/). It seems to be the best choice at the moment from what I’ve seen.
The bigger issue I’m having is setting up this Mac so I can run Windows in a virtual machine to allow me to do development on both versions without leaving the warm comfort of OSX. I tried using Parallels but that’s not going well. I can’t get QT to work reliably when compiling from Windows while reading off the Mac hard drive, the path names for the shared folders are weirdly obfuscated, and there’s generally a lot of sadness.
I’m currently installing Windows into a trial copy of VMWare in hopes that it will be easier to work with. Here’s hoping!
Cross Platform Development?
September 1st, 2009I was thinking today about a Windows version of ToeTag and how difficult that would be. I started to wonder if it really WOULD be all that hard. It would require a rewriting of the user interface code but to be honest, how hard is that? The meat and potatoes code could be rewritten in C++ so it would compile on either platform without a problem. All that remains at that point is to do a platform specific UI front end for each OS and you’re home.
I know there are cross platform UI libraries out there but, you know, they just look kinda ugly. They have to shoot for the lowest common denominator in terms of functionality and it ends up looking pretty blocky and generic. I mean, I think OSX looks fucking amazing and I’ve seen what the programmers at work have done on the newer UnrealEd enhancements. Just incredible looking controls!
So I’m thinking about a cross platform ToeTag level editor. Not committed yet. Just thinking.
Remake Quake
August 30th, 2009Not much going on so that’s why this blog is so slowly updated lately. In the Quake world, I mentioned previously that I had joined the Remake Quake project and I finally got around to setting up my code environment today. Not done yet, but I like to get my work area all set up before I dive in.
I need to figure out what’s already written so I can avoid stepping on toes and such. I haven’t been part of a multi-programmer project in a very long time (aside from work, of course). Should be interesting!
I also installed Snow Leopard on this Mac which has caused me a few hiccups to be honest. I had some OpenGL lock up stuff going on and some of my apps were behaving in strange ways. It seems to be ironing itself out – as I fix each little issue, the whole computer becomes a little more predictable. This is unusual for an Apple update so, frankly, I’m a little disappointed.