Triggering (explosive) payloads
As part of my effort to integrate Lepton for particle effects, I have been implementing a system of triggers and payloads to make projectiles more interesting in general. The system is heavily inspired by the similar payload system for my old artillery game, Arty, which I wrote about earlier, but of course redesigned and modernized to make it more generic and cleaner. I haven't settled on an interface yet, and looks like I'll have to make yet more changes to the entity system, but every change is a step closer to perfection, right? Anyway, about triggers and payloads...
Any number of triggers and payloads can be attached to entities. For now, they will only be used for projectiles (artillery shells), but later they could be used for many other gameplay applications. Triggers can react to collisions, height from ground, proximity to units, or they could activate after a delay. Almost anything is possible, really, but I'm starting with just collision triggers. Payloads are triggered, well, by triggers; they are the "meat" of the projectile system. Again, I'm starting simple with just kinetic (contact damage based on mass, velocity and an armor piercing multiplier) and explosive (yay, particle effects and shrapnel projectiles) payload, but almost anything would be possible. For example, it would be easy to make a cluster bomb that explodes above ground (height trigger attached to directed explosive payload) into many small bomblets (individual projectiles with contact triggers attached to explosive payloads).
More on the triggers and payloads when I get the system implemented.
Lepton
Remember when I said "if I don’t hit any further roadblocks", I would add particle effects to Artillery Brawl this week? Well, guess what...
The bad news is, I had to spend a whole evening porting lepton to Windows so Visual C++ would compile it.
The good news is, I'm now the maintainer and tester of the Windows port of lepton, so hopefully this doesn't happen to anyone anymore. The first Windows installer for Python 2.6 has been released; check the lepton home page. Unfortunately, I couldn't get it compiling for Python 2.5, since I don't own Visual C++ 2003 and building extension modules with the free Visual C++ Toolkit 2003 compiler is a pain in the arse. I might try it again later, but for now, I'm considering myself defeated.
Anyway, you should all check out lepton, it's an awesome library for creating fast particle effects in Python games and other applications, and works out of the box with Pyglet, Pygame and any OpenGL-based applications. It's also easily extensible so you can add your own custom effects to particles. I'll be sure to post any further experiences (and the video I promised) as soon as I get it properly integrated with Artillery Brawl.
PS. note the new link category – "Cool Python modules" – at the sidebar.
Quickie
Just a quick update... I have been fixing all the stuff that was broken since the change to multi-part units and then some, and everything should be ready for finally implementing particle effects. I even implemented fake sweeping collisions for shells by making them face their velocity vector and making their collision rectangle longer than the shell "sprite." There are still some collision problems when the shooting unit is next to a steep cliff, but it's acceptable for now, pending a real solution.
I'm going away for the weekend, but if I don't hit any further roadblocks, next week should see Artillery Brawl with some kind of particle effects, and of course, a second video of the game!
