DATA Labs – Cassette Player Blueprint

If you’ve been following my blog you’ll know that I’ve been working on DATA labs for around a year now – the level serves as a testing ground for new ideas, blueprints and personal development and it’s been lots of fun to work on!

Recently I’ve been creating audio log entries for the level, so the player can find out a little bit of backstory about the labs and what goes on there, as well as letting me indulge in some fun blueprints. The idea evolved from a simple playback system to a fully functioning cassette player, and whilst I’d like to expand it further I feel it’s probably a little beyond the scope of this project at the moment. Here’s how it works…

Essentially you can click on items to interact when them in DATA labs – clicking on the cassette player once plays the tape, again pauses it, clicking again plays from where you left off. You can leave it running or turn it off at any time or let it play until the end. Once the tape has reached the end, it will automatically shut off. A final click lets you rewind the tape and the whole system starts again. A red LED illuminates whenever the cassette is in play mode.

Cassette Blueprint
The full blueprint for the cassette player.

A lot of the ideas here are not mind blowing of course, they seem pretty simple in fact..! However, not coming from a game design or programming background means I often find that even simple tasks take up a fair amount of my dwindling brain power, so it took a number of iterations to come up with the blueprint you see below.

cassette_recorder_part A

This basically sets a number of variables in motion so that the blueprint knows what to do when you click on it – namely whether it’s playing, paused, stopped (complete) or rewinding.

cassette_recorder_part B

The next stage handles the system for play / pause functionality, which turned out to be quite a frustrating process for me! At first, my system could only handle a few play / pause run-throughs before it got confused and either started from the beginning or stopped completely! As usual, a branch node came to the rescue with an attached ‘is playing’ variable and the rest is history. It’s worth noting I’m using FMOD audio events for this blueprint, and a useful tip is the ‘On Event Stopped’ node you can use in conjunction with them – here it handles the auto-stop function of the cassette recorder.

cassette_recorder_part C

The final section of the blueprint is the sweet, easy-icing on the cake and simply toggles the red ‘active’ LED on and off in accordance with play state. Phew!

I’ll be adding some actual recordings to all the players in the level soon, so people don’t have to listen to me repeating “THIS IS A TEST” over and over again.. but it does the job for now. Any suggestions for the system would of course be appreciated and I hope this has been a useful read for folks. If you’ve got a question let me know!

 

A big thank you to Warren Marshall for the excellent retro-models you can see in the level – check out his Twitter for more!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s