Tuesday, July 2, 2013

Dragon game update: additive blending, contorted transformer and slender dragon

Hello again!

This has been a pretty big week for my game.
I've refactored the rendering engine simplifying some stuff and improving performance a lot. I've also added smooth shading to my dragon model and had a fight with blender over exporting models (I had to change roll of some bones which turns out isn't as simple as I though because all animations get screwed up).

As for additions to the animation system:
  • Additive and Subtractive blending. Allows me to create an animation I can lay on top of other animations (eg: small variations when running)
  • Skeleton masking: Allows me to select which bones get affected by a node
  • Triangular mesh node blending resulting in Head rotation: Ok, this isn't completely new but I did remove it for some time when I did the animation tree refactor
I also did another small anim tree refactor meaning it is no longer a tree and more of a graph with a root node and leaf nodes. This means I can now have one source animation node being used in several other places which is really useful.


Anyway, here's the latest update video:




And here you can see what happens if you don't subtract animation from a reference pose:  
 
 


Also my dragon is apparently a transformer, here he is as a spaceship:


That's all for this week. Next week I'll be working on leg IK, adding flying animations and I'll also work a bit on the texture. I'd love to do an IK tutorial eventually since it's a topic I already got myself quite familiar with, and there are a couple of techniques that are easy to implement that you don't need to know too much math to add to your own game.
Either way if you have any questions about animation blending/trees or IK feel free to contact me either by commenting or through twitter @SpliterCbb

Cheers!

Saturday, June 22, 2013

Working on a new game

Hey!
I've been neglecting this blog for quite some time since I was thinking of moving to wordpress but without ever actually committing.

So I decided that for the time being I'll keep updating this blog with the news of the game I;m currently developing.

The end result I want is a game where the player is a dragon from the start of its life in the egg up to the end of the life. I want it to have a certain storyline but It'll be free-roaming/open world for the most part with story taking place in specific areas, one of the key focuses of the game will be the animation as I want to combine keyframed animation, IK, physics and procedural animation to have a dragon that controls great but still responds naturally to the world.

I'm developing it on my own engine since I want this to not only be a great game but I also want to learn the hard technical parts as I'm making it.

So far I have a basic resource management, a rendering system and the beginnings of a robust animation system.

Here are the video updates so far:
Update 1

Update 2
A funny bug related to my direction setting resulting in wobbling.
Update 3

Friday, December 2, 2011

New Website is Up!

Ok, so I was talking with the folks at the Ludumdare IRC the other day and they advised me to create a website to show off my stuff. And so for the last two days I've been working on it tirelessly almost every waking hour to get it up and running and I tell you: HTML, CSS and javascript are NOT nice to work with!

Also as I'm writing this I'm talking to the guys at IRC and another suggestion of theirs that I think I'll follow is first to switch from blogspot to wordpress, then register a proper domain name, and finally change my hosting. But since I've only just created it and I'm really busy right now I'll do that next week if not later.

Anyway, here's my Website:
http://catboxbeta.com

Any critiques in relation to content, design and anything at all are very welcome!

Cheers!
Spliter

Tuesday, November 29, 2011

Deferred Lighting

First a quick update on stuff that's been going on since my last post here:
-I've been let go from my old job, looking for new one.


And now back to our topic at hand.
I always like to boast that I'm a graphics programmer, that there's little that can stop me in my way and even though I actually do believe that's true I don't have much to show for that. Be it because of work and being uninspired to program back at home, or because I've spent far too long retouching my engine and in the end I end up with a lot of hidden work and nothing visible, or because I was simply too lazy/distracted.

Well, since I lost my job I decided It's time to boost my portfolio a bit, and prove to everyone and to myself that I can actually be a good graphic programmer. To accomplish this I decided to work every day on a small demo of a certain feature I never implemented before. The first one being:

Deferred Lighting.

Of course my first reaction was grabbing as much as I could from the internet in terms of research papers and tutorials. The most helpful I found are these:

Creating a GLSL Library - This was a good way to quickly sketch out a simple per-fragment lighting shader and apply it to a model lit directly. I've used this before so I simply copied most of the code

Coding Labs Deferred Rendering Tutorial - This is what I needed, though I decided to skip the tutorial and learn directly from source code since I already understood the concepts and implementation, but I didn't know which opengl functions to use.

Normally Deferred rendering requires you to use the inverse of the modelview matrix and inverse of the projection matrix to get both the pixel position from projected screen space to camera-space, and to get the lights from world space to camera space, however the tutorial used a nasty inefficient hack to get the pixels in world space without the need for transformation: it simply recorded all x, y and z inside what in normal deferred lighing program would be a single-32bit float-value gbuffer.

However with lights I did another nasty hack: instead of using the gl_LightSource[i].position in my shader I simply replaced it with an array of vec4 screen-space light positions I calculated outside using the modelview matrix from the first pass and passed to the shader.

All of this just so I didn't have to write/find and de-obscure and test and debug a matrix inverse function.

In the end I spend between 4 to 8 hours on this (how mach depends if you count the research time) over the course of 2 days.

The results?
Here:



All in all it wasn't that bad but the code ended up a horrible conglomerate mess, most of which was shoved into a single main.cpp file.

If you're interested you can download the demo with the code here:
Deferred Shading Demo

Before you look at the source please note that this is terrible code, unoptimized and originally wasn't meant for viewing by other people, if I ever did the exact same demo again there would be ZERO similarity.

Right now I'm working on another experiment, namely importing a model with animation using Assimp (which I still have to learn) and then use that data in my animation tree (similar to the one UDK has), in the end add some IK, but this experiment is much larger than the deferred shading one, so it'll take probably about a week or so before I post here again.

Thanks for your attention!
Laters!
Spliter

Sunday, August 21, 2011

Progress snippet

Hello!
Ludum Dare 21 has started yesterday. Unfortunately I'm not participating but that doesn't mean I won't be doing anything this weekend!

For the last month or two I've been working on my game engine. My little baby Litterbox has it's third rewrite from scratch ever since I've started making it. This time the key word is "Components"!

Now, components are a very, very good thing, but the classical component-based engine design has it's flaws like component communication overhead, the lack of centralized control, and many more than would normally keep me away from it. However I couldn't just go back to using the traditional deep hierarchy design as it constraints the flexibility of the engine, and many times you have to use a super-complex base-object that I really don't want to have.

So.. What's the sollution?
Hybrid

My engine architecture is a hybrid one, having always a centralized  game entity to which the components are linked. In most cases this means that I have a command center for my objects, but I can also add and new components easily. So if I have a 2D game engine where I suddenly would want one of my bosses to be fully 3D there wouldn't be a problem! I just add a lb3DModelComponent to my boss object, and handle all the special 3D code in the entity.

So far I've moved from 2D animated sprites to 3D models (with Horde3D) without any problems, and if I want a 2D game on top of my 3D game then there's absolutely no problem!

So, here's my progress so far:
-I have a fully functional Entity system with attachable components.
-2D box-based collision system (with various iterations per frame)
-2D graphic system, leftover from earlier engine testing, with support for animated sprites loaded from a sprite sheet.

My Game
I also started thinking about the game I want to make. In my earlier days as a wannabe game dev I created a small demo in gamemaker, where you controlled a fiery guy, you had a selection of fire-based weapons and you were left in a small town full of squishy pink dudes and buildings to use your abilities on.
Recently I showed it to a couple of guys at LudumDare IRC channel and the feedback they gave me really pumped me up so I decided to give that game another try.

The basic idea of the game was that you were a Poyo, a little pink dude kinda resembling a Poring from Ragnarok Online. You would then acquire special powers that would let you transform into a version wielding 1 of 3 natural elements, namely: Fire, Water and Flora.

The game setting was mostly based in a fantasy land with traces of advanced tech.

Now I'm reworking the Idea. I'm planning for keeping the feature of 3 elemental transformations, and as planned before the game would be an Action-Adventure, though I might throw in some RPG elements in there too since it seems to be a good blend considering the fantasy setting.
Anyway, here's the screenshot of how things are so far:



This also was a good excuse to go back to modelling in Blender.
Importing these models to Horde3D was a real pain in the ass as the colladaConverter crashed when converting them, but the people on Horde3D forum had a nice workaround which works good so far.

For comparison here's how the old PoyoAdventure demo looked:


That's quite a sight there in all its 2D glory, however 2D constraints when it comes to depth and having object on top of one another really threw me away from it, that's why I decided to remake this game with 3D graphics (though with the same 3/4 view). I still plan on using 2D collisions though, just to work faster and have something done in less time.

I won't finish this game but I want to have a fun to play prototype. If it's fun enough then I'll work on it more adding fully 3D collisions, proper story, and I'll invest more time into it. (Basically this version will be the proof that I can make a game, as well as a proof of concept for my engine).

I'll be working on this most of the weekend, in a few hours I should have the little pink dude walking around with a basic animation and colliding with stuff. No idea what I'll do tomorrow but lately I've found out that striding back and forth around my house, brainstorming, gave me lots of good ideas as well as will/inspirations to implement them.

Edit: For those interested, no I didn't get the animations playing. I have no idea how I export animations from blender to use in Horde. I'll ask on Horde forums but that place is pretty much a ghost town. I'm kind of starting to regret using Horde instead of Ogre3D. If I don't find anything reasonable soon I'll try making my own converter with the help of AssImp.

That's all for now!

Later!
Spliter


Monday, July 11, 2011

Going social

Yeah.
As a mean to slowly start changing my life and become more social I joined Google+ and Twitter(SpliterCbb).
My life in the last few months has been almost nothing more than wakeup-watch videos on yt/play games-sleep and it's been a bit colourless lately (especially if I compare it to my academic life before I lost everything). But as a way to keep my sanity and keep myself minimally occupied in my free time (considering I can't bloody do anything creative as I have enough of programming at work) I decided to jump onto the latest social craze.
Whoopee frikin Do.
Spliter

