Monday, 29 December 2008

Mr Ball Update

Just finished another cutscene. It's the one right after the first battle. God, my cutscenes are damn lame. Well, I've got to start somewhere right? A novice can't turn professional in a day anyway.

Ok, I have successfully modeled 2 ice stalagmites. 1 fat one, and 1 thin one. There's one problem though. I'm not really good at UV mapping and all, so the texture for the two ice spikes is a little odd. Still, it's quite satisfying for me.

Saturday, 27 December 2008

Ooh!! Empire of the Rising Sun!!

I seem to like that faction in RA3. I used to think of it as "ai yo, don't really like it lah".

One good thing about it is that the buildings does not have to be built close to your base. You can expand the base far and wide out in the field. That's very good for building up defenses.

Somehow, I'm feeling like I'm gonna have to kill Prince Tatsu somewhere in the campaign. It's not that I don't like him, I just have the feeling that he's gonna die somehow.

Well, anyway, here's an update of Mr Ball 2:

-Added the first super power for Mr Ball.
-Planning for the 2nd battle.
-Already have ideas for the third, last and secret battles.

Here's a sneak peek at the super power.


It eats up 75% of Mr Ball's power. The great thing about it is that it's one powerful attack and eventhough the so-called "special effects" cover only a small area, it effects the entire stage. So, the enemy may be far far away from all those fancy rectangles, but he still kena. In this video, the damage was 417 HP.

Note, the damage caused by this super power varies based on your current attack points. Just by increasing your attack points by a factor of 1, you would increase the maximum damage of that attack by 200. Minimum damage is 400. The damage is a random number between 400 (Minimum damage) and the maximum damage (400 + Attack points * 200)

Reformat my hard disk please!!

Ok, I'm just joking. But I did help Jun Ray reformat his computer yesterday. His computer is very slow, and also have viruses (as far as I know). I tried to help him fix the lagging problem once, but then the problem came back to haunt him. Poor Jun Ray.

So, in the end, he decided to reformat his computer, so he asked me to go. Then, I happily wiped out his hard disk and installed a fresh new copy of Windows XP Pro SP1.

Suddenly, there was a problem. Everything went well, until the time when I wanted to go online. It seems that Windows Xp doesn't have the driver for the Ethernet Card! WTH?? Asked Jun Ray if he has any disc for the hardware in his comp. Unfortunately, it was a No.

I wanted to open up his CPU and have a look at his Ethernet Card for the model number and blah, but I didn't dare to do that. If I'm electrostatically charged, I could fry his motherboard. That's the danger of fiddling with the guts of a computer.

But that wasn't the only problem. The sound card drivers aren't installed as well. God!! I should have taken down all the driver names and things like that. Reformatting can be a headache sometimes.

People, if you think your computer got infected, try not to think about reformatting. Reformatting the hard disk should be done as a last resort if the virus is too stubborn to be removed from the computer. Just google up the virus name and there should be some links to antivirus sites or forums talking about how to eradicate that virus.

Thursday, 25 December 2008

Gah!! I killed the President!

Well, it's not real. But in Red Alert 3, I really did kill the President. This is what happened:


Tuesday, 23 December 2008

Came back from the Jelapang Padi

Right, of course, when someone hears Padi, it'll automatically refers to Kedah. Ok fine, not everyone refers Padi to Kedah. Anyway, that's not the subject of this post, so I shall not talk too much about it.

The reason I went to Kedah for 3 days was to attend my cousin's wedding ceremony. Congratulations to my "piu ko"!! My grandma must be so proud of him! Here's an overview of what had happened the past 2 days:

21/12/08:
Started journey at around 10-11am. It was a very very long journey. An hour and a half later, we reached Tapah. Most of the time, when we are heading North on the North South Expressway, we stop at either Bidor or Tapah (the rest stop, I mean) to have a break. Now, we usually stop at Tapah. Tapah's Rest stop is very huge. You actually have to walk quite a distance to reach the toilet. And the toilet is almost as big as the food court! It's very cool. The walk isn't a bad thing actually. There's a lot of stuff to see, like all those side stalls and things like that.

1/2 hour later, we continued on the highway for another 2-3 hours. When we reached Jitra (our destination), it's almost 3 o'clock.

My mum showed me the picture of the Hotel (correction, it's a Motel), I was like "erk! This hotel's gonna suck!". The picture itself doesn't look promising at all. But, when I got in, to my surprise, it was quite nice and comfy. "Billy! Never underestimate hotels! And don't judge the book by its cover!"

Well, we checked in, then BLAH BLAH BLAH, then ate at a Mamak Stall, then BLAH BLAH BLAH, then my sister suddenly got sick and went to bed while my mother, my auntie (who came with us) and I hung out at my cousin's bride's house for dinner.

22/12/08:
Sister still sick. Poor gal... Anyway, today, we are supposed to get the bride. Som everyone got up, waited for the groom, then we all headed for the bride's house. After that, old Chinese tradition and culture are practiced. I'm not very good with traditions. I know, I have failed to be a Chinese. :( Ok ok, stop blaming myself! Anyway, here's what happened:

1) My cousin (husband-to-be)'s brother, my cousin sister's husband and I went upstairs along with the groom to go to the bride's room. And then the bride and her friends tortured the groom by asking him to do humiliating things outside her room. He must do as she asks to earn hr approval. Well, something like that lah. Anyway, in the end, the bride showed herself and placed a flower into the groom's chest pocket.

2) Lunch time...

3) "Cam ca" ceremony. The bridegroom serves elders some tea and in return, they get ang pow.

Then, later at night, my sister finally recovered. We all went for dinner in a sort-of-like-high-class restaurant. And ate, and ate.

Ok, I have to comment something here about the PA system. It's too LOUD!!!! No, really, it's freaking loud! And mixed with some people singing on stage, it's no longer music to my ears, it's eardrum destruction! You can actually feel your eardrum vibrating. OMG!!! What more, the loud speaker is just few metres away from our table. Gah!!!

The food was okay, nothing much to say.

And today, we just had lunch in the bride's house and came back. Nothing much really.

Now, I have to release my anger...

F%$#@!G SMOKERS, CAN'T YOU READ THE F%$#@!G SIGN THAT SAYS NO SMOKING!! AND YET YOU STILL WANT TO SMOKE! WHAT'S YOUR F%$#@!G PROBLEM???

Ahh, that feels so much better. Ok ok, now, smokers are the top of my most-hated people list (exception are my family members lah, only hate them when they smoke).

Right, I was at the dinner last night. I wanted to hide from the loud speakers, so I went to the toilet. Right when I opened the toilet, the whole place was so foggy. No, it wasn't water vapour, it was smoke. There were like a few people happily smoking away in the toilet, one of the most important places on Earth!!

HEY C'MON! YOU WANT TO DIE, GO DIE YOURSELF, DON'T PULL SOMEONE ELSE WITH YOU, YOU BRAINLESS IDIOTS IN THE TOILET LAST NIGHT!!

Second-hand smoke is way worse than the smoke the smokers inhale through their cigarettes. Sigh, so, I went back to my seat to wait for the smoke to clear. Really, these people has no feelings for other people. They are slowly killing other users of the toilet, and killing people, as you know, is a very big sin.

After the dinner ended, some people started smoking in the air-conditioned restaurant! I was like "WTF??? There's like an air-cond up there???". God! All they do is smoke smoke smoke. And other people just choke choke choke. Grrr!!! So, I walked out of the restaurant. And again, more smoke! No where to hide now, so I took some tissue and used it as my air-filter.

1/2 hour later, you could actually see the little smoke particles embedded in the tissue.

SMOKERS, I'LL PASS ON BECOMING ANOTHER LUNG CANCER VICTIM. I LOVE MY LUNGS, AND APPARENTLY, YOU DON'T.

