Brickley Roscowicz Engineering

Brickley's
Words

HomeBrickley's WordsBrickley's Gallery

Archive for June, 2005

Advent ported to Perl

June 29th, 2005 by RoscoHead

When I was in high school, we had a PDP11 mini-computer which was used in various classes for lots of interesting stuff. Well actually, when I say “we had” I actually mean “we had access to” – the computer itself resided elsewhere, we just had a couple of terminals and a line-printer connected to it.

Anyway, 2 of the games available on it were Super Star Trek (sst), and Colossal Cave Adventure (advent), both of which I used to play quite a lot.

Then, many years later, I decided to teach myself the Perl programming language. And it just happened that I came across the original Fortran source for advent around the same time. So I decided porting advent to Perl would be a way to learn the language while having fun too.

So the result was this Perl program (remove the .txt after downloading). It mostly worked, except for a couple of bits, like the wizard, which works a bit but not fully. But the game itself works fine, and you can save game positions.

However, it must be said that it was ported on a pretty old version of Perl (4 point something I think), so it is unlikely to work with more recent versions without some tweaking.

It also requires the original advent.dat file, which I’ve made available here.

Anyway, here it is, for what it’s worth, and if you get something out of it, well that’s just a bonus!

Moving cars!

June 15th, 2005 by RoscoHead

OK this isn’t new apparently, but I’ve never seen it done in LEGO before so it’s new to me 😉

The idea is to motorise vehicles on a town layout. The method has been pinched from model railroading, where this seems to be reasonably common. Basically, you stick a battery and motor in the vehicle, and metal wire or strips under the road around the path you want it to follow. Then you add a magnet that activates the steering, and voila!

So I’ve come up with a basic chassis, too big for a car, but should be OK for a truck or bus. I think to do a car, you’d need to use non-LEGO parts, probably commercially available internals. My chassis is all LEGO, 7 studs wide, and length is easily adjustable. Vehicle must be long enough for a battery box, plus a couple of studs for the drive and about 6 studs for the steering.

The next thing to think about is stopping at level crossings. In scale layouts this is achieved using an electromagnet under the road which activates a reed switch cutoff in the vehicle. That will be difficult with LEGO, but we may try it eventually. For now I guess they’ll just go round & round.

Anyway I’ll let you know how it goes.


LEGO®,Technic®, Mindstorms® are trademarks of The LEGO Group of companies, which does not sponsor, authorise or endorse this site. Please visit the official LEGO site here.

Send mail to webadmin@br-eng.info with questions or comments about this web site.
Copyright © 2002-2007 R. Crawford

Brickley's Words is proudly powered by WordPress
Entries (RSS) and Comments (RSS).