Whistle Your Way Through A Cave in: Hyper Bat Simulator 2018!

A few weeks ago was the end of January, and many game developers know what that means: It’s time for yet another Global Game Jam! The GGJ is a world-wide event with hundreds of locations where people meet for 48 hours of rapid game development.

This year’s theme was “Waves”, and I found myself in a team where I didn’t know a single person – which is always challenging, but also fun! The development went nearly without any hitches and I’m really content with our result:

In the game, you are a bat flying through a cave looking for its bat pups so you can go hunting. The cave is dark and the pups are tiny, so you use your echolocation to see and hope the pups answer. You steer with the gamepad – but to use the echolocation, you have to whistle into a microphone! (Like the title suggests, this is definitely the latest in bat simulation technology.)

Here’s a video of our presentation after the GGJ (starts at 0:29):

 

And a small trailer video Emily and Caroline made:

 

The game and its source code is available at its Global Game Jam entry page.

Before I talk a little more about the development, here’s the team:

We also used some assets:

Okay, on to the development! This time (and very atypical for me), the concept was rather simple. A single player game with no really hard development challenges – well, that leaves more room for polish, and sounds just right for 48 hours!

This was also one of the few times where the game design didn’t change much over the course of the weekend. Everything just worked. In the end, we actually finished the game with all the features we wanted! We even removed some features we already implemented because they made the game less accessible and weren’t as much fun as we had imagined: Dizzyness when the bat crashed into a wall, and not being able to call out to children when there’s a wall in the way. We also wanted to add monsters that follow sound, but in the end the game turned out to be plenty fun without the added complications, so we decided not to go that route.

The microphone implementation was incredibly easy, more so because this isn’t my first microphone controlled game. I just had to sample the input volume and detects peaks.

First I wanted to do the echolocation waves via shaders, but that that would’ve taken some time. Then I remembered something I learnt about in a Pluralsight video tutorial just a few weeks ago: Light Cookies, which allow you to put shadow masks on Unity3D lights. The final echolocation waves are just multiple spotlights with a circular light cookie mask shining from above, and the angle gets progressively bigger. That way it “runs” across obstacles and scales walls and stalagmites instead of just looking like it’s two-dimensional shape projected from above. The effect is a bit hard to describe, but you can see it quite often in the videos linked above.

I am really happy with our result! Thanks a lot to my team for being the best team – and to the location organizers and the Global Game Jam team who made it possible for us to jam without worrying too much about such mundane things as work space or food!

Generative Art – Sketches #043 to #050

Alright, next batch of generative sketches coming up. Grab them while they’re hot!

#043: Das Kollektiv

This is the first time one of my artworks is inspired by music! The song in question is Das Kollektiv by ASP. I’m taking a fairly literal interpretation of a swarm of little entities in between the walls, sucking out the essence of the “guests”. The images are pretty dark; you might need high contrast settings.

043_das_kollektiv_01      043_das_kollektiv_02      043_das_kollektiv_03

#044: Into Oblivion

This next one isn’t just inspired by music, but directly driven by it! There is already a post about it, so I’ll just post the visuals here.

Here is a video using a shortened version of Push Every Button by Lapfox:

044_into_oblivion_01      044_into_oblivion_02      044_into_oblivion_03

044_into_oblivion_04      044_into_oblivion_05      044_into_oblivion_06

A Slice of π – A MOD Music Visualizer

When making Into Oblivion, I was a bit frustrated that it was rather hard to gain good information from the FFT analysis and that it was utterly impossible to find which instrument was playing. And then a friend told me about MOD music.

Unlike audio files like mp3, module files aren’t rendered down to just the audio information. Simplified, they have two elements: A collection of distinct audio samples and tracker information when to play which sample and how to modify its pitch, volume and other properties. So that means if your visualizer is a MOD player, you have all this juicy information available at your fingertips!

So there were a few things I needed:

  • MOD files: I got those from ModArchive.org. I chose:
    • chiptune, phantasmagoria, rsectro and zapped_out by 4mat
    • Rivendell by radix
  • A MOD tracker to analyze the MOD files: OpenMPT filled that spot quite nicely and was easy to get into even for a total beginner like me.
  • A MOD processing library – of which I only found one! Luckily, PortaMod has (nearly) everything I needed, and the creator Brendan Ratliff was most helpful on Twitter.

Since this was my first foray into MOD music visualization and I wasn’t cooperating with a musician, I wanted to keep the visualizer as general as possible; any file that it could play should work. I also wanted to use as much information as possible. In the end, I chose a rotating circular representation divided into slices. Each slice is a MOD channel and each MOD sample was assigned a color. Pitch modifications made the radius go bigger, and everything is pulsating according to the output amplitude.

Downloads:

Executable for Windows
GitHub Repository (MIT License)

And now there’s been enough talk – have a preview video and a few screenshots!

The song used are, in order:

  • Rivendell by radix
  • phantasmagoria by 4mat
  • rsectro by 4mat
  • zapped_out by 4mat

chiptune01      phantasmagoria01

phantasmagoria02      phantasmagoria04

rivendell03      rsectro01