Right, next time, if I have the power, I want to banish smoking in Malaysia for good. I want clean air for my grandchildren!! (Got that from A. Samad Said's poem, The Dead Crow)

Remember you readers out there, smoking is not cool, as some might say. If you are being pressured by some hooligans to smoke, DON'T. Leave them alone. Let them smoke. They may be laughing at you and insulting you, but when they die, and you're still alive, you'll be laughing at them.


This just shows how much I despise smokers (exception, my family members, only hate them when they smoke)

Thursday, 18 December 2008

Just started Persona 3

Yeah, so, I was watching my sister play this PS2 game for a long time already. The suddenly, I felt interested to play it. Well, actually, I saw Youtube videos of the final boss battle, and it looks fun and tough. Because of that, I wanna play it. I dunno why, but then I always love to battle bosses at the finale of the game. They are freakishly challenging, most of the time. Maybe along the way, i can get inspirations for Mr Ball 2??

Oh, and there are 4 more commands that I have recently added into the Cutscene system.
lockOnObject -> Camera locks onto the specified object, but it doesn't follow the object like the trackObject command.
stopLock -> stops the previous command
triggerEvent -> Causes the specified object to perform the task that is hard-coded in it
sound -> Plays the specified sound

The camera cannot lock and track at the same time, so if you ask it to lock while it's tracking, it'll first stop the tracking, then it'll lock on to the object.

Monday, 15 December 2008

Ooh!! It works!!

Right, I have recorded a cutscene for testing, then one part of the battle. Remember, this is not the final cutscene I'm gonna use. It's just for testing out my MCS script.

Here's the script:

setCamPos,-100,-100,32;
crObject,1,0,0,0,0;
wait,30;
trackObject,1,0,0,0;
wait,30;
moveObject,1,800,600,52,300;
wait,60;
dialogName,Mr Ball;
dialog,Testing....123;
wait,30;
fade,0,0,0,0,30;
wait,20;
mp3,0,0;
wait,8;
endCutscene;

and here's what the script did:



Ah!! Progress!

Oh, the heads up display isn't finished yet. But the battle is! See the red flashes? It means Mr Ball terkena critical hit! Well, there's still a lot more to do for the cutscene system.

I've added more commands:
dialog -> Displays a dialog
dialogName -> Specifes the name that will be displayed at the top of the dialog
dsObject -> Destroys (delete) an object
fade -> Creates the fade in/out effect
mp3 -> Plays an MP3 defined in the MP3 list
moveCamArc -> Move the camera in an arc
moveCamSpiral -> Move the camera in a spiral

Totaling up to 22 commands altogether.

The last 2 commands are based on this post.

I've got to say, the Cutscene system got to be the Greatest thing in Mr Ball's history. It's actually more fun to play with the system than making the game. But, I've to continue with the game, so, I shall get on to it. haha.

EDIT:

Ok, finally, the cutscene is finished. Well, the first one at least. Can finally get on to the game making. Here's the final script and the cutscene:


crObject,1,0,16,300,0;
crObject,2,1,600,300,160;

//Keep the diamond rotating
rotateObject,2,2,999999,999999;

setCamPos,128,400,48;
trackObject,1,0,0,16;
moveObject,1,200,300,0,120;

wait,121;

dialogName,Mr Ball;
dialog,Where am I? What am I doing here?
dialogName,???;
dialog,Mr Ball, I presume?
dialogName,Mr Ball;
dialog,Huh??

crObject,3,2,200,300,16;
lockOnObject,3,0,0,0;
moveObject,3,600,300,176,120;

wait,121;

stopLock;
dsObject,3;
lockOnObject,2,0,0,16;
moveObject,2,500,300,0,120;

wait,121;
lockOnObject,1,0,0,16;
dialog,What are you still doing here? I thought I've eliminated you.
lockOnObject,2,0,0,16;
setCamPos,100,350,32;
dialogName,Black Diamond;
dialog,You think so, eh? Well, too bad then. I am back now!!
dialogName,Mr Ball;
dialog,What do you want from me anyway?
dialogName,Black Diamond;
dialog,Huh! you have you ask?

fade,1,255,255,255,10;
setCamPos,400,300,16;
moveCam,450,300,16,10;
wait,11;
dialog,I want to erase your existence from this world!

mp3,0,0;
wait,10;

moveCamSpiral,500,300,0,32,135,720,600,1;
setCamSpeed,2,0.5;

crObject,3,3,490,282.68,256;
crObject,5,3,490,317.32,256;
crObject,7,3,520,300,256;

crObject,4,3,480,300,386;
crObject,6,3,510,317.32,286;
crObject,8,3,510,282.68,286;

triggerEvent,3,4;
triggerEvent,4,34;
triggerEvent,5,4;
triggerEvent,6,34;
triggerEvent,7,4;
triggerEvent,8,34;

rotateObject,3,2,9999,3333;

moveObject,3,490,282.68,2,21;
wait,9;
moveObject,4,480,300,32,21;
wait,9;
moveObject,5,490,317.32,2,21;
wait,9;
moveObject,6,510,317.32,32,21;
wait,9;
moveObject,7,520,300,2,21;
wait,9;
moveObject,8,510,282.68,32,21;
wait,9;
fade,0,0,0,0,30;
wait,29;
endcutscene;


There has been a slight change in the syntax. # symbol is no longer the symbol for comments. Instead, use the double slash symbol, \\.

The "dialog" command is parsed differently, so you don't need to place the semi-colon at the end of the line.

Sunday, 14 December 2008

Cutscene system planned

Now, I won't know if it will work because I have never done it before. I need a way to create and manage cutscenes for my game. All cutscene data will be saved in a file and will be loaded when needed. The file is just a small script which can control everything from creation of an object to moving the camera. It's a very simple thing but very hard to implement.

I don't want to hard-code it into the game because it's very hard. If I were to hard-code it, every cutscene will have a long list of codes, increasing the size of the game. So, I thought, why not I just make 1 simple system, which reads a file with the cutscene data and run it? Then I could just write codes which controls the objects and things like that, but the cutscene file will define where to place objects and where they'll move and things like that. That way, the cutscenes are fully customizable.

I don't really guarantee it would work, but I'll just try.

===========
EDIT: To my surprise, the cutscene system worked on my first try!! It rarely happens to me. Most of the time, stuff that I programed must undergo tonnes of testing before it can work, but this time, something that's very new to me, worked without any hassle!

Here's how it's going to work.

There's an object called the Cutscene Manager. You'll give it the path to the MCS (Mr Ball Cutscene) file. It'll then load it. It's a very basic little script file, with very simple syntax.

<Command>,<Parameter1>,<Parameter2>,...;

It starts with a command name. It's not case sensitive. Then followed by its parameters. The whole thing is ended by a semi-colon (a must). The command and parameters are all separated by comma.

No 2 commands are allowed on the same line. When you start a line with the # symbol, it just makes it a comment, which won't be parsed by the Cutscene Manager. Currently, I have just defined 15 commands, which is actually enough for a very simple cutscene, without dialog, that is.

Yeah, so, the Cutscene Manager parses the little script and just run the cutscene.
A lot of the commands involve objects. When the object is created with the "crObject" command, you must assign it a unique ID. This id will be used in many other object commands. You can only create objects that are defined in the Cutscene Objects List. Anyway, here's the list of commands I created so far.

crObject -> Creates an object and places it in the Cutscene
moveObject -> Moves the object to the specified destination
stopMoveObject -> Stops the previous command
wait -> Wait for the given amount of time before preforming the next command
rotateObject -> Rotates an object
setAngleObject -> Sets the object's orientation along the x,y, or z axis (without the animation like in rotateObject)
setPosObject -> Sets the object's position (without the animation like in moveObject)
setSpeedObject -> Sets the object's speed
setGravity -> Defines gravity for the specified object

setCamPos -> Sets the camera position
setCamTarg -> Sets the camera target
setCamSpeed -> Sets the camera speed
moveCam -> Move the camera
trackObject -> Tracks the specified object
stopTrack -> Stop tracking the object

There will be a lot more coming up, adding more power to the MCS script, like playing MP3, fade in and fade out animations, and more.

Dice...

Ok, I'm just bored, so I'm just gonna talk some crap here.

Here's a question. You have 2 dices and you're asked to roll them. Out of the 11 possible numbers that can appear, which number has the highest chance of appearing? (11, not 12, because it's impossible to get 1 from 2 dices. The least you can get is 2.)

Right, there are 2 dices, right? And each dice has numbers ranging from 1 to 6. So, there will be 6x6=36 possible combinations.

Ok, let's list out the possible combinations for all 11 numbers.

1 -> None (unless 1 of the dices have a face with no spots!)
2 -> 1,1;
3 -> 1,2; 2,1;
4 -> 1,3; 2,2; 3,1;
5 -> 1,4; 2,3; 3,2; 4,1;
6 -> 1,5; 2,4; 3,3; 4,2; 5,1;
7 -> 1,6; 2,5; 3,4; 4,3; 5,2; 6,1;
8 -> 2,6; 3,5; 4,4; 5,3; 6,2;
9 -> 3,6; 4,5; 5,4; 6,3;
10 -> 4,6; 5,5; 6,4;
11 -> 5,6; 6,5;
12 -> 6,6;

As you can see, there are 6 ways you can form a 7 from 2 dices. So, there's a very high chance (16.67%) for 7 to appear whenever you roll 2 dices.

OK, we have finally answered that question above. Now, what about this: suppose that you are forced to get a double, like 1 and 1 or 3 and 3 and so on. What is probability of getting a double?

There are 6 possible ways to get a double, 1,1; 2,2; 3,3; 4,4; 5,5; and 6,6. All together, there are 36 combinations. So, the chances of getting a double is 6/36*100%=16.67%

From there, we can conclude that the probability of getting a double is the same as the probability of getting a 7.

Well, I shall end here. I wanna go eat some chocolates!!

Saturday, 13 December 2008

Update, update

Did more tweaking for the introductory battle overview camera movements. Now it's finally finished! And, I have added the slow motion effect when Mr Ball receives a critical hit. Right, best of all, I'm done with the first level! Now on to the second! Oh wait, I have to get the sound effects first. Now, I need to think what should I do for the 2nd battle, and how to blend it to the storyline. I mean, I can't just simply make a diamond and have it fight Mr Ball for nothing, right?

Friday, 12 December 2008

You're Busted!

Gosh, I can never get tired of the song named "Busted!" from Phineas and Ferb! It's so damn nice. Ok ok, here it is:



The song's about Vanessa (the girl in black) trying to bust her father for being evil and Candace (the other girl) trying to bust her brothers for building impossible stuff in their backyard.

Man, I so love Phineas and Ferb. Have I told you that? I think I did. Hahaha!


==================

Now, update on Mr Ball 2. Well, there aren't much changes I have recently made to Mr Ball 2 because I can't really get my hands on the laptop these days. Just now, I did tweak a little on the introductory battle overview (IBO). Well, that's just my way of referring to the camera movements at the start of the battle. It's almost similar to the IBO in the first game, but not entirely.

However, I did drastically change the controls. Now, WASD will be used to move the character instead of the Arrow Keys. The mouse will still be used to orientate the character and control the camera. Space bar is used to Jump and replaces the right-mouse button. The right mouse button is used for healing now. All these changes were the result of the discussion between me and my cousin and a lot of testing.

Once I am done with the IBO, I can finally get on to Level 2, or maybe make the first cutscene.

So far, the source file is 105KB and the external resources (not embedded in the game) is only 10.5 KB. Once all the sound is added into the game, it'll grow to as big as 1 MB. I'm gonna have to find a way to store the BGMs such that it won't take up too much space, because the BGM's are all MP3s. I'm considering to convert those MP3s to another format. But that's for later. Right now, I have to finish all the levels!!!

Thursday, 11 December 2008

Bolt is soooo cute!!

Ok, I watched Bolt the second time today. And you know what, I'm starting to admire Pixar!! Awh, Bolt!!! Penny is so proud to be the owner. Gosh, I feel like getting a puppy, a white one! But, I don't think my father will let and also, I might not have time for it.

Anyway, up till now, my holidays were all packed. As in, I never stopped going out. In a week, I went out at least 5 days. And last week, I wasn't even in my house! I was staying over in my cousin's house, as usual, and went to Genting with him.

The last Genting trip, I've got to say, was the best Genting trip in my entire life. I sat on rides I never ever sat before. I really love the Corkscrew and the Flying Coaster. After sitting those, the indoor roller coaster doesn't really feel nice anymore. Also, I faced my fear of heights again when I sat on the Space Shot! This time, it wasn't that scary, because I have counted the seconds before it drops. So, when it was up there, I just started the countdown, and when it dropped, I didn't scream like a girl like the last time I went!! I was so proud of myself. Muahahaha.

Anyway, I sat on the Corkscrew twice. Even after all that, I'm still not yet satisfied. I wanna go back to Genting again!!!

Thursday, 4 December 2008

Mr Ball 2 Update

I can't believe it! I'm almost finished with the first level! But then there are some glitches here and there. Mostly they are all caused by the sudden halt in the AI sequence. Currently, the boss has 2 attacks, gonna add 1 more.

Here are 2 screen caps:


The falling spears attack. It is nothing like the one in Mr Ball 1. Is that a good thing or a bad thing? Hmm...


The spinning spears attack? It's quite similar to the one in the first game, just that the diameter of the spin won't increase.

I know, it's a little weird to have Mr Ball smiling even when taking a hit. I'll look into that once I have finished everything up, in the "touching up" process.

I have also thought of rewarding the player with the so-called Ability Points to increase Mr Ball's stats after every battle. This way, they can increase their HP, CP (curing points), Evade points, Attack and Defense. OK, you know what HP is. Attack and Defense, well, pretty self-explanatory, if you have played RPG games before. CP? Well, used to be MP, but since the MP is only used for healing, might as well call it Curing points. I know, it sounds odd.

Evade points. Hmm... I have a very bad news. The enemy can inflict critical damage!! Uh oh! When you receive critical hits, the screen will flash red, and you'll receive up to 6 times the normal damage. Don't worry, I'll give Mr Ball the chance to inflict critical damages as well.

The chances of getting critically hit is usually quite low. It's all based on luck. Increasing the Evade points lowers the chance of getting critically hit.

The next thing I'm gonna do is add the music thingie and some Sound effects. I don't really have the mood to test my game all the time because it's just way too "dead". No sound effects!!

Also, as you can see, I have kinda like changed the "Damage display" a little. That's the thing which displays the amount of damage received from an enemy or inflicted on an enemy. The font is somewhat bigger and a little clearer than before. The red one is for amount of HP deducted. The blue one is for amount of MP/CP deducted. Note that critical hits only increases HP deduction, not MP/CP.

Whee!! I'm making progress here!

Saturday, 29 November 2008

Right, let's talk reflection!

Ever shined a torched light or a laser beam towards a mirror? If not, you probably have witnessed reflection by just looking into the mirror. Reflection of light, it's so fascinating and simple. But when it comes to math, it's a different story.

I'm been doing some paperwork on reflection of light, and I think I finally got it. Before I continue, there's gonna be a lot of Math mumbo-jumbo, so, again, if you hate Maths more than you hate the annoying little barking bitc.. dog next door, I suggest you look away. Lol! (No offense to those dog lovers, yeah, it's just a joke)

Here goes:

Let's say we have a beam of light. The beam's direction will be called as vector D. I'm going to be using a lot of vectors here.

There's also a plane of mirror, with a normal vector, N. This normal vector is a unit vector, ie, a 1-unit long vector. The normal vector is a vector that is perpendicular to the mirror.

Now, I shall draw it out. Introducing, MS Paint!!



I know, the normal vector is a little too long. I just drew it long so it's easier to see. But remember, vector N is a unit vector, as shown by the symbol above the letter N in the picture.

Ok, now, let's add more stuff.



On the left of vector N, there's another vector. Well, actually, it's just an inverted vector D, or -D. It's inverted for the calculations later. And there's one more extra vector, vector R, which is the reflection.

One very important thing that applies to all reflection:
The angle of incidence = angle of reflection

Therefore, a = b.

Because of that, the scalar projection of vector -D on vector N = the scalar projection of vector R on vector N.

I have coloured the so-called scalar projections in green.

Still with me so far?

The magnitude (length) of the scalar projections can be obtained through what's called the dot product.

The full stop (period) sign is a little too small for me, so to use as the dot product symbol, I'll utilise the "o" symbol instead.

Now, -D o N = |D| |N| cos a
But since N is a unit vector, thus |N|=1
-D o N = |D| cos a

which gives us the scalar projection of -D on N. According to
"the scalar projection of vector -D on vector N = the scalar projection of vector R on vector N."

we should now have:
-D o N = R o N

but we will use
R o N = -D o N instead. It's just the same, anyway.

Ok, that's 1 equation down, we will need 1 more.

The magnitude of the reflection vector (R) should be the same as the incidence vector (-D), so, here comes the equation (oh boy)

Rx2+Ry2=(-Dx)2+(-Dy)2

now, Rx means the x component of the vector. Ry means the y component. Same goes for the D vector.

Ok, I omitted the square root to make things simpler.
Now, we got 2 equations:

R o N = -D o N

Rx2+Ry2=(-Dx)2+(-Dy)2

Right, let's try with an example:



Right, I have normalized the normal vector, N. Normalizing is basically making a vector exactly 1 unit long. The vector is perpendicular to the mirror, therefore, it is "normal" to the mirror. So, "Normalize" and "Normal vector" are two different things.

Actually, N's direction is supposed to be (1/sqrt(2) , 1/sqrt(2)), but I was lazy to draw the root, so I got the decimal number instead.

So, let's get cracking.

R o N = -D o N

can be rewritten as

RxNx+RyNy = (-D)xNx+(-D)yNy

Substituting values, we get:
Rx(1/sqrt(2)) + Ry(1/sqrt(2)) = (-1)(1/sqrt(2)) + (2)(1/sqrt(2))
(1/sqrt(2)) (Rx+Ry) = (1/sqrt(2))

Dividing both sides by (1/sqrt(2)):
Rx+Ry=1

Dang, there are 2 unknowns!! What to do?? Chill man. That's where the 2nd equation comes in.

Rx2+Ry2=(-Dx)2+(-Dy)2

Plugging in the known values...
Rx2+Ry2=(-1)2 + 22
Rx2+Ry2=5

Ok, now, let's solve for Rx. First, get Ry.
Ry=1-Rx

Dump that into the previous equation:

Rx2+(1-Rx)2=5
Rx2+1-2Rx+Rx2=5

Remember the "completing the squares" thingie? Right, let's apply it here.
Now, make it so that it is in the form x2-2ax+a2, then it'll be easier.

2Rx2-2Rx+1=5
Rx2-Rx+1/2 = 5/2

To complete the square, take away -1/4 from both sides
Rx2-Rx+1/4 = 9/4

(Rx-1/2)2=9/4

Take the square root of both sides
Rx-1/2=3/2
So,
Rx=2

Placing this into Rx+Ry=1, and you'll get Ry=-1.

Therefore, the reflection vector is (2,-1). Makes sense right?

Woohoo!!! That was long! Now, I'm gonna do more research and probably refine these equations. This might not be the best way to calculate reflection, but at least it's something. Haha

Friday, 28 November 2008

The Curve... no, I'm not talking about the bent line

Today, I was supposed to go to the Curve to watch Twilight with Li Ching and gang. But the problem was, my alarm did not go off, and no one woke me up! So, I went there a little late, so I decided not to go watch the movie. I already missed 1 hour of the movie when I reached there. So, I went walking around. I want5ed to go Ikano, but in the end, got lost some where while looking for the bridge. Then, once I reached Ikano, I got lost in there looking for the bridge back to Cineleisure. Whoa!!!

Anyway, it was fun hanging out. =D

Thursday, 27 November 2008

Java... hmmm

Suddenly, I feel the need to learn the Java language. I have no idea why, but then I just want to try it out. Maybe make one Java application for my phone. I tried it once, but it didn't turn out too good. So now, I'm trying again. Since I'm quite okay with the C# programming language that I'm currently using now, it shouldn't be too hard to adapt to Java. Both of them have almost the same syntax. Gosh, now I have to download more stuff...

Wednesday, 26 November 2008

Antibiotics are losing effectiveness

Just now I saw a show in Discovery Science and it was talking about a baby who is suffering from an illness which is drug-resistant.

I continued watching on, and what I learnt was that antibiotics will not be as good as it is now later in the future.

Bacteria are living organisms. They grow, and evolve to adapt the changes in the environment, just like all the other living organisms. Let's say there's this guy, we name him Mr. X.

Mr.X just got infected by bacteria Y. Bacteria Y multiplies in Mr. X's body. White blood cells then wage war against the bacteria. But the bacteria's too powerful, so, Mr. X was very ill and went to the clinic. The doctor prescribed some antibiotics. Antibiotics are like the superweapons in the micro war. And so, bacterias were killed. Few days later, he was back to normal, so he stopped taking the antibiotics. Little did he know, there were still a tiny amount of bacteria Y left in his body, too little to cause any problem. Soon they multiplied and the new generation of Bacteria Y have a little resistance to that antibiotic. It kept multiplying, and Mr. X fell ill again. Unfortunately, the antibiotics have became less effective. So, the doctor prescribed a better antibiotic for the man. It worked, and he stopped taking the last bits of the antibiotics left in the medicine bottole. And, you'll know what happens next.

That's why antibiotics must be finished. And, like any other drugs, antibiotics must never be misused or overused. If antibiotics stopped working, we'll all return to the pre-antibiotics era, when used-to-be-easily-treatable illnesses can't be dealt with. That's not good.

So, respect antibiotics, and they'll respect you back. Oh, wait, that didn't come out right...

Tuesday, 25 November 2008

List of Projects to complete

The following list enumerates, by priority, my plans/projects for my holidays:
  1. Mr Ball 2 (only 2% done so far)
  2. Finish all Red Alert 3 factions' campaigns
  3. Create a map of the school for CS. (Dunno whether it would work)
I won't guarantee I can finish all of them by Chinese New Year '09, if not New Year, especially Mr Ball 2. I have a lot of stuff to do for my game because of all the storyline and special effects. Hmm... map of the school for CS eh? That idea was originally proposed by Seck Wei's brother, Seck Houng. And I kinda liked the idea, so that's why it's currently in my projects list.

The mapping thing is gonna be one heck of a challenge! But, hey, nothing comes without a price, right? I'm gonna have to get the floor plan first, then have to draw out the prototype. I faced a very annoying problem while mapping one strange map for CS (which turned out quite ok, for me, in the end). I didn't really plan on mapping anything, so I just made a map for fun. In the end, it grew into a must-finish type of map, because I just wanna add some more stuff into my map and play it. The only fun part of the mapping process is going in there and experiencing it. The problem was, I got lost during mapping at some point. Haha. But, that's just a minor problem. The bigger problem was that I just dunno how to continue my map. At one point, there were 3 passageways sticking out at the side of the map, opened to the dark void of space. I can't leave it open! It'll cause more problems! So, I kinda got stuck there, wondering how to end the map with 3 unfinished passages.

Hey, nobody wants to walk through a tunnel and fall down to nowhere at the end, no?

There's gonna be a lot of delays because my sister needs the laptop. I've no access to the laptop currently because she's busy with her stuff. Sigh... I need to do my stuff also. If only she knew that. Well, anyway, because of that, my Mr Ball 2 went wayyyyy out of schedule. I'm supposed to finish at least 25% of the game by now.

Oh, I guess things have to wait. I'm having doubts about my Mr Ball project now. To have come this far, I don't wanna redo it again. All the essentials have already been done. I will cry if I fail to finish at least 1 level.

Wheeee!

I've got to say, Red Alert 3's main screen's theme is quite nice! I love it! Here Here:


Soviet March - Red Alert 3

Well, a lot of the comments said the way they sang the song sucks, because the pronunciation of the Russian words are very cacat. Frankly, I don't know how Russian accent sounds like, so I can't agree or disagree with that. Still, the music is good. Haha.

Monday, 24 November 2008

Life in my cousin's house

So, I'm currently in my cousin's house now. Sleeping over as usual. It's fun hanging out with him. And I also get to play the computer the whole day. I still can play computer the whole day in my house too, but that computer is too blah, so anyway, you get the idea.

What more, my sister is hogging the laptop, so I can't really touch it much. Sigh.... how I want another laptop, all to myself. No interference from other people!

Anyway, I'm just gonna go play with my cousin now, since he just came back from tuition and he currently reading what I'm typing. So, this is Bee Lee, signing off!

Friday, 21 November 2008

Red Alert 3 is the best!!

Today, I finally installed Red Alert 3 on the comp. Or rather, the laptop!! The tutorials were a little long but after that, it was cool. Currently playing the Soviets campaign.

There's one slight problem though. Being a Red Alert 2 player, it's hard to adapt to the controls in RA3. In RA3, you tell your units where to go by using the right mouse button, not the left. So, every time I press the left mouse button by accident, it'll usually deselect the units or select some other things. Very annoying. I definitely love the ability to build stuff on water. At least now, I don't have to worry about limited land spaces.

Well, I kinda miss the Red Alert 2 actors. I thought maybe some of them might make a comeback. Sigh... Maybe I'm too used to RA2.

All in all, it is great!

Thursday, 20 November 2008

BLProductions is hiring!

Sorry, that's not true. But even if its true, I don't have enough money to "gaji" my employees. Anyway, I just only came back from playing badminton with Janie, David and Hon Son. It was ...fun, I guess. I was a bit lazy to move. Maybe due to my lack of sleep.

These few days, I've been watching Bill Nye the Science Guy. It's a fun and entertaining way to learn Science. And it was that show which made me love Science so much! Go watch it in youtube, it's cool!

Well, I've nothing much to post now. So, erm, ...

Wednesday, 19 November 2008

Finally, continued Mr Ball 2!

Wow! I'm so proud of myself! I haven't scrap my Mr Ball project yet! Wheeee!

What I did today was animated some spears. It's a very crappy animation, but at least I did something. So, I only made 1 attack so far for the first diamond. Hmm...




Yes, I know, it's lame. But I've got to say, that's actually quite good for a simple game. Hahaha
There aren't any sound effects yet. Same goes for the music. I'm not going to look for the SFX and BGM right now. I need to finish up the game as fast a possible. It'll probably take me another 2 months to really finish everything. Oh, that's very long. None of my projects have actually gone over 1 month (except Mr Ball).

Oh, if you have watched the video, you may have noticed that there are some slow motion effects there. Oh, it's due to my recorder. Dunno why. But it's kinda cool. I might wanna incorporate in some cool and dramatic slow motion effects. But that would mean a lot of problems for my recorder. Well, who cares!

Tuesday, 18 November 2008

Making a layout is harder than I thought

I'm the one in-charge of the senior scouts blog layout. Trying to make a layout for it is not really as easy as I thought it would be. And what more, my sister is using the laptop everyday. What does that have to do with my problem? I have a drawing program over there, namely, Paint.NET. It's a free digital imaging program. I can't use it on my Windows 2000 because it's not compatible.

Usually it'll take me a couple of weeks to whip up an idea. Take my blog as an example. My blog did not start out with the Billy's Rail Transit thingie. It was quite a while before the new naming convention for the links to kick into action. And the tabbed bar? It only started a few weeks ago. I'm trying to say, the way I change the layout of a blog is by "slow evolution". Sorry, I'm not sure what I'm talking about here. Oh gosh, I lost my point.

Anyway, trying to make a new design for a blog in such short period of time is kinda stressful. I always thought it would be fun. Hmm... what should I do????

Monday, 17 November 2008

Nausea, my evil friend!

The whole day today, I had a very bad nausea. Every time I stood up, I had the feeling to vomit. It really annoyed me. So, I said, "Fine fine, you want to vomit, izit?" Then I rushed all the way to the toilet bowl and tried to induce vomiting. It didn't happen. I tried to vomit like a lot of times. All of them failed miserably. Whenever I don't want to vomit, the nausea kicks in. Sheesh.

So, I went to the doctor again. The nurse/receptionist looked at me and said, "tak sihat lagi ke?". I was like smiling there and said, "yeah...". I was grateful there weren't as many people as yesterday, or else I would be sitting and suffering over there. The headache and dizziness. Argh!!! How I hate this!

The doctor said, "don't worry, it'll only last for a day". Then he gave me some pills for my nausea problem. It worked great! I'm not having any urge to vomit now! But the headache is still there. I guess I'm quite tired now.

London Tipton's really great

Yesterday when I watched The Suite Life of Zack and Cody, I saw this scene.



I dunno why but I find it quite amusing, especially the dance! Lol!!

Here's the lyric:
London Tipton's really great,
really great, really great,
London Tipton's really great
and deserves the opposite of hate
which is Love!

Sunday, 16 November 2008

Gosh, I'm so sick!

It all started last night when I felt a little weak. I thought I was just sleepy. Despite that, I slept late. Then later at 3 AM, I woke up and rushed all the way to the toilet because of a minor discomfort in my tummy to erm... dispose all the junk. Well, maybe not all. You do not want to know how unpleasant it was. Eww!! Diarrhea!

Anyway, I have nausea and stomach discomfort all night. Then when I woke up this morning, I defecated again. Same old thing! Diarrhea. I also had a slight fever this morning. So, later in the afternoon, went to see doctor. He said it may be food poisoning. So he gave me some medicine. One of which is charcoal pills (for the gas in my stomach)!!

I felt weird when I knew I had to eat activated charcoal. I just never eaten charcoal before! Anyway, I can't type much now, I'm having a very bad headache and nausea. So, see ya!

Saturday, 15 November 2008

Tata Seck Wei

It was fun having Seck Wei around. Unfortunately, he had to go back to Penang already. I thought of visiting him during my trip to Kedah in December. Well, at least for the moment, I can finally play with him in CS.

So, anyway, I should continue with Mr Ball 2, and not forgetting about the layout for the Scouts Blog. I know I'm not so active in scouts and all, but hey, at least I get to do something good for it.

Yesterday, I went to the Curve with Seck Wei and Li Ren. We met David, Wei Yuen, Li Ching and a new buddy, Yi Jean. It was very nice to meet her. Yeah, we went to watch Madagascar 2 together. I didn't even watch the first one so I thought I might not be able to follow, but I did, and it was amusing. Awh, Alex (Alakay) the Lion was soooo cute when he was small. Those eyes! Those paws! And the penguins, well, they are erm... okay, just go watch it!

Right, so Mr Ball 2. I must create the first level already. It's already out of schedule. I'm supposed to have finished the 2nd level by now. Okay, I'm gonna prepare myself to go to Jun Ray's house to play his PS1. Byes!

Tuesday, 11 November 2008

Computer is dying

My desktop is having problems booting up. I guess the hardware inside my computer is really failing. I'm not sure when it will finally crumble. And today, my BIOS gone haywire at me, but in the end, the RESET button did all the work. Yeah, so it finally booted up. Even so, the computer crashed, as usual. Two nights ago, my desktop had more unusual crashes. I have never seen those messages before in the Blue Screen. Now, that really freaked me out. Even if I could search up Microsoft about the Bug check codes that were displayed, how could it help me? And, sending the bug check information to Microsoft doesn't really do much good also. All it could say is "a driver encountered a problem" or something similar. Yeah, like that's gonna help.

Anyway,

Here are some more maths! Sorry, I'm just lazy to write it out in my Nonsense Book, so I'll just type it out. I found this in my sister's Math book and Wikipedia. It's about the Quadratics formula and how it came to be.

I had used this formula in my post about Circle-Line intersection:


Okay, the question is, how did it turn from this:
ax2+bx+c=0

to that?

Before I get started with the OMG-IT'S-SO-UNBELIEVABLE maths, let's talk about completing the squares.

Huh? What? Completing the squares?

Anyway, completing a square is just a method used to solve quadratic equations. Right, imagine you have an expression, x2 + 2xy. We want to factorise this so that it'll be in the form of (x+y)2. Before we can do that, we have to find out what's missing in x2 + 2xy that doesn't allow it to be factorised into the (x+y)2. Still with me so far?

Let's expand (x+y)2:
x2+2xy+y2

As you can see, the missing term is y2. Just add the y2 into the x2 + 2xy and it will be factorisable into the (x+y)2. Hmm... factorisable, is there such a word?

Let's take an example:
x2+6x

We need to find the "y". We know that
2xy=6x

So,
y=3;

And, y2=9

Therefore, it'll be x2+6x+9. This is then factorised into (x+3)2.

So, did you get it? I hope you did because we are gonna apply that later in the post.

Okay, now we know how to complete a square. Let's go back to the
ax2+bx+c=0

At first glance, this is cannot be factorised, because a,b and c are not known. But, we could apply what we've learnt just now.

First, we need to make the left side of the equation to be in the form of x2+2xy. To do that,

ax2+bx+c=0
ax2+bx=-c

Now divide the whole thing with "a"
x2+ (b/a) x=-c/a

Good. Now, we can say that,
2xy=(b/a) x
So, y=(b/2a)
y2= (b2/4a2)

Add that into the equation. Remember, whatever you do to one side of the equation must be done on the other side as well. That's the basic rule of algebra.
x2 + (b/a) x + (b2/4a2)=-c/a + (b2/4a2)

Factorise the left side of the equation and add up the terms in the second.
And you'll get:

[x+(b/2a)]2=[ (b2-4ac)/4a2 ]

Square root everything

x+(b/2a) =[ sqrt(b2-4ac) ] / 2a

Solve for x

x = [ sqrt(b2-4ac) ] / 2a - (b/2a)
x = [-b ± sqrt(b2-4ac)]/2a

And that's how you get:


Hope you liked it!! I know I did

Here's a better way to see it, courtesy of Wikipedia:


Monday, 10 November 2008

Ice skating again!

Today I had improved!! Well, sort of. I'm happy that I had experienced by first fall! Most of the time I had close calls but today, I had my first real fall while skating. Well, okay, not really. I was holding on to David. Then he stumbled and it caused a chain reaction. He fell, then I fell. Then I hurt my pelvis. Hahaha!!!

So, anyway, Seck Wei is busy playing with Counter Strike now. And I'm currently being very cautious while using the laptop because my sister's documents are open. Well, just don't wanna see her angry face. It's very freaky.

I gtg makan dinner now. Bye

Sunday, 9 November 2008

...

I'm back from Caroline's birthday party! And it was the bomb! Anyway, Seck Wei came down from Penang yesterday and is currently staying over in my house. Gonna have fun with him until next Saturday, on which he will return back to Penang. Yeah, anyway, I've got to be sleeping right now because I have got to wake up early tomorrow. Good night.

Thursday, 6 November 2008

I'm rolling the world!

Sorry, I couldn't think of a relevant title for this post. This post is all about maths. So, if you hate maths, just look somewhere else. I'm not boasting or anything here, just bored only.

(David, you love Quadratics right? Well, here are some Quadratics for you!)

Right, do you remember about my post about ray tracing. Yeah, I tried implementing it, but it was too buggy, so I scrapped the project. The most simplest thing to ray-trace is a sphere. It's very simple to trace a line through a sphere. But, let's represent a sphere with a circle for simplicity okay.

Okay, a circle can be represented by this equation:
1) (x-x0)2+(y-y0)2-r2=0
where x0 and y0 represents the coordinate of the center of the circle in the Cartesian Plane.

I'm won't go through the details on why the circle's equation is like what I've typed above. If you know Pythagoras' theorem and the Cartesian grid, you should probably have a little understanding on how it's defined.

Next, the equation to represent a line. Here, I'll use vectors.
2) P=L+Dt
where
P is the (x,y) coordinate that lies on the line
L represents the line origin point (the line's starting point)
D is the direction of the line. This is a unit vector (a 1-unit long vector)
t is a scalar value. It's sort of like the distance from point P to L0

So, now, how do we check whether a line intersects with a given circle? First, we derive two formulas from equation 2.

3) x=Lx+Dx t
4) y=Ly+Dy t

