Category Archives: Programming
Converting vintage toys into their modern tech equivalents
I’m not comfortable referring to toys I played with as a kid as vintage, but they are, and what this person does with them is quite inventive. His Nom de Plume is Circuitbeard, and among other things, he converts vintage toys into modern ones, while modifying as little of the original item as possible.
The one that prompted me to write this post is his updating of a classic mechanical driving game – in this case a Tomy Turnin’ Turbo Dashboard game – to instead be a fully functioning, self-contained, OutRun arcade game.
Before we get to that, the original Tomy game was quite an accomplishment in itself. Released around 1983, everything about it was mechanical, from the revs to the fuel gauge to the fake-but-passable digital speedometer. The driving is secondary, really, since there isn’t much to it other than keeping the car in the center of the road via your manual steering and not veering to the side nor crash into the exact same car that kept appearing since the road is really just a looping image. Even if you did, nothing much happened, and remember this isn’t a video game, it’s all mechanical.
It’s a hard thing to explain, so here’s a video that shows how the original looked:
The electronic magician Circuitbeard, on the other hand, took this device and turned it into the game it always wanted to be. Just like Pinnochio always wanting to be a real boy, this game always wanted to play OutRun. The details of how he did it, which are long and impressive, including custom printed PCBs, a custom, laser-cut dashboard, and LEDs that actually represent what’s going on in the game, can be read over at his blog post and I very strongly encourage you to do so. Not simply to experience the monumental creative and technical feat he accomplished, but to see the other vintage toys he has converted. It’s all very masterful, and fascinating.
I’m sure what everyone wants to know is how did it turn out (but don’t skip the details. Seriously!). Here is the video of the final result, and to add to the above paragraph it involved some custom libraries, bespoke 3D-printed parts, multiple controllers; it is not hyperbole to say it may be one of the most brilliant electronics projects I’ve ever seen. He has others, by the way, which are equally as magnificent.
Here’s the video of the final result, and don’t be deceived into thinking this was a simple project. Read his post!
A small update to the site’s functionality (and learn some PHP!)
There has been so much to write about, however I have been beyond busy especially with the quarter drawing to a close. There is a showcase to plan and schedule for, and industry people will be there so I want my students to shine. From what I’ve seen, they will. On top of that I’m mentoring a group for a business competition and of course there’s the regular teaching, grading, meetings and other stuff that goes on.
Nevertheless, it had been nagging at me that the site’s comment functionality never worked quite right. I’ve been made aware of it before, so why it started to gnaw at me two weeks ago I’m not certain, but it did. What I wanted it to do was give visitors an option of commenting via WordPress login, Facebook, Twitter, or other social media accounts they may prefer rather than having to sign up specifically with WordPress. Normally on a WordPress site there is an option for this, however for whatever reason – and I never understand why WP themes do this – my theme overrode this, forcing visitors to log in through WordPress if they wanted to comment (hence one of the reasons for the dearth of comments). You can see how it should look in the header image. Luckily, the fix was beyond easy, but shows the lengths the theme designer went through to ensure a broken commenting system.
Here’s what I had to do to fix it. You aren’t going to believe it, but here we go:
WordPress uses a file called ‘comments.php’ to provide comment functionality. Here’s what my original comment.php file looked like:
<?php if ( post_password_required() ) { ?>
<p><?php _e( ‘This post is password protected. Enter the password to view any comments.’, ‘themater’ ); ?></p>
<?php return; } ?>
<?php if ( have_comments() ) { ?>
<div id=”comments”>
<h3 id=”comments-title”><?php
printf( _n( ‘One Response to %2$s’, ‘%1$s Responses to %2$s’, get_comments_number(), ‘themater’ ),
number_format_i18n( get_comments_number() ), ‘<em>’ . get_the_title() . ‘</em>’ );
?></h3>
<ol class=”commentlist”>
<?php wp_list_comments(); ?>
</ol>
<?php if ( get_comment_pages_count() > 1 ) { ?>
<div class=”navigation clearfix”>
<div class=”alignleft”><?php previous_comments_link( __( ‘<span class=”meta-nav”>←</span> Older Comments’, ‘themater’ ) ); ?></div>
<div class=”alignright”><?php next_comments_link( __( ‘Newer Comments <span class=”meta-nav”>→</span>’, ‘themater’ ) ); ?></div>
</div><!– .navigation .clearfix –>
<?php } ?>
</div><!– #comments –>
<?php } ?>
<?php comment_form(); ?>
A lot there, yes? You may be wondering if the comments functionality needs all that PHP, and the answer is no. Actually, it’s because it was all there that the comment functionality was broken in the first place. In fact, to INCREASE the functionality of the comment system and allow people to comment using any social media login they prefer, I had to make the following changes. Be sure to pay very close attention, because the change is subtle and hard to notice; see if you can see it in the new code:
<?php comment_form(); ?>
Did you see it? You may want to read through it again to be sure. I’ll wait.
So there you have it. By deleting the entirety of what was there before and only leaving the final line, full functionality was restored, the attempts at subverting the proper order of things was thwarted, and all is right with the world. Now, anyone who wants to leave a comment can do so in a way that is quick and easy, just like the code that allows it.