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

Doing My Best (to boogie) – FMOD / Unreal

I realise it’s been some time since I posted here (two months truth be told!) however I’ve been keeping busy working on a couple of freelance contracts. This doesn’t mean that I’ve neglected my portfolio projects (Lake Lodge / DATA Labs / Digital Dark Age) and I’ve spent some time researching and developing my knowledge of blueprints to aid in their development in my spare time.

In particular I’ve been looking into creating custom occlusion blueprints for FMOD (which I’ll get into more depth about at a later date) and some of the ways in which FMOD integrates with Unreal in a musically interesting fashion!

As you can see the text and ‘coloured blobs’ are timed to the music, or more accurately the tempo and time signature of the attached audio event in FMOD. This can be useful for a whole range of things (rhythm games in particular) although I plan on using this feature in my DATA Labs level to add some extra interest in the basement labs.

Boogie A.PNG
Once you’ve got the tempo / time signature info from FMOD its possible to trigger lots of different actions in Unreal. This is the blueprint for my ‘boogie demo’ above.

As you can see below the FMOD component has it’s own ‘On Timeline Beat’ event which automatically outputs information about tempo, beats, bars etc and can be used to trigger anything you like really! As my boogie loop is in 4/4 I’ve used the beat output and a switch with beats 1 – 4 to toggle visibility of the coloured blobs and boogie text render.

Boogie B.PNG
The ‘On Timeline Beat’ event outputs a range of useful data.

Another useful function I’ve been playing about with lately is the ‘On Event Stopped’ event that can be called from any FMOD audio component.  The screenshot below is taken from my DATA Labs level where I’m using it to turn off a cassette player once the recording on the tape has reached it’s end. (I’ll be posting about this soon as well!)

Cassette Stop.PNG

This is really only just scratching the surface of what you can achieve when combining the functionality of FMOD and Unreal in blueprints, but I hope it highlights a couple of ideas and provides some inspiration for your own projects. If you’ve got any questions etc please feel free to drop me a message over on Twitter.