Announcement

After 5 years serving the vintage Apple enthusiast community, ThinkClassic has been marked for closure and is now in caretaker mode. Please see this thread for further information. Please direct any questions, comments and enquiries about the website, management and ownership to this thread.

You are not logged in.

#1 2014-11-11 19:22:43

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Snaaaaake!

When I first got my pile of compact macs, I was trying to brain storm something to do with them that benefits from having boatloads.  I initially wrote a little appletalk tool that would send all input events to all machines.  That was ok, but just having all the machines do the same thing, isn't much different than having just one machine do it.  Later, a friend came up with the idea of playing Snake across all machines.  After taking a couple years to get around to it, here we go:

And if youtube isn't working: http://users.mac68k.info/~bbraun/snake.mp4

Last edited by bbraun (2014-11-11 19:23:25)

Offline

#2 2014-11-11 20:47:30

ClassicHasClass
Member
From: Electron Alley
Registered: 2014-05-26
Posts: 1,118
Website

Re: Snaaaaake!

That is a big stack of Macs. I love how it moves from screen to screen. How does the handoff work?


Machine room (updated for 2019!): http://www.floodgap.com/etc/machines.html

Offline

#3 2014-11-11 20:56:52

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

The first machine on the network is the controller node, and only that one can control the snake, and that one knows how the displays are arranged (basically takes an x and a y number of displays, and assumes the increment from left to right, and bottom to top).  It then broadcasts the current location of the snake, represented by n segments, and each segment has which display it is located on, along with the xy position on that display.

I hope to expand the wall o' compacts.  I've got 3 more plus' that need some amount of servicing, and a giant stack of 512ke's, but I currently lack de9 phonenet dongles to connect those up.  I may end up just making a de9 to minidin8 adapter for them.

Offline

#4 2014-11-11 23:02:27

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

I got a couple more working:

Offline

#5 2014-11-12 02:41:06

techknight
Member
Registered: 2014-05-22
Posts: 453

Re: Snaaaaake!

why have 1 monitor when you can have 6. haha. or more....

Offline

#6 2014-11-12 05:40:34

uniserver
Member
From: Sf, Mi
Registered: 2014-05-15
Posts: 956
Website

Re: Snaaaaake!

bad ass!      need music,    need tail to grow, need mice to eat.

supercool!  unique intelligence at work here......
vitruvian-man-vector-289612.jpg


#I Re-Cap √Mac √NeTX √Amiga Boards - A/B - PSU# (MacCaps.com)  Modern SCSI HD's - For Old Macs - Pre Cfg'd - 10k RPM! 73gb!! $50 + free shipping  -- Mac 128K Re-Ram kits (16 Chips) $35 + shipping, Floppy Issues?-> Bourns Filter Solution 128k - SE/30, $16 + shipping

Offline

#7 2014-11-12 06:42:09

jt
Member
From: Bermuda Triangle, NC USA
Registered: 2014-05-21
Posts: 1,470

Re: Snaaaaake!

I'm lovin' it!

Back when these things were dumpster ballast, I really wanted to fab a bunch of sheet metal boxes so I could mount the Compact's innards into what would have wound up about a double depth 9" NTSC Monitor enclosure to pack the Mac's 9" CRTs together as closely as possible. Doing anything with it is still beyond my ken. I really thought I'd someday be able to get such a segmented display working, but alas, that hasn't happened. The other things I've learned and done (or done and learned why not to!) have been a fun ride.

I'm glad guys like you are around to pull stuff like this off, it makes the world a geekier place. cool    You just gotta love it! big_smile

Offline

#8 2014-11-12 14:44:14

ClassicHasClass
Member
From: Electron Alley
Registered: 2014-05-26
Posts: 1,118
Website

Re: Snaaaaake!

bbraun wrote:

The first machine on the network is the controller node, and only that one can control the snake, and that one knows how the displays are arranged (basically takes an x and a y number of displays, and assumes the increment from left to right, and bottom to top).  It then broadcasts the current location of the snake, represented by n segments, and each segment has which display it is located on, along with the xy position on that display.

I hope to expand the wall o' compacts.  I've got 3 more plus' that need some amount of servicing, and a giant stack of 512ke's, but I currently lack de9 phonenet dongles to connect those up.  I may end up just making a de9 to minidin8 adapter for them.

