logo

ShrimpWorks

// why am I so n00b?

A long time ago, in a galaxy not far away, I created a very small application named SaveScreen. Today I’m rather pleased to release a much-improved SaveScreen 2.

A couple of anti-virus applications complained that the .dll file distributed with SaveScreen which enabled detecting when “Print Screen” was pressed, was a virus or malware of some sort, so even I was unable to use SaveScreen, which made my cry.

Finally fed up, I set out to resolve the situation by creating a brand new application which did not rely on random keyboard hooks and stuff. The result is SaveScreen 2.

In addition to no longer being flagged as a virus, SaveScreen 2 features direct ImageShack posting (complete with automatic forum code creation and thumbnail support), and FTP uploads of screenshots. Something which may be rather handy (just don’t take a screenshot of your bank statement then complain when the whole world is exposed to it - use with care). Also, it can save screenshots in per-application folders, making organisation somewhat neater.

Since the XBox Live “GamerCards” are so nicely exposed, there’s really no reason not to have a DynaBar plugin for it, now is there.

I’ve noticed a few GamerCards claiming to be in “userbar” format, however they do not follow userbar standards in layout, dimensions, or fonts. So, soon you too can have a lovely dynamic standards-compliant GamerScore userbar such as this:

Well, despite around 10 years of pure PlayStation fanboyism, I’ve caved in and decided to get an XBox 360. With the South African launch happening officially at midnight on Friday the 29th, I now find myself counting the hours, and thinking XBox and games every waking moment. I don’t know if it’s hype or something, but I can’t remember being this excited about a console before.

I shall be collecting my new toy from Look & Listen, first thing on Saturday morning, along with an extra wireless controller, Need for Speed: Most Wanted, Burnout Revenge (all included in a R4399 bundle), then I’ll be dashing off to BT Games to grab Dead Or Alive 4, and Project Gotham Racing 3 at somewhat lower prices than Look & Listen offer.

Looking forward to writing about my experiences with the 360, something different for a change. Only two sleeps left!

Guess it shouldn’t have taken so long for me to get around to doing this, but at least it’s done now.

Attached to this post you’ll find a zip file, containing a small example application which allows you to spawn PyODE physics-enabled cubes with the middle mouse button into a PyOgre world. You can then bounce and roll the cubes around by holding the left or right mouse buttons.

The code is fairly straight-forward, and I’ve included quite a number of comments. Should be easy enough to follow what’s going on if you’ve been through the PyOgre tutorials.

A note of performance and stability - you can safely spawn loads of cubes as long as there are not too many collisions going on at once (after around 50 cubes, things start to get really sluggish if there are too many inter-cube collisions going on). In practice though, I doubt you’d need that many collisions happening at any one time. Also, If you make a large pile of cubes, lift them all up, and let them fall down together, it seems to bomb out as there are too many collisions happening when they all land on top of eachother at once. I haven’t debugged this very much, so I’m not sure yet if it’s a ODE limitation, or something bad I’m doing in the code. If anyone works it out, I’d be interested to know.

Please don’t ask for advice on stuff like per-polygon collisions, terrain collision and the like, I have not really messed with this beyond the state of this example. Once you get the basics going after checking out the example, I’m sure a few questions shot off at the PyOgre Forums would turn up more useful results than asking me :).

Have fun ;).

Well, in the interests of Monster Hunt surviving a bit longer, I’m releasing the full UnrealScript source code.

Included is a basic license document, outlining in simple terms what you may and may not do. Basically, you may make any kind of MH mod or ‘sub-mod’, however you must give due credit for the original creation. Even if it’s very basic, please read it if you intend using it for creating a mod.

You’ll find the file at the end of this post… Have fun :)

MonsterHuntSource.zip

I was browsing around the BeyondUnreal Forums the other day, and came across an 11 page thread, with around 720 replies, about Monster Hunt. Interested to see what’s up, I checked the CSports rankings for Unreal Tournament, and was shocked to find MH is the #4 most played UT gametype in the world. Coming in after CTF, DM, and TDM.

Seems people have been making maps like nuts, there seem to be over 300 of them, there are a few mutators and mods available for it as well. I found there’s even a pretty large fansite, Planet Monster Hunt.

Not too bad for a mod I thought I had retired nearly four years ago ;).

My idea for implementing non-physics physics into my little game framework didn’t work out too well, so I gave in and took a look around for options.

It seems only ODE is available to Python, via PyODE. Not many [open source] physics engines seem to have Python bindings, which I find rather odd.

As it turns out, it isn’t actually all that of a mission to get ODE and Ogre working together, and the results I’ve got so far are quite acceptable. I can spawn loads of cubes (of varying sizes) and throw them around the scene and they bounce and jump around in a suitable fasion.

PyODE and PyOgre playing nicely

I haven’t tried with balls or polygon-accurate stuff yet, that’s next on the to-do list. I also intend writing a short how-to for PyODE and PyOgre integration at some point, as I was a little confused to start with, not knowing quite where or how to begin, and there is no PyODE/PyOgre example code floating around to reference.

EDIT: Example using PyODE and PyOgre now available -

It seems as though the guys at work are seriously looking into the option of doing some game development next year some time, and they’ve been busy checking out various engines and frameworks to help with this. Despite being the only person at work who plays games seriously, and my history of developments on the Unreal engine, I haven’t really been included much with what’s going on.

