I do a reasonable amount of LARP with the UKLTA who use lasertag as their combat resolution system. It's not dissimilar to Airsoft at first glance except there's no physical hit so you don't have to worry about eye protection and you have to wear a sensor, by convention on the head. It does however have some real advantages as a LARP combat system.
The particular variant they use started out as a toy product in the mid 80s which they adapted for adults and through the hard work of their members have kept alive long after the effective death of the original brand. The 'laser' in the name is a misnomer as it uses normal infra-red light and the guns are essentially similar to IR remote controls. Souped up turbo-charged remote controls.
For some time the UKLTA have had to build their own guns and sensors. A lot of the guns are actually converted from other things like Airsoft or Nerf although there are plenty of scratch built ones around. There's a real 'cottage industry' in the hobby and at events people end up cooing over each other's latest builds.
Over time the capability to send small amounts of data has been developed and nowadays the system can handle different effects from weapons and on the sensors. This includes things like armour, regeneration, healing effects, variable damage, 'stun', ongoing fire or radiation damage etc. The sort of things that make it work well for LARP of the modern or sci-fi variety. Very recently in a game we had a 'techno mage' with a fancy staff that did various effects.
With modern IR emitters being very powerful and microcontrollers small and cheap, you've got a solid combat resolution system where the guns can have ranges in the hundreds of metres and the sensor keeps track of everything for you automatically. The thing it can't really handle is melee or hand to hand combat but people have experimented with making short range 'tasers'.
I have for a while wanted to get involved in making a prop that interacts with this system and one of the people behind a lot of the developments, Phil Higgins, gave me some Arduino code that would generate a simple lasertag shot.
Last night I uploaded this on one of my spare Nanos and connected up an IR emitter fitted into a piece of brass tube I had kicking around left over from the Enigma build to make it more directional. Proper tag guns have carefully set up lens & emitter assemblies but an unlensed one is good enough for use indoors or short range outdoors.
I'm now working on integrating this into a fun prop and will try making my own gun over the winter. If I'm feeling saucy I'll use an Arduino inside and build it from scratch rather than use one of Phil's boards, mostly as a bit of fun.
Hiding the GM behind the curtain
I have, for a while wanted to do something to use technology to enhance how some things work in LARP. This is my first stab at a practical application.I've made a fake medical scanner which goes through the motions of scanning a sample in a test tube you drop into it. So far, that's nothing particularly interesting. What I've added to it though is a 'GM interface' which can be accessed over Bluetooth.
The photo on the left is where I mocked it up using some breadboard. In the end I used a bigger screen and there's an Arduino Mega inside as I needed the extra pins for bits and bobs. The Uno really doesn't have the memory or flash space to handle driving the display if you use the very nice libraries written by Henning Karlsen.
Once the sample is loaded a GM can connect, set what the outcome is and how long it takes to process. There's a facility for them to type free text and it just outputs it on the screen at the end. I still need to do more work on the software so it handles events in a less linear fashion but I think it's coming along nicely. It better be, the LARP is on Friday.
It's not all code and soldering
I regularly play in a local fantasy LARP and my partner came up with an idea for a jokey motivational sign based on multiple in-game screw-ups we've had.
This weekend I chucked this together using things I had kicking around. I'm not in the least bit artistic so the lettering is done with laser printable transfer sheet. I love this stuff.
I found a small piece of slate, cut it down with an angle grinder, notched it for screws and also used hot glue to stop it moving about.
Having a lump of stone that you write on with chalk seemed the appropriate thing for a fantasy LARP, rather than an LED matrix. :-)
This weekend I chucked this together using things I had kicking around. I'm not in the least bit artistic so the lettering is done with laser printable transfer sheet. I love this stuff.
I found a small piece of slate, cut it down with an angle grinder, notched it for screws and also used hot glue to stop it moving about.
Having a lump of stone that you write on with chalk seemed the appropriate thing for a fantasy LARP, rather than an LED matrix. :-)
Beaglebone Black Unboxing
Just took delivery of this today. Very impressed so far with the fact that it's usable via USB out of the box as it powers the board and at the same time gives you a virtual Ethernet adaptor over which you can connect to it.
Having stuck a real Ethernet cable in it's merrily updating the distribution and once it's done that I'll have a play with running some of my resource heavy Python code on it. It's been bought to see if the faster, later ARM chip it's based on delivers the performance boost I'd like. An overclocked Pi is OK but only really has the grunt in Turbo overclock mode and this is slightly unstable in my experience.
I lack a micro-HDMI lead so I've not been able to play with the GUI but to be honest I've been using that as a bit of a crutch with my current Pi-based project. I need to start changing it so that it starts up when the Pi boots and can be controlled by GPIO connected buttons or remotely with SSH.
Having stuck a real Ethernet cable in it's merrily updating the distribution and once it's done that I'll have a play with running some of my resource heavy Python code on it. It's been bought to see if the faster, later ARM chip it's based on delivers the performance boost I'd like. An overclocked Pi is OK but only really has the grunt in Turbo overclock mode and this is slightly unstable in my experience.
I lack a micro-HDMI lead so I've not been able to play with the GUI but to be honest I've been using that as a bit of a crutch with my current Pi-based project. I need to start changing it so that it starts up when the Pi boots and can be controlled by GPIO connected buttons or remotely with SSH.
Raspberry Pi Motion tracking in Python Pt. 2