So this is all done with AppleEvents, basically?


Machine room (updated for 2019!): http://www.floodgap.com/etc/machines.html

Offline

#9 2014-11-12 14:49:55

markyb
Member
From: Aurora, OH (330)
Registered: 2014-05-16
Posts: 185
Website

Re: Snaaaaake!

hmm. I wonder why the embedded videos don't show up..
there is a giant blank space for them, so the browser knows something is there.
(Chrome 38, Windows 7 x64)


http://markyb86.weebly.com for some packs of old macintosh wallpapers, desktop patterns, windows wallpapers, sound files, etc.

Offline

#10 2014-11-12 16:24:11

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

Nah, not AppleEvents, it using a single DDP packet on the update interval to just blat out a struct of the game state to the network.

Each machine registers for a numeric name in sequence, with the service type 'snake'.  If a previous machine already registered the name it increments and moves on.  So "one", "two", "three", etc.  The first machine to register becomes the control node and other machines just increment and are listeners.  The machines then know their "display number" based on which number they registered, and can inspect the broadcasted game state to see if they need to do any drawing.

Basically something like:

for name = 1; not registered; increment name
    NBP register name

while getnextevent
    if received network packet
        iterate over packet looking for stuff relevant to my display number
    if name == 1
        if keyboard event
            update snake state
        DDPWrite snake state to broadcast address

It's a fairly simplistic hack, not really intended to be a generic network protocol or anything.  I figured it's probably going to be throwaway to support the demo of the wall of macs.  After all, the goal is to unload these things.  smile

Offline

#11 2014-11-12 16:26:44

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

markyb: I see the same thing in firefox on osx, but I just figured I had blocked youtube.  smile
If you've got a fairly vanilla setup, you might try reporting it in the Site Issues thread.

Offline

#12 2014-11-13 03:10:08

ClassicHasClass
Member
From: Electron Alley
Registered: 2014-05-26
Posts: 1,118
Website

Re: Snaaaaake!

Oh good, I was worried TenFourFox had a bug in it. tongue


Machine room (updated for 2019!): http://www.floodgap.com/etc/machines.html

Offline

#13 2014-11-13 05:14:40

iMic
Administrator
From: Adelaide, Australia
Registered: 2014-05-12
Posts: 948
Website

Re: Snaaaaake!

markyb wrote:

hmm. I wonder why the embedded videos don't show up..
there is a giant blank space for them, so the browser knows something is there.
(Chrome 38, Windows 7 x64)


Hopefully should have this issue fixed. See here for more information. smile


Resident Professor of Alternative Methodology
Faculty of Electronic Restorations & Modifications - "It works, let's fix it!"

Offline

#14 2014-11-15 04:34:54

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

Thanks for fixing the videos iMic!

So, you wanted mice to eat and growing tail?  Here you go:

