Thursday, August 29, 2013

Back to School, Back to Vinyl

Summer passed in a flash, and while I was unable to work on Vinyl while doing my internship at EA, the game has come a very long way from when I last worked on it.  The track generation code I wrote with Sherly after the end of last semester is still being used to generate each song's track.  Cody has set up a lot of code to analyze and track data from the song so we know when and what to spawn based off of the music.  We have most of the core gameplay set up and working, now we just need to refine the fun and tune everything.

Today I jumped right into the code and fixed the two of the largest bugs that had been plaguing the game for a while.  The first was an issue with the track where the half pipe would be created incorrectly with a roof on top of it. Initially it would seem like an issue with the track generation code, but it only happened on certain songs and not all of them.  Additionally, while travelling through this makeshift tunnel the camera would freak out for a split second, which didn't match up with the mesh having a problem.  Because of all this my initial suspicion was a problem with the spline data that we use to generate the mesh, and not the actual mesh itself.  After digging into the code a bit this turned out to be exactly what was wrong and it was an easy fix to adjust the spline.

The second bug was a larger issue, where after starting up the game it would soft lock.  We knew that this was happening because Unity and PD were failing to connect.  Unity was listening for the connection from PD, but the signal was being requested before PD had finished loading up.  To fix this I made it so that instead of sending one signal we send several attempts if we fail in addition to giving a timeout to the connection attempt so there's a window we're sending the signal in instead of a split second.  Now in the case of it failing, which has gone from almost always to never so far, the game won't soft lock although it will play incorrectly.  The next step is to take care of that fail case in some manner.

Here's the updated look of the game:

Friday, April 26, 2013

Semester End

The end of the semester has arrived and Vinyl is pretty much still in Prototype.  It's come a long way since the industry panel and we've changed a TON about the game, but we're not anywhere close to Alpha.  We're going to be working over the summer, starting completely fresh, to get the game up and running.  We've already set up our first sprint and we've assigned tasks, although only myself, Cody, and Sherly are programming.  The three others are unable to work on the game immediately for various reasons.

I'll admit to not being overly pleased about this whole setup, not for myself, but for the other engineers.  If they're unable to contribute much over the summer, they're going to come back to a game they haven't worked on or contributed much to and that doesn't seem terribly fair to them.  Of course, we're kind of forced into this at the same time since we have to have an alpha version of the game working by the start of next semester.  i just really hope everyone is able to contribute in a way that they're happy with by the end of the summer.  I personally am implementing the obstacles the player deals with since I'm familiar with that code as well as working with Sherly to generate the mesh of the pipe (as opposed to using a pre-made one like we did in the prototype.)  I'm particularly interested in this last task as it's been something I've wanted to work on since the start of the project and because it relates to code I've worked on previously (making a 3D reconstruction from data points.)

Aside from all of this, I'm also not terribly thrilled with the direction the game has moved in since the industry panel.  I'm not saying the game should have been locked where we had it, and I fully support changing and modifying the game, but I feel we're moving in the wrong direction.  A large reason for this, I feel, was our nebulous design and lack of a solid, defining razor for the game.  Because of this, stuff starting being cut or added to the game and it was hard to tell if it fit or not since everyone had a different idea of what the game was.  For me, Vinyl is all about the integration of game and music and NOT a game that just has music thrown into it.  Because of this, the heavy sports game genre influence that emerged really didn't feel right.  Parts of it, such as changing movement to be momentum based as opposed to simply moving work very well, but others, such as grinding just feel tacked on.  With the removal of a score mechanic the game completely lost its game feel and entered the realm of "not a game".  I also felt we were losing a really awesome aspect of our game, that of the online leader-boards which double as a fantastic way of getting word of the game out in addition to providing people a way to compete.  If there's one thing people online like to do it's beat other faceless people on the internet.

