Thursday, May 31, 2012

Day 18: Triple Nothing

Totally unrelated to game dev, but I've been making diagrams for my mum. So it's still nothing, but with a neat picture.

Tuesday, May 29, 2012

Day 17: Nothing

Nothing to report today. I know I could just not write anything but eh, at least I'll have a day to day track of what I've been doing I guess.

Monday, May 28, 2012

Day 16: Nothing

I am pursuing other projects at the moment. No progress relative to any previous work here.

Sunday, May 27, 2012

Day 15: Git Woes

So the project I'm working on has decided to use Git for it's source control solution.

I was like, alright, it's cool I guess, I've never tried Git, but I've worked with Tortoise SVN and Dropbox, maybe it'll be as simple and friendly to use as those?

Nope, the more I read the more it seams that it wants to be a console only application where you have to explicitly type everything to get anything done. Yes, there is a GUI version, but all the main tutorials totally ignore it and focus solely on using the console version.

<begin entitled rant> Man it's 2012 already, what's with using console applications to do stuff, it's not very user friendly and just creates a barrier to entry because people have to actually dig through docs to figure out how to accomplish simple tasks instead of experimenting in a GUI environment.</end rant>

Alright, off to figure out how to get a simple text file to commit to the damn online repository.

Saturday, May 26, 2012

Day 14: Reading up on A*

Well I've worked on implementing the A* algorithm back when I was in high school, in the Turing language, but  it didn't end up working. So here I am, looking into A* again, hopefully 5 years the wiser.

Guess I can put up my implementation of it up later, if it works, and if it ain't a terrible pos. Anyways off to do more reading, figuring out both A* and now how to use Github too.

Friday, May 25, 2012

Day 13: What am I doing again?

So not much coding progress.

I should be working on something, probably the character controller that makes the avatar walk from one node to another, or any specified node. I don't know what I'm doing, but hey thanks Wikipedia and Dijkstra's algorithm - I should be able to get something that works if I can concentrate. Put it together with the animation stuff and hopefully it'll all play nice together.

I'd like to think that if I knew what I was doing, I'd be done by now.

One thing at a time, but there is just so many things to do.

Thursday, May 24, 2012

Day 12: First Patch Job

Well basically I blew all of yesterday playing Beyond Good & Evil, but I did talk with the animator about some issues that came up about the animations because of late changes in the design.

Basically because the original specifications never included facial animations, the rig maker never included any sort of facial controls in the animation rigs. So now that the design calls for some eye blinking and minor facial expressions the rig must be redone in order to properly animate it. This complicates a lot of things because if the animation rig is changed, then the models will no longer be able to share animations between versions. Basically every animation would have to be redone in order to get the same effect.

So in order to skip the large amount of misery that it would bring to everyone involved (redoing every animation, me having to reexport/import every animation, and blowing a bunch more weeks doing this) I suggested that the animator only use the new rig for animations that call for facial expressions, and then they would be used in the game as a special case that would replace the regular model with the newer model & rig. This loses compatibility and creates some duplication, and if more animations need facial expressions then it becomes less and less worth it, but for now it'll be the quickest way to get things done.

As for me, I figure I'll get back to making the animation controller which I think will probably just be an extension / wrapper for the regular animation component. After that I think I'm back to the art side of things -> exporting and importing the apartment models.

Wednesday, May 23, 2012

Day 11: Animation Controller Design

Alright, it's time to design the real animation & character controller classes now that the testing version of the animation controller is sufficiently done and out of the way. Since I don't know what exactly I am developing and any unknown functionality that will need incorporating I think it'd be a good exercise to go over the intended uses of such a controller here before starting to code. 

For an animation controller for basically a 3D point and click adventure game it should probably have:
  • The controller has to have a public method for switching animations, probably by name, or checking a list of all the animations available to that character.
  • The controller should be able to recognize what the character is doing, moving or standing still.
  • It should be able to fade the screen when it needs to for certain animations or clothing changes.
  • It should be able to add or remove props that are used for specific animations. 
  • It should be able to tell if an animation is part of a set and then transition automatically; crossfading when the animation is part of the same set, fading the screen when it is not.

Tuesday, May 22, 2012

Day 10: Animation Switcher

Got more coding done. Squashed all the bugs / missing features / incompetence issues I mentioned back in Day 8. Although the code I have written has grown into a monster of spaghetti code.

The editor interface allows a lot more control for how the animations are played and transitioned with , but it takes a lot to setup properly.

Pictured is the interface, but it doesn't have every animation setup since that would be a pain while I'm testing new features. Anyways tomorrow forecast is more tweaking, setting things up, and then recording a video of it all in action.

Monday, May 21, 2012

Day 9: Nothing new

Well today was a day where our family got together, and as a result nothing got done.

Sunday, May 20, 2012

Day 8: Back to coding


Well it took a week but now I'm back to coding, working on a throwaway testing system for animation control. Doesn't work right now, but I'm hoping to get it working with a video of it in action by tomorrow. Right now I'm having troubles getting Animation Clips to assign during runtime so I'll be doing some research on that. GUI is up, but not the meshes.


EDIT: Alright got it working, but there is some issues that'll have to be fixed.
- Wife animations aren't full set and need to be reexported, le sigh, in order to use the same skeleton so that animations are not cloths specific.
- There is a bug with the swimming animations that flip the rotation axis, to fix just switch the cloth set to reset the axis.
- Animations that use props, eating, gym exercises, etc, need to be added in during run time and synced.
- No support for screen fades if desired instead of crossfading animations, which I must admit looks better than I expected it to.

Saturday, May 19, 2012

Friday, May 18, 2012

Day 6: Almost Done Exports/ Imports

