Thursday, December 13, 2012

Heroes of Rock: Alpha Post Mortem



6 sprints worth of work (or what I did)
This semester we were able to get 6 full sprints in, the sprints started off a little slow while we were familiarizing ourselves with Scott Torgeson’s engine, but we were able to quickly pick up the pace and complete our vertical slice for alpha.  Being a programmer, I worked a smattering here, fixed some bugs there, etc. but the two major systems I developed in our game were: Artificial Intelligence and the Particle System.

Artificial Intelligence
What I did
I created a complete Artificial Intelligence system including:
·         weak enemies that run at the player (stupidly; Christian handled the attacking)
·         ranged enemies (stationary)
o   They raycast to determine if they should shoot missiles at the player.
o   The missiles move forward and explode upon colliding with any non-enemy object (complete with smoke trail and explosion effect)
o   When their missile explodes they will try to shoot another
·         Tied into Scott’s triggering system to allowed triggered spawns of enemies
o   Can define type of object to spawn, number of that object to spawn, a delay between each spawn, if you want them to spawn in waves
o   Wave spawning correctly handles itself such that when all enemies spawned by triggers die, they will all span another enemy (assuming they haven’t met the limit)
·         Enemies expel blood when they die
·         The player can walk through all enemies except for the Heavy Enemy.
What still needs to be done
Several portions of the AI need to be improved, the effects can be polished once I have a better idea of how the enemies will be performing their actions.  The AI could needs to be made a little smarter, and I need to add the code for a heavy enemy.  The heavy enemy will perform similar to the weak enemy, but he will move slower and will take a reduced amount of damaged when attacked from the front.  Another slight improvement can be made to the wave spawning system as funny issues will happen if enemies are partially hand placed, partially spawned.  I also need to add the ability for enemies to chase in the Z plane (we plan on doing levels where the level takes starts on the X plane, but changes to the Z plane partway through.  None of these issues are very difficult to change and I already know how to change them, I just made the decision to not polish them for Alpha and help out with other features that we needed to be done.

Particle System
What I did
I made a particle system from scratch that uses textured planes facing the camera to render the particles.  The system is made up of a Particle Emitter, and the particles themselves.  The Particle Emitter has an update, during which it will spawn new number of particles if conditions are met, and updates all the live particles that it has created.  I had never written a particle system before so I wasn’t sure what variables should exist in the system.  However, when I used Unity previously, my team never ran into issues with their particle systems lake of features, so I decided to copy the elements I thought were useful in their system.  After looking through all the variables in their system I decided that I would define the following properties for my emitter:
·         Min Size(float) – minimum size of the particle
·         Max Size(float) – maximum size of the particle
·         Min Energy(float) – minimum time to stay alive in seconds (lifespan)
·         Max Energy (float) – maximum time to stay alive in seconds (lifespan)
·         Min Emission (int) – minimum number of particles to emit a second
·         Max Emission (int) – maximum number of particles to emit a second
·         Local Velocity (Vector3) – Velocity that all particles should start with.
·         Random Velocity (Vector3) – A Vector3 that defines the randomness that can be applied to the particles velocity (e.g. (1, 1, 0) means the particle will have an additional +/- 1 velocity added to its local velocity in the x and y dimension).
·         Random Position (Vector3) – A Vector3 that defines the randomness of the particles position (e.g. (1, 0, 0) means the particle will have an additional +/- 1 added to its position in the x dimension).
·         One Shot (bool) – if true the emitter emits an entire seconds worth of particles at once, and then stops emitting.
·         Texture (Texture2D) – the texture all particles created by the emitter should have. 
Overall, I am happy with the properties I allow, we the ability to create jets of steam, circular explosions, and anything in between.
Just like any system I want my particle system to be as lightweight and efficient as possible.  Because we are using XNA in C# we don’t directly control memory, meaning when we ‘destroy’ objects, they continue to reside in memory, until Garbage Collection is called.  Garbage Collection, frees memory for us so we don’t have to worry about memory leaks, but it can cause the game to freeze up for a second or two during its operation, which is unacceptable for a game.  Particle Systems create lots of particles that have short life spans, so if written poorly your garbage collection will be called quite frequently.
I made an observation early in the development of the engine that all particles have the same texture, so rather than each particle storing redundant data, we should have the emitter store one copy of the texture.  Since the emitter is performing the draw calls for the particles it is simple enough to slightly rearrange the draw call so that the particle emitter is drawing all the particles rather than all the particles drawing themselves.  The most important memory optimization I made was the choice of my data structures and the system of creating particles.  It was an easy choice to use a linked list for the live particles.  You can iterate through all the particles to update them, and you get linear insertion and deletion, meaning that we do not have to sort particles by lifespan or have expensive removes from the middle of the list.  I mentioned before that particles have a short lifespan, meaning that you will not hold a reference to them long before they need to be removed.  However, due to the nature of an emitter you are creating a new group of particles every time you update the system.  When you put these two items together you can come to the realization that it would be smart to recycle the dead particles rather than just deleting them.  So you create a second linked list that you always draw from before creating new particles.  Instead of creating emission rate number of new particles every second, you instead draw from the pool of existing particles and end up creating a total number of particles that is less than 2*emission rate (assuming lifespan < 1 second).  Because of this we can create emitters with much larger rates without running into garbage collection problems.
What still needs to be done
After looking at some more particle systems I think there a handful of changes that are still needed to complete the system.  A basic feature that we still need is the ability to give the emitter a lifetime, we can say “emit for 10 seconds, and then destroy yourself”.  We would then have a “create and forget” system, you just create a particle emitter and the particle system would handle everything else for us (updating and deletion).  In addition, to improve memory further, I would like to have a global pool of particles, when an emitter is created it estimates how many particles it will use, and grabs that many from the pool.  In the case the pool doesn’t have enough particles, it will take as many as it can, and create the rest of the instances locally.  Upon completion the emitter will return its particles to the pool, helping us keep the number of deleted objects down, so we need to run garbage collection less often. 
Of course, there is a list of non necessary features (at this point) that I feel would make our particle system even better.  I like the idea of our particles shrinking in size and fading out their alpha to make a smoother transition when they are removed.  I don’t find the instant remove to be jarring, but there is some room for improvement, and more features are almost always better.   Another thing I would like to look into is applying color/hues to the textures, meaning we would have to create a smaller number of textures if we need multiple colors.  For instance we talked about the having particle FX for our attacks that are different colors based on how accurately you performed the combo.  This would be a reference to Guitar Hero with green, yellow, and red standing for good, okay, and bad respectively.  The last cool addition I thought of would be the ability to give a starting and ending texture for the particle, they textures are then transitioned between during the lifetime of the particle.  Given the time, I will get all these features in, but there are I need to ring other items up to the necessary level of polish before I get that chance.

What I would have done differently
This semester I learned a lot about how to be a better team leader and member.  I wouldn’t have changed a whole lot that had taken place this semester, but I wished I had been more hands on, checking the other programmer’s code more frequently.  I used to lead in the opposite extreme, when people didn’t get their code working how I desired I would change it myself.  The bottom line is that this benefits no one, I have to put in an insane amount of time, and they don’t have a good learning experience.  This semester there are relatively few implementations that I am not happy with, but rather than redoing them I have talked to the programmer, pointed out what I didn’t like about their implementation and sketched out how I would have implemented it.  I wish I had caught these issues a little earlier, but at least I feel like I handled them in the correct manner.


Low Fat Scrum Process
If I had to describe the process we used this semester I would describe it as the “Low Fat Scrum Process.”  We had standup meetings, weekly sprints, and tasks, but we didn’t go into the full fledged Scrum Software.  We used a color coded google spreadsheet to keep track of each weeks sprints as well as storing a list of features that still needed to be tackled, but we didn’t delve too deeply into user stories, bug backlog, or time estimates.  We could have used time estimates, and bug backlogs, but I don’t think the programming team would have kept them updated (I had to fuss them about not marking their tasks done several times).  We were effectively able to use the agile process to adapt resources to where they were needed to accomplish our deadlines.  Scrum is still the best process for game development, as it gives you enough structure to stay on task while also allowing you to quickly switch tasks.

Things that went well
Team dynamic
This is an extremely fun team to work on.  We quickly got over the disappointment that our games didn’t get picked and have rapidly bonded as a group.  There are no outcasts, we all get along, joke with each other and have a great time.  Everyone on the team is talented, has great ideas, and is good at what they do.
Early group brainstorming
After Heroes of Rock was picked the new team was formed and we had several early discussions on what direction the game should head in.  The game was originally pitched as a platformer that you play with the guitar, but after several discussions we decided this wasn’t a good idea.  If we were going to use the guitar controller we felt as though the input wasn’t precise enough for a platformer.  Instead we focused on what the guitar controller lends itself well too, pushing multiple buttons at the same time, strumming, and ended up with brawler that makes heavy use of combos played by the guitar.  The game we have now is much better than the original idea and the guitar is now something that makes the game cool rather than making it interesting but clunky.  We have run into several obstacles during our project where we don’t know what direction to head in, but we are always able to have a quick discussion and figure it out.
Allowing Democracy without over-scoping
I mentioned in the previous point that we have great group discussion where we come up with a lot of ideas.  This is a great asset when making a game, but can also be a hindrance if the creativity is not kept in check.  It is easy to keep coming up with ideas, but if you put the foot down eventually or you will never get your game out of the door.  On our team we all come up ideas, but we also know when to let them go.  We just met the other day to re-scope our game based on what we had accomplished this semester, and ended up cutting 2 more worlds and 4 enemy character types.  That was a lot to cut, but I was one of the least painful cutting processes I have ever been through.  We all know at a group what the core game, and were easily able creatively swap around the remaining ideas and make them work without the items that had been cut.
Splitting up programming projects
Being the lead for this project I had a couple of goals in mind.  I had worked on several previous projects where people hadn’t contributed, and as a lead it was my job to make sure it didn’t happen on this project.  From personal experience, I know for a fact people work harder and longer if they are working on something they are passionate about.  My goal when dividing up programming tasks was to give people stuff they wanted to work on leaving the undesirable stuff for myself.  This way rather than chasing down and keeping 3 programmers on task, I would just have to keep myself on task (in theory).  I feel like this worked remarkably well, Scott was able to work on the rendering stuff and his engine, Christian seemed to enjoy working on the level editor so he got to stay on that for most of the sprints, and Shandice likes programming front end items, so she was given the task of implementing the GUI and combo system.  I rarely had to chase down programmers (after a few initial slaps on the wrist for not committing their code on time) and after a few weeks I was able to get an idea of how much they could get done in a sprint and was assigning tasks accordingly.

Things that went poorly
Design ideas/communication
Our biggest problem by far, was our communication breakdown somewhere in the design process.  Between AJ (team lead), Jake (Designer), and myself there was instances of confusion.  We would have programming deadlines of features, and I wouldn’t know what the final verdict on the feature, that is I wasn’t sure how the feature was supposed to work in some cases.  This may just be me remembering things wrong, or the design not being final, but it was an issue we had several times.  The easy fix is to put up a document so that we can see in writing what the feature is going to be so the programmers know how to implement it.  So far we have been lucky and it hasn’t cost us, but it is something that left unchecked could come back to haunt us.
Not getting a playable early enough
One thing that hurt us for our Alpha Presentation was that we had finally gotten all of the components together just 3 days earlier.  I am not going to say it was because x wasn’t done with y which delayed us, because that isn’t true.  We had all the pieces were complete, and we had all the mechanics working on the original prototype level, but yet the game was never played.  This could be several reasons behind this: there was a communication breakdown (people didn’t know it was playable), we only had one laptop that could use the guitar, or maybe the right people never played it.  Regardless, we didn’t have enough time to formulate a concise description of what was happening, what still needed to be done, where we were taking it, etc.
Alpha Presentation
To be blunt our presentation of our alpha was a completely disaster.  Due to the aforementioned late playable and issues with design communication several of the people had different ideas of what the game was and where it would be going.  The presentation was two days before it was scheduled so we didn’t have time to discuss what our presentation would be.  To make matters worse, we had people with these conflicting ideas present together.  Our game wasn’t at a state where items were being visually represented well, so a lot needed to be described.  This is where we ran into problems because people were describing it differently and saying we had features or plans that we didn’t have (I was sick and didn’t have enough of a voice to talk about the features we had done).  Luckily Isaac was able to pull aside some people and explain the points that the others had missed saving our presentation.  What we did learn is that we shouldn’t let certain people present, at least not without a script of what they are supposed to say.
Reviewing Code
This one was a personal shortfall.  I was busy this semester, and the thing I didn’t take the time to do on the project was to review other programmer’s code.  This led to an instance where code wasn’t done as desired, and needs to be redone.  I was able to go through a large portion of the code during the final sprint, so we know what needs to be fixed (and people have been assigned these portions to complete over the break).  I am definitely putting a priority on this for next semester to make sure everything goes smoother.
Hardware problems
Our hardware threw us several curveballs this semester, but we have been able to push through them.  Three people, including myself, had their laptop die at some point during the semester, causing us to lose a half sprint worth of work while we waited for fixes/new laptops to arrive.  Unfortunately, it isn’t looking like our laptops have finished giving us problems, because now Christian’s old laptop doesn’t have enough memory available to compile the project (due to the number of art resources).  Hopefully he can upgrade the amount of RAM he has or remove some software (I have seen his desktop, he has a lot of programs installed).  However, laptops haven’t been the only hardware causing headaches; our game is meant to be played with a guitar controller, yet the ‘plug and play’ for the wired guitars doesn’t work on Windows 7.  We can get them to work on Aj’s new Window 8 computer, and Christian’s old Vista computer (I am pretty sure he is the only CS student who still uses Vista), yet we can only get wireless guitars to work on Windows 7.  Because Activision ran the Guitar Hero franchise into the ground and killed it, guitars are no longer being produced, meaning that they are retailing at prices than none of us are willing to spend.  The laptop problems are something that we can’t prevent, but the guitar is a fixable problem.  As of writing this, won’t be a problem next semester because went ahead and purchased one for the group.  Now instead of being forced to crowd around one computer to see the game we should be able to pass the guitar around and everyone can play it on their own computer.

Conclusion
We made some good progress this semester and worked out a lot of the kinks.  We still have plenty of stuff to do, but I am sure with the talent on this team that we will have no problem making our deadlines.  It has been a blast so far, and I can’t wait for next semester to see the game fully realized.

Sunday, December 2, 2012

ALPHA!!!

Our Alpha is due on Thursday, meaning that we are wrapping up our last pre-Alpha sprint.  After a 6 and a half hour group crunch/meeting on Saturday we finally got all the components put in the game together and it is actually fun.  We have a few minor features left to complete, but we are essentially done.  This means that in the last 6 weeks we have a vertical slice of all our features from Animations to a mock Main Menu.  It was a little tighter than I wanted it to be, and we took to long to get a playable game, but it.

On a personal note, this week I was able to get all the code in for the Ranged Enemy allowing him to shoot missiles at the player that explode on impact (with a smoke trail and explosion particle effect of course).  I also was able to fix some bugs in the Attack System, and made it so that the player respawns at the beginning of the level when they die (previously the game just crashed).

Next thing we know our game will be published (if only it was that easy).

Monday, November 26, 2012

on the Xbox

Kind of a short update this week (things are a little hectic as it is the last week of school) but a great update nonetheless.  We were finally able to get the dreamspark + xbox accounts working and Scott got our game playing on his xbox.  It looks great and we are getting great frames.  In other news we are also looking really good for our alpha cutoff, I got the particle FX system in the engine (needs small tweaks) I also have all of the code for our ranged missile shooting enemy, I just need to tie it all together.  Alpha, here we come.

Monday, November 19, 2012

A huge success

What a productive week.  I got our AI working now, rather than floating through the air our small enemies now run at the player and jump at them to attack.  No damage is being done yet, but since Shandice will be done with the attacking and health system tomorrow that will be put in next week.  In addition, I also worked on a particle FX engine.  It is looking very nice, and I will probably be putting out a how to guide next week after the thanksgiving chaos is over and I have a little more time.

Tuesday, November 13, 2012

A Rough week

So the goal of our sprint this week was for the level editor to be in a working state so that Jake could start using it.  My job was to get enemy spawns triggering and to have a basic AI system (so that we could see enemies running at the player).  I had a little bit of success, and a little bit of failure.  After having a lengthy back and forth with Scott over how to implement spawns, I threw out the code I had and was able to come up with a triggering system that allows us to spawn x number of actors at a set frequency.  It needs some optimization as I was experiencing some frame drops on my computer when the first actor was created, but it is a start.  AI is still a work in progress, I haven't dug into the physics engine enough yet so I took some preliminary stabs at implementations.  I was able to get moving enemies, but was having issues with gravity no longer being applied.  Unfortunately at this point my laptop that I am developing on decided that it wanted to die.  The time it took to compile, run, and load the level jumped from ~45 seconds to ~5 minutes.  I continued to try to chug away on it (since I was staying up for the nexus 4 release anyway, which I didn't even get :( ) but after another couple hours it was completely unbearable.

Status for this sprint: Close, but no cigar.

Monday, November 5, 2012

Halfway Update

On Thursday we will be at roughly the halfway milestone for our Alpha, and we still have a lot to do.  When you look at the list it is quite daunting (Particle FX and AI among other things), but the list needs to be taken with a grain of salt.  Many of the features left are much smaller features than massive level editor we have been working on so far.  When you think of Artificial Intelligence, you think of complicated difficult code, but since we are only moving in two dimensions (think Mario  and have separate combat and platforming sections it will be a much simpler system than a full 3D AI.  We also talked with the designers last Thursday and came up with a solution to the music system that takes a lot of pressure off of us, but makes the level design a little more time consuming (not much though).  Furthermore, several of the other items only need to be basic for our alpha in December.  So while it does look grim if you look at the percentage of tasks done, what really needs to be looked at is the percentage of work done, and on that front we are in much better shape.

Tuesday, October 30, 2012

Running a little behind

Well, we have officially completed our first sprint.  Everybody did great work, but we may still be a little behind.  We got a new feature requested (triggers for events/spawning) for the level editor last week and went straight to work on it.  However, we got this request right before the weekend break so we didn't get much time to talk about implementation.  This could be an issue because there are certain aspects of the games(spawning, music, etc.) that haven't been defined yet that the trigger needs to tie into.  So, if we decide to take a different approach the code may need to be redone and we will be slightly behind schedule.  We will need to slightly restructure our second sprint to make up for this.  Other than that, it was a good first sprint and we are making good progress.

Monday, October 22, 2012

Learning from previous mistakes and Scrum


Every time you start a new project, it is a good opportunity to look back on your previous projects and figure out what went well and what didn't. This is my third project as Lead Engineer, so I have a couple of previous experiences to reflect on.

The first project I was lead on was a game called Fat Knight, it was a great little base defense/hack and slash mixture that was worked on in a 6 man team. We didn't use scrum software but we kept and organized list of tasks that needed to be done. In addition, we also kept a reasonable scope throughout the project, cutting when need be. The final project, while not having all the features we wanted originally was polished, fun, and something I am proud of.

The second project that I was lead on was called National Photographic. This game was supposed to be an educational game created as if we were a client for National Geographic. The concept of the game was free roaming Pokemon Snap. You would travel to an area (in our case Yellowstone) and would wander throughout the environment trying to take pictures of animals and learn about photography and animals at the same time. We even had National Geographic interested in coming to see the game, but the final product was nowhere near good enough for us have National Geographic come look at it.

On this project we had a 9 man team to start (with 2 extra artists coming on at the end), with enough talent to actually make a good game, but it went wrong along the way. The project was over scoped from the start, and with something as ambitious as our original idea, we needed to be really organized (but we weren't). I am not here to blame the other leads, but to learn from what I did wrong to make sure it doesn't happen again.

I started off with the right ideas, I created a scrum spent 4 hours populating it with what needed to be done from an engineering standpoint, invited my team members, and even put in some example tasks that the art lead could start with when he started using it. Things were going great for the first week, the engineers were all marking the tasks they were working on and when the finished them, but by the second week nobody was using it anymore, at which point I made a couple of mistakes. The first that rather than forcing people to use the scrum tools I asked if they were interested in using it, to which they replied no. I should have said we were going to use the software regardless, but I really didn't like how time consuming it was (free software is unintuitive at times) so I put it up to a vote. So the scrum software was out and I made my second big mistake, rather than keeping my own physical copy of tasks and progress I just kept it in my head. In hindsight, I should have kept my own spreadsheet of tasks, it doesn't take as long as setting up the tasks in the scrum software we were using, but it still would give me an estimate on how much still needs to be done.

This early mistakes hurt us later on in the project, because we had no list of what needed to be done and what had been done, it was hard from a management standpoint to make sure everyone was moving at the correct speed. It is easy to make the argument that people weren't getting their jobs done so that is why our finished project wasn't that good, but the reality is that it was my job to make sure people were getting them done, and I did a not so great job on that front.

Now that I have made myself look like a horrible leader, lets look at options to make sure both yours and my future projects go along without as many bumps along the way. I am going to talk about Scrum for agile development. If you look up on scrum on Wikipedia it says, “Scrum is an iterative and incremental method for managing software projects and product or application development.” Scrum tools allow you to create tasks (user stories) of a given priority with an estimated time till completion. At the beginning of your sprint (A short period of development time ranging from 1 – 4 weeks), you pick unaccomplished tasks and assign them to people on your team. You are able to use the previously mentioned time estimate and priority to make sure everyone has reasonable goals and that you are working on the most important features first. Recently scrum tools and agile development have caught on and now there are hundreds of software suites that you can spend a decent chunk of change on. These suites provide a lot of nice tools, that on a indie or student project, you will most likely not use, so don't spend the money. Burn down graphs and all the fancy stuff are nice, but when you boil it down the really helpful parts of scrum tools are:
-A list of what still needs to be done for the project (tasks).
-How much time it will take to complete each task.
-Who is working on which part.
-The priority of the task.

There are a lot of free ways to do this: a google spreadsheet, a whiteboard, sticky notes, etc.  Even if you are the only person working on the project I suggest you do some kind of task list. The reality is that you can't keep everything that needs to be done in your head, and if you are working with a team that can't see the list in your head. When people get done with their job early and want to work on something else you want them working on something that helps you make your current deadline, not working on a main menu you don't need for another year. Another thing that the prioritized list helps with is scoping/cutting. Cutting from your project is always a somber moment, but it will happen with most every project. If you have a prioritized list it become easy to figure out what features are not integral to the game and cut those. Even more important is that if you are cutting items that are of lower priority, and you have properly assigned tasks, you may be able to cut items that haven't been worked on yet. The only thing that sucks more than cutting a cool feature, is being the person who has been working on that cool feature for several weeks (I know, I have been on both sides).

When your working on a project you need to be organized from the start. The longer you wait the more difficult it becomes to get back on track (believe me). I know populating the list isn't as fun as programming, but in the long run the time you spend organizing will make for a better finished product than getting the AI system done 30 minutes earlier.

Sunday, October 14, 2012

All Aboard, next stop awesomeness

So it is Fall Break, which is why this blog post is a little later than it normally is.  However, that doesn't mean we have stopped working.  Our new team has been together a week and already we have changed the game drastically.  It was pitched as a music infused platformer (see BIT.TRIP runner), but we have decided that we want the game to be more combat based.  There are a couple of reasons for this, the first is that we felt that it would be more fun to rock out through combat than through platforming.  The second is that the guitar controller isn't precise enough to make a non frustrating platformer experience.

At the same time, we are still in the first couple stages of the project in terms of art and code.  Artists are hard at work concepting characters, and the engineers are still reading through the massive code base that Scott had from the prototype (the man is a machine).  This was a slow week, but it will be picking soon.  Get ready for more news in the near future.

Sunday, October 7, 2012

The next step

The adventure game didn't make it past the panel, so the new hot project that I am working on is called 'Heroes of Rock'.  Currently we are still trying to figure out what we want the game to be.  We know that the core concept is a game that involves music that you play with your guitar, but other than that a lot still needs to be decided.  The previous team prototyped it as a platformer, but we are playing around with some other genre ideas as well.  

The other major decision that needs to be made is what music we want to use.  That is do we want to generate our own original tracks that go with the levels we create, or do we want someone to be able to plug in their own music and play.  There are pluses and minuses to both options, in fact they actually correlate with each other.  If we come up with our own music we can correlate them with our level design and make some beautiful set pieces.  The downside is that the replay value will be low because we have to create both a level and a song and tie them together; furthermore, we want to do different genres so the art style changes every level as well.  On the other side of the coin if we have the player generate the tracks with their own music the replay value is only limited by the number of songs the player has.  However, the down side to this is that the art can't be as distinct as we discussed before.  The set pieces can't be as amazing, and the art style can't tie in to the music as closely as if we picked the genres ourselves.  A cool balance in my opinion would be if we generated the levels based on the song and were also able to identify the genre.  We could then apply different skins and such to the levels and characters to match the genre.  For example if a rap song is picked all the characters get chainz, but if a country song was picked they all the characters get overalls and cowboy hats.  Its a pipe dream, because it would be extremely difficult to define the genres, especially considering how rapidly they are becoming similar to one another.

I have wanted to work on a music infused game for a couple of years now, ever since I played Audiosurf, but since then the idea has really caught on fire.  It has been a while since I have played most of these games so I thought it would be a good time to replay my favorites and see if there are any new games using music as a mechanic.


BIT.TRIP RUNNER


We actually talked about an auto running platformer on Thursday where the player would play the guitar to jump,attack,etc.  But, I don't want to be the game that is bit.trip with guitars so I think that idea would need to be changed heavily to make it more unique.
Gameplay: The music syncing with the level is done so well.  The music is all upbeat and fun.
Art: Fun, colorful retro style graphics that go very well with the chiptune music.
Final thoughts: If we are going to make a game of any genre where the level flow is based on music that we compose this is the high standard that we will be held against.

Audiosurf


You can't talk about music based gameplay without bringing up Audiosurf, this was the game that got the mechanic going.  Even though it came out in 2008, it still has the best gameplay generated as generated by a players music.
Gameplay: The game mechanic is so simple, collect blocks of the correct color.  Any one can understand it, but it is something that is easy to generate based on music provided to the engine.  The track generation is so good (once again the high mark to aim for if we do something similar).
Art:  Generic futuristic sci fi Tron like graphics, they look good, but more importantly they aren't highly stylized so they don't look wildly out of place with some genres.  The difficulty we will have is that as soon as you add characters it becomes hard to make them generic enough for all genres without making them bland.
Final thoughts: Similar to what I said for BIT.TRIP BEAT, if we go with player generated levels this will be the standard that we will be held against.

Beat Hazard 
(warning lots of flashing lights if you are stroke prone you may not want to watch)


This is game combines two music generated content with a twin stick shooter.  It is also on XBLIG and is usually around the top of the best sellers list (20 or so).
Gameplay: This took the very popular twin stick shooter genre and added gameplay generated by your music.  I don't think the levels are actually generated by the music (I am pretty sure they are just random), but they match the gameplay pace to the pace of the music extremely well.  That is when the music is playing slower enemies are less aggressive and you shoot slower.
Art: Just like with Audiosurf we see sci fi themed graphics (it is a common style for twin stick shooters), but their presentation is completely over the top with all of the insane particle effects, explosions, and strobing lights.

Retro/Grade


I have never had the opportunity to play this game because I don't have a Playstation, but I heard about it in the spring and thought it looked cool.  In case you couldn't tell by the gameplay video, Retro/Grade is a side scrolling shooter with a twist.  You play each level in reverse, rather than shooting all the enemies you have to collect the bullets that were shot to kill them as they return back to your ship.
Gameplay: This is such an interesting idea, but the bottom line is that it is essentially Guitar Hero.  I know that it is essentially Guitar Hero, but the idea is unique enough that I still want to play it.  It is all pre generated levels based on music that they had created for the game.
Art: Yet another well presented, flashy game with space graphics (standard for side scrolling shooters).  This game does the best job of having the ridiculously over the top, epic set pieces defined by the games music.


Rayman Origins


The first 4 games I went over were all indie titles, but Rayman is most definitely not, this was my favorite game that came out last year and there is a reason for it.  For all the other games that I have covered, the music defined the gameplay, but with Rayman, the gameplay defines the music.  Every little action you do layers some music onto the score, but it feels so natural that it seems almost as if it was meant for you to jump off that creature at exactly that time.  They don't actually play the sound when the action happens rather they 'predict' when the action will happen and play the sound slightly before it, which makes for a more natural event.
Gameplay: The gameplay is so smooth, everything just flows and feels right.  The controls are some of the best I have felt for a platformer, they feel tight and you never feel like the controls made you die.
Art: The art in this game is amazing, it is probably the most stylized of the games on this list and it fits the music and the humor of the game.  This was a game that had an art style that defined the music rather than the other way around.



The standards have been established for music based games.  However, if you look closely you can see that there are a lot of ideas that haven't been done with music yet.  Some of them are bad, but we just need to find that one gem to make the game great.

Saturday, September 29, 2012

Presentation time

This is it, Tuesday is the real deal.  Some will survive, others will have their dreams crushed.  My team is trying the best we can to make sure we make it forward.  We learned a lot from Thursday's first attempt at the pitch.

Positives:
+We had great length on our presentation.
+The live demo was with commentary, was at least in my opinion, leaps and bounds better than watching a video because we can control the pacing (I am biased though cause I present that portion).


Negatives:
-We didn't have our names on our power point or one page.
-We didn't have enough personality in the presentation, we are selling a humorous game, so we need to show that we have a good sense of humor.
-We need to have our razer and actually talk about it.
-Plug in the controller earlier, so we don't have to wait for drivers to install.
-Come up with the keywords we want to use when describing the art and gameplay.
-End with gameplay, don't go back to slides.


Most of these negatives are easy corrections, a couple lines of typing here, some reordering there and they are complete.  We are going to solve the other few problems tomorrow.  By Tuesday we should be a well oiled pitching machine.

If we do things right we should be able to make it.  I feel that we have one of the most complete demos (we have a simple concept so it was easy to polish), but at the same time we have one of the harder games to sell (point and click is a niche genre).  We have a great idea of what we want to do, but only 2 (maybe 3) games get to move forward, so wish me luck.

Saturday, September 22, 2012

That gameplay video I promised

Well here it is, I will be doing a better capture next time I go in to school because I hate the watermark.  At the same time though I don't want to spend 35 dollars for a program that I will only use once (pirating is bad).

We still have to do a couple of minor things such as changing the controls (I am picky and would rather press a face button than a shoulder button), but other than that we are done.  Now onto the pitch!!



Friday, September 21, 2012

A lame excuse for a blog post

Well, after convincing Google that this isn't a spam blog I am back up and running.  Unfortunately I don't have anything all to interesting to talk about for this week.  We are finishing up the last couple of touches on our prototype.  This means that I am just placing in the placeholder graphics as I receive them and bug testing, which is not all that interesting of a topic.

I will update this blog again once I have recorded a video of our prototype (Saturday or Sunday).

See you then.

Wednesday, September 12, 2012

A new control scheme, a new issue


Since we are creating a point and click game for consoles, the controls will clearly be different because there is no mouse with which the player can point and click.  This leaves us will a couple of different control scheme options.  Most of the existing point and click games on the XBLA marketplace replace the mouse controls with the thumbstick.  That is the thumbstick controls a cursor on screen that you use to interact with the game.  The control schemes work, but it feels sluggish and unintuitive, so instead of using the standard control scheme we decided to create our own.  In our game the player moves with the left stick and can cycle between the interactable objects in the room by using the right stick.  This not only feels better, but also gets rid of one of the major flaws in Point and Clicks, pixel hunting (having to click every pixel on the screen hunting for the area you need to click to complete the puzzle). 
However, we also have added a problem to our game, how to represent which object is selected.  When using a cursor this isn’t necessary, as whatever object your cursor is over is the object you will interact with, but in our game there is no cursor.  We will display the name of the currently selected object, but it would be bad game design if we forced the player to match the name with the graphic.  We then have 2 obvious solutions; either we change the graphic on screen to represent which graphic is selected, or we place an indication next to the graphic (such as an arrow, or actually drawing the name of the object above the graphic).  I think that the best option would be to draw the interaction text directly over the object, but the issue is that it becomes difficult to distinguish when objects are extremely close.  Therefore, from a game play standpoint the best solution is to have a graphical change to represent the selected object (we could also combine this with displaying the text over the object).
When dealing with graphics you have to take both prettiness and user friendliness into account.  Artists work hard on their assets so we don’t simply want to apply an ugly effect that covers their work, but at the same time we need to make a noticeable enough change that the user’s attention will be drawn to the desired object.  I eventually decided on applying an outline to the graphic to represent the selected object.  So if I take an object that looks like this (sorry I am a bad artist):



It would look like this when selected:



We are using XNA for our project, and unfortunately there is no easy (read built in) way to add a border to the image.  After some thinking I came up with a solution where we use the shader to calculate the edges of the texture we want to outline, and draw an outline in post processing.  This is the solution I decided to go with (although I admit that I didn’t do purely the outline to save a little bit of work, it is just the prototype anyway).  This can be done in a few simple steps.  First we render the scene drawing on the selected object with the rest of the scene being transparent.  We then save this rendering as a texture and pass it to our shader.  The shader post process is called for each pixel.  Given our pixel we know that if our alpha is none zero that we are part of the texture and hence not part of edge.  Otherwise, we could be part of the edge.  If we check all of our neighbor pixels and one of them is part of the texture (has an alpha value greater than 0) we have be part of the edge (either the outer or an inner edge).  If we change our color to be the desired edge color we get a result that looks like this:



Ideally I would like to eliminate the inner edge, but the result is acceptable, especially for a prototype.  Overall, I am happy with the implementation because it works for any image, and I can change the color and the thickness of the outline at any point.

Tuesday, September 4, 2012

A new adventure: the point and click


Well, the bad news is that my game idea didn't get picked, but the good news is that I get work on a prototype for another genre of games that I love, the Adventure Game (Point and Click) genre. However, it is not all sunshine and rainbows, in my personal opinion there are some deep problems with the adventure games of today.

The adventure game genre has been around for a long time. It was once a very popular genre (in the 90's), but has since fell by the wayside and has become a niche genre. While Double Fine was able to raise some 3.4 million dollars via Kickstarter to make a new adventure game, that does not mean the genre is in anyway mainstream. Rather, it had more to do with the fact that Ron Gilbert and Tim Schafer, two of the fathers of the genre, were going to be creating the new game. While I do love adventure games, I have not been playing them for long, so that gives me more of a fresh view on what the genre does well and what it does poorly.

Most of the people who play adventure games today are the same people who were playing them in the 90's. While the number of gamers has grown at a rapid pace since the 90's, the point and click genre hasn't attracted a large percentage of these new gamers. I have been gaming since 1998 (at the end of the adventure games), but I never really got into them because I was a console only gamer until 3 years ago. Only then did I get into adventure games, in fact, only because Sam and Max: The Devil's Playhouse offered a promotional hat that I could wear in Team Fortress 2. I immediately enjoyed the game, being a huge comedy nerd, the humor stood out and sold the genre for me. Coming from being a mostly FPS gamer, the characters, plot, and dialog were so much more fun and compelling than anything I had experienced before. But I quickly noticed some problems.

Not to be an ego maniac, but I would list myself as an intelligent human being. Never before in a game had I found myself completely stumped, but in a point and click game this happened almost immediately. I don't mind having a hard problem to solve, I know what I need to do, and if I play for long enough I know I can figure it out. But, in adventure games, I frequently find that this happens, but it is usually because I have no idea what I am supposed to be doing. For example, in Secret of Monkey Island, why would I ever think to step on a board 3 times to scare off a bird so that I can pick up a herring to give to a troll. I never would, and without a walk through I would have never figured it out. I know how good it feels to figure out a difficult problem, but it adventure games it is all to often a feeling of relief, rather than a rush of joy. While I am trying to figure out this strange ordering of events I spend an hour walking from one side of the town to the other, because my character only moves at a snail pace and there is no fast travel.

When you compact these two elements together it can become obvious why many players trying adventure games for the first time find them either frustrating or boring. It is easy to identify a problem, but the difficulty is coming up with a solution. The second problem, long travel times, is easy to solve; either add a fast travel, or allow players to run rather than just walk. This seems simple, but it makes the game much less grating when you realize that you missed an item and you will have to walk to the other side of town. Action games can keep the tempo up by throwing enemies at you on your backtracking path, but once you run out of dialog in an adventure game there is nothing to do but watch your character walk slowly across the screen.

Unfortunately, the other problem is a little more difficult to solve. We want to allow beginners to be able to progress at a reasonable pace, but the same time though we want experienced adventure gamers to be able to play the game without hints. Drawing from the limited number of adventure games that I have played, in only one game have I had a general idea of what I needed to be doing at all times. In Sam and Max: The Devil's Playhouse there was a mechanic that allowed you to see into the future. In the future sequence you would see the last second or two of the solution to the puzzle in the area. For instance, you would see that a monkey teleports off the edge of a roof and falls to the street knocking him out. This mechanic did not tell you how to solve the puzzle, rather it gave you a vague idea of what the outcome needed to be. You still had to solve all of the puzzles by using your own intuition, but at least you would have a general idea of what you needed to be doing (which is much better than wandering aimlessly).

My solution, is a little more scalable. We have decided that our main character will have a small pet companion (like a hamster or something). My thoughts are that we could use the hamster to indicate hints based on the hint level. If user wants to play with no hints, the hamster will not do anything. However, if they want to play at the highest hint level, then the hamster will direct the user by standing next to the door they should enter, or making motions to signify the use of a certain object. This could easily be scaled to any value in between as the user desires. Furthermore, the hamster hint level could be scaled dynamically based on the amount of time that has passed without the user making progress towards solving the next level. Meaning, the experienced point and click players could go through the game without ever seeing a hint, but those who are new to the genre will receive more hints. Then everyone would be able to complete the game without the use of a guide, and without wandering aimlessly for the better part of an hour.

In conclusion, point and click adventure games are amazing experiences that I wish more people played and enjoyed. However, I believe that for this to happen some innovation needs to be done to ease players into the experience. Recently, more gamers have expressed the desire to play games that have more depth in terms of story and characters. The best adventure games of times pasts contain plots, characters, and locations that are leaps and bounds ahead of any shooter that I have ever played. These games have the atmosphere to impress gamers, but the mechanics need to improve enough to not scare the new gamers off.

Monday, September 3, 2012

Venturing into shaders

This post retells my venture into creating a simple shader, it is not a step by step tutorial on how to write a shader (maybe another time).

Shaders allow you to make beautiful games, allowing special effects such as depth of field and bloom.  I like making pretty games, but I have always used other people's shaders rather than writing my own.  The internet it a great code base to get familiarized with the concepts of the code and find some simple code that people have already written.  However, at some point you either have a bigger problem than someone has written code for on Stack Exchange, or you just want to learn how to write the code yourself.

Today I fit into category B, and so I waded out into the new world of shaders.  For the game I pitched last week it is essential that the game can filter out colors (make certain colors white) until a certain point in the game.  Last week I modified a stock shader to make sure I could get the RGB value of a pixel and selectively show it.  However, the shader was in no way robust and only worked for very specific values of red, green, and blue.  I determined, that the minimum requirement for my shader would be the ability to filter out 10 distinct colors (red, green, blue, yellow, orange, pink, purple, brown, black, and gray) whenever I so desired.  It is a much simpler problem than say depth of field shader, but it was a starting point nonetheless.

As is common when one starts coding I brainstormed to come up with a couple of different implementation methods.  However, not knowing what a shader would allow me to do in terms of data structures, I decided that to start I would use a simple color range to calculate which color I had.  Because my elementary school had art projects I am able to visually distinguish between the desired colors*.  However, I can't tell you off the top of my head what RGB value equates to a dark shade of cyan.  So doing what most would do in this situation, rather than blindly guessing I opened up photoshop to get some reference values to start with.

I quickly realized that using the RGB value was a horrible idea, but it seemed to me that the HSB (Hue, Saturation, Brilliance) value was much more consistently grouped.  I don't really use HSB values often so I went logged onto the Internet to see how a HSB value relates to a RGB value.  To my rejoice I found that a color's hue defines it location color wheel that contains red, yellow, green, cyan, blue, and purple.  The color wheel already defined values for 5 of my desired colors, so I decided that this would be an easy first implementation.  XNA color structs don't provide hue values, so all it took was one more quick search and I was off.

Once I got the equations coded up, I was excited because I thought all I had to tweak the ranges to yield orange and pink (black and grey are easy because they are the lack of brilliance and saturation).  Unfortunately I was wrong, I ran into the first road block of the day, the color brown.  By that, I don't mean that it was a roadblock that caused some tricky coding, rather it was a roadblock in that it took a long time to define what brown is.  It ranges between so many values that you can't do a simple if statement as a catch all.  However, I come to you as a proud man, in a spite of genius I was able to defined the mysterious brown and define its muddy qualities exposing it to the world**.  At this point I stumbled upon a much, much bigger problem.

When you write a shader in XNA you are allotted a maximum number of arithmetic instructions that you are allowed to apply to every pixel.  The keyword being instructions (not operators), meaning however many instructions you have after the compiler runs threw your program reorganizing your code as it pleases.  In other words, it becomes extremely difficult to make a few simple changes in your code base to cut down on the instruction count (removing some operations does nothing, adding one operation adds 10 instructions, etc.)  While I could just specify that it should compile under a system that allowed me to use more instructions, what is the fun in that (Read: it didn't work on my GPU without me writing a vertex shader).

After much toiling, I was able to get all of my code to work with one expection, I haven't been able to sneak in the cutoff for brown.  This means I am able to draw just brown, but I can't draw yellow without the brownish yellow values.  While I don't like leaving incomplete code I had to throw in the towel for today and work on some other items.  I will leave the preliminary results (minus some threshold tweaking and fixing the aforementioned issue) below, but don't worry, I will be back with better results in the future (sooner if my game idea gets picked).

Results:
Full Picture:


Picture showing only certain colors (clockwise from top left: red, purple, blue, brown):







*Elementary school isn't my highest education level, I was making a joke.
**It wasn't that hard, I am being melodramatic.

Tuesday, August 28, 2012

Brainstorming a game concept (for a student project)


In my opinion, the creative process is one of the most exciting aspects of working on games. Coming up with a good game concept is not only vital for sales, but picking a fun concept also leads to a fun project to work on.  When it became time for me to come up with a game concept for my senior project, there was a couple of things I had to keep in mind:

1. I am a student, and I will be working on this project with other students. This means, that while we do not have to worry about funding, we will have to work around other time commitments.
2. This is a school project, meaning the team will be made up of about 10 people and we have a definitive deadline of when the project is due (no pushing back the release date).
Noting, both of those items I had an idea of what my scope could be.

Scope is one of the most important aspects when brainstorming new ideas, and is particularly relevant in this situation.  I have always wanted to make a Lacrosse game, but I realize that my team won't have the man hours or experience required to do the game justice.  While EA is able to release a new Madden every year, they have hundreds of experienced staff members working 40+ hours a week to get the job done.  On a student/indie project, you just don't have the manpower to make something of that scale. Therefore, you probably need to cut back on the size of the project.  Although you don't want to make the scope too small and end up with something simple and boring.

Enough talk, what did you do already:

I knew that I was going to have to pitch my own game idea for a couple of months now, but was having a hard time coming up with something I liked.  I tried brainstorming by saying what if I combine the mechanic from game ‘Y’, with the controls from game ‘Z’, and use an art style similar to game ‘X’. This generated several interesting ideas, but never amounted to anything more than 2 or 3 games mashed together.  They would have been fun games, but I didn't want to create the game that was labeled as 'Minecraft with guns' (this is an example, not an idea I had).

So I gave up on waiting for inspiration, and instead forced myself to come up with a game idea.  I decided to brainstorm using a free writing like approach.  If you have never heard of free writing, it is the act of sitting down and writing continuously about random items until you come up with something that you think sounds interesting.  Once you have written down a few interesting items, you can flesh them out and see if any of them are decent ideas.  In other words, I picked a genre and started writing down things that aren't common game mechanics in the genre.

Finally I settled on a puzzle platformer in which the player paints the world to reach the finish.  I knew that using paint had been done in a couple of major releases, most notably 'Jet Set Radio', 'Portal 2' (and the Digipen project the mechanic was taken from), and 'De Blob'.  But the concept intrigued me, and I wanted to see if I could come up with some modifications that separated the project from the previously released titles.  After another 30 minutes or so I decided that I had changed it enough to call the game my own, and I know it will continue to morph if it gets picked by the class.

Did I come up with a brand new concept?  Not quite, but I feel that it is unique enough to call my own.  There are millions of possible game ideas, and I am happy with what I chose.


*Note: I purposely left a couple of the ideas I had out of this blog post. Am I paranoid thinking that people are snooping college student's blogs for new game concepts? Probably.