Monday, May 27, 2013

Character redesign

Last year, I finished sketching up all the characters and special attacks for the dream build play competition but due to time restrictions I really didn't have the time to think in deep about each of the characters, now that I had more time and the animation framework working I decided that is time to redesign the rest of the characters, as of today there are 4 characters in good shape, and today I will show up the 5th one and the evolution from concept to somehow a finished version.


The first image on the left side is just the very first quick draft of this character, the next one is the clean up version of the line art and that was used for the DBP2012, not quite exciting but didn't have much to draw, animate and program everything given the time I had. This weekend made a new character to replace the old one, I had an idea to use sheeps as part of the special attack, as seen in the middle as a hat, but made me feel sleepy, so changed the hood drawing to a fish type, a little bit more agressive.


The color placeholder can be seen above on the left, and I just designed a few color palettes in the animation editor as seen on the right side, I like the second one a lot. So after finishing coloring this version, all the animations will be drafted by hand and hopefully I will have this character running in game by end of this week. So 3 more characters to go until all the main characters are ready for the final game, plus some more monsters.

Sunday, May 12, 2013

Time flies, past, present and future...looking back what I've done...

It is almost 2 years and 7 months since I started playing with XNA framework, and even if it is no longer supported by Microsoft I am still using it since I can easily migrate it to MonoXNA or do something else with it. The first year I wrote my first game, which is still unfinished but I was able to submit a demo of it to the DBP2011 with little less than a year and a half of experience, and proud of finishing a demo I came to know some of my limitations. So I decided to move ahead and keep the old game for a future release and move forward, so I started a more compact game and this will be released for sure. Today, I wanted to see how it all evolved during the year and a half since I started this new game, I spent most of the last 11 months making an animation framework that could do the things I wanted to do, so far it is working well, and just for fun tonight I will post some metrics.

Animation framework : 5483 lines of code
Elem3ntz game :  19853 lines of code
Shaders : 741 lines of code
Total lines for game + animation framework : 26077

Quite a lot, I didn't expect to have this much, but there is more...

Animation tool  : 29188 lines of code, used to do the nice animations previously shown in other posts.

Wow!, I wrote a total of 55265 lines of code for this game + animation tool, but 35412 lines were written only in the last 11 months!, so most of the work was made in the last year. I didn't expect it to be this big and still there is a lot to write, but I believe now that 90% of the code is already there, that makes me feel happy and I just started to see the light at the end of the tunnel.

All of this doesn't take into account all the art I've made and the new characters, long ago I posted a few pictures of the characters in-game but I really didn't like the art so much, but that was the only thing I could do given the limited time I had, now that I made a new framework things speed up a lot, and I made new art+animations, it really moved faster and faster, I still want to make some drawing tools to increase the speed of sketching but I don't have enough time to do that at this moment. I want to release my game in the next few months.

And one last metric for fun, I have +1700 png image files in this game, and counting, I will add a few hundreds more by the time I finish.

I haven't heard of this kind of metrics in any other game, but I would like to know how big some indie games can be.

In my next post I will show up some of the last changes in the framework, one of the things that I didn't like is to manage the audio manually in game for some animations, trying to sync up frame animations with audio was a little bit time consuming, so finally this weekend wrote an audio module that is linked to the animation framework so I can animate and add sound effects at the same time, this is really a time saver! The interesting thing is that I can use it also to make music, though the intention is not to make music with it!, but I noticed it can be used as a tracker, which is a plus. I may expand those capabilities in the next version after I finish the game, since I don't see a need to write music attached to animations at this stage.

Sunday, May 5, 2013

Bug of the week , funny moments...

I haven't seen any indie blog nor any other kind of blog that publish some of the most interesting bugs while developing , probably is it not so nice to show the mistakes but sometimes I think showing some of them bring some joy and fun while developing.

This time I just want to show some of those funny moments from last night, also as a plus the first bug gave me some new ideas, learning from previous mistakes one can make do better everyday. Like the following image, the garbage on the right is a wrong texture applied to another character, and when I saw that thing moving gave me an idea of a new character , I will keep it as a secret until the final draw is ready but was fun to see.


After replacing and fixing the correct texture I got this...
Well, now it looks better, a group of trolls coming, but hmm... colors and patterns are not good, I was so sleepy that it took me over half an hour to fix the issue, it was only a DXT compression setting and a key color that shouldn't be using, I usually do not compress textures since my animation framework can replace colors and it needs to have precise numbers to change them to do a palette replacement, well spent too much last night fixing trivial bugs, but finally today I got this image.
Finally! it is working as expected! and I got crushed over and over tonight while trying to win the level , those trolls are overpowered now, I am trying to balance the gameplay and have fun mixing the building blocks of the game and it takes time to balance it well, but I am pretty happy to lose over and over now, it is fun! better than the previous puzzle mode.