Importing the character assets is finally coming to a close. I was able to get rid of the namespace renaming that prevented different clothes versions from using the animations from another clothe set, so any clothe set can use any animation for that character. I also started tweaking the character materials, adding a skin shader for skin since regular diffuse shaders don't light skin properly. Also figured out what was going on with that war paint on the wife's face. As it turns out when exporting the UV u channel got flipped so what I was seeing was upside down eyebrows, a quick flip of the texture solved that and its looking a lot better. The wife character has more quality and work put into it from what I've experienced. 5 different materials just for the eyeball, while on the guy it's on the same texture sheet as the rest of the skin.

By tomorrow I should be able to totally wrap up the export / import process as well as mop up some bugs and figure out how to add in props that are manipulated through the animation via script.

Thursday, May 17, 2012

Day 5: Refinements to the Import process

 Well it should be able to interpolate between animations but I'm betting some will look really odd. 
Working with other people's meshes often brings a lot of "what where they thinking?" moments, see: polygon density on those boots, no texture for the white jacket dress thing, the interior of the jacket does not have any polygons and is not double sided so it doesn't render anything, the body doesn't exist under the clothes - which would be fine if there was polygons closing off the clothes as mentioned right before. And then I curse my own lack of knowledge of rigging in Maya, because if I knew how, I could modify the mesh myself and then re rig it and be happy. 
Now for some good news, bad news.

Good news! I figured out how to save only animations to file and get them to import and automatically link to the reference mesh. This cuts out huge amounts of lag in the editor and keeps the file size down as the files are now 2mb instead of 10mb per file.

The bad news is that to reap the benefits of this I have to go over all the animations and re export them, again. And Maya is a dick program - want to rename the namespace in this file so that it matches every other animation file? NOPE you don't get to do that, deletes the desired namespace automatically. How about creating a new namespace using the desired name? NOPE have fun shitting through bad documentation and not a single GUI method to create a namespace.  Developers: Oh hey lets throw in a shitty feature that arbitrarily decides which namespaces are valid or not to piss off that one guy trying to figure how match them between files. 

The only way I got through that doozy was to import the file with mismatched namespaces into a file with proper namespaces and then renaming decided it was ok to work.

Next time : Endless asset exporting!

Wednesday, May 16, 2012

Day 4: Dropped Game Dev now into Imports and Exports

More animation exporting, the process is not instantaneous as it has to bake animation down to the .fbx file. It is slow and boring. I have not even finished exporting all the animations at the time of this writing, and haven't gotten to testing them inside the Unity engine either.

I could be writing the animation control system code while the exporting runs in the background, wait why am I not doing that. Ah I'm an idiot...

Tuesday, May 15, 2012

Day 3: More Animations

Well I thought I was done importing animations, but I just got a package with more animations to put in game. Most of it is just the same animations, but with the character wearing different seasonal clothes. Didn't get anything done on the animation control system, but I should probably work out all the details before starting to code anything.

What I'm thinking of doing for testing is just a little app with two drop down menus, one for choosing a character set, and one for the animations in the set. When the animation is changed to one that uses a unique prop, or has no animated transition then the screen will fade to black, the model and animation will switch, and then the screen will fade back. Otherwise the animation will just tween between the old and the new. So what I need is a list of character sets, with the relevant animations that each have their own transition and prop flags.

Taking some advice from John Carmack and his post about Functional Programming I'm trying to follow the techniques outlined there. I think packaging the state data( character set name, animation name, uses fade flag) in a struct and passing it to a handler behavior is the best I can manage right now. The handler can then create the new components and remove the old ones instead of modifying their pointers. The handler would also call the start to fade if needed and then listen for when it would be appropriate to do the switching.

Well it'll be a busy tomorrow, since this was all just a fancy way of saying I got nothing done today.

Monday, May 14, 2012

Day 2: Finished Importing

So  I'm done importing all the character animations, now just to put together the switching and animation control system.
 Although it is tempting to be sidetracked into editing the textures:


War paint and a blank icy glare, perfect for a young newly wed couple.
Hmmm, well I'll get back to it when I get the time, or better ask the artist to tweak, although I'm not sure if the files I get back would be better or worse.

Sunday, May 13, 2012

Day 1: More animations in game

Well aside from Mother's day stuff I didn't get much done. Did manage to finish up importing all the animations for the Husband character though. Only the Wife and the Doctor left. The Doc has only one anim, but there is some duplication of meshes in it's file that I'm trying to remove before being satisfied. I'm going to get started on the Wife as of now, and finish up tomorrow.
Most of the husband animations - when it doesn't need an extra prop, like a bowl or workout machine, I can tell a model to use another model's animation and it'll work. So no need for model switching for some animations, only for ones with new clothes or props. I hope to put together a little scene with a GUI that tests the switching along with proper screen fades synced to the swap.

Saturday, May 12, 2012

Day 0: Starting Up

This is an effort to discipline myself by making the process of developing a game more accountable and transparent. I shall strive for daily updates that show progress made on the game I am currently developing. The game has been in development for a few months now, and development often slips. Although we have no formal deadlines, this cannot go on. Arbitrarily I hope to be done with this in two months time.
Today I started importing our character animation files into the Unity game engine. Each animation for each character (3 characters in total) was given to me in a separate Maya file. A problem I ran into was that the animator had changed the name of the objects in the scene for some files by adding a prefix on every single bone and mesh. When imported into Unity, the base mesh would not play these animations because the prefix caused a name mismatch. Maya provides a tool for finding and replacing strings in object names, but this failed to function as intended so I had to search for a third party script. Odd that such an expensive software lacks a function that simple notepad provides. The script I found, written by Rod Green, is excellent, along with his entire blog: Maya Renaming Objects Script. With that solved I can move onto the next inevitable headache.