I started to become more alarmed once SSX was introduced.  I understand and support looking at other games and seeing how they do things, but directly yanking remixing the song while grinding, a completely unique feature to SSX, is going too far in my opinion.  The questions I keep asking myself is at what point does Vinyl stop being Vinyl and become SSX in the groove of a record?  Why do I want to play Vinyl instead of SSX?  We have to be careful to not be too heavily influenced by what's already been done and actually make this OUR game.  I'm not too concerned about this, but I think it's very important to keep in mind.  I'm still not entirely sold on grinding, but I also don't expect the rest of the group to conform to my design ideals.  I also feel it can work well in the game, we just need a good reason for it to be there, and it needs to be related to the music.

Finally, I feel we're starting to disregard a lot of the feedback we got from the industry panel.  I think the biggest thing about our game that got a lot of really positive feedback was how we make the song sound like crap if you play poorly.  No other game does that and it's our USP.  Now, as the one who's spent the most time working with filters to make the song sound more awesome I fully support that, but I also think we need to keep the negative aspects and if anything have more of them.  Now that we've learned about splines in Engineering we can ensure there's always a "safe" path the player can take so it's possible to reach the end of the song without a section forcing you to mess up the song.

In the last week we've worked to solidify the design of the game and have Mike as the Lead Designer so that we have a more streamlined design as opposed to everyone just throwing stuff into the pot.  Everyone is still going to be contributing, of course, but at least there's a filter now.  I keep pressing how much we need a razor and I think we'll have one soon which should really help us.

Thursday, April 25, 2013

Graphics Write-Up #12

This was a pretty fun assignment that didn't end up being too tricky to do, but there was a bit of debugging to figure out some issues.  All of the coding itself was pretty simple, I pretty much just duplicated my DepthPass and did the same thing for my ShadowPass except from the lights view instead of the camera's.  And....  that was pretty much it.  Changing the light from a point light to a directional light was surprisingly easy and the movement ended up working identically as before except that instead of updating a position, I just update the direction (and the position is calculated from the direction).  The most challenging was setting up the WorldToLightTransform since I just copied what my WorldToViewTransform was doing.  Once I double checked with your instructions, however, D3DXMatrixLookAtLH() worked perfectly.

The fragment shader code was a little trickier to figure out since I had to make sure to sample from the right texel of the shadow map to compare against the texel of the mesh's texture (since they're in different spaces.)  Talking with Derick, Sherly, and Chris really helped with this.

The end result of this assignment is quite possibly the coolest yet.  Seeing shadows working is really awesome.

Here's what the scene looks like:


And here's the shadow map as seen in PIX:


Link to code:  http://www.eng.utah.edu/~jthummel/graphics/ThummelGraphicsAssignment12.zip

Thursday, April 18, 2013

Vinyl Large Progress

I got a lot done on Vinyl this week working with Filter effects to modify the song.  Our wall, which I added a nifty little particle effect to, now adds a chorus filter to the song so that when you hit it three more tracks of the song come on.  The result is a really nice echo effect that lasts for two seconds.  We tested this with a few various types of music, including songs with lyrics, and it pretty much always sounds good, so that's nice.

I spent a lot of time working to get a distortion effect when the player hits a static object, but had a lot of trouble with it.  The main issue is that the filter drastically increases the volume, which ends up blasting out of the speakers.  I tried various ways of dropping the volume, even cutting the output audio to .1 of it's normal volume, but nothing actually decreased the volume of the filter.  This is really unfortunate because the effect of the filter, played for a split second, is a really nice horrible sound that would function great as an obstacle. For now I've shelved this, but I'd like to get back to it in some form since the effect really does work so well.

For now, there's just a small Echo filter on the static so you get a bit of extra echoing.

Finally, I worked with a Reverb filter to play while the player is grinding on one of bJason's rails on the side of the pipe.  This ends up sounding like you've plunged underwater and lasts while you grind.  We've talked about doing a remixing effect while grinding, but I'm more in favor of us coming up with a unique sounding filter.

Thursday, April 11, 2013

Vinyl Update

I worked on Vinyl for the first time in a long while!!!