Saturday, May 4, 2013

Puzzle mode from scratch!

It has been almost a month since my last update, but I've been quite busy thinking and reworking this game. One of the features that I wanted to implement was the puzzle mode, in which the player will have to solve different kind of puzzles using the game tools available, at first I found very interesting idea and quickly implemented about 7 levels of it and that was part of the DBP2012 entry about 6 months ago. Then I tried to implement more levels but I did a trial test again of the old levels to see how much fun I could find on them, and I didn't find it very rewarding at all, after so many months of denial, I finally decided that this can't go live the way it is since there is no fun playing it. It is very hard to implement a challenging mode that is rewarding and fun at the same time, so I decided to redo it again and from scratch.

Now that I had more time to think about it, one thing that is rewarding is to learn how to use the tools, take advantage of those tools, and eventually the player will build more confidence and feel more and more powerful and solving a different kind of puzzles seems to be a better idea. The old system was a quick use of what you have on screen and I felt over powered all the time, I had to try to save/cover/extinguish or any othe action into the opposite board, that was a great idea until I tried it more and more, and I found it very difficult to offer a challenging puzzle since most of the tools I provided were more like "make the other player take damage and cover myself", so basically, not a good way to match and mix game components into one framework, and I found myself not looking at the opposite board at all, so I had hard time trying to play it. So having this framework in my mind, the logical solution is something similar to a tower defence game, in which you are the only barrier to defend all the innocent people behind you, and that way of thinking just made me redo all the puzzle mode. This mode is working a lot better than the previous one, so I can introduce different enemies and abilities that can challenge the player even more than the previous one, is more dynamic and entertaining, and also allows me to introduce boss levels after small quick and run small levels to unlock even more powers! , so giving all the powers at the start was not a good idea, but that allowed me to test all the functionality, and that was also a problem with the last build. I will post a video of the alpha version of the puzzle/challenge mode once I finish a couple of monsters and some other effects, but so far I just made a big leap forward this month.

Saturday, April 6, 2013

Game mechanics and juicy things...

I've spent the last 4 days play testing Elementz game trying to find out the best balance and while having fun, but after a few hours I felt that it was too slow and too tedious in some places, with matches lasting for about 6 minutes or more, i felt it dragged me too much. Also I got confused in many cases with the icons and the response of the game, I wouldn't say it is not fun to play but after playing myself alone it became clear that lot of small changes are needed to make it faster and have a better pace.

So, I had a about a year ago the great idea that a puzzle game of matching 3 is not enough, and that an evolution of the old match 3 puzzle is the next step, so why there isn't any game that allows you to upgrade each of the matching elements? that was the first idea, so Elementz is based on match or upgrade and match, so the gameplay can be more rewarding, but found that just upgrading is not enough, so I forced also the player to only be able to match 3 of the same level, but since the elements non upgraded and upgraded are very similar and the properties are the same it became confusing for me while playing, what to upgrade, how to group, and how to take advantage, this only small change in the match 3 puzzle make it very hard to play. Anyway today I just tweeked it and I am able to use any upgraded and non upgraded together and that helped save a lot of time and avoided confusion so I think a design issue is fixed, the pace got faster too and I felt I was doing more in less time. To illustrate the issue, the picture below shows two groups one inside the red area and another in blue, both are the same elements but how the player can use them vary a lot after this change, either use 3 or use 5, it doesn't looks like a big difference but when playing it makes a lot of difference when you have many different groups at the same time.



Now coming back to match 3 puzzle style, another simple idea is that usually you put 3 elements together and the game rule is that it should vanish or attack or something else, always 3 together or more and that should be the trigger, well the next idea is also simple but changed greatly the pace and gameplay, I just forced the player to choose what should be triggered, so now i can put together like 10 or 20 elements together and trigger all at the same time for greater effect. Sounds like a good idea but this also slowed the gameplay and since you can only trigger what you want to trigger it means that there is one key thing missing, "combos" that are cascaded when other elements get in groups of 3 or more, that is one of the most rewarding things to see but since I am triggering those groups manually there are no more combos to trigger. So for now, the only thing I could do from design perspective is to create a fever mode, which is triggered by the number of elements used by the player, the more elements used the more points awarded to the player and once you reach a certain limit you enter a fever mode and you get some extra benefits for about 30 seconds. But now the question I have is how to make the gameplay more strategic since I could just spam as many elements as possible without having to upgrade, and I noticed that I was playing after this change without upgrading the elements too much or not doing that at all, just spamming attacks one after another. The interesting thing that came from this experience is that even though I was spamming my AI opponent non stop, I lost to it twice, only because the AI decided that upgrade is better than spamming like I did, this was a very rewarding experience, so I think somehow there is some more strategy involved but I was not able to see it since I played this game for so many days without looking at any other thing, but losing to the AI was the most interesting thing that I had today. Just to show up the idea behind this and some animation made with the animation framework, I just posted a video in my channel.