If the line were to intersect the circle, there will be at least 1 coordinate that will satisfy both the circle equation and the line equation. Equations 3 and 4 are just to find the x and y components of the resulting vector P.

Anyway, let's plug those two babies into the circle equation:
5) (Lx+Dx t - x0)2 + (Ly+Dy t - y0)2 - r2=0

You're gonna hate what's coming up next. Now, you've got to expand it. Remember the (a-b)2 expansion rule? Hopefully you do because it's one very important rule. Well, Same goes for the (a+b)2 and all his cousins. Okay, you know what I mean right?

(a-b)2=a2-2ab+b2

By applying that into equation 5, you'll get a very big mess...
6) ( (Lx+Dx t)2 - 2(Lx+Dx t)(x0) + x02 ) + ( (Ly+Dy t)2 - 2(Ly+Dy t)(y0) + y02 ) - r2 = 0

This is one hard thing to type out in HTML man. Phew... got that down. Now, expand it some more to get an even bigger mess!!!

7) (Lx2 + 2LxDxt+Dx2t2 -2x0Lx - 2x0Dxt+x02) + (Ly2 + 2LyDyt+Dy2t2 - 2y0Ly - 2y0Dyt + y02) - r2 = 0

Starting to hate Maths already? Well, too bad. That's not the end of the horror.