rsectro04      zappedout03

Generative Art – Sketches #050 to #056

So far I’ve mostly used Processing and occasionally Unity3D for my generative sketches. While I’ve learnt quite a few techniques on how to make things look interesting, I’ve been struggling with making them look beautiful. Processing definitely has the capabilities for beautiful rendering, but so far it seems to be a bit beyond me. Secondly, most of my stuff is 2D and neither Processing nor Unity3D have strong tools for procedural mesh authoring. Time for a new contender: SideFX Houdini!

Houdini is a 3d modeling/animation program with a procedural twist: Every action is saved in a node network and the node/action parameters can be changed or randomized later. That allows for generative artworks among other things. You can also just build the node network directly which feels very much like visual programming.

So this batch contains the first things I’ve ever done with Houdini. Most are inspired by the fabulous Entagma tutorial series.

#050: Starry Polygon

The first one is based on the Entagma “Poly Rembrandt” tutorial series. The tutorial produces great results, but I was missing that randomization touch that leads to every image generated being different. Using colored noise textures as input instead of images worked quite well for that.

050_starrypolygons01_0-593      050_starrypolygons02_0-0083333333

050_starrypolygons03_0-00833333333      050_starrypolygons04_1

050_starrypolygons05_0-18181818      050_starrypolygons06_0-474

#051: Wisps

Next up is my first seamlessly looping video!

051_wisps_105      051_wisps_145      051_wisps_233

Sadly, I couldn’t find a looping video player. I guess the above GIF must suffice for that; but at least you can see a non-looping sequence in far better resolution here:

#052: Dancing Tiles

After my previous experiences with music visualizers, I tried to make one in Houdini with the help of this tutorial about audio-driven animation.

The tile position changes are animated to the beat of one of the percussion instruments, the jittering is in tune with the amplitude and the color of the light changes roughly according to the frequency of the tune. This is made possible by using a multi-track arrangement I took from http://www.cambridge-mt.com/ms-mtk.htm: Lacuna (Excerpt) by APZX.

It didn’t turned out as impactful as I would’ve hoped – but because of the half-transparent tiles it took a really, really excessive amount of time to render and I didn’t want to redo it.

#053: Melted Sphere

Next, I discovered my love for melted things with this Entagma tutorial. I also learnt that the recipe for an awesome looking image is 1.) place a light source in the middle of an object and 2.) activate subsurface scattering.

053_melted_sphere_61      053_melted_sphere_48

053_melted_sphere_230      053_melted_sphere_136

#054: Crystals

Here I tried to use volumes generated by noise to make a cave with stalagmites and stalactites. Instead, I got this. I think I’m pretty fine with that.

I also learnt how to use the compositing capabilities of Houdini to lighten up the resulting image right after rendering.

054_crystals_182      054_crystals_111_nc_close

054_crystals_65      054_crystals_157

#055: Steel Wool

Steel Wool uses curl noise flow around a procedurally generated object. I wanted to use subsurface scattering again, but stumbled upon the metallic effect instead and quite liked it.

055_steel_wool_240      055_steel_wool_315

055_steel_wool_360      055_steel_wool_135

#056: Paper Leaves

This looks almost more 2D than most 2D stuff I’ve done so far. Mesh splinters, highly transparent and with lighting from behind.

056_paper_leaves_01


And that’s it for this batch! In case you want to see the contents of any of the Houdini files yourself, just install the free Houdini Apprentice Edition and head to my Houdini GitHub repository to get the project files.

Tobi’s Unity Utilities

When you google “unity utilities”, it seems like everyone and their dog has one of those. Well… now there’s one more of them! Open-sourced, well-commented, with descriptions, examples and class documentation. Get it while it’s hot:

GitHub repository

Class Documentation

Overview

  • Countdown: Useful for things like cooldowns or spawn delays. It is also helpful for tweening things by using the PercentElapsed property.
  • EditorHelper: Gets the [Tooltip] attribute content of fields for editor classes. Might get more helper methods in the future.
  • LINQExtensions: A collection of extension methods for IEnumerable, List and arrays.
  • MathHelper: Helper methods for time-independent eased lerping, mapping and angles.
  • MeshCreator: Makes it more convenient to create meshes via code.
  • NoiseOutputValue: Enter a range and a speed in the editor, get an output value that fluctuates over time using Perlin Noise.
  • RandomBag: A RandomBag gives you random items from a group while ensuring that in a certain interval every item was given back the same number of times.
  • Range: Editable data types that take an int/float range. Used for things like “Spawn 2 to 4 enemies.”
  • RollingArray: Collection that keeps the last x elements that are added to it.
  • Singleton: Allows easy and convenient creation of a Singleton. Optionally makes a Singleton persist between scenes while ensuring that only one exists.
  • UnityHelper: Contains a plethora of useful extensions and helpers for Transform, GameObject, Vector2/3/4, Rect and more.
  • XmlHelper: Serializes data to XML strings and makes accessing optional element content and attributes in general XMLs easier.

Usage

