Music-Event System, and Build 4
April 6th, 2010Lines, Blob, and multi-object-Pool Tests
April 6th, 2010Over the past term, I’d been working on a number of utilities and algorithms to put to use in the game. More recently, I’ve been compiling everything including these new assets into the latest full build of the game, which I will also be posting over on the build page.
The first test I did involved a new way to calculate the drawing points for the surface of the planet. I’d run through a number of methods, including trying to use the curve drawing functions built into flash. I determined, however, that their functionality was too limiting, and wouldn’t work for what I needed. Flash gives you the ability to draw a curve by specifying two points, and a third which connects 2 tangents from those points. This unfortunately does not allow for any cubic curves, which I would need at points.
As a work around, I spent a good amount of time developing a quick and rough algorithm for computing interpolated points between “knots” on a continuous spline-curve.
After this first, rough pass, I run a smoothing algorithm that re-aligns the points based on their neighbors. The result is something similar to a b-spline, drawn from control points:
Next I started to try and tighten up the over-all playing concept for the game. I needed an end goal for the player to try and accomplish in while on the music planets, and inside this universe as a whole. I came up with a scenario where the player would have to change the size of the planet’s body-mass. As the mass would grow, the planets atmosphere would remain the same amount, creating the illusion that it is shrinking slightly, as it stretches to wrap around the larger planet. Eventually the planet breaks through it’s own atmosphere, and that how the player will complete that song/level/planet.
The following example also shows off a dynamic slider I coded to help me rapid prototype different effects in the game. With sample values driven by these sliders, it will be easy for me to determine the best default values for new features I make in the game.
Next, I did some more research on object pooling. I had already gotten working my first version of a pool which I used for the intro screen. This pool however could only accept one type of object at a time, which I was occupying with the glowing orbs on the title screen. My game world, however, needs to be populated by several different classes of objects and enemies. Firstly, I want to be able to cap the total amount of objects on screen at any one time to save processing. Additionally, I don’t want to have to make a new pool for each object.
The answer I came up with was an auto-recycling multi-type object pool. The pool starts out with nothing but an empty custom object inside it. I can add array variables on this object dynamically each time I need a new type of item to put in the pool. Essentially I set up a global managing-pool which has several simple pools inside it. Each smaller pool has it’s own limit which I can define per-object-type. While the pool itself has no strict cap, I do cap the amount of objects I have on the screen at any one time. Any time I make a new call for an item, and these limits are exceeded the oldest member of that object-type is called back into the pool for recycling.
In the following example I add 4 different types of object to a pool as they are called on stage randomly. I also only 8 items to be on screen at one time. Once the 9th item is called, the first is recycled back into it’s own type’s array in the pool. This test shows the resulting ratios of items that build up inside the pool. It also shows the total size of the pool as compared to the total items on screen. For 4 types, it can essentially grow to 3 times the screen-total, but this test shows that this takes an incredibly long time for that to actually happen. The real total does not accede the screen total by much.
Game Build
February 15th, 2010This post shows off a large jump in production of the actual game itself. I’ve been working on putting togather a solid game-build from the outset, including all the final menus and game framing architecture. I’ve integrated the old music selection screen into my air version (not available in flash), in addition to implementing the latest ALF library into the game. I’ve found the new ALF API runs alot smoother than what we previously worked with for Pulse2. Another even newer edition of the library is on the way for this upcoming week apparently, and I am eager to try it out. I’ve also overcome some additional technical hurdles involving the goo planets.
Below is shown the most recent implementation of the goo planets. The character is now able to run around, following the surface of the undulating goo. Additionally, when the player leaves one planet and lands on another, the processing I am doing on the surface can stop saving on processing, and the game will focus only on the current planet.
Start Screen and Object Pool
February 15th, 2010Over the past couple of weeks I’ve been going back into many of the scripts and functions I had put together for my previous game Pulse, in preparation for the newest music code from the METLab. I’ve also been studying up on numerous optimization techniques for flash and Actionscript, which I’m hopeful will show a boost in the performance of this new game.
Below is the almost finalized start screen fir the game, which features an object pool of the light orb objects. The objects do dissapear, and respawn, but by keeping the instances around in a consistent pool, I eliminate the need to rebuild them or perform any garbage collection. I plan to use this technique for the various enemies and collectibles throughout the game.
This particular visual with the light orbs is what I imagine the void space between two music planets will look like once you break through the atmosphere layers.
Beat Sync Mash and ALF
January 29th, 2010This project is now reaching the point where I will start developing the new music analysis related features within the game. I’ve been working with the Drexel METlab who have developed 2 key projects which I will borrow from to implement my game. The first is a real-time music analysis API for flash, which they are calling ALF (audio library for flash). This is a library written in C and compiled for actionscript3, which can analyze dynamic audio being called and played through flash on a frame by frame basis.
For my previous game pulse, as well as my current project, using their code also involved creating a way to read and save data about the music at least a few seconds before it is played.
An additional code-base I am eager to start working with is dynamic music blending algorithms they’ve supplied me with. A previous student from the METlab developed a project called Beat Sync Mash Coder, in which he was able to take a number of small audio samples, and blend between them, syncing tone and also trying to line up beats.
He has supplied me with his underlying code, which I plan to implement in my game. Part of how my thesis will extend upon my previous work is that it will involve multiple audio tracks within one universe. One track will be ascribed to a unique goo planet. As the main character travels between these planets, the Beat Sync Mash code will help my facilitate this effect.
Game Physics Evolution
January 29th, 2010Another pre-production hurdle was to develop a system in which the hero character could interact with the various small planet objects that will make up his world. To facilitate this I’ve implemented a simple 2D gravity engine which can take in any number of defined objects of different weight, and calculate the resulting gravitational force on each object every video frame.
The playable character is actually defines as one of these gravity objects, with unique physics applied for playable purposes, and also not affecting the other objects. His motion vectors are derived from the direction the sum force of the object around him apply:
Early game concepts involved only one planet. For this scenario, I initially planed on faking gravity using a Polar coordinate system. Two test below show how I converted a coordinates from Cartesian space into Polar space for this effect. Later I had to manipulate the character’s air speed to compensate for the increased radial length traversed as he got farther from the center point.
Early Surface Algorithms
January 28th, 2010A big part of this game, outside of the music, will be the unique and surreal environment it takes place in. The main structure of this environment will be planets made of an amorphous black goo materiel. One of my early programming challenges was to figure out how I could script this movable surface, wrap it around in a circle, and finally, be able to influence the movement of particular points along the surface.
This first flash demo shows my first attemp:
This more recent tests shows the ability to move a cursor around a more accurate circle, and also push and pull points along it’s edge. For the most part, the surface is also volume preserving when changes are made.
Concept Videos
January 28th, 2010In a joint project between my AdvancedCG imagery, and Particles systems and AI classes, I’ previously took on a project which would act as a pre-visualization to the game Surge. In addition to helping me flesh out a look and feel for the game and how it may play, I intended the end product (the first video) to be re-purposed as a game intro cinematic.
This second video video represents an early test in the program Houdini, syncing up audio generated animation curves to metaball objects, simulating a goo effect I envision for the game-world and it’s reaction to music.
Welcome
January 28th, 2010Hello, and welcome to my Thesis project update blog.
The tentative name for my thesis document is:
The Possibilities of Real-Time Audio Analysis and Manipulation for Music Based Gaming
and the parallel game project I will be developing is called:
Surge
This blog will serve as my main update hub for pertinent research links, and progress updates as I develop both the paper and project throughout the next 8 months or so.
- Christian Hahn












