Friday, December 18, 2009

Key Frame Animation

Couple of years ago i worked on Adrian in which we used the Md2 models(i.e, quake2 models) but you know it was all quite troublesome for my taste. It is by no means a complicated format.. in fact it is the easiest format for storing your animated models. The problem was when i wanted to create my own models. .. May be i didn't search hard enough or may be im' just too lazy but basically i could not find anything that i could use to create my own models. .. I tried the blender exporter but due to certain limitations in the format, we had to create certain number of keyframes etc.

Well after all that I thought why not create a plain text format which is inspired from the md2 key frames idea.. but with all the limitations of having predefined number of frames for a certain animation etc.. removed. Plain text formats could be really bad for big models.. but when you are targeting low end systems or handhelds im' pretty sure.. it will work out pretty well.

I've got the exporter ready for blender. I even created a small demo of how to load the model and render it. Pretty simple and easy to follow code.. in plain simple c. Python would have been better i guess but wanted to stick with c, c++.. Ill' probably create a library for the helper functions that load and draw the models but for now its' just one demo.

Will probably start working on creating a simple game with this new found/implemented animation format :D.. until then.. you might want to look at the demo.

Sunday, November 29, 2009

OpenGL glRotatef

While working on a recent project, ive' decided that i wanted to give the user freedom to rotate the object about its' axis and see what it looks like. Sounds fair enough right.. i mean its' a 3d object.. so let the user view it as he wants to.... so i started coding.. now i wanted the user to be able to rotate the object on Global X axis and the Global Y axis. So i have two different angles one about X and one about Y. How do i rotate them correctly so that i produce the right rotation? (in opengl) The problem here is once you rotate about an axis, the co-ordinate system is changed and you have to figure out how to rotate around the other axis. Here is the thing.. glRotatef() actually takes in an "angle" and "vector" about which the rotation should happen. I have convinently forgotten this information and struggled to find the answer... .some where in the forums some one mentioned .. its' an arbitrary vector you can rotate about.. wel.. that fixed my problem. .. so here is the sequence of calls you make ...

glPushMatrix();
glTranslatef(objCenterX, ObjCenterY, ObjCenterZ);

//rotate about y axis now the x axis is changed.
glRotatef(angle[0], 0, 1, 0);
//the new globalX axis is cos(angle[0] *pi/180), 0, sin(angle[0] * pi/180)
glRotatef(angle[1], cos(angle[0] * pi/180), 0, sin(angle[0]*pi/180));
glTranslatef(-objCenterX, -ObjCenterY, -ObjCenterZ);
... //draw the object
glPopMatrix();
This was particularly exciting to me because.. i knew glRotatef function takes a vector.. but i just couldn't figure out how to use it till i saw somebody post it in as a solution to the problem i mentioned above.
Just in case you are interested in looking at the conversation that helped me figure out the solution.. here you go

Sunday, September 20, 2009

Ubuntu Config

Ok for some weird reason the firefox on my ubuntu box has been .. you know.. really really slow.. switching between tabs etc.. are slow.. at least so I perceive ... any way.. turns out i wasn't the only one.. lucky for me i found a post on ubuntu forums which said.. i had to disable the ipv6 thing in about:config.... so here is what is supposed to be done if you are facing this issue:

1) type about:config in your address bar
2) once you see the config, search for ipv6
3) you will find only one entry in there.. double click it to toggle it to true.
4) restart firefox.. you will find that it is a definitely better than what it used to be. (well it is for me at least)

Now the Video Player keeps flashing the screen while playing a video.. while compiz is enabled.. so the solution.. again... is just a config change.. i dont' see why these things are not put in by default but here you go...

check out the link just in case you are lazy to hit the link.. here is the extract...

* GStreamer Users (The default video player in Ubuntu, totem-gstreamer, and any video player that is based on the gstreamer backend)

o Open a terminal and type “gstreamer-properties”. Press Enter.

o Click the Video tab.

o Under Default Video Plugin select “X Window System (No Xv)”.

