What this Blog is:
- a place filled with positive sarcasm and jokes
- closely relate to the life of a software engineer in a fun way.
- support for an employee to make the life of his employer miserable
- eyeopening patterns followed in the organisation to ruin developers life
- comparisons of college education and organisations work
- and a lot of similar stuff
What this Blog isn’t
- its not a blog with discussion on techinical stuff
- no political or economical issues’ discussions
- no educational articles
- no hacking tips and tricks
- no mergers and acquisitions of brands
- and no bad/abusive language usuage
Tuesday, July 29, 2008
Software Engineered
Yesterday, I launched my fourth blog and first official public blog: Software Engineered. Here I've quoted some of the details of the blog:
Sunday, July 27, 2008
One step ahead
Yeah, I cleared the code jam round 1 too. This time not with a good rank though(724), ya a small silly mistake cost me 15 points and around 400 ranks drop. Hopefully I'll do better in round 2, coz next time there will be less than half the people going through it.
Friday, July 18, 2008
Google Code Jam 08
This year Google Code Jam started day before yesterday (16th of July), for me it was yesterday. It was organised in a bit different way, usually they used to sponsor the contest as a event on Topcoder and contestants used their arena to develop the code. This time they applied a new approach and a better one. They opened the contest for all languages and was compiler independent. We were supposed to download input generate the output and upload it along with the source code file. So on 16th was the qualification round, 24 hr long event with 3 problems. The person submitting one solution correct was to be promoted to the next level.
Each question had two input sets: small and large. The output of small was evaluated instantly and the result was displayed. The output for large data set was submitted and the result was announced after the event.
So in all it worked out well, and yes I have qualified for the online round 1 too, with a full score of 75 and world ranking 336 :) Lets see what happens in the rounds ahead.
Each question had two input sets: small and large. The output of small was evaluated instantly and the result was displayed. The output for large data set was submitted and the result was announced after the event.
So in all it worked out well, and yes I have qualified for the online round 1 too, with a full score of 75 and world ranking 336 :) Lets see what happens in the rounds ahead.
Wednesday, July 16, 2008
Launching hairyhi.info
Hey everyone, today I am officially announcing the launch of my new site hairyhi.info. Its displays my profile. So go ahead and check out the site if you want to know more bout me. It uses a beautiful accordian and has cool javascript effects. Its a better and updated version of my last site which still exist at ankit-jain.info.
Wednesday, July 2, 2008
Browser Based games III
Yes, I actually managed to write the third version of my browser based games tutorials. Today I am going to discuss the second type of browser games: small Animation games. Like I discussed last time, small animations games are like tetris, frogger, bricks which require moving objects but very less AI and have static backgrounds. These games require a lot of memory space to store the position and status of various objects along with the objects' properties.
There are a few points that one can consider while planning the game for development:
There are a few points that one can consider while planning the game for development:
- Firstly, examine the game very carefully and be very clear with all the rules/ instructions of the game to be developed. This will help you decide the data structures to be used. Usually most of the data is stored in javascript Arrays. So, we need to be very careful while designing the game to optimise the utilisation of memory (try to use minimum memory space and use local variables as much as possible)
- The idea behind using Arrays is to find patterns among the objects. For example, the image objects in the frogger game which move along the road can be stored in the arrays. By finding the right quantity of those objects we can define the size of the array. By deleting the old objects which have crossed the screen and inserting new objects in those places. Similarly.. we could store the empty and filled spaces of the screen in an array in the game of Bricks.
- Moving the objects is fairly simple now.. if we have a constant speed, we could just move objects by using a set interval command, and calling a function which moves all objects on the screen.
timer=setInterval("functionName()",50);//This function is called periodically after aevery 50 ms.
function funtionName()
{
for(i=0;i<size;i++)
arr[i].style.left=parseInt(arr[i].style.left)+moveRight;
} - This will move the array objects to the right by moveRight pixels every 50 ms. If you have to move both ways.. u might need an array to store a boolean value indicating left or right. and move accordingly.
- Similarly to detect collision both the objects coordinates have to be matched. Generally all objects could be considered as rectangles and hence they could be checked for their areas of intersection by their end points easily.
Subscribe to:
Posts (Atom)