Tuesday, February 5, 2013

Prototype for Cohort 2

I am finally in Zeph's group on "Mars Rovers". The team for now is Zeph (Producer), Alice (Artist), Me(Engineer), Yuntao (Engineer), Yang (Engineer) and Wang (Engineer). I picked this team because "Mars Rover" is an RTS game. I have grown up playing RTS games and I would love to contribute to an RTS game like "Mars Rovers". 

      Until a week back we were iterating on the game idea. We came up several themes and several mechanics. But, something didn't feel right as all of those themes and mechanics have been already instigated in many RTS games. I was really doubting the theme and mechanics at every stage of the iteration. I just didn't want to settle on one thing. So, we kept iterating until Roger helped us with some game theme. We again started iterating on the game idea, keeping Roger's suggestions in mind. 

   The game idea has a come long way. We now have an RTS survival game. Bringing RTS lovers and First person/Third person survival lovers together can be our research statement. 

    Since the past week we are working on the prototype that we have to show to the Cohort 2 next week. We are using Unity3D. We are using JavaScript,C# mostly to write all the scripts.

Sunday, February 3, 2013

Game pitch for IGF

    The semester has started and I just remembered (thinking about my last semester grades) that writing here is really important. So, talking about this semester we, the cohort 3, have to work on a game for almost one year and present it to the IGF mostly by the end of this year. 
   
       For this we were supposed to pitch a game idea. Everyone in the cohort 3 had to participate. We were given a week to polish our game ideas (as we were supposed to be thinking about our game idea since the first semester). I, frankly didn't have any idea. I did not want to pitch my thesis game idea of the first semester. I wanted to come up with a novel concept. I really was thinking for the big thing- the IGF.
  
    I did a lot of research on what games go into IGF and which ones really win. The whole week I just did that and was trying to think about getting a new idea, IGF-like idea. New ideas don't just pop up in your brains. They neither come when you try to copy other game ideas. As Jonathan Blow says "Let me take my deepest vulnerabilities and put it in a game". And like Tracy Fullerton says "game ideas come when you try to relate them to your own life". 
   
    It was Monday 9:00 PM and I was still not sure about what to do. I asked my classmates if I can join their group, as participation was mandatory. But deep down I didn't feel like getting into someone else' idea just because they were not mine. I decided that however bad I suck I will be presenting my own pitch the next day. The only problem was that I didn't have any thing to present.

     Keeping Jonathan blow and Tracy Fullerton in mind, I knew its inside me and I just have to take it out. I tried to think about my deepest vulnerabilities and then and there my whole game (Footprints) was right infront of me. I worked around the whole night to get it right, to eliminate all the possible flaws of the game idea. It was 5 AM when I decided to sleep.
   
     Wise men have said "Don't sleep for 2 hours when you have a presentation the next day". But I am wiser. I got up at 7 AM and started making my Prezi slides. Everything was right in time and place, except me. I felt miserable and starting doubting this whole thing and where it was going. I couraged-up and presented my game idea. 


I just have one word to say on how my presentation was- DISASTROUS. Then and there I knew that I just ruined the whole thing. 

My hidden intentions behind writing this post really detailed must be to gain some sympathy. I just know that I tried really hard to put my idea in front of the audience, regardless.




Friday, February 1, 2013

Graphics Assignment 3

 Download Code

    I found this assignment pretty easy as compared to the previous one. I have added a texture (.png) image on the cube. I used D3DXCreateTextureFromFile command to load the texture onto the device (IDirect3DDevice9 object). Then set the texture using setTexture command. In vertex shader I just set o_texture=i_texture. It didn't need any changes in vertex shader. In fragment shader, I created a sampler2D object and applied it to the o_color. Applying texture just needed a couple of LOC.

Screenshot of PIX:



Getting point light effects needed just getting the world position of the cube. In fragment shader, I normalized both the world position of the box and the point source of light. Taking a dot product and multiplying it with the o_color gave me the those light effects. I used a simple if branch command to clamp the negative value of dot  product. The light position can be changed with I[up],J[left],k[down],L[right].

I have also taken care of the linker errors in release build. Now, the project works fine in release build.

Friday, January 25, 2013

Graphics Assignment 2


Download Link: Download Code

I had a tough time with this assignment. The most challenging part was understanding the transformations. Another problem that I faced was with understanding the HLSL part and get it working. I couldn't figure out for a long time on how to get colors in my cube as my cube was  appearing all white on all sides. I then tried to change the o_color = i_color and it worked.
     Getting the camera and the cube moving around was a cakewalk after understanding all the transformations. I found that PIX is really useful in debugging if you know how to use PIX. I am getting better at PIX and in this assignment I learnt a lot about different things that can be done. I spent around 3 days to figure out the transformation and how it works. But now that I am done, everything looks easy.

I was not able to fix the project when run in release build but I will try to remove those ASAP and I will make sure it builds properly in the next assignment.

My cube.txt file looks like this:

8 12
-1.0 -1.0 -1.0 0 255 60
-1.0 1.0 -1.0  0 255 0
1.0 1.0 -1.0 0 0 255
1.0 -1.0 -1.0 25 0 0
-1.0 -1.0 1.0 30 0 255
-1.0 1.0 1.0 0 44 255
1.0 1.0 1.0 255 0 0
1.0 -1.0 1.0 0 255 55