Monday, April 1, 2013

Animation loops the hard way or is there a better way?

One thing that sometimes seems to be tedious is to make an animation to loop seamlessly without jumps, and all animation packages I saw till today do not provide a way to to do this, the reason can be obvious if you are just making straight animations, but when making games an essential component is to loop for example an idle animation and have each channel behave as expected regardless of the starting frame without having to worry about the start or end of the animation loop, anyway it can start at any frame if you are in a loop and it should look as expected.

Since I couldn't find any reasonable tool for that, I ended up doing it to simplify simple looping tasks, like moving legs, arms, etc... in loops , Check a quick test here. Nothing really revolutionary to see here, but it just broke down a tedious task to the minimum, by only having a keyframe at the beginning and one in the middle the framework takes care of compensating and returning back to the loop properly without having to do it myself manually, and one of the key issues I had for many months when trying to animate simple loops was that all loops had to start at frame 0, and put my keys after, with this solution I just end up putting keyframes at any time and the framework will close the loop without me having to adjust it to look proper. This simple logic actually made me save quite a lot of time at the end, each animation has multiple parts moving and I am not showing up at this stage what the vertex animation holds, so trying to loop seamlessly all the keys and look proper was a tedious task, for example, for one of the characters it took me about 10 hours to make it look right, only because the looping started always at frame 0, ended at the end of the animation length and have so many moving parts that it was really hard to make it look convincing. Now it can easily take me half of that just by using a free mode where loops are calculated by the framework and not by my eyes. I am still wondering why there aren't any tools like that in animation packages, probably because the target audience is not games and just movies, or perhaps I haven't search enough.


Wednesday, March 13, 2013

A bug that is so deadly that can kill you...

A short story that I wouldn't want anyone else to live. Yesterday I was creating new animations with the Mystic Framework and found a small bug that I wanted to fix, nothing  important but was related to a UI glitch of the animation editor, so I decided to put some breakpoints and find the culprid class that created that annoying glitch and suddenly Visual Studio showed an error telling me that the source code is not matching the current build, ok I said , I will stop and rebuild so I can continue debugging, soon after it stopped around 2000+ errors popped up on the screen. This doesn't looks good, anyway, I am tired now so the best way is to quit and reload, and probably no errors will show up since I haven't closed VS for the last 3 days, well after loading the application to my surprise surprise! errors were still there, and after trying to figure out what was going on, I noticed that magically nearly 1.5 megabytes of code was gone from many classes, I don't really know how is that possible but many files were affected and the code was gone, nowhere to be found, only being able to see some code that maybe I wrote about a year ago and few pieces of code here and there was there!, I went from very angry to very sad in a second of my life.

Not all is lost, luckily, I made some periodic backups, I used to have a backup utility but it stopped working long ago, but didn't care to find a new one because I wanted to keep coding, so I only did the minimum and keep doing manual backups and zip the files, saddly the most recent back was made about 15 days ago, but not all is lost, keeping a log file in another place with the tasks I made since I started allowed me to find what I did, and restoring the old files plus using some code that I was able to salvage restored maybe 98% of the missing code or even a little bit more, and I only had to spend 2 hours more verifying that the code worked with minimum patching since the code was quite fresh in my mind I could easily fix it.

Now, I am a little bit worried that this may happen again, about 4 to 5 months ago something similar happened but was not serious just a few lines of code was lost, but this time it was almost everything I worked on the in the past 6 months or maybe more, so my weekend task is going to be "find a good backup utility", I haven't been able to find yet an "incremental" backup tool with zip capabilities so I don't get my hd full of backups, I saw a few ones here and there but most of those tools just synchronize files without compression, and without scheduler, I don't need a 5 minute backup tool, just once a day is more than enough so I can backup different folders and compress the new output, if none are available , something I doubt, I may have to write one but I don't want to spend time on it since I prefer to keep doing testing and fixing some other bugs in game as well as adding more gameplay features.

The bug in VS happened on all the form files I was using, I have one main form but its code is divided into several files for readability, so at some point of time VS may have gotten confused and broke in pieces and taking my code with it. Hope this thing doesn't happen to anyone else in the future.