Now, introducing the Quadratic equation:

8) Ax2 + Bx + C = 0
Now, instead of x, we need to find t.
So, equation (8) will be rewritten as

8) At2 + Bt + C = 0

To fill up the quadratic equation, we need the values of A, B and C. Where do we get such values? Do we like wish upon a star for it to come out? Do we dig underground to look for it? Not really. All you need to do is take equation (7) and factorise out t2 and t. After that, the remaining terms will be C.

So, factorising, you'll get:

(Dx2 + Dy2)t2 + (2LxDx + 2LyDy - 2x0Dx - 2y0Dy)t + (Lx2 + Ly2 - 2x0Lx - 2y0Ly + x02 + y02 - r2) = 0

You should now be able to see clearly which is A, B and C.
A = (Dx2 + Dy2) = 1
Mind you, the direction vector is a unit vector. This is just the Pythagoras' way of finding the length of the direction vector. In the end, you'll always get 1 for A (so long as the direction vector is a unit vector. Remember that)

B = (2LxDx + 2LyDy - 2x0Dx - 2y0Dy)
C = (Lx2 + Ly2 - 2x0Lx - 2y0Ly + x02 + y02 - r2)

Introducing, another pain in the ass (sorry David, I know how much you love Quadratics).

Now, that's the wonderful quadratics formula to solve for the value of "t". (Just substitute the "x" in the above equation with t)

