Sunday, April 14, 2013

Working on Ping


I had taken the ping task for the week's sprint. Last week I implemented the Inventory System of Thief side in Co-signers. The Inventory System has a record of all the tools that the thief acquires. It also has a time based renewal system which increases the count of all the tools on a time basis. Things present in Inventory System of Thief side includes the following tools and gadgets:
·      Candy
·      Camera Bug
·      EMP
·      Flash Bang

Here is how it looks:




For ping I took the Theif's rotation, which unity provides in degrees, and set the compass rotation to that of the thief rotation. Kiran was working on the Ping on the Hacker side. We decided to pass the position of ping in 2D( X and Z as the Y co-ordinate doesn't matter) from the hacker side to the thief side through the network. Whenever a hacker pings on his side, the thief side interface gets a position of the ping. I  have written the thief side script to normalize the difference of the thief position and the ping position and which gives me the direction of the ping and then multiply it with the distance which appears on the GUI compass and updates every frame for 15 seconds. It is a design decision to keep the ping active for 15 seconds.

Friday, April 12, 2013

Graphics Assignment 11

Assignment 11 is about post processing. We draw the opaque bucket and translucent bucket to the a surface say, Postprocessing surface and then we apply effects like vignette or bloom to that texture.
   
  Steps of getting the Vignette Effect:
Get all the entities (Opaque and translucent) rendered on the postprocessing surface.
Use the texture of this surface in the as a uniform in the fragment shader of the postprocess entity (An entity having )
For a tex coordinate, sample this texture at that tex coordinate and also sample the vignette image( passed as uniform) and multiply these two float4 which is the output color.


Steps of getting the HUD:
Take a quad and set it to have a texture of the HUD to be displayed.
In vertex shader, resize the quad ( I am doing position in model space divided by 2 minus some offset to center it to the screen ) and passing that position to the hardware. 

Output:






Download Code

Graphics Assignment 10

The 10th assignment was on differed rendering. You hold the output of the opaque bucket and pass it to the translucent object bucket to create a fading effect at the intersection of the translucent object with Opaque objects bucket.

   Initial depth pass:
     The opaque bucket is asked to draw the depth of the opaque objects relative to the distance from the camera. We create a new surface for drawing this depth. Instead of using D3DFMT_X8R8G8B8 format for the surface, we take D3DFMT_R16F because the result we want to output from the fragment shader is depth and that requires only red channel to output to. To make the fragment shader output the depth of the opaque bucket to the viewDepth surface we set the render target to that surface instead of the back buffer. The texture is available from the viewDepth surface.

Draw Opaque Bucket:
    After we get the depth of all the opaque we can draw the opaque bucket to a different surface say, opaqueBuffer surface. The order of drawing opaque bucket and view depth doesn't matter.

Draw translucent Bucket:
  Set the render target to back buffer and Stretch rect the opaquebuffer surface and copy it to the backbuffer. Now calculate the distance from the camera of the pixel to be shaded  and compare it with the texel of the view depth texture( that is the depth of the opaque object in view space). We saturate the difference of these two pixel so that we get a value between 0 and 1. This then becomes the alpha value of the pixel.

To see the fading effect properly use the keys NUM8, 4, 2, and 6 which are mesh controls.

Final Output:








View Depth Texture:


Hardware Depth Buffer:



Download Code








Friday, April 5, 2013

Carrying forward with Unity and Prep for Alpha

As a team we have decided that we are going to use Unity for the game. From last post about "Do and Don't at GDC" I want to elaborate a little more about what the Industry looks in for a entry level programmer.

  So, after talking to professionals from different game companies made me really clear of what I have to do for the next one year to get into the gaming industry. First thing's first-Depth is more important than breadth. Professionals don't want you to have all the knowledge of the all the game engines. They don't even want you to know the technologies they work on. A reason why general CS majors also get game dev. jobs. But, what they really want is a Do-er. A problem solver. In case you get stuck somewhere they want you to solve or find a way of getting over that problem. Period. You be a problem solver and you will never be jobless, anytime.

Do what you do well. If you are a game tester and you want to change to game dev. then just excel at what you do. Get recognized for doing awesome work and you will get what you want. That is the way to do it. This doesn't apply to me but something to remember for later. 


At GDC play, I played some really good looking games and novel games. After playing one game ( I don't remember the name of the game), I talked to the developer of that game. The very first answer to my very first question baffled me. That game was made in Unity. 

So, all my misunderstanding about using Unity for my thesis game just got cleared. Two very important things got addressed -

  1. Professionals don't care if you do your thesis game in Unity.
  2. Unity games can look really beautiful.


 So, based on what I learnt at GDC I want to go for Unity without any doubts. Alpha is approaching and we need to start preparing for that, so that we can present the game well to the industry professionals at EAE Fest.

Do and Don't at GDC

GDC was fun. I learnt a lot from the game developers whom I met at GDC. I had taken an expo pass which was valid only on Wednesday, Thursday, and Friday giving me access only to GDC pavilion and GDC play and the last day Career Seminar.

   I found Career seminars to be really useful. I learnt how to do good Resume and Covers. I learnt about what the recruiters and the company pros look at while interviewing a candidate. I also learnt a lot of other things which were not related to me but otherwise good knowledge.

At expo pavilion I met my favorite game companies like, Riot games, ArenaNet and Ubisoft. My goal was to meet people and ask them for jobs or for tips which will hep me get into the game industry. A lot of pros personally gave me resume advice and answered "how to get entry level jobs?" questions. 

 One of the most amazing experience was of talking to Bethesda's lead engineer Brett Douville whom I met at the Career Seminar. He told me that more than having knowledge of different engines, it helps to have knowledge of just one engine in greater depths. That, right there cleared my mind and after that I didn't bother about whether to use Unity or UDK for my thesis games. More on that later. But, I was really pleased to meet this man. We did talk about a lot of other things. I also met Mike Acton, a lead engineer at Insomniac. One thing is for sure- Gamers are the most awesome people.

So, My list of Do's and Dont's at GDC(It's small but precise)-

Do:
 Go for Bootcamps and Tutorials. You think they are useless but they are NOT.
 Open up and talk to anyone you see near you. Trust me you will get something out of it. If nothing   else you will definitely get enlightened.
 Go to the companies and people for their advice on your resume, portfolio.
 Visit Riot games. Those people and they way they talk will blow your mind.

Don't:
 Hesitate to talk.
Go to a company or a pro and ask them for a job or an interview.
Forget to attend Career seminar. You think you don't need it but you DO.
Lose your pass :P I am serious.