Skip to main content

Posts

Showing posts from 2010

Squared Is Live

My second HTML5 game for the Mozilla Game dev contest is live on balaji.me server.You can check it out at http://balaji.me/vkrishna/squared . This game has two modes "CopyMode" and "FreeMode". The basic gameplay remains the same though. This was my first attempt at making a game with two different game modes. The code structure doesn't seem to be in a very good shape though. I've just used an if condition to make the rules come into play. It definitely was a fun exercise. I wanted to add another mode called "Reverse Mode" which is essentially a converse of "Free Mode" but didn't add it as i was travelling. I just hope people like this game, It's simple but iv'e tried my best to make it addictive.. :) You can check the game on my gamedev website http://sites.google.com/site/vkgamedev

Importance Of Concept Art

Recently i've started drawing concepts for games before starting the actual code. If you think enough about the game play, you inevitably wind up with the most basic art that is required to represent the game. Case in point.. " Stardust " this is the game i made for pyweek. I was all set to do a standard platforming game when i started thinking may be its' time I try something different. I came up with the gameplay mechanic based on the gravity levels from "DeadSpace". I tried to visualize that 3D gameplay in 2D and what I ended up was the simple format. I started doodling in the Inkscape just to see what it would look like and that ended up to be the final look for the game. I never did this form of making a mockup before actually writing the game before, but im' glad I started doing it now. This gives me a better idea about how the game will look like and i have a better understanding about how to implement it. Here is another concept ive' drawn in

FaceBook Integration

If you visit stardust game website, you will find a Facebook like this I was thinking about working on a social network based game.. so what better place to start than at the good and not so old facebook. I started looking at the documentation and was able to figure out what has to be done in a few minutes and i have to attribute it to the documentation. It is really good, there are a lot of examples all along with the docs. Registering the app was very simple too (was kinda worried that it would be something like the apple app store kinda review process). If you want to integrate FB in your site, just go to developers.facebook.com and you will know what to do. And as for the integration... i've integrated my stardust game with facebook as in.. you can brag about your achievements in game on facebook from the game itself (i.e, if you allow the application to). Check it out here ,

PlayGroundSDK from PlayFirst

I wanted to try out the PlayGround sdk, so went to their website and tried to download it. Sure enough i was prompted to register and create a "Free Account" to download the SDK and the documentation. So like any normal sane person i tried to register.. guess what?.. I couldn't .. why you might ask.. well there was a "CAPTCHA" for making sure that people were registering rather than some bot i guess. So what's the problem you ask?.. I would say THAT is the problem.. why does everybody just use those twisted CAPTCHA which arent' very clear to even read for normal people? Any way i tried it like 50 times... and im' pretty sure i got it right a couple of times but the playfirst's servers refused to accept any of my attempts.. dejected and frustrated i started requesting my friends to try it out and see if they can get one account.. and somehow the audio CAPTCHA seems to have done it for them. For me not so much.. in those 50 times i tried.. (2-3 tim

Stardust (HTML5)

I always hated the javascript because of the browser incompatibility issues and so never bothered to do anything much with it other than making a silly menu navigation demo for a tutorial class. Lately iv'e got interested in the whole WebGL movement with things like mozilla labs starting a gaming initiative and a game dev contest . Later i came across this website and realized i could probably make a resonable 2D game using the canvas element and javascript. Then i came across another gem , a whole freaking 2D game engine built around javascript and html5. This gave me hope that i would actually be able to make a reasonable game using javascript. And guess what i wanted to port? .. My Pyweek11 entry stardust. I started reading about implementing classes in javascript and a little details here and there and finally go to writing the code. It was quite frustrating at first as some of the things like callbacks didn't quite work as i expected with member fucntions so i ended up

Punish The Player

Looks like people expect the game to "punish" i.e kill the user controlled character or restart a level when they screw up too many times. They want to "see" a loosing condition. I guess that's what brings in the challenge aspect in a game. For my entry in PyWeek11, I went for a smaller simpler game with better game play and it did pay off, I ended up third in the individual entries list . The one thing people complained about was the repetitiveness of the game. I didn't quite get what they meant, because every game does one thing repeatedly.. in a shooter game you shoot, in a puzzle game you solve puzzles. But the major factor for them getting bored was the game didn't quite challenge them.Picking up enemies did effect their score but that was second nature. It didn't effect what they were doing which in turn made the game boring too soon. So I guess it's a good thing to "kill" the user when he/she commits too many mistakes. I think