o Click Test to verify that video playback is working (you should be able to see the standard TV testing colour

Saturday, September 19, 2009

InkScape Learning

So i've been spending time with inkscape to see how good it is for creating character art and then animations from that... essentially sprites.. so.. here is what i was able to create following some tutorial..

I kinda skipped through some of it coz i think i got the hang of it.. any way.. here we go.. the drawing...

Wednesday, September 16, 2009

Trying some cartoon drawings with inkscape


Some thing i drew in inkscape just after getting inspired by svg art around the web.

Sunday, September 06, 2009

PyWeek9

Yet another successful pyweek flies by.. well not yet.. but at least the major part of it is. Just in case you were wondering what the heck pyweek is.. just visit the website will you. I've been participating in this event ever since i found out about it during college. Enough of this stuff... let's get to the good part ...

If you have a wii or heard about it.. you will have heard that its' a low end system with not much of graphics power etc, but some of the games that are available on this system are really very innovative. One such example is the game called deBlob (by THQ). This was a student project which got adopted into a commercial game. So why the hell am i talking about it in a post dedicated for pyweek?.. well this game kinda inspired me to write write something similar. I've been waiting for the right moment and PyWeek9 presented the right opportunity. Why?.. coz the theme for this pyweek was 'Feather'

So i thought ill' build a game around painting the world in colors with a feather and have enemies who suck color out of the world and the feather. You get the idea right?.. so I had my inspiration from deBlob and now i had to get the painting aspect incorporated into the game. It would have been a easy ride (or so to speak) if i had stuck with just ripping off the deBlob game. But according to system capabilities survay i conducted among the other participants (who also judge your entry) it turned out that most of their systems did not have pixel shader capabilities. I thought it would be hard to get the art assets etc ready for such a game without shaders running. So i dumped the 3D game idea and started working on 2D version of it.

Art Assets:
The look for this game was very important, it had to look dull and gloomy with mono chrome colors and then the feather would transform the world with colors. So i was looking for the right concept to target.. my attempts to create 2D versions of the 3D buildings in deBlob turned out to be pretty lame but that was the best i could do so i continued.. one day i came across a game called Misadventures of Mr.Winterbot this game set the right guide line for me as far as the buildings are concerned. I've been working a lot with blender lately and that has helped me create these models with ease. Once this was done, the simple procedure for generating ambient mapped renders in blender helped me get past the major hurdle for me.

Game Play:
user controls the wind direction which helps the user to control the feather. You can use the same wind power to crush the enemies and get the color you want for painting the world.

UserControls:
Mouse Gestures , strokes on the screen with mouse button pressed.

I had a document prepared in google docs with all the features i wanted to be in the game. So this helped me focus on what needed to be done. I would clear off each item off my list as soon as it is done.. So.. what was the result of one week's hard work?.. here you go...














As you can see.. this does look pretty awesome :D (well at least to me) so. As with any programmer, the art work has been a bit of a trouble for me .. i guess iv'e gone past that hurdle now.. at least for the 2D games :) I can't stress enough how important Blender has been for creating the art work. Oh and for the menus, i kinda put mini maps of the levels and these levels also track your best time and score :). As you finish a level sucessfully, you will see that level's menu option colored.. .. hmm you dont' get it right?.. just get the game from pyweek.org
you will be able to download a binary version as well as the source code (.. special note about the source code... it's dirty!! .. what do you expect.. 1 week time.. i had to do some stupid things to get the thing done)

ps: I know this is quite a long post.. I'ts been a while since i made such a big post.. but for a whole week this post is definitely small :)








Thursday, July 09, 2009

Prototype

Prototype is a game where the player can shape shift his character and grow blades (you know just like wolverine..) and hack and slash your way through the military and infected people to find who made you the way you are.. (a freak).. now that we have the story out of our way.. let's talk about the gameplay, controls etc.. (im' referring to the pc version here)

hmm let's see how i can put it in a single clear statement... "Prototype game kinda sux at combat".

I really don't get the free flowing feel that i did with wolverine x-men origins, Devil May Cry, you know the list goes on.. the combat just isn't there. Running around the city is fast paced and fun for a while but it does get old quickly. So im' not sure what the other reviewers are talking about this game.. i.e, it being good and all.. but i didn't like it one bit.. the controls just dont' feel right.. again.. im' looking at the pc version here.. if your experience on the consoles is better.. oh well congratulations :)

Ok.. now for the bitching... As you might have seen .. ive' been busy with porting the transporter game to blender game engine for the game design contest @ blender forums.. turns out they put out another thread for the entries and i missed the train :)) as In i did not know it happened... my work all just kinda wasted.. oh well at least i have a pretty good game running on bge ..

ps: Sry no art work / screenies this time...

