tag:blogger.com,1999:blog-47494508081558426822024-03-13T06:34:26.458+05:30Innovative Game design ideas..Gamemaker, game design, reviews and lot more..
I'm a high school student who wishes to take admission in Computer Science stream in a undergrad college... And this is my blog where i wish to share my game design related stuff and interesting day-to-day contents with anyone who is interested in all this... Any suggestion is welcome..Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-4749450808155842682.post-57782098208820072092012-06-27T07:21:00.001+05:302012-06-27T07:59:01.709+05:30Steganography: Hands-On approach<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
</div>
<h4 style="color: #351c75; text-align: left;">
Stumbling upon Steganography (Inspiration behind this post):</h4>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
</div>
<div class="MsoNormal" style="text-align: left;">
Have you heard about the site called <a href="http://www.squidi.net/three/index.php">300 Mechanics</a>?</div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
</div>
<div class="MsoNormal" style="text-align: left;">
Well, I guess, many have heard about it. It’s on the first
page of Google search for terms like “game mechanics” and it’s quite a class of
its own. I have hunted this website often for game ideas and though I am not a
great admirer of turn-based and card mechanics (which is a considerable portion
of the mechanics posted there), there is a lot of food for your thoughts.</div>
<div class="MsoNormal" style="text-align: left;">
And there was this one post, about saving game save files as
images.</div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
I liked the idea, though I wanted to generalize the idea
like this : Saving any file as image (not just changing the extension, actually
making a picture out of it) and restoring the original file from that image
alone.</div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
Now, you are going to shoot me, I know: This is almost what <a href="http://en.wikipedia.org/wiki/Steganography" target="_blank">Steganography</a> is, though the original file is hidden in another innocent
picture.</div>
<div class="MsoNormal" style="text-align: left;">
But unfortunately, until one of my friend (to whom I
described the idea) told me about this “Steganography” thing, I believed it was
one of my new ideas and I was super-excited about it.</div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
So, here it is: It is not really an original idea, so I
decided to make a “How-to” tutorial on it using Gamemaker ...</div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://dl.dropbox.com/u/77212526/steganography3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="https://dl.dropbox.com/u/77212526/steganography3.jpg" width="400" /></a></div>
<h4 style="color: #351c75; text-align: left;">
Concept Briefing: Saving the file as image</h4>
<div style="color: #351c75; text-align: left;">
</div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Once
you get started, you can easily see how easy the concept is:</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Let’s
say there is a file “xx.xxx”. At first, somehow we need to draw it to the
screen and save the screenshot. This screenshot will be our stand-alone image
(instead of the file) and we can restore our original file from this image
(using the algorithm I will describe later).</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://dl.dropbox.com/u/77212526/steganography.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="https://dl.dropbox.com/u/77212526/steganography.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;"><b>The process we will use</b></span></td></tr>
</tbody></table>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">So,
lets come to the most important term here: “somehow”.</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">How
exactly are we going to draw a file to the screen? </span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Here
is my approach: </span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">At
first, read the file byte by byte (so, it doesn’t matter what type of file it
is as every format is similar in binary) and return in decimal format (for e.g.
“A” should be read as 65, its ASCII value and not as the binary equivalent of
65 ). </span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">[Now.
Let’s talk about RGB colours a bit. Every colour in RGB format (HSV format is
also possible) consists of a value of Red, green and Blue (in the range 0-255)
because red, green and blue are three primary colours and every colour can be
made using a variation of these.]</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Our
primary task, now, is to convert this number returned in ASCII format to a
unique colour, which is to be drawn on the screen. One of the facts, which
might appear astonishing at first, is that extended ASCII table has 256 values
(0-255) and range of value of red, green and blue each in RGB format is also
0-255. [This is probably due to the fact each of them is allotted one byte (8
bits) of memory space. So, there are (2^8)=256 possible values.] So, now we
have to choose any one-to-one function which has equal range of domain and
co-domain to convert ASCII value to RGB value. For sake of simplicity, we are
choosing a easy relation between the two: Blue value of RGB=ASCII value of the
character, Green value=0 and Red value=0. What it simply means is that we use
the ASCII value as the blue value in RGB colour format and we use the value 255
for both red and green in the RGB colour.</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Now
for each byte of data, we have one specific colour. Next, we decide to draw these
colours on the screen. It is quite simple: Just as in notepad, we start from
the top-left corner of the screen by
drawing a pixel with the colour corresponding to the ASCII value of the first
byte and then we move towards right (1 pixel at once) by considering the next
byte of data and so on. There is just one thing- Similar to text wrapping, we
have to use a wrapping function so that this drawing function moves to the next
line when it is about to go out of view.</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">So,
here we have our file drawn to the screen. The final task is to take a snapshot
of this drawn screen and save it as the stand-alone picture instead of the
file. Our next section deals with how to restore the original file from it.</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<h4 style="color: #351c75; text-align: left;">
<span style="color: #351c75;">Concept Briefing: Restoring the original file from the screenshot</span></h4>
<div class="MsoNormal" style="text-align: left;">
</div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://dl.dropbox.com/u/77212526/steganography2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="235" src="https://dl.dropbox.com/u/77212526/steganography2.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The actual process of Steganography</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">We
are almost finished with our steganography tutorial. This part is easier than
the earlier and shorter too.</span></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">So,
we already have our screenshot. Let’s get the original file back from it…</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Here,
we need to have a function which will help us pick any colour from the screen
and tell its red, green and blue values. Fortunately, Gamemaker has the
draw_getpixel() and colour_get_blue()
functions to help us with this situation.</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Initially,
we need to clear the screen and load the screenshot as the background.</span></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">Then,
we will need to start from the top-left corner of the screen [(0,0) in
Gamemaker], pick the colour at that point,
get its blue value, convert it to its ASCII equivalent (which is actually equal
to the blue value here),write the character equivalent of this ASCII value to a
“new” file, move towards the right one
pixel at a time and continue this process until there is only the background
left. [Also, we will need to use the aforementioned wrapping function to make
sure that we move to the next line of the screen when the colour-picking
function is about to go out of view.] To identify the background, I used black colour
as the background. As the R, G and B values of black are 255,255,255
respectively, we can easily identify the black colour by getting just the red
or green value (as we are using red=0 and green=0 for our drawn points).</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
<span style="line-height: 115%;">So,
when this whole process completes, we will have the content of our original
file back in the “new” file. Just make sure to give it the same extension as
your original file to access it properly.</span></div>
<div class="MsoNormal" style="text-align: left;">
<br /></div>
<div class="MsoNormal" style="text-align: left;">
</div>
<h4 style="text-align: left;">
<span style="color: #351c75;">Problems and suggested improvements:</span></h4>
<h4 style="text-align: left;">
<span style="color: #351c75;"> </span></h4>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://dl.dropbox.com/u/77212526/steganography4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://dl.dropbox.com/u/77212526/steganography4.jpg" width="320" /></a></div>
<span id="goog_1601962352"></span><span id="goog_1601962353"></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
</div>
<div class="MsoNormal">
<span style="line-height: 115%;">Two
most important drawbacks of this tutorial is that it will support only small
files (about 350KB) and the process is very slow in Gamemaker.</span></div>
<div class="MsoNormal">
<span style="line-height: 115%;">To
increase the file size limit, there is an easy solution: use surface
(applicable with Gamemaker only) to draw instead of the screen, because the
maximum possible dimension of any surface is much more than the screen size.
There will still be a limit in the file size because surfaces do have
dimensional constraint (due to memory constraint), but still it is a lot
higher. Also, you may use multiple surfaces wisely to get rid of this drawback.
Theoretically, this problem can be solved.</span></div>
<div class="MsoNormal">
<span style="line-height: 115%;">The
sloppy performance you’ll experience is only due to the slow performance of the
draw_getpixel() function. Unless you can re-create a faster version of this
function with an external DLL or extension written in a faster programming
language, you’ll have to live with it.</span></div>
<div class="MsoNormal">
<span style="line-height: 115%;">As
always, here are the links: </span><a href="https://dl.dropbox.com/u/77212526/colour_encrypt_advanced.gmk"><span style="line-height: 115%;">.GMK file</span></a><span style="line-height: 115%;"> and </span><a href="https://dl.dropbox.com/u/77212526/colour_encrypt_advanced.exe"><span style="line-height: 115%;">.EXE file</span></a><br />
<br /></div>
<div style="text-align: left;">
<h4 style="text-align: left;">
<span style="color: #351c75;">Few Facts:</span></h4>
</div>
<div class="MsoNormal" style="text-align: left;">
<br />
What we just did isn't real steganography, it's just a part. Steganography involves the removal of a particular sequence of pixels of an image with other pixels which contain the hidden data. We created this pixels which contain the hidden data, but we didn't do the removal part. The removal part isn't that hard, and you can easily try that. Also most of the times, a password is used to vary the sequence of removed pixels.</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0tag:blogger.com,1999:blog-4749450808155842682.post-11516432644020405422012-06-17T00:42:00.002+05:302012-06-24T08:23:37.108+05:30Storing two integers in one integer: Encoding and decoding<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="color: #351c75; text-align: left;">
Intro:</h4>
<h4 style="text-align: left;">
</h4>
<div style="text-align: left;">
<b>Let's start with what a basic understanding of how integers are stored in the computer ....</b></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Whatever programming language you use, in almost all cases, there is a range of the value you can store in an integer variable. But, in practical cases, this range is quite high and it is not reached with optimized calculations.</div>
<div style="text-align: left;">
And the most interesting fact is that, irrespective of the value of the integer, it is internally converted into a binary number of a fixed length (32 or 64, depending on the system and mechanism of conversion). In case of relatively small integers, their binary equivalents are much smaller in length than that fixed length and hence, these binary equivalents are filled with zeroes in the left to make them of that fixed length (filling with zeroes is done to keep the decimal equivalent same). Now this binary number, always being of a fixed length, consumes the same amount of memory space.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<b>This is where the process described in this post will come to use...</b></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
This process takes benefit of the fact (described earlier) that<b> </b>small intgers are also converted into a binary of larger length (than optimally required to store it). We will try to convert two integers into one bigger integer which retains the both numbers in the order supplied (referred to as encoding, I really like that term :D) and later recover both the integers from that bigger integer in the order supplied (no prizes for guessing.. referred to as decoding).</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div style="text-align: left;">
Just for those interested, the approach I describe in the later section, was originally inspired by the use of the escape character, \<code></code><code></code> in JavaScript.</div>
<h4 style="text-align: left;">
</h4>
</div>
<h4 style="text-align: left;">
<span style="color: #351c75;">Encoding logic:</span></h4>
<div style="text-align: left;">
<br />
<i>Note: I will be using zero as the "separating" number in this example and referring to the two original numbers as numb1 and numb2</i><b>.</b><br />
<br />
So, the rules for encoding goes below:<br />
<br />
<b>1. </b>Whenever one of the digits in numb1 or numb2 is zero, one extra zero is added before (or after, it doesn't really matter) that original zero. But, what is important is that this newly added zeroes should be just left as they are and should <b>NOT</b> be subjected to the previous part of this rule, as that will cause an infinite loop.<br />
Also, this step should be done only once for the whole number.<br />
In short, whenever there is a zero in the original number, they become a pair of zeroes in the modified number.<br />
For e.g. after applying this rule on 1203, it becomes 12003 and similarly, applying on 1002 makes it becomes100002.<br />
<br />
<b>2.</b> To get the final encoded number, the modified first number is to written side by side to the of the modified second number and a single zero is to be inserted between those two. (The whole thing can be done more easily in the form of a string but remember, no spaces anywhere.)<br />
For e.g. if numb1=202 and numb2=0, the encoded number becomes 2002<b>0</b>00<b>. (The bold zero is the single zero inserted between the two modified numbers 2002 and 00)</b>.<br />
Similarly, if numb1=120 and numb2=5, the encoded number is 1200<b>0</b>5.<br />
<br />
This is how we get the encoded number and to be true, this final encoded number makes little sense to anyone. So,we need to decode it now to get back those original integers.<br />
<br />
<h4 style="text-align: left;">
<span style="color: #351c75;">Decoding logic:</span></h4>
<h4 style="text-align: left;">
</h4>
<div style="text-align: left;">
So, you think it'll be quite easy right?<br />
<br />
Well, I can't disagree more.<br />
<br />
Let's deal with the most easy case first and the harder next:<br />
<br />
<b>1. </b>In the encoded number, there are no 3 successive zeroes and there is one and only one single zero. <br />
<br />
<b>A: </b>This is actually the case where numb1 and/or numb2 contains non-zero digit in the terminal position (the front terminal position doesn't count because a number can't start with zero. Even if you write 012, it is considered as 12 by the compiler).<br />
<br />
This case can be decoded by the following logic:<br />
<ul style="text-align: left;">
<li><b>1.1</b> The encoded number is separated into two separate numbers at the position where a single zero is found, such that this zero is not considered within any of the separated numbers. The respective position (which number was in the front and which was in the back in the encoded number) of these two separated numbers must be remembered for the later step.</li>
<li><b>1.2</b> Now, with both of these separated numbers separately, whenever there are two zeroes in a number side-by-side, one of them is removed. This process will leave us with the two original numbers.</li>
<li><b>1.3</b> To get the original numbers in the order specified, the logic is that, whichever number was in the front in the encoded number leads to numb1 (after the previous two steps) and the other one is numb2.</li>
</ul>
</div>
<div style="text-align: left;">
<ul style="text-align: left;">
<li>Example: If the encoded number was 12001023, then the numb1 and numb2 decoded in this process should be respectively 1201 and 23.</li>
</ul>
</div>
<div style="text-align: left;">
<b>2. </b>There is no single zero in the encoded number or there are more than 2 successive zeroes.</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<b>A:</b> This is actually the case where numb1 and/or numb2 contains zero in the terminal position (again, only the last position i.e. digit's position counts). For eg., numb1=20 and numb2=0.</div>
<div style="text-align: left;">
So, in this case, numb1 and/or numb2 can be equal to zero.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Logic for decoding:</div>
<div style="text-align: left;">
<ul style="text-align: left;">
<li><b>2.1</b> When there are more than two successive zeroes in the encoded number, moving from left to right, the first two are considered as a pair and one of them is removed and this process continues for the rest of the digits of the number. </li>
</ul>
<ul style="text-align: left;">
<li> <b>2.1.1</b> If a single zero is left out after completing this process and it is not in the terminal position, then apply logic 1.1, 1.2 and 1.3 to get numb1 and numb2.</li>
<li> <b>2.1.2</b> If a single zero is left out after completing this process (logic 2.1) and it is in the terminal position, then numb2=0 and numb1 is equal to this processed number.</li>
<li> <b>2.1.3 </b>If no zero is left out after this process (logic 2.1), then this processed number is equal to numb2 and numb1 is equal to zero.</li>
<li><b>2.2 </b>When there are no zeroes, then numb1=0 and numb2=encoded number.</li>
</ul>
</div>
<div style="text-align: left;">
<h4>
<span style="color: #351c75;">Conclusion:</span></h4>
<h4>
</h4>
<div style="text-align: left;">
That is pretty much the end of encoding-decoding logic, but there are some more things to say. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
First of all it's better to use the number with the least number of total appearance in numb1 and numb2 as the "separating" digit instead of zero.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
And secondly, this whole process will work fine only when you are working with relatively smaller numbers, because else the encoded number may get bigger than the highest possible value that can be stored successfully in integer variables.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
And thirdly, as you might have guessed, I have made a small app for this with Gamemaker :<a href="https://dl.dropbox.com/u/77212526/storing%20two%20numbers%20in%20one.gmk" target="_blank"> GML link</a> and <a href="https://dl.dropbox.com/u/77212526/storing%20two%20numbers%20in%20one.exe" target="_blank">Exe link</a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, till the next time, good bye.</div>
</div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com3tag:blogger.com,1999:blog-4749450808155842682.post-72537566409814690672012-06-06T18:54:00.000+05:302012-06-23T08:01:20.744+05:30Arrays in GML : 5 things you probably don’t know<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoNormal" style="color: #073763; font-family: inherit;">
<u><span style="font-size: 14pt; line-height: 115%;">What is
GML?</span></u></div>
<div class="MsoNormal" style="font-family: inherit;">
<br /></div>
<div class="MsoNormal" style="font-family: inherit;">
You have most probably heard of Gamemaker, the popular game
design software.</div>
<div class="MsoNormal" style="font-family: inherit;">
<br /></div>
<div class="MsoNormal" style="font-family: inherit;">
Along with Drag-and-Drop (D&D) feature, it also features
an extensive coding language, which is formally called “The Game maker Language
(GML)”.</div>
<div class="MsoNormal" style="font-family: inherit;">
<br /></div>
<div class="MsoNormal" style="font-family: inherit;">
According to Mark Overmars, the original creator of Game
Maker (which has been recently re-named as Gamemaker), “<i>Game Maker</i>
contains a built-in programming language. This programming language gives you
much more flexibility and control than the standard actions. This language we
will refer to as GML (the <i>Game Maker</i> Language).”</div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoNormal" style="color: #0b5394; font-family: inherit;">
<b><u><span style="font-size: 14pt; line-height: 115%;">Why this
article?</span></u></b></div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoNormal" style="font-family: inherit;">
The only official documentation of Game Maker is the help
file included with the software. This help file, though complete, documents
only what happens when something is used and the correct syntax to use it. But,
it leaves out necessary details in some cases.</div>
<div class="MsoNormal" style="font-family: inherit;">
<br /></div>
<div class="MsoNormal" style="font-family: inherit;">
Among the many features of GML, I find the “Array” portion
of the help file least detailed, which is (probably) supposed to be known by
the user. Though this is acceptable, it often causes a lot of confusion when
using arrays extensively for the first time in a new project. A lot of things
have to be guessed. Now the problem lies with this guessing: Everyone with
prior programming knowledge tries to think in terms of their previous concepts
and experiences. Unfortunately, this often differs considerably due to the
different approach of different programming languages.</div>
<div class="MsoNormal" style="font-family: inherit;">
<br /></div>
<div class="MsoNormal" style="font-family: inherit;">
This problem is concentrated further by the fact that
compiled languages like C/C++ (which are most popular among programmers)
support only fixed length arrays (without using dynamic memory allocation, of
course) compared to GML which supports dynamic arrays (so, practically their
lengths are not fixed and can be changed whenever required). Thus, for many
programmers, previous concepts have to be tested in GML. This article tries to
solve this problem, testing and publishing the result of every exceptional
situation that may arise with arrays in GML. I have tried to answer every weird
question about arrays that popped up in my head and thus, exposing some of the
lesser-known facts about it. But on other hand, you are expected to know what
is written in the help file.</div>
<div class="MsoNormal" style="font-family: inherit;">
<br /></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Just a word
of caution</span>: You probably won’t find anything worth experimenting with
arrays after you complete reading this.</div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoNormal" style="font-family: inherit;">
<b>So, let’s start…</b></div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoListParagraph" style="color: #674ea7; font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><span style="font-size: 14pt; line-height: 115%;">1.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-size: 14pt; line-height: 115%;">What
does arr refer to when arr is an array?</span><span style="font-size: 12pt; line-height: 115%;"> </span></b></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<br /></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;">A:</span><span style="font-size: 14pt; line-height: 115%;"> </span>In GML, nothing is practically defined as a
variable of some specific data type. The data type is instead implied based on
the value assigned to it at any time. A variable is implied to be an array only
when it is assigned a value in this format:</div>
<ul style="font-family: inherit; text-align: left;">
<li><b>a)<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b style="mso-bidi-font-weight: normal;">arr[ind]=value;
</b><b> /* in case of 1-D arrays or */ </b><b style="mso-bidi-font-weight: normal;">variable_local_array_set(name,ind,value);</b></li>
</ul>
<ul style="font-family: inherit; text-align: left;">
<li><b>b)<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b style="mso-bidi-font-weight: normal;">arr[ind1,ind2]=value;</b><b>
/*in case of 2-D arrays*/</b><b style="mso-bidi-font-weight: normal;">variable_local_array2_set(name,ind1,ind2,value);</b></li>
</ul>
<div class="MsoNormal" style="font-family: inherit;">
Now that it is implied as an array, arr actually refers to
the arr[0,0] ( which is the same as arr[0] ) position. </div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoListParagraphCxSpFirst" style="display: none; margin-left: .25in; mso-add-space: auto; mso-list: l2 level1 lfo3; text-indent: -.25in;">
<span style="display: none;">1.<span style="font: 7pt "Times New Roman";">
</span></span><span style="display: none;"> </span></div>
<div class="MsoListParagraphCxSpLast" style="color: #674ea7; font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><span style="font-size: 14pt; line-height: 115%;">2.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-size: 14pt; line-height: 115%;">How
are the 1-D and 2-D arrays related when a 1-D array is converted into 2-D array
and vice-versa? </span></b></div>
<div class="MsoListParagraphCxSpLast" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><br /></b></div>
<div class="MsoListParagraphCxSpLast" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<span style="color: #c00000; font-size: 14pt; line-height: 115%;"> </span><span style="font-size: 12pt; line-height: 115%;">A: After a lot of experimenting, this is the final decision I
came to: arr[ind1] is the same as arr[0,ind1] for all practical purposes. The
value of arr[ind1] changes to the new value whenever the value of arr[0,ind1] is
changed to a new value and vice versa.</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoListParagraph" style="color: #674ea7; font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><span style="font-size: 14pt; line-height: 115%;">3.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-size: 14pt; line-height: 115%;">Is
there any relation between numbers, strings and arrays?</span><span style="font-size: 12pt; line-height: 115%;"> </span></b></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><br /></b></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;">A:</span> Two-dimensional arrays can be considered as the
general data type for both numbers and strings as well as 1-D arrays (Hence,
these are the special cases of an 2-D array).</div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<br /></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
They are related in the following way:</div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><br /></b></div>
<ul style="font-family: inherit; text-align: left;">
<li><b>Any number or string variable (let’s say,the variable named numb_or_string , usually used in code
like this: numb_or_string=something;) is
actually the [0,0] position of the 2-D array of the same name(i.e.
numb_or_string[0,0] ). Thus, numb_or_string can be alternatively called as
numb_or_string[0,0] and vice versa . </b><b> </b></li>
</ul>
<ul style="font-family: inherit; text-align: left;">
<li><b>Any 1-D array (for eg. arr[ind], used in code like
this: arr[ind]=something;) essentially
refers to the [0,ind] position of the 2-D array with the same name(i.e. arr[0,ind] ).</b></li>
</ul>
<div class="MsoNormal" style="font-family: inherit;">
This answer generalizes the answers given in the first and
second question.</div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoNormal" style="font-family: inherit;">
<b>As a side note, this is the reason why the same variable
name can’t be used for two variables even when they are of different data types.</b></div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoListParagraph" style="color: #674ea7; font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><span style="font-size: 14pt; line-height: 115%;">4.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-size: 14pt; line-height: 115%;">Which elements of an array
are filled with the default value?</span></b></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><br /></b></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<span style="color: #c00000; font-size: 14pt; line-height: 115%;"> </span><span style="font-size: 12pt; line-height: 115%;">A: This idea is quite simple: I’ll explain it in terms of a
2-D array, though it can be easily applied with 1-D arrays (following the
previous rules). The first and second index of a 2-D array is referred to as
row and column respectively, for visualization purpose.</span></div>
<div class="MsoListParagraph" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><br /></b></div>
<div class="separator" style="clear: both; font-family: inherit; text-align: center;">
<b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU8194GNWHdEyGL23OkYbl3dap8mkimk0i7Xpl-4W3RaNhnbigGhXn3M3ewaicg1kNUsBSEBJxKSyhb3FjrRgUpW83WYZiJvUlnxXMt_djaPHj3e3gU_DU004l0GLdhfOxKQ-mCtJqpfwR/s1600/l.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU8194GNWHdEyGL23OkYbl3dap8mkimk0i7Xpl-4W3RaNhnbigGhXn3M3ewaicg1kNUsBSEBJxKSyhb3FjrRgUpW83WYZiJvUlnxXMt_djaPHj3e3gU_DU004l0GLdhfOxKQ-mCtJqpfwR/s1600/l.gif" /></a></b></div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<div class="MsoNormal" style="font-family: inherit;">
<br /></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 12pt; line-height: 115%;"> The rules for filling up the elements of an array with the
default value (zero) are:</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<b><br /></b></div>
<ul style="font-family: inherit; text-align: left;">
<li><b><span style="font-size: 12pt; line-height: 115%;"> <span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><span style="font-size: 12pt; line-height: 115%;">If it’s a global 2-D array, then the [0,0] element is
filled with zero.</span></b></li>
</ul>
<ul style="font-family: inherit; text-align: left;">
<li><b><span style="font-size: 12pt; line-height: 115%;"> </span><span style="font-size: 12pt; line-height: 115%;">In both local and global arrays, for any row, all the
undefined elements between any two defined element is filled with the default
value, zero.</span></b></li>
</ul>
<div class="MsoListParagraphCxSpLast" style="color: #674ea7; font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><span style="font-size: 14pt; line-height: 115%;">5.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-size: 14pt; line-height: 115%;">Is there always an
error when a negative index is passed to an array?</span></b></div>
<div class="MsoListParagraphCxSpLast" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<b><br /></b></div>
<div class="MsoListParagraphCxSpLast" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<span style="color: #c00000; font-size: 14pt; line-height: 115%;"> </span><span style="font-size: 12pt; line-height: 115%;">A: In terms of 2-d array, an error is always thrown when you
use this type of syntax: “arr[ind1,ind2]=value;
“ (where atleast one of the values among ind1 and ind2 is negative), to set or
get a value. But only in one exceptional case, when you use </span><span style="font-size: 12pt; line-height: 115%;">variable_local_array2_set(name,ind1,ind2,value) </span><span style="font-size: 12pt; line-height: 115%;">to set a value, such that ind1 is positive but ind2
is negative, no error is thrown. </span></div>
<div class="MsoListParagraphCxSpLast" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="font-family: inherit; margin-left: 0.25in; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"> </span><span style="font-size: 12pt; line-height: 115%;"> I found
out this last exception just out of curiosity. Though practically it is not of
much use as the memory is ultimately leaked and so, the value can’t be
accessed. IMO, it is some sort of a unimportant bug, so you should probably
check if ind2 is negative, before using it in that function.</span></div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com4tag:blogger.com,1999:blog-4749450808155842682.post-11740991774708445792012-06-03T06:38:00.003+05:302012-06-23T08:14:34.171+05:30Neon BBXD HD : A review<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="color: #444444; text-align: left;">
Intro: </h4>
So what happens when you hunt the Gamemaker Community (GMC)
forum for a game to review?<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Well, you come across 4 types of games:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoListParagraph" style="color: #351c75; text-indent: -0.25in;">
<span style="font: 7pt "Times New Roman";"> <span style="font-size: large;">1.
</span></span><span style="font-size: large;">WIP (Work-in-progress)</span></div>
<div class="MsoListParagraph" style="text-indent: -0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in;">
[ These are the guys I don’t have
much to comment on: </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
While some of them are pretty good games on the rise,
others have a lot of room to improve upon]</div>
<div class="MsoListParagraphCxSpFirst">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="color: #b4a7d6; text-indent: -0.25in;">
<span style="font: 7pt "Times New Roman";"> <span style="font-size: large;"> <span style="color: #351c75;"> <span style="color: #20124d;">
</span></span></span></span><span style="color: #674ea7; font-size: large;">2.Novice games</span></div>
<div class="MsoListParagraphCxSpLast" style="text-indent: -0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in;">
[ These are mostly first or
second-time projects. </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
Actually, most of the novice games are usually in WIP
section, but a small number of them make it to </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
the ”Finished Games” section.</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
Now this finished
ones are playable, but usually buggy or
easy projects. </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
Not really the kind of stuff you’ll like playing.</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
They are
usually very small in number, and are not continued for sake of better projects.]</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoListParagraph" style="color: #351c75; text-indent: -0.25in;">
<span style="font-size: large;"> 3. Intermediate games</span></div>
<div class="MsoListParagraph" style="text-indent: -0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in;">
[ These are the most in number. </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
While a lot of them are interesting, they are usually not totally bug-free.</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
Most popular genres remain RPG, tower defense and platformers.</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
Many of them are
“just another game” and are not quite polished, but they are usually continued/updated
for a reasonable amount of time.</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
A few of these games, which have interesting content,
through continuous development, evolve to the next section of games. ]</div>
<div class="MsoListParagraph" style="color: #351c75; text-indent: -0.25in;">
<span style="font: 7pt "Times New Roman";"> <span style="font-size: large;">4.
</span></span><span style="font-size: large;">Jewel Games</span></div>
<div class="MsoListParagraph" style="text-indent: -0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in;">
[ The rarest kind and the ones
worth waiting for- usually made by GMC veterans and becomes very </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
popular. </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
Highly polished games (not in term of graphics, but in term of game design),
usually with quite </div>
<div class="MsoNormal" style="margin-left: 0.25in;">
innovative gameplay and intelligent level design – the ones
you’ll always be coming back for.</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
Many of the GMC Jam winners (usually
continued even after the jam ends) fall in this classification.]</div>
<div class="MsoNormal" style="background-color: white; margin-left: 0.25in;">
<br /></div>
<h4 style="background-color: white; color: #444444; text-align: left;">
<span style="font-size: x-large;">The first look:</span></h4>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
As this is my first review, I wanted to clarify how I
classify most games in the GMC so that I can refer to the class of game
whenever I review one.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So, let’s come to the
real stuff …..</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
When I decided to write a game review, I had the lucrative
offer of choosing one of the ( recently ended) GMC Jam 6 games.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But I decided to act otherwise: </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I think those games have fair amount of spotlight on them
and so, it will be justified enough to review one of the “not-so-popular” games
from the “Finished Games” section.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So, by quite random choice, I picked up this game called <span style="color: #9fc5e8;">“</span><a href="http://gmc.yoyogames.com/index.php?showtopic=541494" style="color: #073763;">Neon BBXD HD</a><span style="color: #9fc5e8;">”</span> : </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I wanted to see how <a href="http://gmc.yoyogames.com/index.php?showuser=193173"><b>MisuMen49</b></a><b>
</b> (the creator of this game) have changed the classical Brick-breaking game. Also the description read “2 years in the
making” – so that kind of interested me.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Frankly, at this moment,
I expected the game to fall into the Elite class of “Jewel games”. So,
let’s see how it fares finally…</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The moment you start the game you see a screen shake and
some 3-D boxes thrown at your face followed by the name of the company (or
group, maybe). </div>
<div class="MsoNormal">
This effect does look professional when you run the game for the
first time; but when you come back at it later, you may find it a bit annoying
and long (in duration).</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Then, when you
finally start in the “Normal” mode, you get a screen filled with bright, colourful
and outline-based brick arranged in a fashion, as you normally expect it to be.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Those bricks get a lot of your attention due to their sleek and beautiful look.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now, when you start playing the game, you just wish that you knew each of the
“power-up”s and “power-down”s showing up
on the screen (some of them may look similar).</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
They are broadly classified into
good and bad category, recognizable from the colour of the bubble around them,
so you don’t get confused. </div>
<div class="MsoNormal">
This is a nice addition to the concept of
“power-up”s, I suppose.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is how your journey starts in this 100-level game….</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
To be true, it wasn’t possible to play the whole game, but I
tried my best to get the whole picture and below are my opinion on specific
elements in the game:</div>
<h4 style="color: #3d85c6; text-align: left;">
<span style="font-size: x-large;">Graphics:</span></h4>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is where this game really rocks!!</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Neat attractive sprites and beautiful particle effects gives
a edge to this modern-day version of Brick-breaking game.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I just wish that there were different backgrounds for
different levels.</div>
<div class="MsoNormal">
The background is good enough, but it may get repetitive to
the player.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Also, the “Death screen” (when the player misses a ball) in which
the colours were apparently just reversed, looks like a cheap effect – could
have been done better.</div>
<div class="MsoNormal">
<br /></div>
<div align="center" class="MsoNormal" style="background-color: #444444; color: #d9d2e9; text-align: center;">
<span style="font-size: 16pt; line-height: 115%;">Verdict: A (Very Good)</span></div>
<h4 style="color: #3d85c6; text-align: left;">
<span style="font-size: x-large;">Gameplay:</span></h4>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Clearly, not the best gameplay I have experienced.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The game is perfectly playable, but there are some problems
under the hood.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
These are a few bugs which can make the whole gameplay
experience bitter:</div>
<div class="MsoNormal">
<br /></div>
1. <span style="font: 7pt "Times New Roman";"> </span>The real "bugs" in the game get stuck
among themselves as well as the wall.<br />
<div>
</div>
<div>
<span style="font: 7pt "Times New Roman";"> </span>2. The "bat" goes outside the screen:</div>
<div>
<br />
<div class="MsoNormal" style="margin-left: .25in; text-indent: .25in;">
a) if you move
the mouse hard towards one wall, </div>
<div class="MsoNormal" style="margin-left: 0.25in; text-indent: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in; text-align: left; text-indent: 0.25in;">
b) also at times
with the keyboard.</div>
<div class="MsoNormal" style="margin-left: 0.25in; text-align: left; text-indent: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in; text-align: left; text-indent: 0.25in;">
The frustrating
part is that both of this either kills you directly or freezes your bat, which
is again</div>
<div class="MsoNormal" style="margin-left: .25in; text-indent: .25in;">
( effectively)
going to kill you.</div>
<div class="MsoNormal" style="margin-left: 0.25in; text-indent: 0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo2; text-indent: -.25in;">
<span style="font: 7pt "Times New Roman";">
</span>3. In "mouse mode", if your cursor is on
the side brick walls, when you are reborn due to your 2nd or 3rd </div>
<div class="MsoListParagraphCxSpFirst" style="text-indent: -0.25in;">
life, the new
bat is also created there and so it practically means one more unjustified death.</div>
<div class="MsoListParagraphCxSpFirst" style="text-indent: -0.25in;">
<br /></div>
<div align="center" class="MsoListParagraphCxSpLast" style="background-color: #444444; color: #d9d2e9; text-align: center;">
<span style="font-size: 16pt; line-height: 115%;">Verdict: B (Average)</span></div>
<div class="MsoNormal" style="margin-left: .25in;">
<br /></div>
<h4 style="color: #3d85c6; text-align: left;">
<span style="font-size: x-large;">Level Design:</span></h4>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I will be super-cautious about my comments here:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
As a whole, this game takes a new take on the old
“Bick-breaking” genre.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I didn’t go through even 50% of the game, so it’s not
justified for me to give a rating here.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But from whatever I experienced, I liked the varying number
of power-ups and attacks and specifically, how they can make a long level, a
lot easy.</div>
<h4 style="color: #3d85c6; text-align: left;">
<span style="font-size: x-large;">Sound:</span></h4>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The sound effects did make the whole experience more
awesome, but the background music was kind of repetitive, so that should be
changed.</div>
<div class="MsoNormal">
The collision sound effects were quite energetic and I loved them.</div>
<div class="MsoNormal">
Also, the sound accompanying the screen shake was pretty
good.</div>
<div class="MsoNormal">
So, in short, whatever sound is present in the game is
lovable, but I expected some more variations for the background music.</div>
<div align="center" class="MsoListParagraph" style="background-color: #444444; color: #d9d2e9; text-align: center;">
<span style="font-size: 16pt; line-height: 115%;">Verdict: B+ (Good)</span></div>
<h4 style="color: #3d85c6; text-align: left;">
<span style="font-size: x-large;">Overall recommendation:</span></h4>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This game is more than worth downloading: definitely a lot better
than average games, but still a “Intermediate level game”.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
You are surely going to love the flashy neon graphics, but
watch out from those nasty bugs.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I recommend not using the “Mouse Mode” due to the bug told
earlier.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Finally, I am just hoping that all the problems of this game
gets addressed by <a href="http://gmc.yoyogames.com/index.php?showuser=193173"><b>MisuMen49</b></a></div>
<div class="MsoNormal">
and we have one more perfect game to play.</div>
<div style="background-color: #444444; color: #d9d2e9; text-align: center;">
<span style="font-family: "Calibri","sans-serif"; font-size: 16pt; line-height: 115%;">Verdict:
B+ (Good)</span></div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0tag:blogger.com,1999:blog-4749450808155842682.post-10502597296394222742012-05-15T09:22:00.000+05:302012-06-09T06:30:15.600+05:30Generating smooth roads for top-down racing games on-the-fly<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
Prologue:</h4>
<div style="text-align: left;">
I am making a fake 3D <a class="zem_slink" href="http://en.wikipedia.org/wiki/Racing_video_game" rel="wikipedia" target="_blank" title="Racing video game">racing game</a> (like a lot of <a class="zem_slink" href="http://en.wikipedia.org/wiki/Browser_game" rel="wikipedia" target="_blank" title="Browser game">flash games</a> you have seen). It looks like a first-person racing game, but doesn't use any 3D functions. Why not real 3D, you may ask and the answer is quite simple:</div>
<div style="text-align: left;">
a. Not every <a class="zem_slink" href="http://en.wikipedia.org/wiki/Game_development_tool" rel="wikipedia" target="_blank" title="Game development tool">game development tool</a> has 3D support</div>
<div style="text-align: left;">
b. It will be lot faster if designed correctly.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
When I was creating the tracks, I was a lot bored and it was a tiring task to lay long tracks by hand just for testing. So, I decided to code for dynamic random road generation, so that I will never run out of road :D<br />
<br />
<h4 style="text-align: left;">
The beginning: </h4>
<div style="text-align: left;">
At first, I thought it would be quite easy, you know like:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Generate random points within a small distance and join them to make a road.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
But the major flaw that surfaced quickly was that the road was not at all smooth, it was like throwing away some chunk of concrete at places.</div>
<div style="text-align: left;">
My thought was like:</div>
<div style="text-align: left;">
This is not how roads really look like :(</div>
</div>
<div style="text-align: left;">
So, I decided to come up with a new approach to tackle this problem and<br />
the next day, I came up with this solution.<br />
<br />
<h4 style="text-align: left;">
Main concept</h4>
<br />
The idea is pretty simple. You'll need to have a knowledge of <a href="http://homepage.mac.com/shelleywalsh/MathArt/GraphingSinCos.html" target="_blank">how sine curves are drawn on graphs</a>.<br />
We won't need any <a class="zem_slink" href="http://en.wikipedia.org/wiki/Transformation_matrix" rel="wikipedia" target="_blank" title="Transformation matrix">transformation matrices</a> for this.<br />
<br />
<i><b>Note: </b></i><br />
1. The <a class="zem_slink" href="http://en.wikipedia.org/wiki/Coordinate_system" rel="wikipedia" target="_blank" title="Coordinate system">co-ordinate system</a> is same as traditional, but the origin is at the bottom-center of the page.<br />
So, Y is always positive and X can be both be positive and negative upto a certain extent.<br />
2. Co_eff is a constant value which constrains the maximum X co-ordinate of the road in order to<br />
fit it within the view. It is used as the amplitude of the sine curve.<br />
<br />
First of all, I decided that that only full sine curves (one total period) will be used to avoid complexity.<br />
<br />
This also gave me one added advantage of smoothness of the curves even when one sine curve ends and a new one is drawn.<br />
<br />
This are the steps for generating the first curve … The rest will follow similarly...<br />
<br />
Steps:<br />
<br />
1. Generate a random value (within a suitable range) and store it as y1<br />
This y1 value is the (relative) height (distance in the y direction) at which one full sine curve <br />
terminates.<br />
<br />
2. Now, as we know, sine curves have a period of 2⊼ radians.<br />
But, in our case, the sine curve should start exactly at the current point and terminate exactly at the next<br />
point (0,y1) [relative to the current point].<br />
So, we need to find a variable named "value" such that y1=2⊼*value<br />
We will use a factor of (1/value) with the <a class="zem_slink" href="http://en.wikipedia.org/wiki/Dependent_and_independent_variables" rel="wikipedia" target="_blank" title="Dependent and independent variables">independent variable</a> [here y-coordinate]<br />
(as the curves are drawn along y-axis, so the x-coordinate of the initial and final<br />
point doesn’t change. So, we don’t care about the x-coordinate)<br />
<br />
3. Now, draw the curve “ x=co_eff*sin(y/value) ” starting from the initial point.<br />
<br />
It will look like this:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://dl.dropbox.com/u/77212526/sine.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="http://dl.dropbox.com/u/77212526/sine.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br /></div>
<div style="text-align: left;">
<h4 style="text-align: left;">
Last words...</h4>
<div style="text-align: left;">
When I was first thought of this whole dynamic road generation thing, I asked one my friend on Facebook for his view on this matter. From what I could make out, he had a better but not-so-simple approach in mind. So, we decided to make a shared Google Doc about this and I wrote about this concept there.</div>
<div style="text-align: left;">
As of now, he's working on <!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]--><span style="font-family: "Times New Roman","serif"; font-size: 12pt; line-height: 115%;">his
version of this solution and hopefully, he will soon be done with it, and we
can have a better version in this blog...</span></div>
</div>
<div class="zemanta-pixie" style="height: 15px; margin-top: 10px;">
<img alt="" class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=057025d6-2925-47d8-b46b-71741bfc9ccf" style="border: medium none; float: right;" /></div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com2tag:blogger.com,1999:blog-4749450808155842682.post-56994792795097708892012-05-09T16:44:00.000+05:302012-05-09T16:44:04.298+05:30Using arrays for better analysis of nodes in a tree<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h4 style="text-align: left;">
Prologue</h4>
<div style="text-align: left;">
Let's start with the basics..</div>
<div style="text-align: left;">
This post is written with the pre-supposition that the readers know about the theoretical concept of trees, storage of nodes of trees using lists and Depth-first search (DFS) used for analyzing those nodes...</div>
<div style="text-align: left;">
[ If you are not aware of this terms, I suggest you read this book on <a href="http://dl.dropbox.com/u/77212526/algorithms.pdf" target="_blank">Algorithms</a> </div>
<div style="text-align: left;">
Also, keep <a href="http://en.wikipedia.org/wiki/Graph_theory" target="_blank">Wikipedia</a> handy if it appears a bit advanced...</div>
<div style="text-align: left;">
Even if you know about these, still it's a good read..</div>
<div style="text-align: left;">
As far as I can remember, it was allowed to be freely distributed; so you shouldn't hesitate downloading it. </div>
<div style="text-align: left;">
For quick learning, you may start with 3rd chapter named " Decompositions of graphs" and after completing page 95, I think you'll get the context...]</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
Context</h4>
<div style="text-align: left;">
As we all know, "tree" is a theoretical concept in Computer Science and hence, </div>
<div style="text-align: left;">
data structures like lists or matrices are used for storing these trees.</div>
<div style="text-align: left;">
Now, all that is fine, but how can you find the relation ( like parent, child, descendant) between two nodes?</div>
<div style="text-align: left;">
For eg. consider this -> </div>
<div style="text-align: left;">
A company has about 500 webpages in their website.</div>
<div style="text-align: left;">
The webpages are inter-connected among each other, </div>
<div style="text-align: left;">
but without any looping, for easy browsing of the reader.</div>
<div style="text-align: left;">
Consider that they have maintained a site map as a list.</div>
<div style="text-align: left;">
Now, someone needs to find (separately for each) if 100 of those pages (Group.A) links to another 100 pages (Group B).</div>
<div style="text-align: left;">
So, using a normal DFS search, it'll take 100x100 searches which is not all feasible.</div>
<div style="text-align: left;">
Even an optimized DFS search, which checks the relation between one webpage of say Group.A, with all the webpages in Group.B takes 100 DFS search and each of them needs to loop through many of the 5oo pages to find the required relation..</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
Can the process be optimized further?</h4>
<div style="text-align: left;">
Of course, we can...</div>
<div style="text-align: left;">
Actually, we don't need that much of DFS search (or, just DFS, whatever)...</div>
<div style="text-align: left;">
Whenever DFS is used a good number of times times,it is bound to search through the same nodes which has been already searched in a previous DFS.</div>
<div style="text-align: left;">
This optimization, on the other hand, increases the speed of the whole process, by sacrificing some storage space.</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
Ok, just show me how to optimize it... (The main concept)</h4>
<div style="text-align: left;">
What I plan is to run the DFS through the whole list (i.e. all the nodes) only once..</div>
<div style="text-align: left;">
And use a 2-D arrays (with the number of elements being equal to number of nodes) to speed up the later searches...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The DFS search is to be customized such that for every level, when the explore() function :gets called</div>
1. The node address is used to fill up the positions of the first column array sequentially<br />
2. The corresponding second column (of the same row) is filled up with an integer which is decided by the<br />
following rule:<br />
<ul style="text-align: left;">
<li>If it is the source, then the number used is 1.</li>
<li>For every next level of the tree, zero (0) is apprehended to the end of the number that its immediate parent/ancestor was given.</li>
<li>For every node, a number is added (in the end of the number previously obtained), which is equal to the sequential order of that node in that level in which it is accessed, taking only those nodes in account which have the same parent (not ancestor).</li>
</ul>
For eg, see the below illustration:</div>
<div>
<a href="http://dl.dropbox.com/u/77212526/TREE.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="470" src="http://dl.dropbox.com/u/77212526/TREE.bmp" width="640" /></a>1. The head node is given 1.</div>
<div>
</div>
<div>
2. When the next level is accessed, a zero is added. So, it becomes 10.</div>
<div>
</div>
<div>
3. Now, for the first accessed node in the second level, 1 is added at the end of 10; for the second accessed node in the second level, 2 is added at the end of 10; and so on...</div>
<div>
</div>
<div>
4. Now for the node in the third level which is the child of the node marked "102", at first zero is added to signify the next level and then 1 is added to show that it is the only child of "102" and hence it the child </div>
<div>
which is accessed first... So, the number becomes "10201"</div>
<div>
</div>
<div>
This continues similarly...</div>
<br />
<h4 style="text-align: left;">
<br /></h4>
<h4 style="text-align: left;">
How is it gonna help me?</h4>
<div style="text-align: left;">
Now that the variable is assigned to each node, let's see how this numbers are gonna help us:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<i>Note: This method is applicable only when the number of child of any parent is less than 100, which is acceptable for general purposes... Also, here acceptable zero refers to that zero which doesn't have zero after it and also isn't the last digit of the number... For. eg, if the head node had 40 sub-node, then the 1st child of the 30th sub-node will have a number "103<u style="color: #bf9000;">0</u>01" : Here the coloured zero is not acceptable zero by definition, which actually signifies <u style="color: #bf9000;">0</u> of the 3<u style="color: #bf9000;">0</u>th node..</i></div>
<div style="text-align: left;">
<br />1. The number with higher number of acceptable zero is of a higher level.</div>
<div style="text-align: left;">
2. The numbers of same number of acceptable zero are of same level.</div>
<div style="text-align: left;">
3. If between two numbers, all the digits of the smaller number are same as the corresponding digits of the </div>
<div style="text-align: left;">
larger number and </div>
<div style="text-align: left;">
a) the larger number has no more acceptable zeros than the smaller one -></div>
<div style="text-align: left;">
then the smaller number is the parent of the larger number.</div>
<div style="text-align: left;">
b) the larger number has more acceptable zeros than the smaller one -></div>
<div style="text-align: left;">
then the smaller number is the ancestor of the larger one.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Thus, we can get all this information which are required for any type of relation between two nodes, without running the DFS multiple times, and using only one variable per node.</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
The End</h4>
<div style="text-align: left;">
Actually, I was reading that book called Algorithms (I mentioned at the Prologue) and I thought that this topic will bring a change of taste and so, here it is...</div>
<div style="text-align: left;">
If you have any suggestions or want to have a small debate, feel free to comment.....</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0tag:blogger.com,1999:blog-4749450808155842682.post-70097002523751696912012-05-07T19:37:00.003+05:302012-05-09T11:01:03.785+05:30A bit more advanced motion planning ... Revenge of the zombies<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
<u>Some words on the blog</u> (You can ignore this)...<u><br /></u></h4>
<div style="text-align: left;">
Before I start this post, I am taking these opportunity to write something about the blog itself..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
No one will like to read this, so let's keep it short..</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
In short, I made a banner for my blog using GIMP which you can see on the top instead of the text.. </div>
<div style="text-align: left;">
You can download the banner <a href="http://dl.dropbox.com/u/77212526/Blog_header_with_blog_adress.jpg" target="_blank">here</a> if you wish and use anywhere, but don't remove the blog link..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Actually this is a stripped down-version of this image I made today using free GIMP brushes and fonts...</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://dl.dropbox.com/u/77212526/Blog_image_full.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://dl.dropbox.com/u/77212526/Blog_image_full.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">If you didn't notice, this image has a secret word hidden in the title itself !! Did you get it?</td></tr>
</tbody></table>
<div style="text-align: left;">
You can get it <a href="http://dl.dropbox.com/u/77212526/Blog_image_full.jpg" target="_blank">here</a> and also you can share it freely...</div>
<div style="text-align: left;">
That's all about it, the real post starts here...</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
The post starts here...</h4>
<div style="text-align: left;">
FYI, this post is a continuation of the previous post on <a href="http://uselessprogrammer.blogspot.in/2012/05/easy-motion-planning.html" target="_blank">Easy Motion Planning</a> made yesterday..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
You must read the previous post, if you already haven't, to understand the context of this post..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I told something about optimization on the last post, but instead what I came up with is an algorithm for finding shorter route (compared to the previous one)...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
But, unfortunately, this shorter route comes with a lot of sacrifice in terms of memory usage ..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I have always sticked to my philosophy of adding one example game to every theoretical concept offered in this blog and this one isn't a exception too, but, as I already said the game can slowdown a lot, specially if you move away from the zombies to a greater distance in a condition where there are numerous obstacles in between...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The example game is present <a href="http://dl.dropbox.com/u/77212526/zombie_edit.gmk" target="_blank">here</a> in .gmk format and <a href="http://dl.dropbox.com/u/77212526/zombie_edit.exe" target="_blank">here</a> in .exe format..</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
<u>Theoretical Concept (A better zombie arrives in the scene..)</u></h4>
<div style="text-align: left;">
The main concept is a bit more detailed this time and so, it needs to be elaborated from the start...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Remember the previous zombie-human hide-and-seek game ??</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Well, they unfortunately couldn't take down the lonely human that time because they weren't intelligent enough ....</div>
<div style="text-align: left;">
So, they decide to learn from a human-vs-human hide-and-seek game and learn their strategy..</div>
<div style="text-align: left;">
<br /></div>
<h2 style="text-align: left;">
<u>Zombies learn a thing or two </u>:</h2>
<div style="text-align: left;">
They notice a few wonderful things :</div>
<div style="text-align: left;">
<br /></div>
<ul style="text-align: left;">
<li>Humans don't change their direction of motion only when they hit an obstacle..</li>
</ul>
<div style="text-align: left;">
They become aware of the obstacle from a distance and plan their motion before-hand before hitting an </div>
<div style="text-align: left;">
obstacle and are usually able to avoid it...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, in a hide-and-seek game with obstacles, they are planning their motion virtually at every moment.. </div>
<ul style="text-align: left;">
<li>Humans move in curved paths..</li>
</ul>
<div style="text-align: left;">
They were confused how humans can move in curved paths !!</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
After all, till now, they could move only in straight line...</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
But in the end a wise zombie came up with this:</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Why not make small linear movements such that it appears curved as a whole??</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
They already knew linear motion and so it wasn't hard for them to grasp the concept...</div>
<div style="text-align: left;">
<ul style="text-align: left;">
<li>Humans are ugly (What!! I am serious!) </li>
</ul>
After all, the zombies saw only their male counterparts :D</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<h2 style="text-align: left;">
<u>Learn and evolve:</u></h2>
<div style="text-align: left;">
As soon as they noticed how humans perform well in Hide-and-Seek game, </div>
<div style="text-align: left;">
they were bent on imitating all those good things to better their performance ....</div>
<div style="text-align: left;">
<br /></div>
<h2 style="text-align: left;">
<u>A better strategy</u>:</h2>
<div style="text-align: left;">
The zombies change their strategy for good and here's what they come up with:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
1. If there's a linear motion possible towards the human from your current position, always take that route...</div>
<div style="text-align: left;">
(After all, those fancy curved motion ain't the least-distance paths in this case)</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
2. If there's no linear path available,</div>
<div style="text-align: left;">
A. At first, you'll scan your nearby places (like the previous strategy)</div>
<div style="text-align: left;">
starting from closest places and gradually moving to far away places with the help of a (hypothetical) </div>
<div style="text-align: left;">
instrument which can tell you if
you'll be able to see that human if you move to a certain point or not </div>
<div style="text-align: left;">
(without physically moving to that place) and also check if the path to that point is obstruction-free</div>
<div style="text-align: left;">
B. Now, if you don't find such a point, you just hope that some other zombie will find him...</div>
<div style="text-align: left;">
But, as in most cases, you'll find one, which is your "local goal".</div>
<div style="text-align: left;">
So, when you have that point, you just <b>don't</b> start moving towards that point and stop when you reach </div>
<div style="text-align: left;">
it...</div>
<div style="text-align: left;">
Instead you take only a single step towards it and reanalyze the situation starting from point 1. </div>
<h2 style="text-align: left;">
<u>So, what's the big deal?</u></h2>
<div style="text-align: left;">
Well, you have to do a lot of analysis for sure, because you decide your next step wisely in every instant..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
But, as a reward, you get all this:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
1. You'll always know the position of your enemy, and you don't follow any obsolete "local goal" </div>
<div style="text-align: left;">
(As the player is usually always in motion, your local goal is bound to change every instant..</div>
<div style="text-align: left;">
There was this problem with the previous approach that you continue to move towards your "local goal"</div>
<div style="text-align: left;">
even when it isn't the best motion possible, as the player changes position...)</div>
<div style="text-align: left;">
2. You don't ever collide against a obstruction </div>
<div style="text-align: left;">
(unless moving along the perimeter of the obstruction is the best possible route... </div>
<div style="text-align: left;">
even in that case it isn't technically a collision...)</div>
<div style="text-align: left;">
3. You move along a shorter path</div>
<div style="text-align: left;">
( As your strategy is decided in real time, you don't move through longer path wasting some time...</div>
<div style="text-align: left;">
This is a direct impact of the absence of "obsolete goals")</div>
<div style="text-align: left;">
4. And can you believe this !!!</div>
<div style="text-align: left;">
Your motion, in some cases, appear to be curved in nature....</div>
<div style="text-align: left;">
<u><br /></u></div>
<h2 style="text-align: left;">
<u>Verdict</u></h2>
<div style="text-align: left;">
What verdict!! </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Don't ask me if the zombies won or lost.... They don't PM me so often...</div>
<div style="text-align: left;">
In case, they ever decide to, I'll surely share it with you ....</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Ok, enough is enough !!</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In a more serious tone, though, I think this more advanced Motion Planning has its own advantages and disadvantages...</div>
<div style="text-align: left;">
It follows a much shorter path, for sure, but it isn't practical to make the basic zombies this advanced because, of course,</div>
<div style="text-align: left;">
a) it'll waste a lot of processing power </div>
<div style="text-align: left;">
(as it has to plan its next step every instant whereas the basic motion planning required such decisions only when it collided against an obstacle)</div>
<div style="text-align: left;">
b) it'll make the game harder for the player...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, it is usually better to use this motion planning algorithm only in case of "Boss zombies" or a army of "elite zombies"...</div>
<div style="text-align: left;">
Whatever it is, in the end, always remember to keep the number of such zombies as low as possible....</div>
<h4 style="text-align: left;">
<br /></h4>
<h4 style="text-align: left;">
The END ??</h4>
<div style="text-align: left;">
So, here ends my second post on Motion Planning </div>
<div style="text-align: left;">
And as I can feel, I will have a "overdose of motion planning" if I continue to post on this topic...</div>
<div style="text-align: left;">
To be true, I don't have any more views to offer on this topic at the moment...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Though if I ever come across any fresh idea on this topic, I'll be sure to post theme here ..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, there will be a change of taste in the next blog post:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The next post is going to be on one of those platforming tutorials I mentioned <a href="http://uselessprogrammer.blogspot.in/2012/05/jumbo-platform-tutorial-evolve-from.html" target="_blank">here</a> ...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, still tomorrow, good bye...</div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com1tag:blogger.com,1999:blog-4749450808155842682.post-830733573991409722012-05-05T19:10:00.001+05:302012-06-23T08:21:14.453+05:30Easy Motion planning<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="font-size: large;"><u>Original post</u></span></h2>
<div style="text-align: left;">
Hey mate! I forgot your name from G+.. Here's what you wanted..</div>
<a href="http://dl.dropbox.com/u/77212526/zombie.gmk" target="_blank">Zombie game fixed </a><br />
Hopefully you've re-downloaded it.. (If your downloaded version has a constant val, then it's the correct one)..<br />
I've changed it a bit.. <br />
I've defined a constant val to tweak the values ... Change its value to tweak the performance .. 40 (default) is pretty fine..<br />
It's working pretty good ... Just the way I planned .. Without real motion planning...<br />
<h2 style="text-align: left;">
<span style="font-size: large;"><u>Detailed post </u></span></h2>
<h4 style="text-align: left;">
Prologue</h4>
<div style="text-align: left;">
<a href="https://plus.google.com/113960245743294337947" target="_blank">James Clerk</a> on Google+ asked me:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<i>" As for my problem, it's based around Step Towards Point being removed
from the D&D options. Turns out all MP (Motion Planning) functions
were removed, so my game can't port to HTML5 properly.<br />What I wanted
was for object A (A zombie) to move towards object B (The player), and
if it came in contact with a solid object, he would move around it and
continue to the player.<br />However, while the functions can be called in
Studio/HTML5, they only do linear paths, and the zombies get caught on
solid objects still."</i></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
This was in reference to his online zombie game <a href="http://zombieskittles.com/still-doing-it" target="_blank">here.</a><br />
<br />
As he is going to edit his game, I will be hosting it on my dropbox account soon.. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, he asked me if I could help him solve it and there was a big bonus for completing this task .....</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I'll get my first subscriber for this blog...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
My reply was: </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<i>Oh.. I checked your zombie game.. Is that the problem?.. </i></div>
<div style="text-align: left;">
<i>Yup, I remember
your zombies (your zombies.. :D) getting stuck at RIP stones.. </i></div>
<div style="text-align: left;">
<i>If that
is the problem, I can give you some easy solutions but specific only to
that game...</i></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I promised him that I will post a solution within 6 hours but in my count,<i> </i>I took about 30 minutes more though...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
You can find the file <a href="http://dl.dropbox.com/u/77212526/zombie.gmk" target="_blank">.GMK file</a> above ...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
(As this post is GM-specific and doesn't use any pro-only function, so I am doing away with the .EXE version)</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, here I'll try to break up how the solution works<br />
(even though it's far less advanced than motion planning, it works quite fine)...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
James told that he will be looking forward to it and so here's the detailed explanation of the solution...<br />
<br />
<h4 style="text-align: left;">
<u>Basic Theoretical Concept </u></h4>
<h4 style="text-align: left;">
</h4>
<div style="text-align: left;">
The main concept is whenever the zombie is stuck because the straight line path to the player is blocked, give the zombie a local goal (which is the closest possible position from where it can make a straight motion to the player) and when the zombie reaches that local goal, change it's goal to the x and y-position of the player..<br />
<br />
<h4 style="text-align: left;">
What is this goal thing you're telling??</h4>
<div style="text-align: left;">
The goal is a point on the current room of the game towards which the zombie will try to move in a straight line path ..<br />
<br />
<h4 style="text-align: left;">
Please define the term "try" ?? </h4>
<div style="text-align: left;">
"Try" here refers to a simple linear movement from one position to another unless it is obstructed by a RIP stone (i.e. a solid obstacle), in which case it will simply stop...<br />
<br />
<h4 style="text-align: left;">
Is it this simple? Or, can you explain the concept in more details? </h4>
<h4 style="text-align: left;">
</h4>
<div style="text-align: left;">
I have to break the truth.. It isn't that simple..</div>
<div style="text-align: left;">
Even if the theoretical concept sounded perfect, here are some complexities..</div>
<div style="text-align: left;">
I'll try to add real-life examples to describe the problems easily..</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Problem 1:</h3>
</div>
<div style="text-align: left;">
In defining "try" , I told that it is a simple movement which will stop if its straight path towards the goal is obstructed by an obstacle. But we don't want the zombie to stop (don't we? :D Nope.. atleast in the game we are going to make those dumb zombies a little bit intelligent..) simply because it's path is obstructed by a solid obstacle .. We want them to move on.. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<h3 style="text-align: left;">
Real-life example 1 and solution (Well, not so real...)</h3>
<div style="text-align: left;">
Consider it like hide and seek game.. </div>
<div style="text-align: left;">
You are the zombie who can walk only in straight lines... You want to find that damn intelligent human..</div>
<div style="text-align: left;">
But as the human is intelligent, he tries to get your view (of him) obstructed by obstacles..</div>
<div style="text-align: left;">
So, here you decide your strategy..</div>
<div style="text-align: left;">
You'll scan your nearby places (starting from closest places and gradually moving to far away places)</div>
<div style="text-align: left;">
with the help of a (hypothetical) instrument which can tell you if you'll be able to see that human if you move to a certain point or not (without physically moving to that place)...</div>
<div style="text-align: left;">
Now, you find one such place from where you view of the player is unobstructed and you can move in a straight line path towards him.. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
But there can arise this problem:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
You can't move towards that nearby place you thought will be perfect because the straight line path to that point is obstructed.. So, you need to know if you can reach that point in a linear path or not..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
If not, continue searching for the next closest best place according to your strategy.. </div>
<div style="text-align: left;">
(This closest best point has been referred to as ' local goal' or 'goal' previously...)</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
And, if yes, move to that place and continue the chase..</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Problem 2 (Based on example..)</h3>
<h3 style="text-align: left;">
</h3>
<div style="text-align: left;">
Though this problem may sound similar, it's a bit different....</div>
<div style="text-align: left;">
Actually, this problem lies in problem1 too..</div>
<div style="text-align: left;">
So, problem to both these solutions needs to be merged in the end..</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, that instrument tells you whether you can see the human from another point or not..</div>
<div style="text-align: left;">
It doesn't really imply that you can move towards the human from that point or not.. Because your body </div>
<div style="text-align: left;">
(the body is equivalent to sprite of the zombie and the vision is equivalent to the line joining the center of the sprites of the zombie and the human) has dimensions and it may get obstructed even if you vision isn't..</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Solution 2:</h3>
<div style="text-align: left;">
We'll need a bit of geometry now and also we need to focus on the game more now...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
We'll need a basic assumption (which will make the complex geometrical problem easy) and my game also stands on this..</div>
<div style="text-align: left;">
So, unfortunately this is a must requirement and in some minor way, limitation for the game...</div>
<div style="color: #9fc5e8; text-align: left;">
<br /></div>
<div style="color: #0b5394; text-align: left;">
<span style="font-size: large;"><b>Both the zombie and the player needs to have sprites of same dimensions and the precise collision (in GM) must be turned off for both the sprites </b></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
which is equivalent to</div>
<div style="color: #9fc5e8; text-align: left;">
<br /></div>
<div style="color: #0b5394; text-align: left;">
<span style="font-size: large;"><b>Both</b></span><span style="font-size: large;"><b> the sprites must </b></span><b><span style="font-size: large;">have same size of bounding box used for collision</span></b></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Look at this illustration:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://dl.dropbox.com/u/77212526/zombie_illustration.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://dl.dropbox.com/u/77212526/zombie_illustration.png" width="227" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The rectangles represent bounding box of the sprites, which are of same dimensions</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
</div>
<div style="text-align: left;">
<br />
Please note that this is a 2-D diagram though it may appear to be 3-D..<br />
<br />
The line joining the center of both the sprites doesn't get obstructed by the RIP stone ...<br />
But the two line joining the left-top and left-bottom end of the two sprites gets obstructed by the stone. So, the zombie can't move towards the human in linear motion without getting obstructed...<br />
<br />
So, to make sure that the whole sprite can pass through, we need to do some more checking<br />
<br /></div>
<div style="text-align: left;">
We need to check if the line joining all the four corresponding ends of the two bounding box collides with the obstacle or not...<br />
<br />
If not, then only that point can be considered as a local goal...<br />
<br />
<h4 style="text-align: left;">
What still needs to be done?</h4>
<div style="text-align: left;">
James, at first wanted to know if I can re-write those MP (motion planning) functions and in the end, I can see that I've finally come up with a primitive and this game-specific version of it.....</div>
<div style="text-align: left;">
Though I have always referred to it as a trick...</div>
<div style="text-align: left;">
So, why not make it still better?<br />
<br />
There is this one problem: <br />
<ul style="text-align: left;">
<li><b>The zombies tend to overlap each other to a high extent such that after few minutes many of </b><b>them becomes recognizably one... </b></li>
</ul>
<div style="text-align: left;">
I knew this was to come, and I do have a solution in my head..
<br />
<div style="text-align: left;">
So, this will probably not be a problem in the future...</div>
</div>
</div>
<div style="text-align: left;">
Also, my approach can be highly optimized, I know that...</div>
<div style="text-align: left;">
So, I'll make a new post on this optimization part... </div>
<div style="text-align: left;">
Hopefully, I'll be posting it tomorrow .....</div>
<div style="text-align: left;">
Still then, hang on....</div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
You may avoid this part (Unless you are James Clerk ) ...</h4>
<div style="text-align: left;">
<i>Note: This part is GM-specific... </i></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-size: small;"><b>Q:James asked me why I haven't used the solid property present for all objects in GM..</b></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-size: small;"><b>A: </b>Well, the truth is you would have yourself stopped using it after some days..</span></div>
<div style="text-align: left;">
<span style="font-size: small;"> <span style="font-family: inherit;">It can be easily re-created with the </span></span><b style="font-family: inherit;">place_meeting(x,y,obj) </b><span style="font-family: inherit;">function..</span></div>
<div style="font-family: inherit; text-align: left;">
Just check if the next position will be collision free </div>
<div style="font-family: inherit; text-align: left;">
from the other objects you consider solid and you're done...</div>
<div style="font-family: inherit; text-align: left;">
As an added benefit,you'll have full control over your objects..</div>
<div style="font-family: inherit; text-align: left;">
The solid property is somewhat mysterious and added in the help file </div>
<div style="font-family: inherit; text-align: left;">
without much details...</div>
<div style="font-family: inherit; text-align: left;">
So, everyone tries to avoid it...</div>
<div style="font-family: inherit; text-align: left;">
From what I've experienced, I can tell this:</div>
<div style="font-family: inherit; text-align: left;">
1.It works only when two objects are colliding due to their speed variables</div>
<div style="font-family: inherit; text-align: left;">
(hspeed and vspeed)</div>
<div style="font-family: inherit; text-align: left;">
2.If you use like x=5 and y=22 to move an instance of an object to (5,22) and </div>
<div style="font-family: inherit; text-align: left;">
there is already a solid object at (5,22) it doesn't give a error.. </div>
<div style="font-family: inherit; text-align: left;">
i.e. both of them exists at that point in harmony.. but the problem starts</div>
<div style="font-family: inherit; text-align: left;">
if you want to move any of those instances using the speed variables they </div>
<div style="font-family: inherit; text-align: left;">
get stuck...</div>
<div style="font-family: inherit; text-align: left;">
So, it is like your unrecognizable pain-in-the-ass feature...</div>
<div style="text-align: left;">
<tt><br /></tt></div>
<div style="color: #351c75; text-align: left;">
<tt><span style="font-size: large;"><b> Don't use it at all....</b></span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com2tag:blogger.com,1999:blog-4749450808155842682.post-75373398755831894892012-05-05T00:55:00.000+05:302012-06-10T08:27:54.451+05:30Swift slope movement in platform games...<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
Introduction:</h4>
This is the first useful tutorial in the series of <a href="http://uselessprogrammer.blogspot.com/2012/05/jumbo-platform-tutorial-evolve-from.html" target="_blank">Jumbo Platform Tutorial.. Evolve from a noob to pro .</a><br />
I have selected one of the topics marked <span style="color: #9fc5e8;">Very Advanced</span> to prove that this blog isn't just all about bragging, <br />
So, let's start the real thingy ...<br />
<br />
<h4 style="text-align: left;">
What is this all about and why is it marked 'very advanced'?</h4>
<h4 style="text-align: left;">
</h4>
<div style="text-align: left;">
Ok, let's start with a image...<br />
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://dl.dropbox.com/u/77212526/Untitled-1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://dl.dropbox.com/u/77212526/Untitled-1.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A screenshot from my example game at Game design Practical .. Part1</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
See those green shining things - yup, those are slopes ... you got it right...</div>
<div style="text-align: left;">
Actually, it shows two types of slopes to be technical...<br />
<br /></div>
<div style="text-align: left;">
<h3 style="text-align: left;">
1. Steps (marked 1 in violet)</h3>
<br /></div>
<div style="text-align: left;">
<i>[ Many would suggest that the idea of steps and slopes are not identical in terms of physics ... </i></div>
<div style="text-align: left;">
<i>That is undoubtedly true..</i></div>
<div style="text-align: left;">
<i>But when you look at a game, they both serve the same purpose ..</i><br />
<i> Move vertically and horizontally at the same time...</i><br />
<br />
<i> So, in terms of our game world, both can be handled similarly even though slopes are not continuous..]</i><br />
<br /></div>
<div style="text-align: left;">
<h3 style="text-align: left;">
2. Inclined planes(marked 2 in yellow)</h3>
</div>
<div style="text-align: left;">
<br />
[Slopes, as you know them...]<br />
<br />
[Just to add, straight and sloped surfaces are not distinguished in my approach..<br />
So, plane surface also fall in this category...]<br />
<br /></div>
<div style="text-align: left;">
Clearly, you knew about slopes, but I just revised them to make sure we are on the same page ....</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Now, about being hard and marked 'Very advanced' .....<br />
<br /></div>
<div style="text-align: left;">
First of all, its better to know how I mark the hardness level of every tutorial..</div>
<div style="text-align: left;">
The ones marked in Red are those which haunted me for about a week<br />
and I spend hours achieving those results with little or no success at all.... <br />
<br />
<br />
So, these are like the special ones for me....<br />
<br /></div>
<div style="text-align: left;">
One of them is this one...<br />
<br />
<br />
Though I believe that it is quite possible for others to achieve this results within hours and with a different approach, I can guarantee can you one thing...<br />
<br />
<br />
All these approaches are self-thought, original<br />
and hence it is highly probable that it will never match with any other approach of the same problem you have ever known ...<br />
<br /></div>
<div style="text-align: left;">
So, it is suggested that you go through the <i>Theoretical Approach</i> section even<br />
if you already know how to solve this problem ...</div>
<h4 style="text-align: left;">
Theoretical Approach</h4>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<br />
<br />
It is quite hard to explain it without this edited version of the previous image ..</div>
<div style="text-align: left;">
<br />
Note: <i>All the X-axis and Y-axis referred here considers the image displayed
above to be in the first quadrant.. This is not similar to the
representation of x-position and y-position in Gamemaker where every object is
considered to be in the 4th quadrant..</i><br />
<br /></div>
<div style="text-align: left;">
So, now my approach is:</div>
<div style="text-align: left;">
For. eg. when right key is pressed:</div>
<div style="text-align: left;">
Check the height of the slope in the next x-position you want the player to move, when the motion is possible ...<br />
<br />
The checking should be done in this order -><br />
<br />
Start checking from a y-position somewhat below the current y-position of the player whether it is collision-free when the player sprite is placed at that point.<br />
<br />
(this 'somewhat' value should be about 5 times the height of the slope sprite)<br />
<br />
and continue checking vertically upright (for eg. bottom to top along the blue line in this pic)<br />
<br />
until you are equally 'somewhat' above the y-position of the player...</div>
<div style="text-align: left;">
If any check returns true ,<br />
<br />
instantly snap the player to that position<br />
<br />
and stop the loop..</div>
<h4 style="text-align: left;">
I have tried to put up a pseudo-code representation here with the concept of maximum slope:</h4>
<div style="text-align: left;">
<br />
1.Max_Slope=Define the maximum slope that the player will be able to move up along (0 to 90 degrees)</div>
<div style="text-align: left;">
2.Max_Hor=Define the number of horizontal units that the player moves in each step (Usually, 5 is a good value in GM)</div>
<div style="text-align: left;">
3.Height=Using any loop find the height in next adjoining area<br />
(specifically the height of the (x+Max_Hor) position where it is collision-free when a player sprite is placed at that position [where x is the x-position of the player]...<br />
the place_meeting function of Gamemaker can be used)<br />
(It can be negative or positive)</div>
<div style="text-align: left;">
4. Find Slope_obtained=Height/Max_Hor</div>
<div style="text-align: left;">
5. If Slope_obtained<Max_Slope, move the player to (Max_Hor, Height) relative to the player's current position...</div>
<div style="text-align: left;">
<h4 style="text-align: left;">
Example game:</h4>
</div>
<div style="text-align: left;">
<br />
1. <a href="http://dl.dropbox.com/u/77212526/awesome_movement.exe" target="_blank">.EXE version</a><br />
<br /></div>
<div style="text-align: left;">
2. <a href="http://dl.dropbox.com/u/77212526/awesome_movement.gmk" target="_blank">.GMK version</a></div>
<div style="text-align: left;">
I've avoided the maximum slope concept in the example game to keep it simple...</div>
<div style="text-align: left;">
Controls: Use right and left arrow keys for movement..<br />
<br />
If it appears a bit complicated, read it again slowly and try to understand it...<br />
<br />
<br />
If still some of the discussions appear unclear to you, feel free to comment... I'm there to help you...<br />
<br />
<br />
</div>
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br /></div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0tag:blogger.com,1999:blog-4749450808155842682.post-2082760547094146802012-05-04T18:34:00.001+05:302012-05-09T11:32:06.452+05:30Jumbo Platform tutorial.... Evolve from a noob to a pro<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Everything you'll ever need to know to make a cool platformer</h2>
<h4 style="text-align: left;">
Introduction:</h4>
So, you have decided to make a good platform game? Well, why not make it great!<br />
You have probably heard that platform games are the easiest genre of games to make and it is undoubtedly quite true. Though this blog is inclined towards the "Gamemaker" software, and all the experience I gathered is from the GMC forum, all the discussions (except the GM-specific programming) here is applicable towards game design as a whole....<br />
So, lets turn our head towards platform games again..<br />
The first platform game I remember playing is Dave, though others may relate themselves with Mario...<br />
But the truth is that inspite of being the most ancient genres in the history of gaming, they remain one of the most discussed genre in every game design forum. This is probably because they still remain the ABC of game design ..... Every game designer starts his journey learning the basics of game programming and design .. and what's better than a classic platformer ??? Every game design forum (and specifically the <a href="http://gmc.yoyogames.com/" target="_blank">GMC forum</a> ) is full with "How to" questions on platform games ...<br />
A typical question starts like -><br />
" I am a noob in GM forum. I started making a platformer a few days back and now I'm stuck in a problem.<br />
PLEASE HELP ME ...<br />
*The problem goes below* "<br />
So, does it prove that platform games are very tough?<br />
No, it just proves that everyone typically starts with a platformer and they need a bit more help to evolve as a better game designer. Most of these so-called "newbies" starts googling "Platform Game Tutorial" and no doubt, there exists a lot of good ones... But the problem surfaces when these tutorials end and they suggest you to try some advanced concepts like knock-back, springs, water physics, AI enemies or even slope movements..<br />
Most of the noobs can understand what they have learned till now,<br />
but these new things appear alien to them ..... <br />
They try to use real physics laws, which are impractical in this case.. So, I'll try to streamline this self-learning process for the future ones and tell them which tweaks are important for a good game..<br />
Every advanced concept of platformer-cum-fighting game that I can think of will be present in my Blog.<br />
<span style="font-size: large;"><b>Head over to the To Do list to see what will be added next.</b></span><br />
<br />
<span style="font-size: large;"><b>Head over to the Available Tutorial list to see which tutorials have been added.</b></span><br />
<h4 style="text-align: left;">
So where do I start?</h4>
<div style="text-align: left;">
<b>Let me suggest you this tutorial page: <a href="http://sandbox.yoyogames.com/make/tutorials" target="_blank">Tutorials by Mark Overmars</a></b></div>
<div style="text-align: left;">
1.You should read the <a href="http://sandbox.yoyogames.com/downloads/tutorials/goodgame.zip" target="_blank">first tutorial </a>there to get a good idea of what a good game is and how to make sure yours is too.<br />
2.You may read the <a href="http://sandbox.yoyogames.com/downloads/tutorials/first.zip" target="_blank">second</a> and <a href="http://sandbox.yoyogames.com/downloads/tutorials/shooter.zip" target="_blank">third</a> tutorial if you are not adept with the basics of a game.<br />
3. <span style="color: red; font-size: large;">You must read</span> the <a href="http://sandbox.yoyogames.com/downloads/tutorials/platform.zip" target="_blank">platform game tutorial</a> <span style="color: black;">before you continue reading this. This tutorial covers the basics of a platform game in general, and also tells you about its programming aspect in Game Maker 8.</span><br />
<span style="color: black;">*If the links are ever down, inform me. I have them safe in my hard disk* </span><br />
<span style="color: black;">This blog post </span>can be considered a direct continuation of this tutorial.<br />
Every advanced topic that is listed at the end for the reader to try out will be present here, but that is not all.<br />
Read the To Do list and Available tutorial list to see what they are.<br />
I can assure you even a Pro in game maker will find something of his interest in those list.<br />
<h4 style="text-align: left;">
To Do List</h4>
<div style="text-align: left;">
All this topics will be added as tutorials very soon...</div>
<div style="text-align: left;">
Technically, 1 (or, sometimes even more) every day....</div>
<div style="text-align: left;">
Use Atom Feed at the top-right or bottom of the page to stay updated... </div>
<div style="text-align: left;">
And rest assured you'll never miss one..</div>
<div style="text-align: left;">
<div style="text-align: left;">
<b><i><span style="font-family: Times,"Times New Roman",serif; font-size: large;">*Technical information about the Atom feed*</span></i></b></div>
</div>
<div style="text-align: left;">
{</div>
<div style="text-align: left;">
Atom feed on the top-right -> Feedburner feed</div>
<div style="text-align: left;">
Atom feed on the bottom -> Blogger feed</div>
<div style="text-align: left;">
Choose the one which suits you... </div>
<div style="text-align: left;">
And if you'll like a RSS feed, tell me through the comment section...</div>
<div style="text-align: left;">
}</div>
<div style="text-align: left;">
1.<b><span style="color: #274e13;">AI enemy</span></b></div>
<div style="text-align: left;">
(Can be very easy, as well as very complex.. But the one here is mediocre... After all, AI is a vast topic) </div>
<div style="text-align: left;">
2.<span style="color: blue;"><b>Spring</b> </span>(Can be used as trampoline similarly)</div>
<div style="text-align: left;">
3.<b><span style="color: blue;">Moving platforms</span></b></div>
<div style="text-align: left;">
(To quote Mark Overmars, the creator of Game Maker ->"this is not easy!"</div>
<div style="text-align: left;">
But, personally I think, it wasn't that hard either.. Atleast it was a lot easier than the next one...) </div>
<div style="text-align: left;">
4.<b><span style="color: red;">Water physics</span></b></div>
<div style="text-align: left;">
(I hate to break the truth.. This isn't fluid simulation... But it's better than the water used in the "Bounce" game, commonly found in Nokia mobile phones... This one really wasn't easy to come up with...) </div>
<div style="text-align: left;">
5.<b><span style="color: red;">Advanced push-back function </span></b></div>
<div style="text-align: left;">
(<i>This one isn't really as simple as it appears. For eg. even if 2 objects undergo oblique collision in the air, this push-back will work perfectly. Also, this is achieved through an external update function. Just for your info, all the in-built variables of any instance in game maker are updated through an internal updated function.. This is one of my favourite..</i>)</div>
<div style="text-align: left;">
6. <b style="color: #274e13;">Double jump and run</b></div>
<div style="text-align: left;">
(Maybe only beginners will need it...Commonly asked question on GMC forum)</div>
<div style="text-align: left;">
7.<b><span style="color: blue;">Awesome Dragon-ball style projectile</span>..</b></div>
<div style="text-align: left;">
(Similar effect as energy balls in Dragon Ball Z(DBZ), if you know what I mean.. It looks very cool...)</div>
<div style="text-align: left;">
<strike>8.<b><span style="color: red;">Swift slope movement </span></b></strike></div>
<div style="text-align: left;">
9. <b>*Your request here*</b></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="color: #bf9000; font-size: large;">Colour coding-></span> <b><span style="color: red;">Red</span></b> -Very advanced <b><span style="color: blue;">Blue</span></b> -Bit advanced <b style="color: #274e13;">Green </b>-Quite easy</div>
<div style="text-align: left;">
Also, you can request anything related to platform games here and if it's good enough, it'll be listed here alongwith your name and ofcourse, an awesome solution...</div>
<div style="text-align: left;">
If you know about a really advanced topic (not only platform games) and how to implement in Game Maker, tell me about it. If it's hard enough (I'll take a 2-day time about learn about it and if I can't find any solution), you can be a prestigious co-writer or guest writer in this blog ....</div>
<h4 style="text-align: left;">
Available tutorials</h4>
1. <a href="http://uselessprogrammer.blogspot.com/2012/05/swift-slope-movement-in-platform-games.html" target="_blank"><b><span style="color: red;">Swift slope movement </span></b></a><strike><b><span style="color: red;"><br />
</span></b></strike><br />
<div style="text-align: left;">
(This is
a very popular question in GMC forum ... How can I make the player move
swiftly up and down along a slope?? ... The solution will work like a
breeze ... Move smoothly along any rough slopes or planes)</div>
<div style="text-align: left;">
2.(To be added soon...) </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
One topic will be discussed from the TO DO List every day..</div>
<div style="text-align: left;">
You can request a topic from this list to be discussed soon by posting the name of the topic and a +1.</div>
<div style="text-align: left;">
For e.g. Double jump and Run +1.</div>
<div style="text-align: left;">
Your vote for a topic counts.. The one with the highest vote is discussed first....</div>
<div style="text-align: left;">
If a topic lingers in the To Do list for more than 10 days, it'll be discussed as a special extra blog on the 11th day, in addition to the one Voted favourite....In this way, there won't be any backlog...</div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0tag:blogger.com,1999:blog-4749450808155842682.post-49183641475637214902012-05-03T20:20:00.003+05:302012-05-09T11:32:41.267+05:30Game design practical.. Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="font-size: large;">What is this?</span></h2>
<div style="text-align: left;">
<span style="font-size: small;">T</span>his is a direct followup to my previous blog <a href="http://uselessprogrammer.blogspot.com/2012/05/let-me-share-some-real-stuff.html"> here.</a><br />
I'll try to show you a practical example based on the theoretical concept introduced previously.<br />
My vision on this blog is to introduce some new or "cool" theoretical game design ideas at first and follow them up with an example game. This follow-up game will highlight as many of those ideas as possible..<br />
<h4 style="text-align: left;">
Just as a info: </h4>
<div style="text-align: left;">
Most of these games will be made using Gamemaker 8... It's probably needless to say that i'm a great fan of this software and would recommend anyone to try the free version (though you may want to buy a full version to unleash the actual power)... In spite of all this, I'm <span style="font-size: small;"><b><u>highly</u> </b></span>dissatisfied with their Gamemaker:HTML5, they've increased the prices many fold just to give you a piece of buggy crap.. I thought that I'll add browser games as example but unfortunately even this example won't run flawlessly in the HTML5 version (thanks to Yoyogames, the maker of Gamemaker:HTMl5).. So, there will be two versions of the examples: <b> </b></div>
<div style="text-align: left;">
<b>1.fully editable .GM8 file </b>(smaller in size, but only for those who have full-version of the gamemaker, as it uses the pro-only functions) </div>
<div style="text-align: left;">
<b>2.EXE version </b>(larger in size, standalone version, for anyone to see the final product).</div>
<h4 style="text-align: left;">
Recap from previous blog:</h4>
<div style="text-align: left;">
The previous blog offered some theoretical concept on how to improve the looks and feels of a game.</div>
<div style="text-align: left;">
My concept was to make the background dark and introduce a "grunge" feel...</div>
<div style="text-align: left;">
Some discussions were also made on how to utilize shadows wisely. If you haven't read it, you may like to read it <a href="http://uselessprogrammer.blogspot.com/2012/05/let-me-share-some-real-stuff.html"> here.</a><br />
<br />
<h4 style="text-align: left;">
Original post starts here:</h4>
<div style="text-align: left;">
For those jumping to see the final product, here's the link:</div>
<div style="text-align: left;">
1. <a href="http://dl.dropbox.com/u/77212526/dark_edit.gmk" target="_blank">.GM8 (Same as .gmk ) link</a><br />
2. <a href="http://dl.dropbox.com/u/77212526/dark_edit.exe" target="_blank">.EXE link</a> <br />
All the controls and instructions can be seen by pressing F1.<br />
Check it out for a secret!! <br />
Special note: Run and jump for a higher jump. You'll need it!! <br />
<br />
<h4 style="text-align: left;">
Screenshot:</h4>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://dl.dropbox.com/u/77212526/screenshot.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://dl.dropbox.com/u/77212526/screenshot.jpg" width="320" /></a></div>
<h4 style="text-align: left;">
Note (about the game):</h4>
<div style="text-align: left;">
Few things should be noticed in the game:</div>
<h3 style="text-align: left;">
1.How to implement the spotlight</h3>
<div style="text-align: left;">
The orange lines from the top-left spotlight to the player is willingly left there to be shown.. It is to prove that the spotlight works correctly.. </div>
<div style="text-align: left;">
As it is quite difficult to make real 2-D light-shadow dynamics.. I've left the complex part aside to show its use.. Frankly speaking, it is a unrealistic light which you can easily understand when you try out the game..</div>
<div style="text-align: left;">
The <b>stripped version of the spotlight physics</b> that I've used follows the following rules correctly:</div>
<h3 style="text-align: left;">
<b>A. </b>Light originates as a pencil beam (intense bunch of light) and it doesn't spread. </h3>
<h3 style="text-align: left;">
B.But the object(s) on which it falls spreads the light in a short range to illuminate other objects nearby..</h3>
<div style="text-align: left;">
So, when the line joining the spotlight and the player is obstructed by some object, that object is illuminated most brightly and the other objects nearby are illuminated partially depending on its distance from the aforesaid illuminated object.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
If you have a better suggestion, I'd love to hear it...</div>
<h3 style="text-align: left;">
2.The bright arrow</h3>
<div style="text-align: left;">
Look at the screenshot.. Can you see a bright arrow.. It is used to implement <a href="http://uselessprogrammer.blogspot.com/2012/05/let-me-share-some-real-stuff.html#link1" target="_blank">this theoretical concept.</a><br />
Beware.. flashy things can be misleading.. </div>
<div style="text-align: left;">
<br /></div>
</div>
</div>
</div>
</div>
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0tag:blogger.com,1999:blog-4749450808155842682.post-57048974263196754402012-05-01T15:30:00.001+05:302012-05-09T11:30:13.649+05:30Let me share some real stuff..My game design ideas... Part1<div dir="ltr" style="text-align: left;" trbidi="on">
Let me get to the point ...<br />
My AIEEE exams are over and I've got a month of time to waste. It wasn't good enough, but it wasn't that bad too. So, I've decided to learn this UNITY game creation software which I've long yearned to do. Thus i can spend my time fruitfully without running out of what to do. That's all great, but let me share some previous game and game programming related ideas.{History: I started Gamemaker about a year ago, and now I'm quite proficient at it, though i never really wanted to learn the 3d part, not because it is hard, but because it is totally undeveloped and there are no future plans from yoyogames to make it more better. All this lies behind my decision to learn a continuously developed 3D game creation software like UNITY.}<br />
All my ideas here are based on 2D games as I've never worked with 3D graphics.<br />
Okay enough foreplay, lets get on to the real stuff.<br />
So this is my idea to add a whole funky dimension to a game 'cause everyone can make a game but it needs to appeal to the players.<br />
And visuals are a huge part of that.<br />
Statistically, it is seen that some really great ideas have failed on the grounds of crappy graphics and half-assed work in visual effects. So read on to make your game stand out.... <br />
<h2 style="background-color: white; color: black; text-align: left;">
<span style="font-size: large;"><span style="font-size: small;"> <span style="font-size: large;"><span style="font-family: Georgia,"Times New Roman",serif;"> <span style="background-color: black; color: #f1c232; font-size: x-large;"><span style="font-family: inherit;">1.</span></span></span></span><span style="font-size: x-large;"><span style="background-color: black; color: #f1c232; font-family: inherit; font-weight: normal;"> Make it dark... so Let there be light !!!</span></span></span></span></h2>
<div style="background-color: white; color: black; text-align: left;">
<span style="font-size: large;"><span style="font-size: small;"><span style="background-color: black; color: #f1c232; font-family: Georgia,"Times New Roman",serif;"><span style="color: black;"><span style="background-color: white;"> </span></span></span></span></span>
<br />
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">You need to give a whole dark grim look to the game and for that you need light.</span><br />
<span style="font-size: 14pt; line-height: 115%;">Ironic, huh? And as complex as that sounds, it's pretty easy. But you might have to read the rest of the post for that.</span><br />
<span style="font-size: 14pt; line-height: 115%;">So you think I just self contradicted myself in the first line there right?? Not at all!!!</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">No one would like to wander in your game thinking
oh-shit-someone-forgot-to-turn-on-the-lights!</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">A game should be a masterpiece of art; as with every form
of art it is very important to know where to start and where to stop.</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">See you can control the darkness only by light.</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">But the million-dollar question is where to place those
lights? And of course, how intense should it be?</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Actually there is no definite answer to this question.
(Actually, it totally depends on the situation.)</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Look at it like an strategy game; you choose a strategy and
you fine-tune it until it reaches perfection.</span></div>
<div class="MsoNormal" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Here is a helpful checklist that you might want to read—</span></div>
<div class="MsoListParagraphCxSpFirst" style="color: blue; font-family: inherit; text-indent: -0.25in;">
<h3 style="text-align: left;">
<span style="font-size: 14pt; line-height: 115%;"><span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><span style="font-size: 14pt; line-height: 115%;">1. Place lights where it’s <i style="mso-bidi-font-style: normal;">absolutely</i> necessary:</span></h3>
</div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">See we are very imaginative beings. The mind finds things more invigorating when
it is unclear. Like it immediately piques your interest when you see the shape
of something in the dark corner and you want to check it out. Even though you
have passed the same corner countless times and never looked back at it. The darkness
is what makes it mysterious, hence more interesting.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="color: blue; font-family: inherit; text-indent: -0.25in;">
<h3 style="text-align: left;">
<span style="font-size: 14pt; line-height: 115%;"> <span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><span style="font-size: 14pt; line-height: 115%;">2. Control intensity and range of light:</span></h3>
</div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Place soft (low-intensity) lights.
Preferably with long range. Don’t make it bright enough to jar the eye of the
player. Make it blend. Make it natural and subtle.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Also it would provide the player with a
longer LOS(line-of-sight).</span></div>
<div class="MsoListParagraphCxSpMiddle" style="color: blue; font-family: inherit; text-indent: -0.25in;">
<h3 style="text-align: left;">
<span style="font-size: 14pt; line-height: 115%;"> <span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><span style="font-size: 14pt; line-height: 115%;">3. Use the shadows wisely:</span></h3>
</div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">In a black and white world, use both
equally.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Place lights so it would illuminate some
specific areas and/or objects.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Let the shadow swallow the rest.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Like say, there is a broken platform which
is not illuminated in any way. Place lights below it that the platforms above
the broken are lighted. This way you let the player know in a subtle manner
that he’s going to fall unless he’s careful enough.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">This way you make the player analyse the situation,
intrigue him with options and generally make him more interested in the game. </span></div>
<div class="MsoListParagraphCxSpMiddle" style="color: blue; font-family: inherit; text-indent: -0.25in;">
<h3 style="text-align: left;">
<span style="font-size: 14pt; line-height: 115%;"> <span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><span style="font-size: 14pt; line-height: 115%;">4. Brainstorm, brainstorm and last but not the
least brainstorm some more:</span></h3>
</div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">So I have noticed that the whole grunge,
punk-ish feel has been a part of a number of AAA titles.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">But maybe the world hasn’t seen enough of
it.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Which gives you the opportunity to come up
with new, innovative, dare I say ‘cool’ ideas.</span></div>
<div class="MsoListParagraphCxSpMiddle" style="font-family: inherit;">
<span style="font-size: 14pt; line-height: 115%;">Let me help you get started by telling my
own ideas:</span></div>
<div class="MsoListParagraphCxSpLast" style="color: #073763; font-family: inherit; margin-left: 0.75in; text-indent: -0.25in;">
<h4 style="text-align: left;">
<span style="font-size: 14pt; line-height: 115%;">A.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><span style="font-size: 14pt; line-height: 115%;">Use dim spotlights instead of lamps!</span></h4>
</div>
<div class="MsoNormal" style="font-family: inherit; margin-left: 0.5in;">
<span style="font-size: 14pt; line-height: 115%;">This works very well with
platformers where the light comes from above. It will get blocked in certain
places by upper platforms, leading you to new paths which you would not
generally notice.</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-left: 0.5in;">
<i style="mso-bidi-font-style: normal;"><span style="font-size: 14pt; line-height: 115%;">Let
the light lead you!!!</span></i></div>
<div class="MsoListParagraph" style="color: #073763; font-family: inherit; margin-left: 0.75in; text-indent: -0.25in;">
<h4 style="text-align: left;">
<span style="font-size: 14pt; line-height: 115%;">B.<span style="-moz-font-feature-settings: normal; -moz-font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><span style="font-size: 14pt; line-height: 115%;">Throw in some bright colours:</span></h4>
</div>
<div class="MsoNormal" style="font-family: inherit; margin-left: 0.5in;">
<span style="font-size: 14pt; line-height: 115%;">Introduce some glowing
platforms.</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-left: 0.5in;">
<span style="font-size: 14pt; line-height: 115%;"><a href="" name="link1"></a>Or maybe you could illuminate
the exit in cheerful colours and maybe also show an ‘easy’ path to it which
will ultimately mislead the player.</span></div>
<div class="MsoNormal" style="font-family: inherit; margin-left: 0.5in;">
<span style="font-size: 14pt; line-height: 115%;">Use sudden bright cheerful in-your-face
colours to break the monotony of the
world and punch the player smack-dab in the face. But DON’t overdo it.</span><br />
<div style="background-color: white; color: black;">
<span style="font-size: large;"><b> </b><span style="font-size: small;">.</span></span></div>
</div>
<div class="MsoNormal" style="margin-left: 0.5in;">
<span style="font-size: large;"><b><span style="font-family: "Bradley Hand ITC"; line-height: 115%;">N.B: Most of my ideas are
derived from platform games but history has shown that great games have always
gone past the barriers of a single genre and there is a plethora of games out
there that have mix-n-matched different genres. For example look at Max Payne
2.So even though this is based on platform games, makers of other genre can
also find this helpful.</span></b></span></div>
</div>
<div style="background-color: white; color: black; text-align: left;">
</div>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0tag:blogger.com,1999:blog-4749450808155842682.post-16963794175372372392012-04-27T13:02:00.001+05:302012-05-15T11:05:47.950+05:30<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="color: blue; text-align: left;">
<b>The blogging starts...</b></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;"> </span><span style="color: #f1c232;">Let me</span> <span style="background-color: orange;"></span><span style="background-color: #f4cccc;"></span><span style="background-color: black;"></span><span style="background-color: white;"><span style="color: orange;">say why i am starting my own blog.. Well, it's just to pour out what i feel i can share with others... Practically</span></span><span style="background-color: orange;"></span><span style="color: orange;"> i am bored to hell now.. So this can become a good habit. I have just given my H.S. exams followed up by usual minions (you-know-what). Aieee is still 2 days away, and this is the worst time of my life.</span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">So, the boring stuff is over..</span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">Well, i plan to get admitted at NIT, Durgapur if my AIEEE exams are good enough. And my plan is to continue this as a live blog - one update every day - a bit of what's happening, bit of funny dose, overall an insider view to whichever college i get admitted.</span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;"> </span>All my decisions will get posted here ..</h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;"> So, i decide to publish all my decisions from now on..</span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">1.First of all, i am totally in love with computers and programmers.. So, I will take up CSE (computer science and engineering) in the college.</span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">{ NOW, the big question: Why?</span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">I can see everybody quoting "The IT market is down. You have to work from sunrise to dawn there." My answer is, "You are looking at it in the wrong way. Freshers do need to work hard, and they can easily <strike>survive</strike> love it. See, that's the point. Many people like 'what they do' and that's why they reach the tip of success. If your job is your passion, then you can easily cruise your way to the management post (and you might even regret doing no real stuff..)</span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">} </span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">So, my first post ends here.. See you soon... </span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;"> </span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;">Listed on: <a href="http://www.dmegs.com/">link directory</a></span></h2>
<h2 style="color: blue; text-align: left;">
<span style="color: orange;"> </span></h2>
</div>Anonymoushttp://www.blogger.com/profile/18363048599364664137noreply@blogger.com0Jessore Rd, Madhyamgram, Kolkata, West Bengal, India22.710812743359192 88.46993252635002122.710698243359193 88.469778526350026 22.71092724335919 88.470086526350016