Stardust2.2

I've never worked on improving any of my pyweek games before. This is the first time im' doing it mostly because i'm not satisfied with what i've put together in the two days i worked during the contest. Any way after a few rounds of feedback, i've added another enemy type to make it a little more interesting. Improved the medal requirements and added the ability to pause the game :D. Press escape to pause and you will see the pause menu. Once in pause menu, if you press esc again it will quit but if you just click (mouse) then it will resume. Also remember that you can make new patterns using "editor.py" available along with the source code . as you can see.. the pause menu is pretty simple and to the point. You can grab the latest executable version from project site

pyglet + py2exe

If you want to distribute a python program (game or just plain script) as an exe for windows, there is a nifty library/set of tools called py2exe. This enables you to easily create an exe from your python programs. Here is the list of files you have to ship along with the exe if you are using pyglet library in your program: avbin.dll MSVCRT90.dll Microsoft.VC90.CRT.manifest package these along with the stuff get in the dist folder and you will be good to go on any windows system :)

PyWeek as Py48

For the pyweek11 i wasn't sure if i should register because i thought it might be hard to find time to complete a game. After a lot of thought I did register. Just before the contest started, I had to work a little extra at the office, get some stuff done as a result I lost the first 2 days of the pyweek. Just when i thought i had the rest of the week (5days) for completing.. i was required/requested to travel. So i quickly decided on a simple game mechanic that i wanted to implement and started working on " StarDust ". Just after 2 days of work on the game, it looks pretty good. Im' glad i settled for a simple game mechanic and concentrated on getting the things work right. Im' really amazed that i could complete this game in just 2 days. Oh well just have a look and see for your self :D Game Features: Achievements tracking High Score tracking Beautifully animated Patterns for waves of stars. Simple Mouse based Controls. Editor to create new Patterns (easy to lo

Updating Plugins from Blender4.9 to Blender5.3

Blender5.3 is the new beta version of the awesome 3d authoring tool. I've been skeptical about using it as it had changed some of the shortcut keys etc. I didn't want to make the jump to Blender5.3 yet but after taking a look at the latest version i was impressed by the ui changes. I decided that it would be nice to switch to 5.3 and try it out for creating art assets during the upcoming pyweek. So i started playing around with blender5.3 creating simple models, animations etc and decided that its' time to start porting the anim3d . The moment i started looking at the export scripts for other formats, all hell broke loose.. i was confused disoriented and frustrated with the lack of proper documentation for getting the information i needed to spit out the 3danim format that i designed. That is when i looked at the " python code sniplets " just a glance at this book and i was able to move ahead a lot in coding the exporter script. Right now only the key frame verti

New patches for Old Code

If you have tried using Pencil with mouse on your pc, you will have discovered that the pan and zoom features are not accessible in an intuitive way.. i.e they are not the same as you see on gimp or any other image editor. "ctrl + wheel up" = zoom in "ctrl + wheel down" = zoom out "middle button + drag" = pan So ive' made a patch to fix this problem. I also made a patch to fix the compilation issues on linux + some bugs in the old_code branch for Pencil. You can access these patches here: Pan and Zoom with mouse Bug Fix, Build Fix

Patch for Pencil

If you have read my previous post you already know what Pencil is all about. When i saw that it was developed in Qt I got really interested in having a look at the source code. Lucky for me the source code was pretty clean and since i already have good experience with Qt I was able to figure out the bits and pieces. So one of the Items on user requested features was "duplicate frames" As this is a traditional drawing software, drawing frames which are pretty close to each other is very common and duplicating the frames feature helps a lot in reducing the time for completing the task at hand. So I thought it would be a nice feature to implement. Im' done with the code, iv'e tested it and to the best of my knowledge it works well. So if you want to try it out grab the source code patch from here Ps: this patch is to be applied on the source code available in the trunk. I've not put a good icon for the operation yet. This is how it looks right now... And just fo

Pencil