Tuesday, March 24, 2009

Porting To Blender

iv'e been porting this game I wrote for pyweek competetion to a blender game (i.e, using blender's internal game engine). There were a couple of things that took a while for me to get a grap of.
1) Making the trees move when it is being cut, there were a couple of different ways i tried but finally i've put in a lame hack just so it will work.
2) How to make sure each level's objectives are different even while linking it from a different file.
3) Making the smoke look right, making it fade away.
4) A little trouble fixing the camera angle etc. But the current thing seems pretty solid.

I've tried to use the feedback I got for the game in the prev competetion as guidance for the dev of this game. Hopefully iv'e fixed most of them.. Well almost.. I still have to design the levels and make sure they are intuitive enough.
1) Heating up only when cutting wood, (stand still and it will cool down.. standard fair.. like in most games)
2) Instead of some weird cooling/heating thing controlling the outcome of the game, I've put in a timer. It is same for all the levels.. The difficulty will increase based on the requirements in the level (wood to cut and cops to trap)

Since I've got better experience with coloring using gimp, thanks to all the paper toy themes i've been working on.. :) any way.. ive' re-vamped the textures of the trees in the game. I even bumped up the polycount on them. They look pretty good now.

One more improvement in visual department is the trap, well in the original game this was just one flat polygon with a very crappy texture. Now I've made a very cool looking trap which looks just like a plant but when a cop crosses through it.. He gets' trapped literally.. like he is in a jail :)... hopefully ill' be able to make the levels fun to play.

Monday, March 16, 2009

HipHop2


Here is another theme for the big-head toy.. and yes.. i modified it a little with extra folding positions etc. Just trying to make the toy a little more sturdy.. i've found the head to be very fragile.. so i guess this does help a little.. and i told before.. if you are uncomfortable with the folding.. just glue them :)

Friday, March 13, 2009

Latest Blender

If you have been following the open game dev project "Yo! Frankie" which has lead to major improvements in the blender game engine, You will be exited to know that blender has put up a game dev competition. So if you are as exited about blender and it's internal game engine as I am.. go ahead and post your entry before 16th march 2009.

Now that i've made the announcement, ever since the game engine got an upgrade, i've been craving to develop a game on it. So i kinda decided to port the "Transporter" game i made for pyweek to blender's game engine. Pretty easy right.. i mean.. ive' got the art, ive' got the logic bricks from blender game engine.. how hard can it be.. so i started working on that and soon i learnt about the above competetion. Without a seconds' hesitation i registered. Since the blender game kit 1 has been released for free, I was able to better organize the data etc. Whenever i got a doubt about how something would/should be done, I would just open up the YoFrankie! 's data files and have a look at them. It is pretty amazing how with a little knowledge and a lot of available source code you can come up with your own thing. Any way i spent almost two days trying to figure out how to design the ai for the cops without using python scriptiong, only to figure out that the best way to do the ai is to put in the python scripts :D.. so i gave up on designing a game with only logic bricks and started doing my thing.you would think that implementing the ai using python would be straight forward.. At least i thought it would be.. (coz iv'e done it before so thought I could just reuse that code). But around 4 days into the development .. i figured out how to use the states for the objects. Pretty neat concept with which we can just implement some thing of a state machine. So basically the ai now is a mixutre of the python script (for making it track hero object) and states (to stop and turn away when ever it hits a tree or a barricade).
One thing i did understand about using BGE is that you should organize your data properly and make most of the available features. To get it to this state iv'e had to struggle with a lot of things. The ai designing, the texturing (hud), getting font colors, getting smoke to work, all these were a little challenging. But the results do look good. More later

Oh btw.. if you want to design a game using BGE i suggest you get the blender game kit1 book to try and understand the basics of the blender game engine. Next you should go through the library linking followed in YoFrankie! project. They even have a video tutorial in the downloads section demonstrating how to use the linking etc. This helps organize your data.. and you can just edit in one place and it will be reflected everywhere.

Monday, March 09, 2009

Hip Hop Toy

While browsing through some of the paper toy galleries, i came across a really cool toy. It had a hood, the dude had a black face, the hood was yellow in color and was wearing jeans ofcourse. So after i made the grimm reaper, i decided it would be nice to attempt making a toy which resembles the one ive' seen. While working on this, i realized the hands of the Big head toy are kinda lame, so modified them too.
Ill' hopefully be able to get the print out and make the toy soon, don't hold your breath for that though... :)
ps: Time and again i keep experiencing problems while putting the big head toys together. The trick to get it right is to cut the slits precisely. Happy toy making..