Now, plug in the values that we have just obtained for A, B and C into a,b and c in the above equation and solve for t.

Once you have the value(s) of t, plug it into equation (3) and (4) to get the x and y coordinates of the intersection point(s).

One tip, by using the discriminant, b2 - 4ac, you can determine how many intersection points are there.

If...
b2 - 4ac = 0, there's only 1 intersection point
b2 - 4ac > 0, there are 2 intersection points, thus, 2 possible values for t
b2 - 4ac < 0, no intersections.

Here's an example:


Anyway, here's how to do it. Let's try with the red line. The starting point of the line (the origin of the line, L) is (-5,-5). The direction is actually supposed to be 1 over square root of 2 (1/sqrt(2)). 0.707 is just approximation.

The circle's center is at (2,2) and has a radius of 2. So, we got everything we need. Let's crank it up using the formulas above. First, let's get A, B and C!!
A=1 (direction vector is 1 unit long)
B= (2LxDx + 2LyDy - 2x0Dx - 2y0Dy)
So, B=-19.796

C = (Lx2 + Ly2 - 2x0Lx - 2y0Ly + x02 + y02 - r2)
So, C=94.

FYI, my calculations may be wrong. This is really one complicated formula, and because I'm always very careless, mistakes may occur. If you think I may be wrong, just ignore it. This won't appear in your Math syllabus.