I updated the static so that on collision it no longer changes your speed or moves you.  Now instead it simply plays an audio effect.  We can make "good" static have a pleasing sound and "bad" static have an annoying sound so that the player has control of collecting or dodging the static depending on what they want to do to their song.  Good and pad are likely bad representations as we can do many various sounds (maybe even player provided?) so that the player can pick and choose which statics to hit.

Additionally I implemented a "filter wall".  Right now it's just a grey wall you can pass through, but it also activates a filter effect on the music.  After hitting the wall the filter will effect the music for 2 seconds before it turns off.  This is actually a pretty awesome new feature as it does some very interesting things with the music.  The echo effect in particular sounds very cool, although it ends up being such an overwhelming about of noise that it gets annoying.  Distortion is also very obvious, but also fairly annoying since it's just static.  high pass and low pass both sound very good though, and the chorus filter is harder to detect, but I think it was actually doing some really awesome things.

Possibly we'll be able to come up with our own filters with help from the PHD music students that can do some really interesting things.

Graphics Write-Up #10 and #11

#10

This was a very interesting and moderately challenging assignment.  Getting the depth pass up and working wasn't too bad, but figuring out all the issues that cropped up from doing so took more time.  I had a really interesting issue where slices of my spheres weren't showing up (making it look kinda like a watermelon).  Additionally, when the meshes moved half of the sphere would vanish like this (Ignore the black sphere in the middle, it's supposed to be like that):

Left:
Right:


Up:

Moving the meshes down did the same thing, but also completely removed the floor.  IN the end, this turned out to be caused because of the order I was making calls.  I was doing the Depth pass, then updating the meshes, and then doing the normal draw pass.  The striped watermelon effect was caused by the natural rotation of the spheres, and the half spheres being removed was from moving them.  Since the depth was being captured and then changed, pixels were failing the depth test and being removed.  The easy fix was to of course do the mesh update first, before anything else.

An additional change I made to make the code a bit nicer was turning the creation of Fragment and Vertex shaders into a method.  This allowed me to set up the correct shaders to use for the depth pass, and was later useful on the next assignment when I had to use more new shaders.

Here's what my Depth pass and the depth buffer of Pix look like side by side:

My depth pass:

PIX's Depth Buffer:

Here's the scene itself with the soft blending edges:


#11

This was a very easy assignment since it was so similar to the previous two.  New textures and a surface, setting them at the right place, all it really was was adding transparency to the opaque bucket.  Drawing the quads was a simple matter of going back to the first assignment and pulling the code into the current project. This was a sort enough assignment I actually ended up writing all the code without testing it and then was pleasantly surprised when everything worked just as I hoped it would.

Despite its ease, it was still a really cool assignment learning how to set up a UI.

Here's the latest version of what my scene looks like:


Code can be found here:




Monday, April 8, 2013

Three Week Update

Once again blogging fell off, and this time it was a combination of being slammed for work, traveling all over, and not really all that much happening in Projects class.

The week after Spring Break we split up tasks and talked more about what we want Vinyl to be like.  I showed the group Symphony since I'd bought and played it over Spring break.  It has several features we want to use such as using the user's library, but we all agree that it's pretty much impossible to tell how the song relates to the gameplay.  Especially on harder difficulties you're so focused on staying alive that you pretty much ignore the music completely.  This is something we HAVE to avoid.  Not much work got done this week, likely because it was just break and GDC was the week after.

As mentioned the week after that was GDC so pretty much the entire class was in San Francisco.  It was a very interesting experience, although at least for engineers, there weren't really any internship opportunities, just entry level jobs.  I think it's going to end up being much more useful next year, especially with a more expensive pass that will let me go to the talks.

The week after that our Ubisoft team went to Montreal to present the game.  It was fascinating to see all the other student games and talk with both students and game devs.  Had a really great time, even if we were cramming like crazy right until the end.

Now that the Ubisoft project is all done with we're able to completely focus on Vinyl.  We only have three more weeks until the end of the semester and at this point we don't know if the deadline negotiations have extended the Alpha date.  We have a lot of work to get done, but I'm sure we'll be able to do it.