To use the scripts, just drop them into the Assets folder of your projects. Or better yet, make an “Assets/Extensions/TobisUnityUtitilites” folder and drop them there. Hurray for proper organisation.

You can also just use selected scripts, but you should check the “Dependencies” section in the respective folder to make sure you copy everything you need.

Generative Art – Sketches #036 to #042

The last batch was a bit mediocre, but this one has some really strong candidates! I’m proud to present:

#036: Among the Stars

Based on a work by the ever-fabulous Titouan Millet! It turned out not to look like the original too much and instead has its own charm.

s036_among_the_stars_01          s036_among_the_stars_03

     s036_among_the_stars_08     s036_among_the_stars_07

s036_among_the_stars_06     s036_among_the_stars_05     s036_among_the_stars_04

#037: Energy Transfer

An experiment with agents and attractors.

s037_energy_transfer_01     s037_energy_transfer_03     s037_energy_transfer_02

Generative Art – Sketches #029 to #035

It’s been over a year since I last posted a collection of small generative art sketches – but that’s not because I stopped making them, I just got a bit lazy with posting. There’s quite a lot queued up now! And without any further ado, here are candidates #29 to #35.

#029: Plasma Blob

This one isn’t terribly impressive, but it was made in a few minutes to demonstrate Processing to a colleague and is reasonably nice to look at.

s029_plasma_blob_03      s029_plasma_blob_02      s029_plasma_blob_01

#030: Mara’s Ocean

A typographic variation of #028: Isles using the Mara’s Eye font.

s030_maras_ocean_01      s030_maras_ocean_02      s030_maras_ocean_03

s030_maras_ocean_04      s030_maras_ocean_05      s030_maras_ocean_06

#031: Chimera Maker: What Has Science Done?!

The sillyness levels go through the roof with this one. For executables for Windows, Mac, Linux and Android and for more pictures, check out it’s own blog post!

031_chimera_maker_01     031_chimera_maker_02     031_chimera_maker_03

Canada’s Marvelous Singing & Dancing Animals

The newest entry in a series of silly animal-themed generative art: An animal music visualizer. Well, it started out as a music visualizer, but I don’t think it would work with many tracks and it needs a lot of configuration. It makes for a fun video nonetheless. I proudly present: Canada’s Marvelous Singing & Dancing Animals!

The song is Python by Rolemusic and the images used are all public domain/CC0.

If any of the animals aren’t Canadian after all, this is an unintentional error; I just identified them by the way they move their snouts.

Into Oblivion: A Music Visualizer made with Processing

With my newest generative artwork, I embark into the wonderful world of generative/reaction animations: It’s a music visualizer.

I’ve used spectrum analysis (powered by minim) and Processing to make a reactive artwork. It works especially for songs with breaks and theme changes where it becomes really apparent that the result is really dependent on the currently played music.

If you are Windows, you can download it here – edit the default.xml to use your own music, change the color scheme. Check out the readme for the controls!

The source code is, as always for my generative art in Processing, available at the GitHub repository and open source. You can open it with Processing 3 – just import Minim.

Here is a video using a shortened version of Push Every Button by Lapfox:

044_into_oblivion_01      044_into_oblivion_02      044_into_oblivion_03

044_into_oblivion_04      044_into_oblivion_05      044_into_oblivion_06

Together We Defend, A Cooperative Crowd Game Prototype

I’ve made prototypes for local multiplayer games with 10+ people before – some very successfully, some less so, but always with great pleasure. There is something magical about a crowd of people all playing the same game together. You don’t just need to design good mechanics though – the game should balance well with a few or with a lot of people, which is also hard to test because you always need a crowd. Another problem is input: While yelling with varying volume in Screamy Bird is tremendously fun, it is a bit limited control-wise. Unless your crowd is very small, giving everyone a gamepad is not an option. But these days, most people have a smartphone with a web browser, and luckily, platforms like AirConsole and HappyFunTimes make using these as controllers extremly easy!

My goal was to make a game where people have to cooperate and that scales well with different amounts of players. To ensure cooperation, the game would feature two radically asymmetric roles: the Shooter, which can attack but dies to a single hit, and the Defender, which has no offensive capabilities, but whose shield can absorb any amount of damage. In the center of the games are the Cores which the players have to defend. Enemies come in from all around the screen and try to destroy the players and the Cores, whatever is nearest. The enemies’ projectiles are heat-seeking – they will always hit something, so without the Defenders, the Core and the Shooters will be destroyed rather sooner than later; but without the Shooters, the defenders could not destroy a single enemy.

This was a jam game done in about 12 hours and everyone around me was busy, so I there was no way I could balance it properly. I solved that dilemma by assuming the role of the game master: I would sit at the keyboard and spawn enemies.

Apart from troublesome connection problems, the game worked rather well for a jam game and the crowd loved it. Here is a video of the presentation:

Together We Defend, A Cooperative Crowd Game Prototype

The video was filmed by Iwan Gabovitch and the sound effects are from the fabulous Universal Sound Effects which I can very much recommend.

Connection problems aside, I am very content with how the mechanics worked out and I think there is a lot of potential there. I will probably revisit this prototype some day and make a proper game out of it.