The Let's Play Archive

SHENZHEN I/O

by Quackles

Part 28: Assignment #10: Tag, You're It!

Tag, You're It!



I know Carl is disclaiming this, but, like the game controllers, this is a project idea I can definitely get behind. Laser tag's fun (one might even call it "AWESOME"), enjoyable, and I'm doing meaningful work making the things.








That said, boy howdy is that a big board! I might have to break my screenshots into pieces just so you can see everything. With the inputs (and output) regarding player vest state on one side, and the i/o for the player's gun state on the other, this design is screaming 'let two MC4000s handle it'.

So here goes. Let's see if we can get two separate circuits working, each with its own expander!

[ ~ ]



 

I've discovered I have a habit of making bold pronouncements about a design before I really dive in. This time, the wrinkle I wasn't expecting was mostly because I didn't read the spec as carefully as I'd intended. My prototype design had the two MCs separate - but the 'gun' MC does require the player to count as alive before it will fire. Which means the vest MC's output has to connect to the vest and the gun MC.

Aside from that, it's pretty straightforward. The vest MC checks if the 'hit' or 'respawn' inputs are active and passes the result on to 'alive' and the gun MC. The gun MC tcps and checks for 0 (reload) or 10 (fire), with 1 as the state if neither event is happening thanks to the NOT gate. (You might recognize this design pattern from the Team Baron drinking game scorekeeper.)
Anyway. If 'reload', the gun MC resets acc (used as an ammo counter). If 'fire', the MC checks the ammo counter, then 'alive', then fires the 'laser'* if all is OK. Pretty straightforward.

*The spec says 'laser', but that's just because it sounds cool. Laser tag guns don't actually use lasers - they use infrared signaling from the guns so no one shoots their eye out by laser beam.

Before I send this off, I feel obligated to make a shot at combining this into a single MC6000, just to see if I can keep the 'all-in-one' design pattern train rolling. I think I have enough pins and few enough lines of code to pull it off...

[ ~ ~ ]





I pulled it off. The logic is almost exactly the same, except 'alive' is also copied to dat so the 'gun' part of the code can check it easily. On top of that - yep, faster, better, cheaper again! The updated design is ¥8 / 290 avg power instead of ¥9 / 381 avg power.

I'm wishing Carl's friend the best of luck on this.



BTW, I noticed something interesting in my updated design. If you're hit JUST after you're firing (specifically on the time unit immediately after the gun pulse), the MC will be asleep and won't register the hit. I checked in the simulator and found it's possible to remove this design flaw by deleting the second slp and removing the conditional flag from the first one, at the cost of about 55 average power per run.

I've decided to leave it in - this is for an AWESOMEPLEX, after all, and it feels appropriate to leave this in as a 'difficult but AWESOME' technique for players to find. And I can use it if the office ever goes out for laser tag!!
Don't tell Joe and Lili, 'k?