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!