Thursday, January 31, 2013

Sometimes code is so secure that I can't even access my own code...

Being trapped with security issues in the .Net framework got me stuck with no simple solution for quite many days, while trying to test the animation framework on XBOX 360 I got quite many warnings and many show stoppers, one that I couldn't figure out for almost 3 days was the confusing security implemented for classes in .Net, I know for some tools security is a must, but for a game I don't think a high level of security is needed, anyway, the content deserializer was able to properly decode all the animation and play it flawlessly in Windows but it didn't run on XBOX since I couldn't setup the same security level directly in the assembly code, so it was just telling me that the security methods that I was trying to setup didn't exists in XBOX so I couldn't set it at all, after many days of frustration found that by simple adding into each dll the following:

using System.Security;              // <-- this adds security
[assembly: SecurityTransparent]  

will clear up the dll requirements needed to be able to use reflection and call List<List<T>>
This is not rocket science nor something close to anything revolutionary, but I needed this to keep the framework simple and run it fast, finally, I was able to compile with the directives and the framework finally started to work in XBOX which really excited me. Saddly I am stuck now in another issue with the shader code which I hope to solve soon and be able to test the whole solution together. If this fits as expected I will post a video with the very smooth animations achieved with the Mystic Framework, it is not a revolutionary 3d framework since there are many, maybe hundreds or more made by tens or hundreds of people, so there is no way for a single person to compete against that, probably most people think that 3d is the future and that's where everyone is going, but I feel that there is a lot to gain also in the 2d arena using 3d technology, so I hope to make a niche new market with this solution. Rayman Origins by Ubisoft did a great step towards this direction, so I hope to achieve the same level at the Indie level, if not, well at least I tried.

Monday, January 21, 2013

The color palette of the 21st century...

Not so many years ago, previous hardware used color paletter to display colors and it was relatively easy to swap colors and create animations like rainbows, well with technology evolution it came as a thing of the past and today it is quite cumbersome and complicated to replicate the same effect, even color replacements can be quite difficult to achieve as in old generation hardware. I spent a week thinking how to achieve the same and searched everywhere for a good implementation that will have the less impact as possible, well as a matter of fact I couldn't find any code but just a bunch of ideas. Even something as simple as creating blending effects became a nightmare in a matter of days, like linear burn A+B-1 blending, can be quite complicated to achieve in modern hardware and I am still unable to perform this in a way that memory, bandwidth and speed are not compromised, since the framework has to be very fast I came up with some solutions in my mind and will post some videos soon. Sometimes I think I just only need one command to do whatever I want, but that command doesn't exists in the pipeline, or is available in the next generation hardware.

So far color replacement is working, but I haven't tested it yet in XBOX in game, for only one color, adding more colors shouldn't be that difficult but there are quite many restrictions with the technology available in XNA and pixel shaders v2 with XBOX, like the number of parameters that can be passed through the shader, so using an image to remap color palette seems to be better solutions but doing it in RGB color space seems to be pretty bad if you are using different shades of the same color, so HSV comes to the rescue, but the number of operations performed to convert each pixel to HSV can be quite taxing to the GPU of the XBOX, so hopefully I can squeeze as much juice as possible from the GPU and implement a color palette, stay tunned.

Monday, January 7, 2013

Sometimes going back to traditional animation gives better and juicy results

Finally, last weekend I found myself with lot of things to animate, now that the framework is almost ready and mostly working except for the audio module that is only half implemented. I decided to re-take again the juicy part, which is to make the eye candy and character movement so I can test if the framework works as expected.

A week ago, when talking about juicy things that make your game looks better I found Juice it or lose it video, and how to make simple things look better by adding small animations, or small things that give more feedback to the player and make the game experience a experience of the 21st century based on 20th century technology. So I decided to animate the Cat's character tail that was a static 2d sprite with springs simulation to wave it but it didn't look nice enough for me, so I tried different 3d and 2d techniques without much success, I couldn't make it look good enough given the time I wanted to spend on it, so doing it in 3d requires a lot of work modeling and animating all the vertices the way I wanted, and 2d polygons do not deform very well with a shape like a tail, so after a few tries I decided to go back to the traditional frame by frame animation, and make about a dozen frames like the picture below.

You can check the progress in this video from a very rought sketch to a clean final animation.

I am still wondering if I can make a 2d patch deformed polygon that can show 2d textures with appropiate deformation and corrected perspective in 2d, but so far I haven't been able to find a good way to do it without having to invest a lot of time and effort, given that, 2d traditional animation seems to be the right path in this case.

Monday, December 24, 2012

Happy holidays and prosperous new year!

Wish you happy holidays and Prosperous new year, it has been a very busy year with lots of new ideas to test and a lot more work than I was expecting, but finally it is given good results.

I just uploaded a simple video showing up spring vertex functionality and how secondary motion can be achieved easily and it also interacts with cloth fabric vertices at the same time. Most probably the framwork will be ready for prime time by the end of January, and expecting to develop all the juicy stuff for the game after, it was very tedious to animate and adjust parameters while programming but the new framework will make that a thing of the past.

Friday, December 14, 2012

Time to get warmer this winter...isn't it?

It was a very busy week, with many small ideas that finally paid off,  it was a long journey since I started working on the fabric simulator but finally I was able to make it work perfectly, next is  wind and gravity modifiers but hope this will take very little time to implement. Check the latest video showing the fabric simulator in real time at my channel. Don't forget to like it! if you want to get more updates on the next things I have in mind. Almost one video a week this December, a lot of things are getting done every week.

So few lines of code were needed this week to solve the worse physics issues I couldn't fix until something come up to my mind while traveling in the train. The only sad thing is that I won't be able to release Elem3ntz! game before year-end as I was hoping for, but instead I added so many new things into the animation framework but I think it will pay offs in the long term.

Sunday, December 9, 2012

Finally enabled texture atlas animation

After so many months, finally I made time to add texture atlas animation clips in the framework, took a few days to complete the user interface and cloning options but now I can easily add texture atlas sprite animation. Check the latest update in my channel

Sunday, December 2, 2012

Animation clips references

I am quite happy today, and very busy, the last few days I've been trying to figure out how to include clips from other animations that I have made to re-use them as building blocks with minor overhead. Finally I can show some of the latest changes in the framework. This weekend I was able to solve this problem, I couldn't figure out an easy way for many months until this weekend and finally an Eureka! moment came, and found a way to run multiple animation clips inside other clips as references, making a lot easier to animate, each included clip can run in infinite loops at different rates or triggered by in-game events. This seems to be a trivial issue if you program the solution for each specific animation but when running multiple ones and trying to batch everything in one mesh it becomes quite complicated to build.

Check the video in my channel

There is still one issue related to cloths and springs, whenever the frameworks runs slowly or is delayed the vertex location can go nuts and jump all the way around, it doesn't happens as long as the game runs smoothly, so I need to implement some special logic to avoid over moving those vertices, not an easy task, but have many more things that I want to finish implementing before releasing the Elem3ntz! game.