Saturday, June 11, 2011

Getting more interesting

As all so often there's a lot of things on my todo and i can't manage to focus on getting one thing done before starting the next, thus i am jumping around a lot of different construction sites.

So what i'm going to show you today is something i worked on a few weeks ago.
Behold inverse kinematics walking animation:



There are still a bunch of issues, like the elbows being all over the place, and the legs crossing at some points when turning around, but it works fairly stable

This prototype is pretty simple in itself as it only works on a flat surface yet. Eventually the model should be able to climb stairs and slopes similar to how a person would to it.

So why am i doing this?
Obviously because it's pretty darn cool. The other point is having realistic animations which are adjusting to the environment, without the need to have the animator design a bunch of animations for specific cases.
Another reason is the immersive aspect (as much as this word is misused nowadays, i think it fits at this point): Nothing tips me more off in game as terrible animations, starting at simple things like syncronising the movespeed with the walking animation cycle, or a simple waving the hand to interact with objects, instead of grabbing the doorknob to open the door for instance. It just looks like a poor puppetplay.

I realize that in the past it was not easily possible to implement it any differently due to performance restrictions and some other barriers. But we arrived at a time where graphics will only improve slightly, so to increase the realism(for lack of a better word) in games we need to focus on things other than the polygon count. Many studios realized that already and came up with a bunch of nifty features, such as Assassins Creed's climbing and user interaction animations, or LA Noire's captured facial and body animation.

This is currently a work in progress proof of concept. This attempt holds a lot of mathematical barriers to me, implementing restrictions for joints, finding the correct pathes to move for the limbs, reacting to outside forces and a bunch of more stuff. So i take this as an iterative process. I will improve it step by step to get a good approximation of what i have in mind eventually.

Friday, May 27, 2011

Not a changelog

No updates last week or this? Whats the matter, getting lazy?

Well, not lazy, but having different priorities. On the weekend two weeks ago i sat down with a friend, who is a concept artist, and knows a fair deal about game design, to discuss some game concept issues. The outcome was, that i had to get rid of my current concept, as is, for several reasons. One being over-ambitious (as always), and another one being the heavy competition in that genre.

So i sat down for a few days and thought about what i can come up with for an entertaining concept, and i think i got a pretty decent idea. There is not a lot of details worked out yet, but i could imagine it being quite fun to play.

Another thing that happened was Terraria. It is a cute little 8bit inspired platform game that takes off where minecraft is stuck currently.
In my experience, Minecraft was a fun game, but it was very very repetitive. Exploration was interesting, until you've seen any biome, or gathered each resource. Caves were all grey in grey, leaving you with an eyesore after a while, and all you got from it was a handful of diamonds to build another pick that would enable you to explore(or dig) even more caves. I really enjoyed playing it, but it got so boring that eventually i don't even consider playing it at this point.
This is where Terraria comes in. Despite it being in 2d, it adds a lot of depths to the gameplay. There is more exploring, less mindless digging, better rewards, more enemies, more ways to navigate through the map. And frigging bosses.
To be fair, after i found most of the items, and crafted the stuff i was interested in trying out, i put the game aside, but it still has some potential to replay. I think, i will wait for some updates, and try me some multiplayer.

Oh yeah, also we decided to make another demo for the evoke 2011 demo party in cologne, germany in mid August. So that's what i am actually working on currently. Can't show anything yet, because secret! You'll have to be patient and watch it on the bigscreen on the party, or afterwards on pouet. That means i can test the engine a little further, but i won't have as much time to work on a game concept, or prototype. I have to see how i will arrange my priorities, or rather see, how well we'll progress with the demo, and adjust the schedule accordingly.

Friday, May 13, 2011

Changelog 003

I mostly finished the work necessary for porting to OpenGL >3.
The model class got rewritten to use VBO's instead of immediate mode, and the imported collada vertices were changed to fit into the VBO's vertex structure. In retrospect, it was a straight forward process, even though there were some minor hiccups. There is still much to do, converting the actual existing code that is still using deprecated functions, but the worst part is done.

After mog mentioned he wants to code a 2d rotating ribbon effect, i thought about how i would realise it and today i was playing around with the shader realtime editor and built that oldschool 2d ribbon/twister effect, which is common in older demos.


