Thursday, February 27, 2014

Dev Blog 35 - Feeling Better

Feeling better today, not 100% though been tired and wiped out all day. Today I worked on the pause sensitivity issue; although the swipe changes I implemented did reduce the sensitivity, there were still accidental pauses every so often. So I changed the pause mechanic for mobile to be 3 fingers on screen instead of swipe to pause. This should alleviate a lot of the accidental pauses, if not eliminate them.

I also changed the joystick mobile inputs, A is now jump, X is now punch, B is now pause.

Lastly, I added another tutorial billboard to explain the pause mechanic, and I tweaked the position of some billboards so they show up better on mobile.

Update: Also did some recoloring on the obstacles to differentiate them from the props; one of the most common pieces of feedback I've received is that props are mistaken for obstacles. After trying out a few different colors, nothing really looked quite right, since the black boxes fits in with the art style so well. I finally went with adding a simple red line around the edge of the obstacles, to make it pop out and differentiate it from background props. I'll see how others interpret that, if it's not enough of a change to differentiate.

Wednesday, February 26, 2014

Dev Blog 34 - Sick all day

Woke up with a stomach bug and puked this morning =( Haven't been able to sit upright until just now, 8PM. Might try to to some work later tonight, focusing on recovering well enough to get back at it tomorrow.

Tuesday, February 25, 2014

Dev Blog 33 - Level 6, Small Fixes, YouTube video

Hi there! Today I implemented the music track "nice_6" into a sixth level using the automation tools I wrote last week. I had some trouble remembering how many tools I wrote and how to use all of them, so I wrote up a step by step process (for both myself and others to use). The tools helped a lot; once I was done cutting the song in FL studio I was able to get a working level in 5 minutes flat - something that would have taken hours for a 4 minute song.

Today I also fixed some smaller issues, such as locking the game to horizontal (landscape) for mobile. The game is significantly more challenging in portrait, and the navigation menus are nearly unusable. I also worked on making the "swipe to pause" functionality less sensitive on mobile. It's becoming quite an issue, I might implement a different method to pause the game.

Lastly, Andre wanted to see one of the levels that his music was featured in. He didn't have an Android device, so he requested a YouTube video instead. I figured this would be a great time to start spreading the word about Chromacore anyways, so I recorded a video of the alpha gameplay featuring his music and posted it here! I also created social media pages for Google+, Reddit, & Facebook.

Monday, February 24, 2014

Dev Blog 32 - More automation, another level

Instead of writing a separate tool, today I added y position support to AutomaticNotePlacer.cs.
Now, for each Note, a ray is cast in the downward y direction and checks the proximity of Notes to level platforms. If the distance is above or below certain thresholds, the Note's y position is adjusted accordingly.
I thought for quite a while about what to do for Notes that aren't above any platforms. I considered checking the position of the previous Note that is above a platform and setting the position to that. I considered setting the position to some default value. I considered simply doing nothing and leaving it wherever it is. However in the end I decided that if a Note is not above any platforms and above a certain threshold, it is flagged for manual attention with Debug.LogError(), and then I'll go adjust it myself.
Today I also cut up the music track for another lever, using Andre's (/u/ioncehadsexinapool) music track "nice_6".
Lastly, I create a Google Group so that I can give specific people (such as Casper, Andre, and others) access to the alpha build on Google Play.

Sunday, February 23, 2014

Dev Blog 31 - Implementing Feedback

This weekend I spent some time implementing Casper's feedback. Now instead of teaching the player game mechanics with simple text billboards in the background, the game pauses once the player approaches each billboard, and a pinging sound players to notify the player they are being broken from the game for a moment. Once the player presses any key or input to continue, a different ping is played to let the player now they are back in control.

This does 2 things: gives players time to actually read and comprehend the text before they need to use the game mechanic, and also makes sure players actually notice the instructions in the first place.

Friday, February 21, 2014

Dev Blog 30

The meeting with my professor Casper went great today! Got some great advice on the design of the game, specifically on implementing a more effective tutorial without breaking from gameplay. He suggested that  instead of having tutorial text scroll by in background, I freeze the game at key point and show exactly what each important mechanic is and how it works, and then unfreeze the game. This is a much better method, as it doesn't break the player away from gameplay like a tutorial animation would, and isn't simple text in the background that the user might miss, ignore, or not fully comprehend in time to apply the information.

I also did a presentation for a freshman Computer Science class today - I talked about a basic overview of the CS & Game Design degree at Northeastern, as well as some details about what the degree is all about. This presentation series was intended to give freshman CS student an idea about what dual degrees are available and what they're all about from the perspective of actual students. Overall, it's part of the Major Mentor program at the CCIS that I've been participating in as a mentor for the past 2 years. There's so many students now that doing one-on-one mentoring sessions won't be as feasible in the coming years.

After this busy day I didn't get the chance to work on Chromacore much, did some quick level design work for level 5. More to come sooon!

Thursday, February 20, 2014

Dev Blog 29 - More Tools

Today I wrote 2 more tools today, one to instantiate level platforms en masse, and the other to instantiate backgrounds en masse. With 8 minute levels it would have taken several days just to copy/paste the platform and background game objects, and label them properly. Now all I have to do is tell the tools how many I want instantiated and where, and it takes care of the rest. Quite the time saver.

At this point I'll spend another day or two writing automation tools for the entirety of a level. Creating new ones from here on out should be a lot faster.

Meeting with Casper tomorrow to go over progress!

Wednesday, February 19, 2014

Dev Blog 28 - Level 5 & More Automation

After finishing cutting up Level 5's music track into 114 pick-up MP3 files, I realized that writing the timestamp file would take far too long and be error prone. I wrote a little Python script that reads the file names of the entire directory and writes them to the timestamp text file. It's nothing fancy, but yet another time-saver.

All of these automation tools are coming in quite handy for the longer 8 minute songs - will try taking a stab at a master note background assignment tool later tonight.

Update @ 11:48PM - I realized that I needed a tool to automatically instantiate Notes, since creating and naming 114 gameObjects would be tedious. I wrote a tool to do just that - it instantiates a given number of Notes only in the editor mode and assigns them to be parented by the Notes gameObject. This worked quite well, all of the other automation tools worked flawlessly with it.

Now I will need 2 more tools: one to assign Y positions to Notes based on proximity to platforms (this will likely be done by drawing a ray directly downwards in the Y direction). Another to assign notes to MasterNote gameObjects so the background color changes work properly (this will likely be done by drawing a ray directly backgrounds in the Z direction and checking the name of the background it collides with).

These will be more complex tools to write, and might chew up a lot of computational power. While it would definitely be a time saver for me, it could affect level loading times. While assigning Y directions and MasterNotes manually would be tedious, it certainly isn't difficult and might be worth it to improve the end user experience.

Tuesday, February 18, 2014

Dev Blog 27 - Automation Tool Fix!!!!!

It's currently 1:46AM - after posting this UnityAnswers thread I was planning on going to bed, but I got a very quick response from user fafase. After some comments back and forth, I was able to fix the issue with his help! It took a little over an hour, but it was completely worth it! I'm very happy this automation tool works now, it'll be a real timesaver.

Can't wait to get back to work tomorrow and utilize the tool!

Dev Blog 26 - Levels 4 & 5!

Today I cut up the background track for levels 4 & 5 and added level 4 in game - they sounds great! Level 5 took a loooong time to cut up and has yet to be added in-game (it's an 8 minute track). It'll take a while to implement in-game, but will be very worth it. I might spend some time writing automation tools to make it less tedious.

I also fixed a small issue where some of the color backgrounds in levels 3 & 4 were glitching through the black and white. For now I'm completely focusing on generating game content, more levels to come soon.

Update @ 12:58am: Took a stab at writing an automation tool to assign the mp3 files to their respective Notes - this will be a huge time saver. It isn't quite working yet, I'm getting NullReferenceExceptions out the ass. I searched StackOverflow and UnityAnswers, there were some threads that helped fix parts of the automation script's errors, but still didn't resolve the issue overall. I posted a thread on StackOverflow and on UnityAnswers, hopefully I'll get some insight from the community.

Monday, February 17, 2014

Dev Blog 25 - Song reworks, tool improvements, bug fixes

Today I discovered and fixed a bug so Note pick-up no longer interrupts punching animation. Notes placed right in front of crates were causing unneeded deaths.

Additionally I reworked the songs for Level 2 and 3; there we a lot of timing issues with the way I cut up the song. The re-cut version sounds much better timed in-game!

However after reworking the songs and re-doing the timestamps, the automatic note placement tool wasn't quite robust enough to handle the changes in-editor (they worked fine once the game was played). This proved annoying to adequately do level design. I improved the automatic note placement tool by adding a "reset button" (boolean value) to the AutomaticNotePlacer.cs script so I can easily reset the notes in the editor if needed (useful when songs are reworked or timestamps change).

Thursday, February 13, 2014

Dev Blog 24 - More stock levels!

Today I did the level design for 2 stock levels, one with my song and one with /u/ioncehadsexinapool's track titled "ALSO heard this before". I very much like how his music works with Chromacore's gameplay.

With my song, I tried implementing a section of the level where gravity was reversed. This proved much more complex than I anticipated, so I put a pin in it for now.

As of right now I'm focusing on generating game content, i.e. creating more stock levels. I will probably revisit the gravity reversal at a later time, but new game mechanics isn't something I need to worry about right now.

The working session with Ronny went okay - we didn't actually implement anything, but tried 4 methods of mp3 analysis (none of which worked). After trying to debug for a while, I handed this off to Ronny entirely so I could focus on the task at hand. Right now the 2nd gameplay mode is on the back burner for me.

Wednesday, February 12, 2014

Dev Blog 23 - ALL THE MUSIC TRACKS!

Great news! I've identified 8 tracks of /u/ioncehadsexinapool's music that would work well with Chromacore. He was nice and trusting enough to hand over the stem files for these tracks so I can implement them into the game.

This is huge. Music tracks was the one thing I was in desperate need of (I'm not great at making them myself and progress was slow). Now I will be working on implementing and designing stock levels based around these tracks.

Additionally I will have a working session with Ronny at 6pm today to implement an audio analysis algorithm, update to come later!

Tuesday, February 11, 2014

Dev Blog 22 - Double Blog!

We're back in business! Hackbeanpot was fun, but now I'm back on Chromacore. Forgot to do a blog yesterday, so here's a double whammy blog today:

I worked on another music track, one that's more mellow and slow. I spoke with Korbin about the timestamp issues I was having, and from what I described to him he thinks I'm time-stamping the song properly. I sent him the .FLP files for the song I created so he can take a look for himself.

In the meantime I've looked through /r/GameDevClassifieds for any musicians that want their work in games. There I found a cool guy with some great music tracks willing to give his songs away for free so long as I share the wealth if I make any money off of Chromacore. I'm now working with /u/ioncehadsexinapool to select some his tracks I think are suitable for Chromacore and get the stem files so I can chop them up (properly).

Ronny and I have a working session tomorrow (Wednesday) so we can jointly work on an mp3 analyses algorithm in Unity. He has one working in Java so (hopefully) this will mostly involve C# to Java translation.
I wrote some code to setup a skeleton for tomorrow's work session. The way I envision this working is LoadingScreen.cs will handle importing the mp3 file, and then invoke another script AudioAnalysis.cs that will handle all of the information gathering. Once that is done, AudioAnalysis will invoke another script LevelGeneration.cs that will handle the creation of the level based on the information passed to it by AudioAnalysis. Once completed, it will call back to LoadingScreen.cs to tell it the level is ready, and then the game will proceed to the generated level.

Saturday, February 8, 2014

Hackbeanpot!

Hacking away on a new project over the weekend, will return to Chromacore on Sunday.


Friday, February 7, 2014

Dev Blog 21 - Level Up!

Met with my professor, academic adviser, and the dean of my college to finalize the details of my independent study! Soon the credits will be officially on the books.

Today I continued working on Level 2 - I realized that the automatic note placement wasn't working properly, and discovered that the Notes List and Notes Array wasn't being sorted correctly. It was being sorted quasi-alphabetically (since that's what the built-in List.Sort() does) instead of naturally numerically.
So elements in the list were incorrectly sorted as "0, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 21, 22, 23, 24, 3, 4, 5, 6, 7" instead of simply "0, 1, 2, 3, 4, 5....etc"

After fixing this sorting issue, the Notes still sounded "off" by a little over 1 second, I think due to improper timestamp labeling. Sent a message to Korbin for some insight - he timestamped mp3 files that worked perfectly fine with my auto-placement algorithm, will see if there's a specific way of doing this (I simply timestamped based on the time shown in FL studio).

I very much like the song I created and think it lends itself to designing an interesting level, can't wait to have it working! I'm off to Hackbeanpot in an hour or so, hopefully the timestamp problem will be clarified over the weekend.

Thursday, February 6, 2014

Dev Blog 20 - Debugging

Today I once again combed through the Unity Answers and forum threads about mp3 importing for Android hoping to find something I missed or some new insight - no such luck. I added some more debugging code that might be able to tell me some more information about what isn't working properly, waiting on results.

In the meantime, I don't have any other issues to work on, but I do have the milestone goal of 5 stock levels due in 10 days, so I've begun work on additional levels for the time being.

Update: Good(ish) news! The debugging code I added actually gave me an error that helped! It threw a FileNotFoundException and listed the filename as "/ /sdcard/Downloads/burn.mp3" when it should be "file: //sdcard/Download/burn.mp3". This is quite peculiar since I had the filepath output to the debug text this entire time - this means that somewhere between when the filepath is recorded and given to WWW, it's modified or messed up in someway.

Update 2 @ 6pm: Spent all day creating a new music track and building a 2nd level. I intermittently played bug detective too, not much progress on the file path front though.

Wednesday, February 5, 2014

Dev Blog 19 - Snow Day!

Snow day! Boston is getting 6-8 inches, and it's the perfect kind for making snowballs~~~!!!! I helped introduce my friend's kitty "Frozone" to snow for the 1st time - he was very confused and cold!

Anyway, back to business - today I became suspicious of the extra forward slash that had been added in front of the file paths on Android. I had applied a fix for this earlier (by removing one of the forward slashes if on Android) and now I'm thinking that could be causing an issue related to the mp3 import problem. I'm removing my earlier fix and seeing if that changes any results or debug output.

In the meantime I'm also knocking out some more low priority issues (updating end of level credits, and increasing the file browser text another 10% or so).

Update: No visible changes from removing forward slash fix, re-applied it

Update 2 11:20PM: Using wwwData.bytes.Length.ToString(); I was able to discover that when normally imported a song would have something like 500,000 bytes, but when run on the Android has zero. This means that the song isn't even downloading properly, which could be the real source of the mp3 import issues. It may have something to do with the forward slashes, but I don't think that's the root issue. Working on discovering the real source of the problem on Android.

Tuesday, February 4, 2014

Dev Blog 18

Today I implemented a potential solution to the mp3 import problem for Android.

So the issue isn't with static vs. non-static IEnumerators, the issue is that StartCoroutine cannot be called from static functions without a script instance. The solution is to implement a Singleton Instance, which I had already implemented somewhat. I refactored the code a little bit to look more like the solution in this UA thread: http://answers.unity3d.com/questions/47513/ienumerator-solution.html

This still imports and plays mp3's on PC, waiting to test on Android now.

Update: The Singleton Instance refactoring didn't work, got same results on Android. In the meantime I increased the button size for the file browser and the text of files/folders/navigation menus on mobile platforms only, to improve usability for touch screen users. Looking for a alternate solution to the mp3 issue, but this might force us to have the 2nd gameplay mode as a PC-only feature for now.

Monday, February 3, 2014

Dev Blog 17

Had a Google Hangout call with Ronny & Sean on Saturday to discuss progress and chart a course of action. Ronny used a blog post to guide a Java implementation of a program that takes a WAV file, analyzes it, and creates a visualizer style graph, which is essentially what we need to do. This week, they'll jointly be working on a similar Unity implementation.

Today I worked on the issue with mp3 not importing properly on Android all day to no avail. It's a little difficult to debug on the Android devices since I can't simply use Unity's Debug.Log, but I have a handle on what the problem is, just not what I can do to fix it quite yet.

Just to get something completed today (and ease a little frustration) I knocked out one of the easy low priority issues - increasing font size of all GUI buttons across the board with GUI Styles.

Update 11PM: After some quick Googling I think that the issue of PlayAudioFile() not being called is related to the fact that: it's an IEnumator function being called via a static StartCoroutine() function. It seems that is a no-no. This doesn't quite explain why everything works perfectly on PC but starts to go awry on Android. Will take a closer look tomorrow and start refactoring.