Friday, March 06, 2009

Grimm Reaper



Hope you have seen the new template that i made. It's a little hard to make, easy to cut though :)... but looks pretty amazing. Note that if you find it difficult to cut and fold the paper through the slits, just glue them instead. Any way.. here is a new theme for the toy.

Tuesday, March 03, 2009

Big Head Paper Toy


Don't you love the look of the above paper toy?? .. well i totally loved it.. and guess what.. I had to go over the design a couple of times before i got it right.... well what are you waiting for go grab the template yourself and make your own unique toys. I will as usual try to post some themes for the toy myself.

Monday, February 23, 2009

Castle Crashers Toy2

Here is the second toy in the castle crasher series. This one is one of my favs' i haven't done a lot of shading. I've tried to keep it simple and true to the original inspiration. I actually made a 3D model for showcasing the paper toys but haven't done the texture yet.. So stay tuned for that.. mean while here is the schematic for the Bear Castle crasher.

Castle Crashers Toy1

If you have been following the xbox live arcade scene, it's hard to miss games like castle crashers. The good old hack and slash genre in 2D, has co-op both offline and online. It's a lot of fun to play too (from what I heard). So any way.. got my hands on an image which had icon sized images of various characters in the game. I jumped to the opportunity and made a paper toy using these images as inspiration. So here goes our first castle crasher paper toy.

Thursday, February 19, 2009

Robot Theme


I've got to admit.. im' pretty bad at shading and colouring... so pardon me for the bad shading in this theme for the paper toy.. but ive' got to keep trying right :) hopefully some day they will be awesome you know just like what most guys put out there.

Thursday, February 12, 2009

Pirate Toy

Used the template i created to make a pirate.. found this very nice image online, thought it would be perfect for a toy. If you have some experience in texturing 3D models, you should be able to create new toys using the template pretty easily. Here is the original image (some obscure site .. through google images)
And the corresponding toy theme on the template :) pretty neat haa. well today for the first time i discovered the anti-aliasing problem while using the fill tool in gimp... that lame tool keeps leaving gaps near the anti-aliased lines so this toy is a little rough around the edges.. hopefully will figure out some solution to this problem by the next time :)

Wednesday, February 11, 2009

Fine Tuning



As is the case with the programs we write, the bikes we ride, the language we use... paper toys require fine tuning too :)... here is the fine tuned version of the template i created.
  • It's got good looking legs now
  • The Neck region is scaled to be smaller than it used to be.
  • Removed the black filling in the flaps. So that people can just download this template and draw on it instead of having to edit it before doing anything.
  • Merged all the parts into a single image file.(one printout one toy :))

Sunday, February 08, 2009

Dexter PaperToy Template


I have been working on refining the schematic i used for creating dexter(prev post) so that people can use it to create custom paper toys. The feet part of the toy is still a little primitive and i am working on another template which has better design for the feet. I've even created a blank paper toy (without any eyes, etc.. just cut and fold the template to get the blank toy). Thought it would be nice activity for the people to come up with whacky faces etc using this template. I would work on putting out different themes for this toy but im' currently hard at work for creating a new template for a paper toy, once im' done with that.. may be ill' try working on this.
And here are the pictures of the paper toy made using the blank template.

Thursday, February 05, 2009

My own Paper Toy




After i came across the cubeecraft.com website, i've been downloading the schematics and making various toys from the website. one of my colleagues was interested in seeing a Dexter (from cartoon network) as a paper toy but unfortunately cubeecraft.com did not have it. I was going through other paper craft websites linked from cubeecraft and was really impressed by how many types of paper toy templates are available out there. That sparked off the intrest in me for making my own template for paper toys. I've tried my hand at making a paper toy using the template provided at cubeecraft.com, then decided to combine templates from other websites and come up with a good one to make characters like afro samurai, and the evil monsters in Samurai Jack. These initial undertakings went puff as the papertoys looked ridiculous. Which made me thinkg about making just a simple paper toy.. you know with just one cube/cuboid. Fortunately the dexter's images led me to a pretty good paper toy template, which i've been trying to polish to be published. The initial dexter's template looks really cool but has some flaws which will be / have been fixed in the actual template. Will be posting that next time around