I've been trying to do traditional animation based on the tutorials at http://www.karmatoons.com/drawing/drawing.htm All was fine but i wondered if there was a software which would help me make the animation on the computer just like i would do on a sheet of paper. One google and 5 minutes later.. i found http://pencil-animation.org/ a slick lightweight tool for making animations. I've been tinkering around with the software and have made a couple of small animations. Btw.. you can create a gif from a sequence of images using convert command. "convert -adjoin animcyl00?.jpg cylinder.gif" where.. animcyl00?.jpg refers to the image sequence and cylinder.gif is the output file.

Yet Another Discovery (OpenGL2.0)

Adrian has been receiving a face lift with fancy glsl opengl stuff. Now I've seen good number of problems with using the GLSL shaders. But what i found today was a little more annoying. So today i thought i'd update the display drivers to a latest version because its' been a while and it's always good to have the latest ones... because all the other users might be using them. Now Adrian which was working fine starting showing a colored screen instead of the actual game, I was shocked because i haven't changed anything but a working code stopped working now. Apparently iv'e assumed something that i shouldn't have.. see.. the vertex shader that we use has a line which goes something like this: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; This looks fine.. if we dont' set the texture matrix, it should ideally be and identity matrix .. or so i thought. Any way... Now .. after digging through all the code.. making modifications everywhere i coul

OpenGL2.0

I know OpenGL2.0 has been out for a while now and i have been developing small example programs for learning purpose, But I've been putting off developing using OpenGL2.0 (GLSL) etc because I wasn't sure if people would be able to play them because of hardware issues. I wanted to develop a game which used OpenGL2.0 features. I wanted to try it out for Last PyWeek but most of the people participating did not have compatible graphics hardware so i scraped that idea. But after having looked at a couple of game engine related blog posts at http://blog.wolfire.com/ , I decided i have to write a game with Graphics Engine using GLSL shaders. So Instead of writing from scratch, I thought it would be best if I tried out on an already developed game and "Adrian" was the obvious choice. We have been updating the game since last year during our free time (yes.... this isn't a solo effort... ) and so updating graphics engine came up. I wanted to start small and

Minute Mistakes Franatic Frustration

I've been working on updating our good old game " Adrian ". Trying to update the graphics engine to use shaders, frame buffers and all that stuff. Actually the other day i found a wonderful game dev blog which discussed various graphics engine tweaks, implementations etc. I've been eager to work on something with shaders.. thought Adrian might be the best bet. So i quickly started writing some basic code for handling multiple pass rendering and some basic code for handling frame buffer objects etc. I've read a lot about glsl .. even done some examples (simple ones) before so i did not think it would hard to get stuff running.. boy was i wrong.. I struggled to get multiple textures to work in my shaders.. and the reason?.. well let me put it in code... //vertex shader void main() { gl_Position = ftransform(); gl_TexCoord[0] = gl_MultiTexcoord0; } //fragment shader uniform sampler2D tex0; uniform sampler2D tex1; void main() { gl_FragColor = texture2D

InkScape As Level Editor

I have been working on creating a simple game engine for 2D games which would use pymunk (chipmunk) 2D physics engine and currently undecided tool kit for windowing. I was working on creating a simple loader for loading info from the svg file to create game objects. I have done this successfully you can see the code at http://code.google.com/p/noobix/source/browse/#svn/trunk/proto . It's a no brainer that we have to add the meta data required for game engine to the objects in svg file, but adding all that Game Engine related info to the SVG objects can be a little tedious.. esp if you want to have many objects in a level. So I've been trying to look at making it a little less painful.. guess what.. inkscape extensions are pretty awesome for doing just that. I quickly put together a simple inx file which inkscape uses for creating gui for the extensions. Im' pretty excited about this now.. Really cool.. .. i have been trying to get the extension to work but for some weird re

Slider Puzzle