However, since game development (of any kind) is the number one thing I’d like to be doing with my life (NOT point of sale systems!!), I’ve decided to involve myself anyway :D.

I have been playing around with a couple of game and physics engines (games being discussed are potentially vehicle-based), and Irrlicht particularly seems rather nice. Korpse however, suggested I take a look at Ogre. I was very pleasently surprised to find the PyOgre project, which exposes about everything Ogre can do, to Python (you don’t even need the Ogre SDK, it works completely on it’s own), and seems very well supported. I’m a lot more comfortable with Python than I am with C++ :).

The only down side, is that Ogre is not a complete game engine, but rather simply a graphics engine. Meaning, I’ll have to work out how to add sound, physics, advanced input options (Ogre does support keyboards at least), etc on my own. There are a lot of options available for all of those, so I’m not really worried about it at the moment.

I’ve begin putting together a bit of a basic framework for myself, trying to base how things work around how UnrealScript works and interacts with classes and objects. It’s working out pretty cool, thanks again to Python.

As a test project, I’ve decided to put together a sort of basic World War II flight sim. All you need really is a model, some terrain, and basic flight physics (which I plan on simulating without the use of a physics engine, in a similar fasion to how I did some stuff in Unreal Tournament [pre-Karma]).

Since the scripting is going well, I decided to take a shot at a quick model. I came across Wings 3D – a simple “subdivision modeler”. Basically you start off with whatever primitive shape (cube, spheres, cylinder, etc) you think will suit what you’re going to build, and stretch and warp it into the final product. I’ve never modeled like this before, but it works surprisingly well.

After 2 hours work, I got the following result from a 16-sided cylinder:

There are quite a number of rather ugly polygons, but it was a learning experience :).

I just came across a post on Voodoo Extreme about the fact that IGN are offering fansite hosting. The commentary along with the post really made me think about the state of fansites in recent years.

They really *have* pretty much completely died off. The closest you’ll get to a fan site these days is something like the SGS or Prophecy forums. I see the Prophecy homepage is even a store-front now, with the forum coming across as an afterthought. Perhaps a little closer to the original fansite idea, you get places like BeyondUnreal and GameSpy’s various Planet* sites. However, these sites have taken themselves from traditional fansites, to giant networks, many of which focusing on some business model or another, rather than the game that got them going in the first place.

On the other hand, a site like UnrealZA is perhaps one of the few remaining dedicated fan sites around. Although, most members on the forums hardly play the game any more :), the idea behind the site and it’s operation has remained pretty much the same since Buccaneer founded it way back in 1998 (granted, a lot of sections and things have been ‘streamlined’ or removed completely due to lack of interest from maintainers and readers alike).

Sadly though, I have also noticed fewer and fewer visitors, and new community members, on the site. Perhaps this is why the bigger sites have reformed themselves from mere fansites like UZA, to the giant networks they are today. I’d really like to try some new stuff with UZA, which I believe could be rather successful (thinking the ’network’ approach of some sites), however on the other hand, I’m worried about losing UZA’s ‘identity’ and ’legacy’ which has been one of the cooler things about being involved with UZA. It really is a pretty unique place on the local gaming scene, I think.

But we’ll see what develops over the coming months.

I’ve had a couple of questions regarding my Battlefield 2 Stats in Python post, and how it may be possible to do the same in PHP, so I thought I’d add an update for that.

Simple PHP code for Battlefield 2 Stats retrieval:

    ini_set("user_agent","GameSpyHTTP/1.0");

    $info = "per*,cmb*,twsc,cpcp,cacp,dfcp,kila,heal,rviv,rsup,rpar,tgte,dkas,dsab,cdsc,rank,cmsc,kick,kill,deth,suic,ospm,klpm,klpr,dtpr,bksk,wdsk,bbrs,tcdr,ban,dtpm,lbtl,osaa,vrk,tsql,tsqm,tlwf,mvks,vmks,mvn*,vmr*,fkit,fmap,fveh,fwea,wtm-,wkl-,wdt-,wac-,wkd-,vtm-,vkl-,vdt-,vkd-,vkr-,atm-,awn-,alo-,abr-,ktm-,kkl-,kdt-,kkd-";

    $pid = '43595724';
    $data = file("http://bf2web.gamespy.com/ASP/getplayerinfo.aspx?pid=".$pid."&info=".$info);

    $stats = array_combine(explode("\t", $data[3]), explode("\t", $data[4]));

    printf("%s has %s kills and %s deaths and a score of %s", $stats['nick'], $stats['kill'], $stats['deth'], $stats['scor']);

Note that if you’re not using PHP5, you’ll need to add the following drop-in replacement for the “array_combine” function:

    function array_combine($keys, $vals) {
        $i = 0;
        foreach ($keys as $key) {
            $newarray[trim($key)] = trim($vals[$i++]);
        }
        return $newarray;
    }

It’s also important to note that while at the time of writing this, this method of retrieving stats works, EA, DICE and GameSpy are supposedly working on a new XML-based stats system for BF2.

Updated: Since this was written, some things changed with the stats system, and the GameSpy application requires you to pass a bunch of columns you want info for. This can help customise the data you get back, so you only request what you need. I’ve included all the columns in the $info variable, which you can customise. Make sure it contains only valid columns, or you won’t get any data back at all.

For info on what to do with the stats, and what all the columns etc. mean, check out the BF2 Technical Wiki.