Okay, let's find the discriminant:
b2 - 4ac = 15.88
And 15.88 > 0, so there are two intersections, as shown by the image above.

The value of t would be:
t=[19.796+sqrt(15.88)]/2 = 11.89
t=[19.796-sqrt(15.88)]/2 = 7.91

Now, slap the values of t into equation (3) and (4) to get the x,y values of the intersection points and you'll get

(3.4, 3.4)
(0.59, 0.59)

Those are the intersection points of the line and the circle. Remember, that's just an approximation. So, it's not 100% accurate, there's about 1% margin of error.

So, I hope you get it. It's interesting, no? You can try it out with the blue line.

Mr Ball suspended for a few days

I couldn't continue making Mr Ball 2 because my sister keeps taking away the laptop. I'm still stuck at modeling the spear for the Black diamond. I hope I can still catch up when I have the chance. Gah!!!

So, did you like the BGM I embedded into my blog? I love it! Haha. Again, it's the Katamari Damacy theme song.

Me gonna go play Katamari after this!

Wednesday, 5 November 2008

I love Katamari Damacy!!

If you haven't played Katamari Damacy before, I recommend that you try to play it. It's freaking addictive. The aim of the game might sound lame, but it's actually quite fun. What you do is, you control the Prince, the son of the King of the Cosmos. Somehow, the King of the Cosmos destroyed all the stars in the universe, and you are assigned the job to bring back the stars. How are you gonna do that? By using a very sticky ball called the Katamari. You'll go around rolling things up (only those which are smaller than your Katamari). As you roll up more stuff, your Katamari will grow, giving you more varieties of objects to roll up. Eventually, you can even roll up humans! It's quite amusing when they scream right when they get stuck in your Katamari. XD

Oh, it doesn't stop there. There's one level which allows you to roll around the world!! If your Katamari is big enough, you can roll up buildings, clouds, tornadoes, whirlpool, cruise liners, you name it! Ultimately, you can even roll up islands and wipe out the face of the Earth!



After each level, the Katamari will be thrown up and turned into a star or a constellation depending on the level. All the levels have specific goals. The main levels (those that create stars or the Moon) require you to grow your Katamari to the needed size in the given time limit, ranging from a short 5 minutes to a long 25 minutes, to advance. I've got to say, the last level, the one that creates the Moon was 25-minutes of SUPER FUN! Well, when you just only start the level, you can't really roll many stuff. But one your Katamari is as big as a building, whoa!! Watch out! The game has it's own way of measuring the size of the Katamari. The size is stated in metric units, you know, meters, centimeters, yada yada. In the last level, when you start, your Katamari is only 1 meter big. The goal of the level is to grow your Katamari until it is 300 meters! That's very big! Hence, the long duration of play time in that level. The first time I played I couldn't manage it. It was freaking hard. Then the second time, I really improved! I got until 800+ meters! There's practically nothing left on Earth in the end!

You should try to play it! It's very fun.


If you are wondering what BGM is playing in the background, it's the Katamari Damacy theme. It's quite catchy, don't you think?

Saturday, 1 November 2008

Mr Ball 2 story line

Okay, I've made a small draft on the storyline of Mr Ball 2. Most of it is about Mr Ball's past. But anyway, here it is.

Anyway, yeah, I might have spoiled a little in here. So, if you still wanna read it, go ahead. Well, it's just a lame story.

Back from 1U

I'm back from 1U, and I had spent quite a lot of money today. Probably the most I had spent on a given day. Here's a list of things I bought:
  • CD-R x 10 = RM13.00
  • CD sleeves x 100 = RM11.00
  • CD Holder x 1 = RM3.00
  • Red Alert 3 + Bonus CD = RM30.00
  • KFC = RM18.75
  • Butter Croissant (Delifrance) = RM2.40
Total = RM78.15!!

I had mixed feelings about that. First, I was happy that I bought Red Alert 3!! Wheee! But was very hard broken to cough up about 3-4 weeks of allowance!