After CubePuzzle, i wanted to make another puzzle game just for the heck of it. I thought for a while and came up with a simple puzzle game. I started off coding it in glut and called it BallPuzzle (not very creative) .. coz the game was to have a ball that would just keep falling down unless you made sure that there was a block stopping it from falling down. Since glut already has functions for drawing spheres and cubes, and because I remember the glut functions better.. i coded it using glut lib. But to make it presentable i switched to SDL, and the GLui i implemented for CubePuzzle. After about 4-5 hrs of porting and polishing .. I uploaded the Src and Binary (both linux and windows) @ code.google.com . Mean while i wanted to see if i could use Blender to create a python game. i.e, create all the logic etc inside blender like we do for BGE but output objects/files so that we can run the game using python. Turns out we can't access the GameLogic api when trying to export files. S

PyWeek10

After ive' worked on developing a couple of puzzle games, i've started getting this weird idea that it would be nice to integrate these small puzzle games into some kind of adventure game, where solving the puzzle opens a door/passage etc. I was also thinking about how to dynamically generate a road for a racing game or just a track kinda thing. So when i saw the pyweek10 announcement.. i jumped on.. i wasn't sure if i'd be able to make time to complete my entry but i managed to pull some night outs and completed it in about 4 days or so. The themes this time were "Eleven", "Rose", "Wibbly-Wobble", "Canine" and "ScrewDriver" check out the actual stats here . As soon as these themes, i started thinking about what features i wanted to implement in the game and i also had to think about a story which would use/include all the mentioned themes. Here are the features i wanted to have at first. Use the 3danim experience i.e,

Linux binary Finally!!!

Long time ago... when people made money porting games to linux.. i came across an article about how to create a universal executable for linux. That is an interesting thing because you never know what the end users' system has installed and which of the libraries that you need are missing. The article offers three solutions.. out of which i decided to go ahead with the third method.. Here is the article if you would like to have a look http://www.gamedev.net/reference/programming/features/linuxprogramming2/page2.asp Definitely a good read... if you would like to develop applications for linux and deploy them on large number of systems. If you are wondering why the hell im' posting this now??... after all these years??.. well remember the Cube Puzzle game??.. it was available for windows as a binary but not for linux.. the source was out there.. but thats' not fair.. so today i decided and made the linux binary for the game. Grab it from code.google.com . As you can see ab

Next is what?

So the other day one of my friends asked me if i could help him guide a team of artists and developers to get a game done. .. so i wrote a small write up for how the game should be.. essentially a requirements' specification doc for a game. Have to see how that works out .. :) Meanwhile .. ive' been working rarely/sparsely on it and haven't made much progress. Mostly because ive' been busy with writing the above doc :) .. but thats' just an excuse.. i've been getting stuck at various stages as in how to implement the rotation of the puzzle etc. During the development of CubePuzzle for the pc ive' taken some liberties implementing it without proper structure etc, I wanted to change that this time and wanted to do it better.. .hopefully ill' come up with something which is easy to manage and doesn't look outright devilish... :)

Cube Puzzle

So i've been hard at work polishing the prototype that i had created a few months ago for an iphone game. It is finally in a presentable state, There may be a couple of issues still hanging around, but hopefully they are not bad enough to ruin the experience. It is a simple puzzle game where you rotate layers of cubes in such a way that no two cube in two different layers overlap. Sounds simple right? well try it out and see.. :) We call it "NooBix" a simplified Rubix .. but don't be fooled.. it could get pretty tough at times. Grab the system independent Source code or The windows executable.. from http://code.google.com/p/noobix/ Hope you like it.. update: If the game is crashing on your system, you should install vc++ 8 redistributable package Visual C++ 2005 SP1 Redistributable Package (x86) ( Direct Download Link )

Setting Icon for Win32 Console Applications

Here is a scenario.. You create an application with Visual Studio Express 2008 (or some other express thing) You created a win32 console application (so that you dont' have to deal with win32 api) You want to set a custom icon for your app (instead of the generic .exe icon that shows up) Sounds Simple right, but took me a while to figure out the solution, but as it turns out is pretty easy to do. Here are the steps you have to follow Add a new (.rc) file to project (empty file) add the following line to the .rc file you just added to the project IDI_ICON1 ICON DISCARDABLE "customicon.ico" Copy the customicon.ico file to source code directory of the project. Build your application just like you would normally. (using the menu options in VC Express) Check the .exe created in the release/debug folder based on your configuration. Well i tried to put it as simple as i could, Hope you found this useful, here are the links which helped me figure out how its' done .. just