October 8th, 2009
OK, I think I’m done with this wacky idea of writing a cross platform level editor. It’s just way too daunting. In my youth, I would have dived in and starting coding up a storm but my current self looks at that mountain and wonders, “Do we really want to climb that again?” Python is interesting and I’ll probably keep learning about it and writing programs in it, one of them may even be a level editor, but it’s going to take a back seat to actual creative work. Being able to load up GTKRadiant in a Windows boot partition and make levels when the whim strikes is far better than having to wait another 6+ months until I can get enough time and energy together to make a new one. Again.
So I blame Apple for whatever they did to break my editor. I blame myself for not being smart enough to deduce what the problem is and work around it.
Blame for everyone! But at least it’s pushed me to realize that I need a break from coding.
Now to push some brushes around…
Posted in Misc | No Comments »
September 29th, 2009
Yay, more Python time. How can I have no children yet still have no time to work on hobby projects? At any rate, I continued in my quest to get a wireframe version of DM1 loading this morning. I’m really liking the basic Python way of working. Not having to care about variable types is really refreshing.
Flexibility
It’s really nice to work with something this fluid and dynamic. For example, variable length argument lists are an absolute breeze in Python. Check this out:
def myFunction( *args ):
print len( args )
for arg in args:
print arg
That’s it. I can call myFunction with any number of arguments and it will “just work”. I LOVE that. Setting that up in C++ is such a pain the ass by comparison.
Memory Management
Something else I’m really digging so far is the memory management and I think it’s time that I came clean on this issue. I can now freely admit that I can’t be bothered to work in a language that doesn’t have garbage collection. I just don’t have the time or the patience. I want to write code that does productive things, not code that goes through gyrations trying to clean up after itself. It’s 2009, you need to provide garbage collection or I’m not using your language.
Learning By Doing
I learn best when I’m doing rather than reading. I started out reading a couple of books on Python and while that helped me establish a baseline of knowledge I find that I really learn best when I’m trying to write something for real. Just this morning I’ve picked up how to do static member functions, variable length argument lists, and gotten a much better understanding of how a Python program is structured.
Back to the doing and learning…
Posted in Misc | No Comments »
September 27th, 2009
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!
Posted in Misc | No Comments »
September 23rd, 2009
Honestly, 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.
Posted in Misc | No Comments »
September 19th, 2009
I 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.
Posted in Misc | No Comments »
September 18th, 2009
Fuck. 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)
Posted in Misc | No Comments »
September 13th, 2009
I’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!
Posted in Misc | No Comments »
September 7th, 2009
Qt 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.
Posted in Misc | 3 Comments »
September 3rd, 2009
Oh, 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!
Posted in Misc | No Comments »
September 2nd, 2009
I 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!
Posted in Misc | No Comments »