Going to 1 U

I'm supposed to go 1U to play at the Cyber cafe with my pals. But then many people aren't coming, so it'll be a very boring moment in CC. So I decided to go shopping around with Jun Ray. I wonder what can I buy. Oh yeah, I need CDs!!

Oh, that reminds me, I also wanna buy Red Alert 3!! Wahh!!! Can't wait to continue the story! Sigh... my sister took the laptop, so I can't continue Mr Ball. So far, I can only tell you that the first boss fight involves the Black Diamond, the one that uses spears. You'll probably see him a lot of times.

And finally at the end of the game, you'll fight the Diamond Organisation leader (name reference: Organization 13 from KH2). I'm still in the middle of thinking up a storyline to relate Mr Ball and the diamonds, and why they are trying to eradicate him.

Friday, 31 October 2008

...

So, I continued my work on Mr Ball 2. Mr Ball can die now. I know it's a very unpleasant thing to say, but come on, no one's immortal right? (unless of course, you're one)

Okay, I tried to use the free 3D modeling application from the net, Blender3D. It's damn nice to use. But the problem I faced with it is the UV coordinates. What are UV coordinates? These coordinates are used when you wanna "wrap" a 3D object with a picture, or called as a texture.

Every vertex can have UV coordinates. They are just your average (x,y) coordinates, just that they are denoted (u,v), I think. But anyway, Imagine a picture. The top left corner of that picture has a UV coord of (0,0) and the bottom-right corner, (1,1). So, let's say a vertex on a 3D object has a UV coordinate of (0,0), it'll then refer to the top-left corner of the picture. So, whatever colour is on the top-left of the picture will now be on that vertex. Smart right? 3D games fascinate me all the time.

I'm not sure why, but misalignment of UV coordinates in my diamond model caused my texture to go haywire on it. In the end, I used back the old model from the first installment.

Okay, diamond down. Now what? Well, I chose to model a spear. Remember the black diamond? Okay, if you didn't play my game before, see it at the Updated Mr Ball post.

Spears are his weapons. Without it, he's nothing but a diamond. Yeah so, tried to model a spear, and you know what, it's so damn THICK! Sigh... got to go remodel. Blah!!!!

So far so good

Mr Ball is coming along great. The targeting system has been rewritten. It's not like the old lock-on system which requires you to press T to lock on to the enemy. Now, you can only target the closest enemy. So, you've got to approach them. Not good for Mr Ball eh? Another thing, this time it won't be the T on the keyboard which activates the targeting system. Just turn the mouse wheel. Move the mouse wheel forward to lock on, move backward to free the camera, ie, stop targeting. I've done this because I want most of the game play to rely mostly on the mouse.

So, I have utilised the whole mouse.
  • Left click - shoot
  • Right click - jump
  • Move the mouse - move the camera
  • Middle click (clicking the mouse wheel, usually) - Zooms in or out from Mr Ball. Zooming out lets you see more things around Mr Ball.
  • Mouse wheel - targets highlighted enemy.
To know that you will be targeting the right enemy, just move close to it and a ring will appear below the enemy. Here's a picture, with a dummy boss (well, actually 2) to test the targeting system:


There he is, closing in onto the enemy, and the highlight ring appears. Notice, the enemy's life bar is also "highlighted". Don't ask why I named the bosses Diamond instead of erm... black hole. It's just for testing.So, I've moved my mouse wheel forward. The ring turns read, indicating that I'm locking onto it. Now, you can keep targeting it no matter how far away it is, until you disable the lock-on.

So far, I haven't modeled any bosses yet. Sigh... but at least, I can start making the first level soon. Right after I finish the overlay object (the object that displays the status of Mr Ball and the enemies on the screen). It's not really done yet.

Hmm... cutscenes. I'm thinking how I should do it. It's gonna be one heck of a challenge.

Sadly, there isn't any Sound effects yet.

Thursday, 30 October 2008

Kitchen O Pank working! Well, sort of

My favourite game, Kitchen O Pank is erm... well working i guess. It's damn hard finding for the right plugin to play the game. Too bad though, after all that searching and configuring, it's damn glitchy. Once I finished the first level, the scoreboard refuses to load. Blah it!!!

Anyway, my progress in Mr Ball 2.
Okay, so here's a list of what I have done for Mr Ball:
  • Movement and Jumping
  • Gravity
  • HP, MP (may be renamed later) and Power gauge system
  • Modeled the water cannon for Mr Ball, but haven't program it yet
  • More importantly, I've finished the camera, but it still lacks some features, like locking on to the enemy
And here's the task I'm supposed to finish by the end of today:
  • Get the water gun ready
  • Add the tendency to be pushed away by enemy attacks for Mr Ball
  • Create the overlay object to draw the gauges onto the screen
  • Create the damage display (the number that floats above the character after getting hit)
I'll probably create more textures for Mr Ball. Because I want Mr Ball to erm... show a different expression when getting hit rather than smiling all the time. Come on, isn't weird to smile when getting slashed by hundreds of spears?

I'm also currently planning a very stupid yet simple storyline for the game. So there's gonna be dialogues. I might voice the dialogues but that would mean adding more loading time to the game.

Oh, and the controls are very different now. It relies more on the mouse. Keyboard alone is not enough. You use the mouse to look around, something like a First person shooter, but this is third person. Anyway, they are just similar. Like FPS, Left click is to shoot. The [CTRL] on the keyboard works too. The right click makes Mr Ball jumps. Alternatively, you can use [Space] for that. The directional keys allows Mr Ball to move. It is no longer WASD keys like in the first installment.

Wednesday, 29 October 2008

Couldn't get GM7

I'm trying my best to get Game Maker 7 Pro, but I just can't pay USD 20 for that. So, I'm sticking back to Game Maker 6 to make Mr Ball 2. I know that it wouldn't really work on Vista, but apparently the creator of Game Maker (Mark Overmars) has made a nifty tool to make GM6 games compatible with Vista, so I'll rely on that.

You might ask, "Bee Lee, why don't you get a pirated version of the program? Like getting a crack/patch or something??". Well, I wanted to and erm... I did, but I'm just not confident that it would be safe. My computer already terkena virus and I'm still trying to track down that annoying virus. I don't want another virus to wreak havoc on the laptop.

I'm gonna start creating the game after this. Wish me good luck!

Tuesday, 28 October 2008

Mr Ball may be available for Vista

I just converted the Mr Ball executable so it's compatible with Vista. But I don't entirely guarantee i would work. So, if you wanna play it, you can request for it bu asking me through MSn or in school.

My first fishing trip!

I would like to thank my uncle for this! Anyway, my uncle brought my cousin and me to a fishing pond somewhere near Sungai Long to go, well, fish! This is my first time fishing, so there were a lot of erm... mistakes.

I got my very own fishing rod, courtesy of my uncle! My first few throws tangled up my fishing line. In the end, I wasted quite a lot of fishing line. Lol! It was humiliating. Then, I wanted to throw my bait further, so, I attached a counter weight at the end of the fishing line. I just tied a reef knot. I always expected reef knots to be tight. So, anyway, I threw the bait, and there were 2 splashes?? What the hell? It seems that the counter weight came off and it dropped into the pond. Sigh...

Later, when I tied another weight, I REALLY tied a dead knot, until I couldn't even take it out! Haha! And it works!

The fishing ended at 5pm. Too bad though, I didn't get any fish! It was embarrassing. All my uncle's friends, my uncle and my cousin (who is just Standard 4) got fish! And I'm the only one who didn't get any!! Not even a single fin! Only a leaf! Haha!

I guess I wasn't lucky. Or maybe my bait wasn't fresh enough. My bait was a small prawn. I really couldn't watch myself pierce the prawn onto the hook. It was a very heart breaking moment for me. Maybe I'm just having too much feelings for animals. The prawn's heart was still thumping when I skewered it. It was incredibly sad for a person like me. I almost broke down. I just couldn't bear the fact that I murdered some innocent prawns.

I got badly sunburned during the fishing trip. You can definitely see the tan line on my arm right now. I'm fearing my skin would peel later. It's gonna be unpleasant.

The next day, I went to watch High School Musical 3! Wheee! It was quite nice lah. To me, I prefer the 2nd one. The songs were okay. Hey. you can't blame me for being such a big HSM fan, right?

Friday, 24 October 2008

A "jogging" trip!

So, Hon-Son and I were having our usual jog around the neighbourhood. Like what we always did, we went friend's house hunting. First, we went to Jun Ray's house. We invited him to join us, and join us he did. Next, we walked all the way to Pei Jiun's house. Before that, we stopped by at Wai Phun's house (erm... I hope I have spelled the name correctly, :P). I yelled out his name, no response. Anyway, on to Pei Jiun's house. Hon-Son, Jun Ray and I were like wondering who would go to the front door and ask whether Pei Jiun is in. Everyone (except me) insisted that I go because I have the "guts". Yeah right!! Anyway, I did what I had to do.

........
Took out my hand phone and dialed. You see, you see how I added suspense in my post?? Lol!! Okay, I know is lame. Anyway, back to the story.

I dialed Pei Jiun's cellphone. No answer. Called Shan Min to ask for Pei Jiun's house number. Then called Pei Jiun's house. Then a lady picked up. I asked "May I speak to Pei Jiun please?". It is followed by a very short silence. Then she spoke to me in Mandarin. Well, I understand a bit, only the part where she said "Pei Jiun bu zhai". So, then I said "thank you" and went off. We then thought of walking to Kai Leong's house.

Okay, it was further than we thought it would be. It was in SS2! Yeah, so I called Kai Leong to ask for his house address. We walked all the way there, then, we were greeted by his sister. It seems that Kai Leong hasn't finish bathing. Sigh... so we walked all the way back home. It's a 1/2 hour walk. But it's still a good exercise though.

============
Just now I went can rings hunting with Audrey, William, Jia Tern, Jun Ray, David and Chia Sing. It was fun, unless you want to count in the horrible encounters with creepy crawlies!! Ewww! And it's all stinky. I don't even want to think how long th cans have been kept there. The Soya Bean grosses me out the most. I mean, it turned into Bean Curd (Tou fu)!!!!! OMG!! And it stinks! Whoa, luckily I have gloves!

I just only came back and now I seriously need to use the toilet!! It's gonna be a big one!

Thursday, 23 October 2008

Kitchen O Pank (Kitchen Panic)! One of my favourite games!

It's not a well-known game, so it's no surprise if you don't know what game is that. Here's the opening movie of the game.



This is the PC version. I'm currently downloading the image file of the PS1 version. I heard there's an XBox version of it as well. The game's created by Panther Soft. It's a Japanese game, so everything is in Japanese characters. But you don't need to know Japanese just to play it. It's simple, fun and cute!

The basic idea of the game is to guide the potato guy to the end of the level, avoiding all the enemies like tin cans (the most common enemy) and a lot of other things that you can find in the kitchen. Yes, that's right, this game is set in the kitchen. This is one of my favourite game ever, eventhough it is so freaking old! Hey, simple games are the best!

My disc is badly cracked up and so I made a copy of it. (Sorry Panther Soft, but I got to do it so that I can "preserve" the game). You won't be able to find this game in the shop already, unless you are really lucky. I especially love the BGM.

Sigh... I hope the PSX ROM will work on my emulator! I love this game a lot! It's my favourite game since when I was still at kindergarten.

Anyway, another thing that I like the most is Phineas and Ferb!! Woohoo! It's a Disney cartoon about 2 brothers (stepbrothers to be precise) who want to do something for the summer holidays, so what they did was to invent unbelievable things. It's damn cool, and random. Well, it's not only that, there are sub-plots as well. Candace, Phineas' sister and Ferb's stepsister (I think) is always looking for ways to bust her brothers. Everytime she suspects her brothers building something BIG, she'll usually yell out MUM! But whenever her mum comes in, Phineas' and Ferb's inventions are never to be seen by their mother, well... maybe sometimes, disguised as something ordinary. Okay, something like that lah. It's just that their mother never catches them doing something "unusual" in Candace terms.

Anyway, another sub-plot is about Perry the Platypus, Phineas' pet platypus. Apart from being a mindless domestic pet, he is also working as a secret agent! His nemesis is Dr. Heinz Doofenshmirtz. His evil schemes are incredibly random and sometimes, kinda stupid. A lot of times, his schemes backfire.

Anyway, you've got to watch it to experience it. It's damn funny! I like it because of the randomness, especially in the music in each of the episode. Very creative!!

Wednesday, 22 October 2008

Goals for now and probably for the future

Man, I can't wait for Mr Ball 2! But I can't start yet until I finish planning properly. I need a better way to plan things now. My programming projects are getting more and more complicated.

I went to Taylor's College today to attend a talk on the fields you can pursue in that college and requirements for some future careers.

Many of my friends and family have asked me many times, "Bee Lee, what are your ambitions?". I don't know why I always feel very shy to say it out. I must learn to be proud of what I need to say. God! Bee Lee, you are so BLAH!!

Anyway, my REAL ambition as of now is to pursue the IT career. I'm more interested in Game development. If cannot then software engineer also can. Anything that involves software programming would do. To me, it's a very fun and satisfying thing, especially when you see your software comes to life.

Okay, before I end my post, here's one more Phantom of the Opera tidbit:

sung by Sarah Brightman and Antonio Banderas

Tuesday, 21 October 2008

Phantom of the Opera

Okay, I'm loving Phantom of the Opera again!!!! Well, the song at least. Oh, oh, here's a video:

Sarah Brightman singing Phantom of the Opera theme. Note, her singing is kinda different from Emmy Rossum's (the one who acted in the 2004 Phantom of the Opera, which we watched in school). I especially LOVE the organ!


And this is the one that we all know and love:


And this video is from the 80's:

Yes, that's Sarah Brightman. She's so freaking young! You can skip the first 30 seconds of this video. There's nothing much. Okay, to me, the Phantom's cape is a little too much. Lol!

Crying makes you look weak?

Most of us were told that crying shows that you're not tough. I agree with that. But, if you look the other side, crying has a lot of benefits. It cleans your eyes, moisten your eyes and most importantly, relieves stress. When you are stressed, the best thing you should do is to talk about it to your parents or whoever who wants to listen to your problem. Hugging is also a good way to relief stress. Studies have shown that people who live most of their lives with someone they love has a lower chance of getting heart attack from stress than people who live alone and isolated from the world! But that's another story.

Let's get back to the subject. These days, many tough parents are taking the freedom to cry out of their kids, especially the guys, just to teach them to be tough people. They should know that young kids are sensitive people. Sure it's good to toughen them up, but when doing so, parents should know their limits.

What I think about this is that crying may be one of the factors that lead to crimes and things like that. I mean, if you don't let some one cry to relief his stress every day, in the end, he'll be so pressured until finally, he couldn't take it any longer and let out all his anger by doing crimes and blah.

Some tough guys do cry once in a while too, just that you don't see them crying.

Learning to control crying is also vital. You don't wanna cry the whole day, now do you? If you feel too stressed out and you want to have a good cry, let it out, until you're okay already and stop. After that wash your face as your face can get a little sticky after that.

And one last thing. Don't cry for small things. It's ridiculous. If you want to avoid crying, learn to tolerate. Toleration is the key to avoid crying.

Just to let you know, this is just my opinion. Don't criticise me or anything just because you don't have the same opinion as me. I admit, I'm a crybaby myself, because of my sensitivity. It's okay to cry once in a while. But when you cry, make sure it's for the right reasons and cry at the right moment. A meaningless cry at a wrong time won't do you any good except humiliate yourself.

========================================================
Leaving that aside....

I can finally focus more of my time in finishing Mr Ball 2. I haven't started yet, but I'm gonna start soon. I've planned out my flow chart for Mr Ball 2 already:
So, there are two types of characters, Good and Bad ones. The good one is obviously Mr Ball. The bad ones, I'm not gonna list it out here. And, I'm not gonna add the level skipping thingie to the game because this time, you can save your game (hopefully). And it's going to have some sort of a storyline, so, skipping levels would ruin the "fun and joy" of the game (like it has fun and joy *rolls eyes*). I know, I know, it seems like I don't appreciate my game, but I really do. It's just that it's very lame. Who cares?? it's my hobby anyway.

Now, there are attacks. There are 2 parts to make an attack work. First, you need the animation. Before you run the animation (the runner), some settings must be set. This is the job for the animation starter. The starter then invokes the runner to begin animating. Now, as you can see, the Animation part of the Attack has an indirect relationship with the camera. Therefore, the animator can manipulate the camera, maybe to show different angles of the attack for dramatic effects. In my game, anything that involves animation and camera movement will be under Cutscenes.

The so-called "Damagers" are the essential part of an attack as they define the region where damage can be dealted. Without these babies, an attack won't really, erm... attack. There are good and bad damagers. Good ones deals damage to the good character and the bad ones, well, you know lah.

The Overlay object displays the HP, MP* (deprecated), Power gauge and all the other important things on the screen.

*The MP bar may not appear in the second installment because the only MP consuming skill is healing. Therefore, the MP bar will be replaced with a more "appropriate" bar.

The Camera is the eye of the observer. Without this, you won't be able to see the stage.

BGM, well... it's BGM!!

The Miscellaneous part consists of other things which help along in the game.