0 1 3
2 3 1
2 7 3
2 6 7
6 5 7
5 4 7
5 1 4
1 0 4
5 2 1
5 6 2
4 0 3
4 3 7

The pre and post vertex PIX shots:



Friday, January 18, 2013

Graphics Assignment 1

Link to code: http://www.sendspace.com/file/xznpk7

I created a .txt file to save coordinates of rectangle. The .txt file looks something like this:


-0.5f,
-0.5f,
-0.5f,
0.0f,
0.0f,
-0.5f,
0.0f,
-0.5f,
-0.5f,
0.0f,
0.0f,
0.0f,

The file parser takes a value for x and y co-ordinate from each line. So, the first value of the file is the x co-ordinate of the first vertex followed by y co-ordinate of the first vertex and so on..

I saw different patterns when I tweaked on the values of the commented part of Pixel and Vertex shaders. 



I found it difficult to display the rectangle by using two triangles. Changing the value of the buffer, that is, changing the size of buffer to 2 from 1, and also changing the value of PrimitveCount to 2, I was able to render the rectangle on the screen. 
   

Sunday, December 9, 2012

Prototype 4- The Lurker's Cave




   This prototype things were really different than the previous prototypes we have had. We didn't have client this prototype. So, it was more like indie game style where a team of 6-7 people design and develop a game with no controlling interests or creative limitations. We had a chance to fully exploit our game ideas and we had absolute control over the narrative, mechanics, viewpoint, aesthetics and gameplay of our game.

 We spent our first week on designing the game and later time of the week on physical prototype. We coalesced our ideas into one game idea. During physical prototype, we tested our idea with using different camera viewpoints and kept iterating on the main concept. At last we decided to go with 2.5D viewpoint- a side view but using 3D art assets.

   With less than two weeks to develop the game and just one artist on the team I decided to go a little artistic. I took the task of modeling the antagonist (The explorer) of the game. I used Maya to model the character. Here are some screenshots of the model-









Being a programmer, I didn't quite feel that I did my part in this prototype as I had not contributed much on the code of the game. To overcome this frustration I started pair programming on the AI of the game with Vaibhav Bhalerao who is an engineer on the team. This was the first time I did pair programming. Together, we resolved many AI related problems like best path finding to catch the protagonist and also mechanics of the AI character like giving correct impulses to the character to climb up. We also designed a level of the game.



Pair programming does help in a lot many ways, sometimes coming up with different feasible solutions.

This prototype was a firsthand experience of how things work in indie game development. It will also help in the coming semesters where such small groups would be developing games and competing for IGF.

 This prototype I got a chance to work on Maya and Unity3D. I really feel good that I stepped out of the box and did something which was totally out of my grasp by not much losing my identity as of a programmer. 

Sunday, October 14, 2012

Orc Choppin Completed!

  These last three weeks were just crazy work and nothing else. But I just loved working on something so awesome as Orc Choppin. At first everything was going great with the camera movements and using simple textures to create the scene of the game. But then later when the models started coming into the scene, it started getting complex. Handling perfect collision with the target-Orc and trees,rocks to the world boundary was just something.
   
    One of the prime reasons I couldn't update my blog with the game progress was because I was stuck at moving the first person camera on a rough terrain using a terrain model, which made all of us fall behind the schedule. But, it is one of the most challenging things I have encountered while developing this game. I came up with various alternatives for dealing with this problem one of which was using a heightmap and store all the vertices of the terrain so that my camera can move relative to the vertices and the height of the terrain. But, I was really afraid of trying this thing as we were already behind the schedule. I wasted almost 3 days trying to figure out on how to do the camera movement on the rough terrain using different types of collision with BoundingBox, BoundingSphere using rays and triangles and what not. Even, Googling and reading blog didn't help.
  After a while I gave up on the rough terrain and decided to do it later if time allows me to. Gameplay is more important than specific things- like terrain. But, by this time, I had a list of tasks to work on, all piled up on my plate, like-
  • Random orcs, trees,rocks, logs generation.
  • Collision with orcs, trees, world boundary.
  • SkyDome.
  • HUD layer.
  • Clocks and counts.
  • Memory management and resolving FPS drops.
  • Sounds-walking, choping, Orc Crying.
  • Lighting.
  • Animations.
  • Splash Screens.
  • Testing.
  • Working on the loop holes.

    At this point of time I have taken care of all the tasks that I had taken up and the game is up and running. I wasn't able to work well on the FPS dropping down issue because it is a little tricky and I figured out that it can be done in many ways, some of the most trivial and common being-

  1. Using Frustum Culling to render only the objects that are inside the camera view.
  2. Using the Vertex Buffer to store and render the objects every frame from the main memory.
  3. Reducing down the size of model files so that the CPU doesn't go crazy rendering each object per frame.

 These last couple of days, I am going to keep working on the FPS drops and try to keep it to 60. Another thing I can work on is the camera movement on a rough terrain but I am thinking to stick to flat terrain as the theme of the Orc choppin is forest and forests are most of the times flat terrains.

Some sneak-pics of Orc Choppin-