I ended up playing around with the same code in the shadertoy and it ended up in a textured more dynamically moving twister thing (paste to the default Deform shader code and hit the compile button (or Alt-Enter)). You might need to manually enable WebGL in your FireFox about:config or use Chrome.

Friday, May 6, 2011

Changelog 002

This week i started out improving the shader editor, so it becomes actually useful. It still lacks some kind of selection of what shader currently is being edited, but i added some visual enhancements like fading the top and bottom code lines, adding a line counter, and error handling and parsing the errorlog to highlight the lines which makes the compilation fail.

Failed compilation with highlight on the errornous code line
Further i added tangent calculation from the texture coordinates for normal mapping and texture mapping on the sphere primitive.

Is this normal?!

Once upon a time in a galaxy far far away
In case you're wondering, theres a julia fractal being animated in the corners.

The rest of the week i was trying to port the engine to the OpenGL 3.3 core specs which includes uploading the modelview and projection matrices, and the actual vertex data to the shader, and stop using immediate mode ( i will miss it! ) for the sake of using Vertex Buffer Objects.

So hopefully i will be done porting most of the code by next week so i can focus on the fun stuff again.

Friday, April 29, 2011

Changelog 001

This was a quite successful week. I've learned a lot of things and started implementing them aswell.

The first thing i worked on was finally getting the per pixel lighting shader to work, which i did after numerous talks with several developers both on gamedev.net and irc. Eventually, all that was left to do was transforming the lights position by the camera matrix, so everything is in the same view space, and can be lit accordingly.

Failed lighting
Successful lighting
Currently it is only using diffuse lighting. Adding ambient and specular would be easy but it is not necessary right now, as for now i just like to tinker around with shaders and to get a better understanding of how to work with them.

Another thing i wanted to get done for month is model loading, and thus i started coding a collada importer. For now it is crudely hacked together, and it only supports triangulated models and no quads or other polygons. It took a couple of hours but eventually i got it working pretty good.

Quick and dirty model made in blender

I added another shader for texturing which includes the lightingcode from before and ..wow.. shaders really are awesome to work with!

Lastly, i want to give some credits to iq of rgba for writing this awesome shader live editor.
Something like this would really increase the workflow, and instead of alt-tabbing and recompiling all the time you just hit a button and see the results. So this encouraged me to remake this idea and write my own shader live editor. It took just a few hours, but for now it is more of a proof of concept. The editing capabilities are crude, but at least it is working!


I will keep working on it to make it a useful and fun tool eventually.

Friday, April 22, 2011

Jitter physics

I thought it finally is time to implement some physics into my game engine.

Physics usually require a tedious amount of work and you probably need a degree in computer science and math to implement them nice and smoothly. Because i have neither, i was looking for the alternatives.
There are a handful of libraries available for C# which seem to work quite well.
JigLibX and BulletX are both implemented for Microsoft XNA, so it would require some rewriting, which wouldn't be so bad since they are both opensource.
There is however Jitter Physics which works tremendously well for me. Implementing it and getting it to work was an hours effort. It comes with samples for XNA, XBox360 and Windows Phone. The XNA sample is just that though. Jitter Physics is in no way tied to XNA like the other libraries mentioned. So it could be seamlessly implemented in my engine. It comes with the zlib license which means you can do virtually anything with it. But you should be nice and mention that you're using it. That's the least you could do!

One thing i will have to adjust would be changing the vector and matrix classes to use my own, because they currently need conversion every time. I'm curious how much of a performance gain that will bring.


Hell, thats an ugly box!
Oh yeah, since i haven't mentioned anything about the engine yet; it is in development for around 9 month in my spare time. It is realized in C# using OpenGL rendering through OpenTK.
Currently i am still working on a lot of base features rather than gameplay, even though i have some prototypes i will show off some other time.

The humble bundle

If you're a gamer, you should buy the humble bundle.
If you donate money for charity, you should buy the humble bundle.
If you like to spend money, you should buy the humble bundle.

You can pay as little as 20cent or as much as $$$ to get Trine, Shadowgrounds, Shadowgrounds:Survivor and two more games. They cost around $50 when you buy them in the store, so go for it and grab 'em while they're still hot! The offer is available for another 4 days.