Since I've got this wall of macs sitting here and I can't seem to bring myself to take it down, I've been thinking up other uses for it while I'm not playing Snake.  So taking the Snake code, I modified it so the app displays 2 lines of text from an appletalk DDP packet, and a posixy command line tool that accepts the strings as arguments and sends the DDP packet out on the wire (this uses libpcap for writing the packet, since OSX and others don't necessarily support appletalk sockets, and certainly not in a compatible way).  This means I can write a script on a modern machine and display the results on the wall o' macs.  Here's the result:
displaywall.jpg

Offline

#15 2014-11-15 23:14:43

ClassicHasClass
Member
From: Electron Alley
Registered: 2014-05-26
Posts: 1,118
Website

Re: Snaaaaake!

The one at the lower left looks out of place (cleaner font).


Machine room (updated for 2019!): http://www.floodgap.com/etc/machines.html

Offline

#16 2014-11-15 23:20:38

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

Yeah, that's the SE/30, and it's using a full install of system 7.0.1, where all the plus' are using a minimal install of 6.0.8.

Offline

#17 2014-11-17 03:01:02

ScutBoy
Member
Registered: 2014-05-25
Posts: 159

Re: Snaaaaake!

bbraun,

You are giving me evil thoughts about what to do with my own wall o' classic Macs. wink

If you have a place you could post up your bits of code and are willing to share, I'd like to have a doodle at it myself.

I can also look at my collection of localtalk/phonenet dongles and let you know if I have any DE9s I can spare.

Offline

#18 2014-11-17 03:07:19

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

Awesome!  I've posted the code (the .sit.hqx files have both code and compiled binaries) on my site, so feel free.  It's kinda hacked up, assuming it'd be disposable, but let me know and I can help get you going.

Thanks for checking on the DE9's.  I actually ordered some female minidin8 connectors in an attempt to make an adapter that would allow the newer, more plentiful dongles to work.

Offline

#19 2014-11-17 14:25:41

ScutBoy
Member
Registered: 2014-05-25
Posts: 159

Re: Snaaaaake!

Thanks bbraun. I've got a couple things to clear off my workbench, but this will be a fun project once I get there smile

Offline

#20 2014-11-18 14:30:54

MinerAl
Member
From: The not-so-great plains
Registered: 2014-08-26
Posts: 73

Re: Snaaaaake!

Very cool.  I remember an AppleTalk demo from the early 90s very much like this, but it was just a bouncing ball zipping across screens.

May I suggest: multi-screen Pong

Offline

#21 2014-11-18 15:09:04

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: Snaaaaake!

Nice idea!  My current problem is needing to connect a mouse to each of the machines to launch the program.  Getting to the mouse port on the back of the machine gets a bit difficult for the middle machines, and I still have hope of adding some 512k(and e) machines to the mix, which will pretty much make it impossible to reach the back of the middle machines.  I could replace the Finder on the disk, but I still prefer being able to select different programs, and be able to use the Chooser and mount network volumes.
I've written an INIT that, when holding down option, allows using the a/w/d/s keys for mouse movement, and space for the mouse button.  Since the keyboard jack is on the front, that's a lot more convenient.  I'll try adding the ability to send keyboard and mouse events over appletalk too, so I can script input events from the modern machine.  That'll make setup a lot easier.

Hopefully the parts to make DE9 to minidin8 adapters for phonenet will arrive tomorrow.

Offline

#22 2014-11-18 22:06:11

uniserver
Member
From: Sf, Mi
Registered: 2014-05-15
Posts: 956
Website

Re: Snaaaaake!

its just so ridiculously awesome.


#I Re-Cap √Mac √NeTX √Amiga Boards - A/B - PSU# (MacCaps.com)  Modern SCSI HD's - For Old Macs - Pre Cfg'd - 10k RPM! 73gb!! $50 + free shipping  -- Mac 128K Re-Ram kits (16 Chips) $35 + shipping, Floppy Issues?-> Bourns Filter Solution 128k - SE/30, $16 + shipping

Offline

#23 2014-11-18 22:06:27

jt
Member
From: Bermuda Triangle, NC USA
Registered: 2014-05-21
Posts: 1,470

Re: Snaaaaake!

Love it. "If we weren't all crazy we would go insane."

/parrothead

Offline

#24 2014-11-18 22:08:22

uniserver
Member
From: Sf, Mi
Registered: 2014-05-15
Posts: 956
Website

Re: Snaaaaake!

I'm gonna name it.

I am going to call it, " The Green Clock "

Algore is going to want one,  he might dedicate a room in his mansion just for it.

( make sure to have it show the time somewhere )  lol

Last edited by uniserver (2014-11-18 22:09:44)


#I Re-Cap √Mac √NeTX √Amiga Boards - A/B - PSU# (MacCaps.com)  Modern SCSI HD's - For Old Macs - Pre Cfg'd - 10k RPM! 73gb!! $50 + free shipping  -- Mac 128K Re-Ram kits (16 Chips) $35 + shipping, Floppy Issues?-> Bourns Filter Solution 128k - SE/30, $16 + shipping

Offline

#25 2014-11-18 23:47:25

jt
Member
From: Bermuda Triangle, NC USA
Registered: 2014-05-21
Posts: 1,470

Re: Snaaaaake!

Can you play snake on it at the same time it's displaying the script results?

How about having it randomly display Susan Kare's icons full screen while doing both? Maybe have the icons pop up on the next to last screen the snaaaaake exits? Something like that'd give you a moving target.

Last edited by jt (2014-11-18 23:49:17)

Offline

Board footer

About ThinkClassic

ThinkClassic specialises in the use, maintenance, repair, restoration and modification of vintage computers and peripherals.