Advice for my past self: Just because you told your bank you were in Vietnam once, won’t stop the fraud department blocking your Visa card this time.
Dear EA Sports active Team,
A followup to last year’s foray into Python and OpenGL.
I noticed today that wxPython includes a GLCanvas class which uses PyOpenGL. However, as of 18.104.22.168, wxPython’s demo crashes due to wxWidgets bug 10203 which is fixed in 2.8 wxWidgets post 2.8.9, and in 2.10.
Until a wxPython release comes out based on either of those, there is a workaround. The script update_manifest.py, which wxPython includes to change the manifest in your python.exe and pythonw.exe to use the Windows XP comctl32.dll, also fixes this problem, so even though I’ve been aware of this bug for ages, I’ve only learned about this workaround tonight by reading the wxpython mailing list archive.
Now that I’ve got that patched, and PyOpenGL installed, the GLCanvas demo in wxPython runs, and the cube demo works. The cone demo however comes back with this:
OpenGL.error.NullFunctionError: Attempt to call an undefined function __glutInitWithExit, check for bool(__glutInitWithExit) before calling
This turns out to not be a surprise, as I don’t have GLUT (glut32.dll) installed. Sadly, the wxPython demo code doesn’t test the result of the OpenGL.GLUT.glutInit method in PyOpenGL, so this exception is simply output without causing the cone window to abort.
Since the draw code for the cone calls glPushMatrix before any of its glut calls, and the glut calls throw an exception so you never call glPopMatrix, you end up filling your matrix stack, and getting a lot of error spam in your output window, where the later errors can easily push the older errors out the top of your scrollback buffer.
I turned out to be too lazy to build my own glut (it’s anecdotaly possible) but a lucky hit with Google informed me that Nvidia’s Cg Toolkit includes both a win32 and x64 version of glut32.dll. You wouldn’t be able to distribute it as there’s no license indication for glut apart from the license for the whole Cg Toolkit. The glut.h file included however is the one from normal Glut (or so it appears) so I doubt it’s anything except the win32 version of upstream glut.
On this point, it’s not obvious to me if freeglut is supposed to be a drop-in replacement for glut32.dll, or a souped-up alternative. It doesn’t help that the freeglut configure file includes an option to switch that mode on or off (producing libglut.so or libfreeglut.so) while the .mak file (for NMake) only produces freeglut.dll not glut32.dll. So I guess it’s intended to be both. The next step would be to see if freeglut can build from configure using mingw64 and produce a drop-in glut32.dll.
However, I don’t care that much. I only wanted to see the wxPython GLCanvas demo run. I won’t be using GLUT (or event GLCanvas, to be honest) myself so this has had plenty of time devoted to it anway.
I guess I hope that the main benefit of this blog posting is to allow those very occasional forum posters who go looking for glut32.dll for Vista x64 or XP x64, or even Vista 32-bit, to find it in the NVidia Cg Toolkit. So far I’ve seen several such questions when searching Google for a copy myself, but no one ever finds one for 64-bit. (There’s a 32-bit one in the bullet physics SVN repository, if you don’t want NVidia’s one.)
And for those same forum posters, a quick note. The x64 build of glut32.dll goes in %WINDIR%\system32 on x64 machines. The win32 build of glut32.dll goes in %WINDIR%\SysWOW64. If you get this wrong, you’ll get the same error messages as not having the file present at all. It’s prolly both easier and a better idea to actually drop the glut32.dll next to the program you’re running, unless you have both 32-bit and x64 versions in the same directory for some reason…
My original plan was to only use the Windows XP 64 installed on my laptop for video games (and then only when necessary due to a Wine disfeature) and Linux for everything else. My World Of Warcraft days actually worked quite well for this, as it played very nicely under Wine. However, as interesting things (ala my previous blog post) sometimes crop up while I’m in Windows, and also as I’m now playing games that aren’t so nice under Linux, I’ve ended up being in Windows more than Linux. And now I’ve found myself distracted from games playing by, of all things, MMO UI Addon programming, keeping me in Windows even more.
You’d think with my strong awareness of the commercial nature of grind, I’d prolly be trying to get all the playtime I can out of my monthly subscription to Warhammer Online. Instead, I seem to be burrowing my head down into some UI programming in Lua. Like WoW, WAR (or WHO as a friend of mine calls it) uses LUA to implement its user interface and provides a way of adding modules in to modify, adjust or just plain futz with the interface. The big site for WAR addons (like WoW addons, in fact) is Curse Gaming and they even provide a Sourceforge-like site for addon development called CurseForge.
Anyway, why am I doing this, given I managed to avoid WoW addon programming for my entire playing time? Apart from external reasons I’m not going to post here, WAR being brand new is missing a fair few addons. None I can’t live without, but one it does lack is DrDamage, which enhances your ability tooltips with the actual effective values of the ability once gear and stats are taken into account.
Part of the issue is that WAR’s combat calculations are not fully understood yet. An excellent primer is available at Disquette’s Weblog and Warhammer Alliance has a Mechanic Analysis forum as well. I’ve posted some comments at the former, but the latter requires you to be a “WAR Soldier” before you can post, and I seem to still be a “WAR Recruit”, which means I haven’t contributed enough to the Warhammer Alliance forums. Ah well.
So anyway, my addon. LibCombatCalcs is my first MMO addon, basically supposed to encapsulate the various combat number mechanics of WAR so that I or someone else can write tools like DrDamage (or RatingsBuster) which magically continue working when they change the mechanics, and which don’t need large hard-coded tables of information duplicated across each addon.
It also intends to tie together the seperate sources of combat information into a single coherent stream for other addons to listen to.
Anyway, we’re not there yet. What it does do right now is record hits against monsters, and give you a little window with /lcc mobinfo which shows the calculated toughness of the monster (from an unambigous non critical autoattack) and the calculated values for all the subsequent abilities you used, letting you see if my calculations (and therefore my transcriptions of the community’s understanding) are correct, and/or where things need tweaks. I’ll be using this (and I hope others do too, I don’t want to build a level 40 of each class to do this…) to identify the sources of DPS that contribute to each ability.
Anyway, there it is. I’d love to hear feedback about it, preferably at Curse/CurseForge but here is fine too if you hate those sort of sites. You can clone the git repo from CurseForge, and it currently autopackages every commit I push so you can also grab and install the zips.
By the by, this is my first time using mysgit although I did contribute some work to a different msys git effort, and it combined with Console and an updated Vim with some nice colour schemes (I’m using xterm16 at home and work now) makes me a much happier Windows programmer on my laptop.
On other fronts, I’ve recently been playing with Python-Ogre, hoping to knock out a 3D physics-based tech demo of some kind with it in the middle-term future. (May end up being a Christmas break project…). After my disappointments with 64-bit Python and Pyglet under Windows, I may end up doing it under Linux. Ideally it’s cross-platform of course. I’ve also done some more serious work on my book cataloging software using Elixir, SQLAlchemy and SQLite to turn my collection of text files into a real database. However, there’s not a particularly good way of dealing with schema changes that I can wrap my head around, so I’ve put that on hold while I think about how the data’s going to have to look in the long run. And then I got distracted, so it’s on the Christmas break pile too.
As I documented in one of my much earlier blog posts, Where are they now?, I lost tbble.com nearly four years ago, and Google hits and archived links have been slowing dying/updating every since.
On the weekend just past I got an email from someone telling me they had recently come into possession of tbble.com, and as the owner of tbble.net, please click the included link to purchase it. (I only read the email tonight. That’s how far behind I am at life.)
Barely restraining my hopes, I immediately clicked on the link fired up an ssh session to my fileserver and whoised tbble.com, discovering it to be apparently unregistered.
Continuing to restrain my now burgeoning glee, I went to do my Bubblesworth domain renewals, and idly popped tbble.com onto the shopping list, almost as if by accident. (No point tempting fate at this point. I’ve had tbble.com disappear from whois before but be snapped up before I could reclaim it).
$15 later (reseller price. ^_^) I’m the proud once-again owner of tbble.com, your source for all things TBBle. Although since I’d managed to migrate to tbble.net and tbble.org over the past four years, there’s nothing good there. I really need to sort this stuff out.
I stopped restraining my glee at this point, and cheered near my housemate until he woke up and heard about my glee.
And now so have the rest of you. Sans cheering, unless you’re using some kind of Text-To-Speech software which takes a fairly imaginative interpretation of the phrase “Text-To-Speech”. If you are using such a program, let me know. I’ll try and work some more amusing noises into my blog posts.
Anyway, that’s TBBle 1, Evil Domain Registrars Who Jump On Expired .com Domains And Try To Sell Them Back To The Original Owners For $1500 Through A Shell Company In South Africa -$20 (or whatever a registrar pays Verisign for four years squatting).
Also on 0, but having had a bye this round, are Evil Domain Resellers Who Refuse To Process My Credit Card And Refuse To Release My Domain For Transfer Without Some Kind Of Fee They Added To The User Agreement Post Purchase Using One Of Those “We Reserve The Right To Modify This Agreement As We See Fit” Clauses. Recapping the earlier round, it was a draw. I lost one domain, and rescued five others without charge.
I’m gonna need a wider scoreboard…
Edit: That’s not how you spell “amusing” or “restrain”. “Gonna” on the other hand is correct.
I’ve been working at MF (Milestones just seem to come at you faster than the calender would otherwise suggest) and particularly in the last couple of weeks getting a good vector-math workout.
I’ve also been working at picking off RC bugs to try and help Etch along a bit, since kind of hoped to be upgrading to it in the half of January that’s just passed.
I’ve also been looking for a CMS for the ANU Anime Society to try and resolve the fact that our web admins never seem to last as long as we’d like. At the moment, Joomla! is top of my list for trialling, as I’m familiar with PHP and looks to have the relevant modules (forum, calendar, eventing system that’ll need modification to work for screening scheduling). However, I’m open to other suggestions, and will see if anyone at LCA has any useful suggestions.
And of course, by adding Planet LCA 2007, I’ve had to read it. And I came across ThreatNet, which is a distributed compromised computer identification system. It’s actually really simple, you do something to identify a certain IP as a threat (the sample code scans postfix logs for “REJECT: noqueue” which usually comes from “no such user” although I noticed it also comes from greylister at CBIT) and sends that IP address to a nominated IRC channel. I dunno what’s next, actually. Presumably, sites can block that IP address as they see fit, and if the responsible parties for the machine become aware of it, they can take action. I’ll be adding this to my ever-growing list of things I need to consider implementation of at CBIT.
On the plus side, I recently installed Debian on a Slug with a 512MB USB flash stick, and I’m going to see how Nagios performs on it. If it’s up to scratch, I’ll prolly shoehorn in a wireless card and see if I can monitor two disparate networks effectively.