Not all USB webcams are created equal.
OK, this is obvious, cheap things are on average crappier than expensive things but the difference here is really marked.
I've built one of these cheap '6 LED' webcams into my project and until I got the code sorted wasn't that worried it would only do 8 FPS.
I was kind of expecting an imperfect image from a cheap webcam but now my code is good the difference in performance is really noticeable.
Knowing I can hit 18-20 FPS or higher with the MS Xbox 360 Live Camera I picked up later is really annoying as the basis of the project is mostly physically built and I thought I could just concentrate on the coding.
The Xbox camera also does a much sharper image with more consistent colour balance and contrast. Which is important as if the camera jerkily changes colour/contrast of the output as the cheaper one is prone to, this gets detected as motion.
None of this is overly surprising as the Xbox cameras were originally reasonably pricey and MS tend to make nice accessories for their consoles.
So unless I can get to the bottom of the poor performance of the original camera (unlikely) I'm going to have to pull it out and replace it with an Xbox one.
If you're thinking of a webcam based project these Xbox ones are really solidly made and seem to be supported by V4L just fine. More importantly they can be picked up secondhand for £1 from CEX, which is a bargain. So you can order a handful of identical cameras to mess about with and embed in things without worrying about cost much.
The ultimate thing to use is probably the official Pi camera which produces fantastic images. But that's 25x the cost for a bare board you need to make or buy an enclosure for.
Raspberry Pi Motion tracking in Python Pt. 1
My next project involves using a Raspberry Pi to do motion tracking. Not something that is difficult nowadays with well developed libraries for image processing like OpenCV.
What I did discover is that a lot of the example code I found was targetted at more powerful things than the Pi and runs at a snail's pace.
So I took one of these projects as a starting point and after initially trying to slim it down and failing I've started from scratch, taking inspiration from a couple of the examples I found.
I now have some Python/OpenCV code that will do >25fps from a USB webcam on the Pi if you keep the source image small.
Here's some of the output of this, with the object outlined and the green blobs showing the track it has moved through. My next step is to do some anticipation so it can track ahead of the object.
Ideally you need to overclock the Pi for best performance but if you only use a 160x120 source image it's still fine at 700Mhz.
I've ordered a Beaglebone Black for this project by way of an upgrade, but for now I'll stick with the Pi as I've managed to squeeze enough performance out of it to be going on with.
To keep power use and heat down the script drops the FPS deliberately when nothing is moving and then ramps up when something happens. I'm not sure if this is 100% necessary but it feels like something you should do and the temperature definitely stays down a bit.
What I did discover is that a lot of the example code I found was targetted at more powerful things than the Pi and runs at a snail's pace.
So I took one of these projects as a starting point and after initially trying to slim it down and failing I've started from scratch, taking inspiration from a couple of the examples I found.
I now have some Python/OpenCV code that will do >25fps from a USB webcam on the Pi if you keep the source image small.
Here's some of the output of this, with the object outlined and the green blobs showing the track it has moved through. My next step is to do some anticipation so it can track ahead of the object.
Ideally you need to overclock the Pi for best performance but if you only use a 160x120 source image it's still fine at 700Mhz.
I've ordered a Beaglebone Black for this project by way of an upgrade, but for now I'll stick with the Pi as I've managed to squeeze enough performance out of it to be going on with.
To keep power use and heat down the script drops the FPS deliberately when nothing is moving and then ramps up when something happens. I'm not sure if this is 100% necessary but it feels like something you should do and the temperature definitely stays down a bit.
RFu Protoyping
Having messed around with my RFu uploading simple sketches to send serial data I really need to start prototyping with it. The board Ciseco sell for this is pretty much bare. Tonight I've added a breadboard and headers so I can start messing around.
First up I think will work on a wireless PIR detector. Basic stuff but I want to work with LLAP a bit so it is 'smart'. This means learning an LLAP address from the hub and storing it in EEPROM, turning power to the PIR detector off and on, being able to sleep for a set amount of time, warn when the battery is going flat and so on. Stuff that should be the foundation for making a network of these things that is controllable and robust rather than just something that blasts data over serial.
First up I think will work on a wireless PIR detector. Basic stuff but I want to work with LLAP a bit so it is 'smart'. This means learning an LLAP address from the hub and storing it in EEPROM, turning power to the PIR detector off and on, being able to sleep for a set amount of time, warn when the battery is going flat and so on. Stuff that should be the foundation for making a network of these things that is controllable and robust rather than just something that blasts data over serial.
Pandaboard
I have been doing a lot of faffing around with the Raspberry Pi but they're obviously not the only word in barebones computing.
My brother loaned me a Pandaboard ages ago, finally last night I stuck an Ubuntu image on it and fired it up.
It's obviously got a lot more horsepower than the Pi (Dual core 1Ghz ARM Cortex-A9) but then they are ~£120 vs ~£25.
I've been doing some image processing on the Pi and it groans a bit, only really working acceptably when overclocked. I'll drag my code across to this and see how it does.
PS: "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"
My brother loaned me a Pandaboard ages ago, finally last night I stuck an Ubuntu image on it and fired it up.
It's obviously got a lot more horsepower than the Pi (Dual core 1Ghz ARM Cortex-A9) but then they are ~£120 vs ~£25.
I've been doing some image processing on the Pi and it groans a bit, only really working acceptably when overclocked. I'll drag my code across to this and see how it does.
PS: "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"
Subscribe to:
Posts (Atom)