Wednesday, June 1, 2011

The joints are turning

Hello!
Luck is not always on our side and so the animation tutorial will be delayed a little. I do have it completely planned out though so pretty soon you'll see the first chapter. The complete tutorial will have 9 chapters ranging from vector transformations, through skinning, blending animations IK and saving.

It's the biggest such project I have got myself into so wish me luck!

The first chapter will just talk about vectors and vector transformation so those that already know this stuff can skip it without much thought.

In this chapter I will assume you've at least heard of vectors and I'll just speed through a few useful things like dot and cross products, and matrix transformations and some interesting applications, so even if you already understand vectors it'll be worth skimming though it.


Later!
Mikolaj (Spliter) Kuta

Tuesday, May 24, 2011

I'm back from the dead, and with some good news!

Hello Ludum-Dare-ians and people who randomly found this blog on Google looking for game save tutorial!

I'm back from my slumber, and what slumber it was!
I did get the job at the company I was making those challenges for, I'm even on our company's page (http://www.covii.pt/) as software developer! (though everyone knows there I'm the Senior Graphics Engineer).

Anyway, I've not been completely procrastinating! Since I've worked there for several months I've been programming everyday for almost 8 hours which shows in my code I write for my own projects. However! Even on my own hobby codefront  I did not procrastinate (not entirely anyway).

I am now announcing I'm working on a game. I'm not sure if it's gonna be commercial or not (probably not as the quality of many thing will be shit) but I'm making it with a long lived friend of mine MICL.
He's going to write the story and make music, while I program and work on graphic art.

But the point of this post is not that.

My Litterbox engine is reaching it's 4th anniversary, and so I decided to make another step and make it fully 3D!

But the point of this post is not that either!

The point of this post is:

MY ANIMATION ENGINE

So far I've created a working 2D prototype. but mainly it's a tree-based animation system, where the leaves can be either animations, physics, or anything that modifies a given skeleton. This system was larely based on UDK animation system, and because of it's tree-based structure it's possible to do the following things:

1-Dozens of working animations , only the animations connected to the tree are updated so no wastes.

2-Animation Blending, which allows for composed animations (eg: having a character with a walk animation composed of four different walk animations (eg: NSEW directions).

3-Synchronized animations! Yes, this is one of the golden jewels in the crown of my engine. This means that you can have a 1.5 second running animation blended with a 4.0 second walking animation and the transition will be seamless as long as the movement is synchronized timely as well (eg: in both animations the left foot is on the ground at 50% mark, up on the 0 and 100% mark, etc)

4-Easy to add nodes that depend on the current pose. Just pop an IK node between the root and the result of the animation and you have IK with the starting position of the animation.

5-Bone masking! Don't want your "running animation" affect the hands and torso? No problem! you just disable all the bones you don't want animated!

6-Adding new types of nodes is easy! if you just follow the node structure of the animation tree, you can add nodes or leaves that fill any necessity, from IK, Physics/conscious ragdolls to procedural or keyframed animation!

Here's an example of the tree structure I've mentioned:




So! When can you use this fantastic animation engine?
Well... that's the bad news: you can't.

At least not for now. I've made a 2D prototype that works and now In the middle of porting it to 3D.
I've got the skeleton working in 3D with quaternions using my handmade math lib. I've also got skinning working, but no texture loading and no normals so far.
here's how it looks right now:



























Not really impressive, is it?
Well, it'll change in a couple of days. I've recently (about a month ago) mailed Chriss Hecker for advice on how to keep focused even if I really don't feel like doing anything.
His advice?

"15 minutes"

Every day work for 15 minutes no matter what the mood, no matter how hard you don't want to.
If you really don't want to do anything then hey, 15 minutes is like 1/16th of your free time if not less. After that go do whatever the hell you want.

I've been following this advice for the last month, I've had occasional slips, but usually when I work I end up working far beyond those 15 minutes. (before writing this post I've been working for about 3 hours stopping occasionally to glance at a video running in the background).

So, this is my official statement:

Since Saturday I'll be making a tutorial on how to implement your own 2D or 3D tree-based animation engine with all the features I listed. And I'll be releasing this tutorials in several chapter, one chapter every 3 to 4 days.

I won't fail unless something really unexpected happens (like the second coming of Christ, or having to stay late at work for the entire weekend).

Wednesday I'll release the list of chapters of the tutorial, but I know I'll be starting explaining the basics of vector math and a bit on matrices and quaternions. In the later chapters I'll explain on how to create a working IK system, and how it'll be integrated into the animation system.

By Saturday I should also have my animation system completely working which should serve as a good proof of concept that I'm not just babbling madly.

I'm out!
Mikolaj Kuta

Friday, December 24, 2010

Covii Challenge part 2 update log: Friday

Day 5-Thursday:
Update 1(2:12):
  • The Final day! The Final Hour! The Final ... ok nvm
  • I finished the project about 15 minutes ago and sent it for review. I'm fairly confident they'll like it even though I personally would add some things like transition effects, DoF and Anti-Alias. I would probably rework my particle engine to allow particle area segmentation with which I could add some more realistic water effect to the second program (I ended up making two programs since I don't have much time and couldn't implement the transition effect).
    And Here are the screenies!
As you can see I fixed the low saturation problem!


Yeah, I know the trail doesn't look perfect, but believe me, it's not at all that noticeable  when it's running.

  • In retrospect I feel like I wasted far too much time resting, even though this project was a bit strenuous, as I must get used to working under such pressure if they are to keep me in the company for more than a few days. I also made a few rules that should help me survive and lead a healthier lifestlye when working:
  1. Sleep Early,Sleep a lot!
    8 hours of sleep a day is a must, even if it means not playing my games or watching movies before going to sleep. Sleep deprivation and lack of a standard sleep hours were one of my biggest mistakes I did during this challenge. An afternoon nap and a night's sleep is a must!
  2. Eat Healthy Food! (and longcat is long)
    As obvious as this sounds eating healthy things is actually a problem for me. Not because I don't like it, as I do enjoy a salad every once in a while, but because I don't find time to prepare proper food and resort to eating tuna or chocolate cream sandwiches all the time. I've noticed that in days I went out to eat in a restaurant I actually performed an incredible lot better than in the days I eat what basically is unhealthy garbage.
  3. A rest from programming is a rest from computerI've learned that if I work for a few long hours and then rest by playing games or watching movies, I don't actually rest as well as if I have taken a walk, it's also a lot more difficult to come back to . I still fall into the trap of playing games or browsing websites when I should leave the pc alone for an hour or two, so it's something I'll have to work on.
  4. Animation is Concentration! (but I'm programming!)Anyone who ever read Richard Williams "Animators Survival Kit" probably knows the quote "Animation is Concentration" inspired by Milt Khals' angry outburst  at Richard when he asked him if he listens to any music while working. This was Milt's response: "F-F-F-For Ch-CH-CHRIST'S S-S-S-SAKE, GG-G-GG-GODDamnit! WHAT A F-FF-F-FF SSSTUPID QUESSSTION!!! I'M NOT SMART ENOUGH TO THINK OF MORE THAN ONE THING AT A TIME!!".
    Yeah, Milt Kahl didn't listen to music while he was working and neither should you!
    Even though I'm a programmer this still holds. Music and any other sounds distract from work more than you realise and I've come to experience this first handed not only this week but along my life as well when I'm studying or working on my own projects.
    Turn off Messenger (or put it on busy and disable all notifications), close any youtube tabs you have open, close Winamp and listen to the silence.
  5. Get InspiredMy biggest problem when working is that I easily change focus, however this also comes with another trait of personality: I get inspired really easily. Every now and then I look for videos made by game "celebrities" like some of Chris Hecker's presentations where he talks about the tech they developed for Spore, or interviews with indie devs like the Wolfire team. Those videos always inspire me to work harder so one day I could achieve what those people have achieved. I also read a lot of tech presentations, especially those made by Valve. Those are also a good source of inspiration and you gain invaluable knowledge even if you can't replicate it at the moment.
  6. Keep things mixed up!
    There's one thing I'm prone to and that's fatigue. I can't work more than a few days on one thing. My solution to this problem was actually quite easy to come by: get a hobby in an area completely unrelated to programming. In my case I always liked to draw so this problem was solved by itself. Every now and then I grab Photoshop or Blender and just do something in it. Having activities spread in unrelated areas is really good for avoiding fatigue, and it even may bring advantages. I for example am more of an Game Engine fundamentals programmer, but being interested in modelling drawing and animation made me interested in graphical computing which in turn gave me this opportunity to work at CoVii!
  • I guess that's all of them. Those are the rules I set for the future. Some of them I've been following already, other will take a bit of time before I get used to them, but if I manage to follow them all I should perform my best at work and avoid procrastination while I'm home!
  • On Sunday I'll probably upload a video of the program in motion.
So, this series of updates is finally finished. I hope those of you that read it enjoyed it as well. From now on this blog is going to get a bit less active at least until Febuary which is when I'll move to a new apartement.
This was Mikolaj Kuta, AKA Spliter
Seeya!

Thursday, December 23, 2010

Covii Challenge part 2 update log: Thursday

Day 4-Thursday:
Update 1(2:49):
  • Almost  3 in the morning, I've been working for the last hour or so with brief rests to watch some youtube videos from my subscriptions. If I'm lucky Batman9502 will upload his LP videos for his Ocarina of Time and Megaman Legends 2 in less than half an hour, if not then it's off to bed  without a good-night cartoon :(
    Anyway, I digress. Here's what I've accomplished in the last hour and a half:
  1. Cubes that light up softly 
  2. When the mouse passes them not too fast and not too slow, they fly in the direction of the camera missing it by just enough not to notice any clipping.
  3. Trail effect on the cubes is finally noticeable.
  4. Added a very nice looking background that changes softly over time(only noticeable without cubes on the screen), I did this using a simple gradient background texture
  • So, not that much done but these are the new accomplishments. As usual I also fiddled with the framebuffer order and some colour and opacity, the colours look too desaturated for me in the current state; changed the bloom effect settings so it's a lot more subtle; changed the way the particles render so the final image looks softer, but at the same time allows me to illuminate the particles I need above their texture color. I also removed the specular highlight. It was far too strong even on the lowest settings, so I'll just stay with the very subtle sphere map.
  •  ANYWAY! Here's the product from few hours ago:
 Randomly Lit cubes with random rotations FTW!

  •  And here's the product from a few minutes before I started writing this entry:
 You see what I mean by too desaturated?

  • The background has a very nice color but the cubes, even though they have the same hue, are a lot more desaturated and I'm still trying to figure out why. I'll probably fiddle around with the light and the 2nd pass to add more red and blue
  • So! I'd say this part of the project is quite close to being done, all I have to add now is to make the cubes rotate when you pass over them with the mouse! Then it'll be off to the second part of the challenge where I'll have to add the same water-y effects to the particles as in the Yellow Submarine from the previous challenge and create another particle system that creates the particles near the mouse to give a similar effect to the one in the video they gave me. If I'm done in the early afternoon then I'll add some extra flavour like the screen shattering into a hundred of small cubes when changing from one effect to the other. This would be quite easy to do if I had the time since I render most of everything on Texture-bound FBOs.
  • I have one regret towards this challenge: I have to copy someone else's work. Not exactly, but since they gave me a reference I've been following it quite strongly so I don't sidetrack as I usually like to do. If I had more time I would've made some significant changes like adding Anti-Alias to the scene so it would look a lot more polished. I would've also added interesting physical effects to the particles, like visual effects like changing the hue of the scene or make the cubes actually behave "softer" using shaders (stretch them in the direction they're flying for example, and expand a bit when rotating really fast)
 Update 1(15:07):
  • I sent my (hopefully) future boss two of the screens I had here on my blog and he liked it! In fact he liked it so much that he said he wants to close the deal! I'm going there to work with them for one day and if they like me I'll be working!! I'll be part of a team that makes awesome projects and lets me get better and better at what I love to do! YEAH!
    Ekhem. Now we resume our scheduled programme:

  •  I added mouse speed dependent rotation to the cubes using cross product between the mouse current, and previous positions and the particle coordinates. Now the cubes rotate properly, if you pass the mouse over them slowly they'll rotate slowly in the direction the mouse is moving, if you pass your mouse a bit on the side it'll rotate on an angle perpendicular to the mouse movement in relation to the particle.
  • I also render the trail above the particles but with much more subtlety. This gives them the appearance of delicate semi-translucency especially when they move fast around the screen, it also helps softening the scene giving it a more...uh... ethereal(?) look?
    Here are the screenies:



  • There are still some thing I would like to try out like making a DoF effect using part of the blur shader but make the blur stronger the closer the particles get to screen, I'm not sure if I have time to do that since I still need to get working on the second part of this program which is making much smaller cubes that light up stronger the faster they go and behave like if they were in water. I would kinda prefer no to do that since I really need a good rest.
    Also I would follow my friends advice and add some anti-aliasing to the scene since it doesn't look that good on screenshots. Luckily this isn't such a problem when actually playing around with the program so most passers-by wouldn't notice any difference.
    One thing that popped up into my mind (even though unrelated to the challenge) is to make some effects using metaballs. I know it's made using the marching cubes algorithm but I'm curious how the actual mesh would be built from that.
  • I just noticed I wrote "Tuesday" instead of "Thursday" in the title.
    Whoops!

Wednesday, December 22, 2010

Covii Challenge part 2 update log: Wednesday

Day 3-Wednesday:
Update 1(2:10):
  •  Ok, I've spent three productive hours playing around with shaders, lighting, rearranging FBOs and generally playing around with everything. Here are the progress screenies:

Boring!


Basic textures, yay! Also, my eyes kinda hurt, red+blue=bad >:(


The beginnings of bloom. AUGH MY EYES!!!


MY EYES! MY EYES! MY EYES!!!


Ok, now it's not so bad, but still looks like crap.

  • As you can see I didn't do much. But only the last one is a true bloom effect. Even though it looks like crap, and isn't as strong/diluted as I would like it to be. I'm starting to get the hang of the shaders, since I've taken a nap I'll probably work another few hours before going to sleep, but I'll take a little rest now from the project.
  • Anyway, I updated my list of things to do. I also updated the list from the previous update here's the resume of what I did today:
  1. Finally Added real bloom (even though I'm not completely happy with it)
  2. 3D model particles
  3. Working quaternion rotation lib
  4. Added lighting
  5. Played around with various effects.
  • I can't say this is bad but I also would like to have made more both today and yesterday. Optimally I would have already achieved good looking bloom, added at least one of two physical particle effects and already added cube mapping. Still I'll probably achieve at least 5 out of 6 planned features by tomorrow noon so things aren't as hopeless as it seemed to me. However tomorrow is a big day since the basic functionality should be finished and I'll start making some more advanced stuff as well as fine-tunning.
 Mini-update: Disco Ball!! Well, sort of.

This calls for some awesome music:
http://www.youtube.com/watch?v=Awzrax7UcV8
Only link since youtube won't let me embed the vid :(
Watch it anyway :D

Update 2(11:44):
  • I fell asleep around 8:00, it's now 11:44. Damn cleaning ladies and their racket. Can't sleep now, I'll try to work, but probably I'll take a nap in the afternoon.
Update 3(14:55):
  • So, after some time feeling dizzy and with a minor headache from sleep deprivation I started blaying around with various effects. The current state of things looks pretty close to the video they gave me as reference. I noticed though that in the video the presentation also used DoF shader. I made some additions on my own of course, like subtle sphere mapping to give a more glossy appearance to the cubes, I also added an overlay texture which scrolls slowly enough not to be noticeable but still gives a faint effect of movement to the scene. Most probably my final work won't look as good as the original but hey! I'm competing against someone sponsored by Toyota, with quite a few years of experience in the field and I'm not that far behind!
The scrolling effect I mentioned earlier:

  • The sphere map is costing me some nasty bright seams on the chamfered edges I used to smooth the cubes, I'm not sure what to do, I'll either have to sacrifice smooth lighting or the sphere map... unless... hm... I might use the same model but with different normals for the sphere map pass, and a different one, with smoothed normals for the light pass!
  • Edit: No, I can't do that, stupid blender and its automatic normals!
  • Edit2: HAHA! being smart as I am I decided to export the cube model two times, first time with the chamfered edges but flat on the cube sides and another one with the rounded edges. Then I'll just copy the normals from the first one to the second one and voilà! I have two types of cubes :]
  • Edit3: Once again: DAMN YOU BLENDER!!! I don't want any stupid optimizations! I want the normals and vertices exactly the same always!!! AGRH. Because of this I can't have fancy sphere map.
  • Edit4: The seams are caused by the light, now I'm mad >:(
  • Edit5: Ok! Finally got rid of the nasty seams, I removed some detail from the edges and it seems to work fine now and I didn't have to sacrifice neither the sphere map nor the smooth light!
  • Also: sorry for anyone stumbling upon this blog with a 56k connection. I really do feel sorry for you.
 Update 4(23:00):
  • I ended up taking a longer rest than I wanted, it's 23:00 now and I haven't touched the program :(
    I disappointed myself quite a lot with this, especially since I haven't even slept properly yet. I hope that I can at least have a productive night, or productive morning, anything as long as I can deliver the program by tomorrow afternoon!!

Monday, December 20, 2010

Covii Challenge part 2 update log

Long story short I'll be updating this post every now and then with the development info, thoughts and screenshots.
Edit: I moved the Wednesday updates to another post since the scrolling up and down to read anything is getting ridiculous.

Day 1-Monday:
Update 1(15:32):

  • Started working on the project yesterday but only had half an hour for it because of uni projects, I added support for FBOs, it's pretty sweet, also added some basic trail effects.
  • Today I woke up at 12, that's what I get for sleeping only 4 hours yesterday, I  started working on it almost immediately. Using a bit of tutorial help I made a blur shaders, works pretty sweet, today I should also be able to add true 3D objects to my particle system (so far it only supports 2D), this also means I'll have to rewrite the existing effectors.
  • Added the blur effect to my previous FBO rendering. My first post processing shader! It looks pretty sweet and it's quite close to the final look I'm going for in terms of trails.
Here's how it looks
  •  Damn, I noticed that if you look really close you can see a little crossing on the blur, it isn't noticeable in the movement through, but I'll once I finish the project I'll have to fix that.
  • Also wasted about one and a half hour trying to make the RECTANGLE textures to work... wasted because they still didn't work even though I used someone else's code. Either FBOs don't work with NPOT textures (which I think is odd since I've read somewhere they work fine) or my graphic card doesn't support them (which would also be odd since it's on the supported extension list) 
  • When starting to work on the new particle system I realized the particle rotation need to be quaternions to avoid gimbal lock. I don't have a quaternion lib compatible with my current math lib so I'm sad because I have to make one :(
Update 2(18:33):
  • Added the quaternion support and supposedly the particle system should work with 3D objects (it still supports all the existing features so I didn't had to rewrite the 2D effectors). I'm starting to get worried I won't make it for some reason even though it's not that difficult. I've been trying to relax and stop working for a bit but having to do this project all day and then work on uni stuff all night isn't good for me. I really need this job so I can't just rest for a day or two, I want this working Wednesday midday at the latest, after that it's fine tuning and Thursday I'll probably deliver it at least to see what they want me to change. They liked the first program I made for them but if I don't get this job I'll have to go back to Poland since I don't have any money left. Yeah, I'm kind of depressed right now, it'll pass after I take a rest.
Day 2-Tuesday:
Update 1(10:21):
  • I just woke up and I'm feeling a lot better now! Yesterdays depression most probably was only because I've been working on it a lot of hours straight without doing anything else. This is something I've learned to avoid in the past since it clouds your mind and you get into an Idea loop. Normally I rest every few hours for an hour or two to watch a movie, play a game or go for a walk to completely get away from my PC and get refresh my head. The reason I didn't stop yesterday is because this challenge is letting me a bit nervous since my life depends on this and all, but I should be able to avoid making the same mistake today.
  • I made  a small list of features I want implemented until tomorrow noon. Here they are:
  1. FBOs ready to write Post Processing shaders (done)
  2. Trail Effect (done)
  3. Particle System ready for 3D with quaternion rotations (done)
  4. Bloom (almost there)
  5. Requested particle effects (quarter way there, I could use my previous effects and add 3D support for them)
  6. actual 3D modelled particles (done)
  7. background movement highlight (I'm waiting for confirmation if it's necessary, I'll probably implement it anyway if I finish ahead of schedule)
 Update 2(14:24):
  • Finally added 3D, model loading, display, lights etc.
  • I discovered there's a problem with my quaternion lib and I'll have to redo most of it (on any rotation the entire scene disappears). I'm starting to wonder if I really need quaternions or would axis-angle be enough. Still I shouldn't have that much trouble since I know I had somewhere a working quaternion lib, I just don't know where. I'll have to go into my backup folder and spend some time looking....
  • Made a screenie so you can see how it looks now:
I know the cubes don't look like much so far but at least it's something! 

Also I still have the grids I used to orient myself
  • Can you believe me I spend over an hour before I could see anything? The beginning is always the hardest part for me when I don't know where I am and my references aren't drawn, since the problem could be anywhere from badly configured viewport with farclip too close, to camera orientation, to (in this case) drawing in a FBO instead of drawing to the screen!
  • I'm gonna take a break now. I need to eat and rest, luckily I don't have any uni projects today night so I'll have a bit more time to work later. I really hope I can finish this for tomorrow noon, otherwise I would be really disappointed with myself.
  Update 3(19:39):
  • I feel sick. Headache high temp and nausea... ugh... I don't think I'll be able to finish things until tomorrow. I'll take a nap and if I feel better when I wake up then I'll continue making the program, if not I'll wait until tomorrow.
  Update 4(21:56):
  • just woke up, I feel a lot better now even though still a bit drowsy. Time to work!
  Update 5(23:17):
  • GOD. DAMN. PRECISION. ERRORS!
  • also stupid c=sin(aangle.angle*0.5); It's supposed to be cos @_@. Bot h of those have cost me over one hour of work that could have been spent making shaders or particle physics or anything at all other than rewriting my quaternion library!!

Covii Challenge part 1 and other updates

Hello!
Another blog update (yeah, I've been doing that a lot lately haven't I?).
If you've seen the video on my last post to the end you'd know I'm desperately looking for a job right now.
With extreme amount of luck I've found a job offer for the C++/OpenGL programmer!!!
The company name is CoVii from Computer Vision Interaction.
Basically they develop applications that allow interactive surfaces like an interactive wall or floor where the content responds when a person walks by.
I went to an interview there on Tuesday and apparently they liked me (either that or they pretended to like me),  but they wanted to test my skills out since my portfolio isn't that impressive as I've let the university and lack of money consume my will and time to work on my projects little by little (if I didn't have any financial trouble I would probably have made by now a graphical equivalent of Crysis).

They gave me two projects and so far I've completed one of them, it took me about 2 days. Considering I had classes during both of them and uni projects to do, I'd say I've done it pretty quickly. Maybe barely over 8 hours of coding.
Anyway, I'm rambling. Here's the video of the project in motion:
 


 


As you can see it went quite well and I'm happy with the results (and luckily so are they) but they want me to do another one. Now the next one is a bit harder not only because I have a ton of uni projects to do, as well as being chrsistmass time for which I'll go spend a day or two with my friend and his familly (with whom I've spent last years' Christmas and it was awesome), but also the seconds project covers more advanced OpenGL topics such as post processing and shader effects.
Now I've done some simple vertex and fragment shaders before, unfortunately what I've learned from them is not as much as I would need for this project (I really hope the boss isn't reading this blog right now, even though he said he's read it when he interviewed me...at least I think he's the boss, I forgot to ask him...).

What will happen in the next few days is that I'll have a couple of day long working sessions during which I'll be furiously studying the advanced OpenGL aspects. Today I've learned how to use framebuffer objects (finally! I've been meaning to learn about them for weeks but the damn uni has me doing chat programs and encryptions and stuff). FBOs are damn useful, I've managed to create trail effects without even changing any existing code nor touching shaders!
So far I've planned using cube mapping for very subtle reflections, shaders on models for stronger light effect, I'll also use shaders combined with FBOs to create post processing effects like depth of field, blur for the trails and bloom.

That's a lot of things to learn in such a full week, but considering I've done kind of similar things before, and understanding how all of this works, I'd say I have a pretty good chance of making them want me in their team!

oh... btw, I know this blog is displayed on the LudumDare through RSS, so sorry for the fellow LudumDarians that I don't make any actual game updates! I hope you're ok with life ramblings and mild programming stuff!.

I'm off!
~Mikolaj Kuta AKA Spliter

Sunday, December 5, 2010

Urban Stroll

Hello!
Just a quick blog update to show I'm not procrastinating as much as it would seem.
This time it's actually a VIDEO blog update!
sooo... yeah
Enjoy


As I mentioned I'm looking for a job so until I get hired, or at least until someone will give me a job interview I won't be able to make a tutorial. I'm also extremely busy with university projects, If I want to do anything of my own it means to stay up till 4am.

That's all for this blog post.
I'll see you next time!

Sunday, November 21, 2010

Desert Bus for Hope



Visit Desert Bus For Hope Here
Desert bus is a charity event created by LoadingReadyRun in which they play the most boring game ever created: Desert Bus.
You can see them play it live on their feed at the desertbus site by clicking on the big Live Feed Drivercam button. I really suggest you do it.
All of the donations are gonna go to the Child's Play foundation.

Monday, November 8, 2010

Small engine update

Hello!
Sorry for the complete lack of updates (in case anyone reads this blog) but I've been dead busy with real life, most notably with my university and finding money to live. But never mind that.
I have made a little upgrade in my engine, namely: it now supports polygon casting.
What is poly casting you say?
Poly casting works just like ray casting except with a poly. Basically it smears a (convex) poly along a line and looking for collisions along it, giving you the time each of them (if any) happened.
In simple terms:
Let's say you have a large 16px ball that's travelling at 200 px/frame. any wall that's in between the balls' current

position and the next one is probably gonna be missed, and so the ball will glitch through them.
frame 1:





frame 2:




Using polygon casting we can prevent that as it will detect all the walls the ball went through and also record the time at which the ball entered and exit each one of them, making this perfect for fast moving objects for which a simple ray cast wouldn't be enough for.

Frame 1:




Frame 2:




Note how in the second frame the ball didn't get past the walls since it detected the collision beforehand.

Here's a video in which I show the latest updates:
1-Webs
2-Lazer
3-little demo of a triangle being cast from the player to the mouse position
4-some bullets





When I get some free time I'll make a tutorial on ray and polygon casting, in the meantime I'll also update my engine to support an entity IO system which will allow the communication between various entities. It'll prove to be mighty useful when I want for example a door triggered by a button, or to make explosions at specific events.

Till next time!
~Spliter

Tuesday, November 2, 2010

Read this article

Eurogamer hosted the following article:
http://www.eurogamer.net/articles/2010-11-01-the-fall-of-realtime-worlds-article?page=1
I think you should read it.

It shows well that in the gaming world not everything is fun and games (no pun intended).
APB wasn't on my hype list, and after seeing some gameplay I immediately recognized it wouldn't be as fun as it first sounded, but still it was made by people who love games and wanted to make a great game, which saddens me because it turned to be their demise. Even though I wasn't impressed in the game it's still hard to believe it destroyed a company and put over a hundred people on the street without jobs.


Good luck to everyone that used to work at RTW, I hope you won't give up.

Tuesday, July 20, 2010

Results of MiniLD20: A little introspection

Warning: This blog post has a lot of introspection and very little technical things, you can skip it if you're just interested in how games are made by other people.

As strange as it sounds I actually made a game.
Well.. it can barely be called a game and I'm not proud of it in the slightest.
I have to admit the theme kind of screwed me over since I'm no good with abstract themes, but still I probably could've done better.
The "game" was a small non animated tank with a drill on it going through a series of letters that spelled "GREED" and they disappeared when it touched them. I didn't even add particle effects. After destroying all of them a big "you win" creen appeared and that's it.
It was complete and utter piece of shit that would probably make this world better if it never existed.
So... why I am blogging about it?
Well... Once I made and submitted it it occured to me that it actually works as a poof of concept for my engine. I didn't have any problems making it. The coding party took only a few minutes and while I did it in an hour, most of that time was spent chatting on Ludumdare IRC channel and watching youtube videos.
So... what does "proof of concept" mean to me? Well, I realized how easy is to add new mechanics in my engine, and I saw how all those time made my engine better and better!
Then why didn't I made more games on it?
The problem is with me getting caught in the details, and not being able to complete a project on my own. I have lots of Ideas for new gameplay mechanics and I can apply them quickly but that's about it for me. I love developing new stuff more than I like polishing it and working with it for longer periods of time. I also invent new mechanics without thinking of how they can be used in the actual game, rather than just a toy to play around with.
For example: after spending some hours programming after I've released my miniLD20 piece of crap (AKA "game" ) I made a small prototype where you controlled a kind of protozoar with to tails.
Here's a screenie:

And that was about it.
I really can't think of any interesting gameplay for it, I'm only good in adding new feature/mechanic and then letting it go without using it again.

Another new mechanic I added was kind of a gravity field, it's kind of a coming back to roots thing as I've done that already before on my old version of the engine (while it was still called El_Poho). But then I've lost my will to use it.

So... why can't I continue working on something and then eventually turn it into a game?
I have a few theories.
The main one is that I need leadership. I've noticed that when I work in teams during classes I make a very bad leader, and a very bad follower, however being the right hand mand of the leader is the perfect spot for me: I get my share of power so I can expand my creativity,but the leader is always directing my actions so I don't get sidetracked so easily. Any other position for me ends up badly. I love to be where the action is and I love challenges but it's hard for me to know what to do next.

Second reason is that I want to do new innovative stuff. But as soon as I implement the hardest part of it it stops looking so innovative for me and I get bored with it. And since I work alone on my project there's noone telling me "you need to finish doing this game/project". Although I shouldn't, I rely heavily on outside influence when I see other people stop caring about what I do I stop as well, and fall into procrastination.

There's probably a few other reaasons to my lack of finished projects but This post is already long as it is.
Sorry for making you read about myself but sometimes I need to vent my anxieties somewhere.

Later!
~Spliter

Thursday, July 15, 2010

MiniLD Commitement

Here's the log of the chat I had with the awesome people of Ludumdare IRC channel:

02:03 Spliter        ok, I'm gonna try to do something this time
02:04 Spliter        if I don't have anything at the end of miniLD I'll ....uh... what's a good compromise that's   harsh but isn't oo harsh like quitting game deving?
02:06 thedaian    hmmmm
02:06 thedaian    hard to say, really
02:06 mrfun         you have to watch the hannah montana the movie
02:06 Spliter        D:
02:07 thedaian     or any of the twilight movies
02:07 Spliter        I said something that's less harsh than quitting game dev, not something worse than going to hell!
02:07 Spliter        ok
02:07 thedaian     and then write a blog post about it with a detailed review
02:08 Spliter        It's decided, if I don't have nothing to show for after the end of miniLD I'll have to watch Hannah Montana the movie and then watch all of the released twilight movies!
02:08 TenjouUtena     You have to make your next game in Brainfuck or something.
02:08 Spliter        and then write a blog post about it
02:08 Spliter        and you're all my witnesses!
02:08 iFire            I spent like 20 minutes on circles and arrows >.<
02:08 Spliter         If I don't do none of those things you'll call me weiner-butt for the rest of my life
02:09 iFire            some people don't work under pressure
02:09 thedaian     banned from channel until the full LD!
02:09 Spliter        D:
02:09 Spliter        when is it again?
02:10 mrfun         but will you video blog about each movie dressed as a lead character?
02:10 Spliter        mrfun: no camera, and no money for corsdressing
02:10 Spliter        oh wait
02:10 Spliter        I have a camera
02:10 thedaian     mid or late august i think
02:10 Spliter        it's shitty as shit but it works
02:11 thedaian     no need to dress as a character from the movie, and no need to video blog, but some pictures of you with the movies would be good
02:11 Spliter        ok
02:11 Spliter        I'm commited then!
02:12 thedaian     make a blog post documenting this would be good
02:12 Spliter        ok!
02:12 thedaian     so there's some more proof


tldr version:
I decided to do something in this miniLD and watch Hannah Montana and all Twilight movies if I don't, I'll also have to blog about the experience and post pictures.


So yeah, I'm commited for this miniLD or I shall suffer the consequences. This blog post is the proof, the participants of the chat are the witnesses.
Wish me luck!
~Spliter

Sunday, July 11, 2010

The joy of prototyping

One of the biggest problems I face when doing tools for my game is the sheer size of it all and my general lack of experience doing usefull things (as oposed to screwing around).
The biggest challenge I'm facing right now is making a level editor that be called a 2D version of Valve Hammer Editor.

Yes. I'm that stupid to try making a huge editor on my own with barely any prior experience. How did it go? Well... I failed miserably before I even begun. The sheer number of features I want in my editor is daunting. Implementing them on their own is already quite a task, not to mention integrating them all into one big editor where every piece has to cooperate with the rest.