Monday 27 April 2009

Never thought skipping school would be a sad thing to do

I always thought skipping school was one of the happiest thing I can ever wish for, but apparently, it doesn't seem that way. This morning I had a very bad stomach ache, probably because of my dinner last night or maybe because of my finger-biting habit. I will never know. All I know is the diarrhea I had this morning was #*!$@%&! It was disgusting.

I really wished I had went to school today. Because of my condition, I couldn't sit for the History test, which I studied so hard for.

Maybe for some of you out there, skipping school is a fun thing to do. Maybe I'm not used to it (and I hope I will never get use to it). I felt like I have missed so much today. I mean, sure, I would like to get the heck out of school to avoid all those pesky teachers (well, some at least) and homework. But then, I realised, school is a much better place compared to house. My house was a boring crap this morning, with only my computer to entertain me. Well, my dad also brought me out to eat breakfast.

Kids, love your school. School maybe a nightmare sometimes, but it may also be one of your happiest places on Earth while you're still studying. I mean, all your friends are there. But, I'm not trying to say parents aren't important, they are. Just that, while you're still studying, just appreciate the school that you are studying in, the school that your parents are paying to provide you good education.

Seriously, next time when I say, "Sigh, how I wish I never had to go to school...", I'll reconsider.

Friday 24 April 2009

Uber cool lightning!

I'm so proud of it, I can't keep my mouth shut. I successfully made "Indignation"!



Just a note, I have no intentions whatsoever to use a religious cross there, so to some of you out there, don't criticise me or anything. That weird looking cross in the video is just a piece of decoration and has no resemblance to any religious cross.

Anyway, that's my attempt to replicate Tales of the Abyss' Indignation hi-Ougi. Well, it may not be 100% alike, but at least I tried. And some more, I'm not a pro game developer, so that's actually quite a big achievement for a person like me.

And if you can't read the damage dealt by that hi-Ougi, it's 3209 (not including some extra damages). Yups, so far that's the most powerful hi-Ougi in Mr Ball's history.

Oh! This is worth it man! There's like 3 hours of effort in that thing!

Thursday 23 April 2009

Holy cow! Lightning!


Right, there's the second boss for you. Gotta love the lightning, right? Oh oh, and a very clear demo of the counterattack, which is actually quite simple, around 2 minutes and 19 seconds from the start of the video. Now, to initiate the counter attack, just press E once on the keyboard during a critical hit. No longer you need to spam the [ENTER] key like what I said earlier.

Seriously, I terpaksa set the boss' health to only 600HP, 200HP lower than the ice diamond because this boss is incredibly tough. Sure, the lightning only cause around 2-4 damage (not including critical hits), but look at the amount of lightnings used!! I know, it's quite evil to place hard bosses somewhere near the start of the game, but you know me, I'm a very evil game developer. Muahahahaha!

I can assure you, the player will be rewarded after this battle.

In the first Mr Ball game, my lightning engine was very simple.
  1. Along a straight line, define a few random points that lie outside the line.
  2. Join them up with straight lines
A good example of this lightning-making technique can be seen below here:

The thing is, this kind of lightning will be too thin, and not very nice. But but, in my current Mr Ball game, I'm not creating the lightning dynamically at runtime, instead, I draw a few lightning sprites, then draw them during the game as billboards, what I have is a more realistic lightning, which I think, is a great improvement from Mr Ball 1.


Cool eh?
I seriously love the lightning. I mean, lightnings are so cool, but I have a phobia of lightning in real life though. But that doesn't stop me from admiring the beauty of lightning, one of Mother Nature's fearful forces.

Hmm... Mr Ball may be able to harness the power of lightning to his own advantage. Who knows?

Wednesday 22 April 2009

No maze

The maze system is taking too much time to be developed, lengthening the project time, something which I really do not want. Therefore, I'll take out the whole maze system and revert my Mr Ball back to the normal "run and shoot and run again" type of game, with some added twists lah, like upgrading Mr Ball's stats.

I need to finish Mr Ball as soon as possible, yea so, no maze lah. And some more, mazes will be quite boring since there isn't anything in there.

=====================
EDIT:

So far so great! Hahaha. Well, anyway, I added a new thing for Mr Ball. It's called Counter Attack! Yups, Mr Ball can now counter attack his enemies, but he can only counter critical hits. The best thing is, the bigger his attack points, the higher the counter attack damage. But then, it is only limited to 250 damage. Still, this is one very powerful ability if used at the right moment.

Before you can use it, you have to "buy" it with the accumulated skill points. Then, to activate it, when the screen flashes red during a critical hit, spam the [ENTER] key before it red effect fades away. If you manage to mash the [ENTER] key a few times before the red flash disappears, it'll initiate a counter attack, and the enemy will receive damage, unless of course the enemy decides to teleport away from his position at that moment, which I think won't happen too often. The downside though, is that your arm will get horribly tired, so watch out! And some more, you need a very fast reflex. Too slow, and your chance of getting a counter attack will be almost nil. Why? Well, the critical hit flash will just be on the screen for a split second only, so you've got to act quick to counter!

Saturday 18 April 2009

Circle, never ever underestimate it again

If you have learnt about circles, you will know that the Greek letter π is quite important. But π is an irrational number (a number that can never be expressed as a fraction). So, what we use is just the approximation in our daily lives, ie, 3.142 or 22/7. But as you can see, if you really want the very precise value of π those approximations will not be suitable for you. Last night, I was wondering, how to get the precise value of π?

Now, I discovered one weird looking formula last night, which may not give you the precise value of π when you demanded it, but at least you'll know how to get the precise value of π. And some more, this formula requires a very large number.

And so, here it comes, some wonderful maths. If you hate maths, just skip this whole post.

Before I begin, I shall introduce to you one cool formula.

A = ns² tan θ / 4

where
A = Area of any regular polygon (a polygon with equal sides and equal internal angles)

n = number of sides
s = length of a side
θ = 90(n-2)/n

That formula will give you the area of any regular polygon, given the number of sides and the length of a side. Remember, it only works for regular polygons.

Right, remember the area formula for a circle? That's right,

A = πr²

Let's get the area of a unit circle (A circle with a radius of 1):

A = π x 1 x 1
A = π

So, from there, the area of a circle with radius of 1 is equal to π
This is crucial to find out the weird formula for π later.

==============================================
Next, we go on to the very important part of this post:

Now, area of circles, are usually just approximations, because we use the approximation of π to calculate the area. So, they are not equal to the real area of the circle. Here's a better way to understand it:

Given a number 3.5, and you rounded that number up to 4, 4 is just and approximation of 3.5, but 4≠3.5

Imagine a situation where we require the precise value. Yea, so we need something.

Let's begin with a circle, with a radius of 1 (unit circle)


We'll start by approximating the area of circle, then we'll work our way to the precise value of the area of the circle.

Let's place a cyclic polygon into the circle. A cyclic polygon is basically a polygon which, the vertices touch the circumference of the circle.

Here's a regular cyclic triangle:


To find its area, we need the length of its side.

Here, I introduce to you another formula:

s=2r cos θ

where
s=length of a side
r=radius of circle
θ=90(n-2)/n

This calculates the length of a side of a REGULAR cyclic polygon, given the radius of the circle, and the number of sides.

In this case, the length of a side of the cyclic triangle is

s=2(1) cos 30
s=1.732

So, area of the cyclic triangle is:
A=ns² tan θ / 4
A=3(1.732)² tan 30 / 4
A=1.299

Ok, keep that in mind, for now.

Next, let's use another cyclic quad, maybe this time, we'll use and octagon.



Using the same technique, you'll find that the area of a regular cyclic octagon in a unit circle is:

A=2.828

Okay, it's easy to observe that as the number of sides (n) gets bigger, the value obtained for the area of the cyclic polygon will get closer and closer to the area of the circle. If we assume that π=3.142, the area of cyclic triangle has a bigger difference from π (Area of a unit circle) compared to the area of the cyclic octagon.

So, from there, we can conclude that the higher the number of sides of the cyclic polygon, the closer it gets to the area of the circle.

If we keep going on and on, with bigger number of sides, you'll know that there's a limit.

n, A:
3, 1.299038106
10, 2.938926261
100, 3.139525976
1000, 3.141571983
10000, 3.141592447
100000, 3.141592652
1000000, 3.141592654
10000000, 3.141592653

As you can see, the value of A gets closer and closer towards π, but never really reach it, as the number of sides increases. Therefore, it's safe to say that there's a limit here. And we can write it out like so:



And so, we have the formula for finding the value of π. The precision of the value you get from there depends on how large your value of n is. It's best to use n=1000000. But the bigger it is the better. But to work, θ&ne90. So, when you count for θ, don't round 89.9999999999 to 90, because that can yield weird results in the end.

Now, I don't recommend you using this in your daily lives though. It's just not practical. And some more, I don't really that I'm the first to discover this weird formula. Others may also have discovered it also, long before I did, so yea.

Friday 17 April 2009

Anastasia!

I still remember I watched that movie with my sister. I always thought it was from Disney, but apparently, it's not from Disney.

One thing, I've got very addicted to Rasputin's song. I don't know why, villains' songs are very nice to listen to because it's dark and evil, unlike those happy songs.



Here it is, with the lyrics on screen. The good bit of the song starts at the 50th second. The starting is all instrumental only. It's damn nice.

Wednesday 15 April 2009

Failed neural network implementation

I guess I need a little more research on Neural Networks. It's very hard to understand for a noob like me. Gosh.



If it's not obvious already, if you look at the Error readings on the right, it's increasing exponentially! It's not suppose to increase that much in such short period of time! So, maybe I'm using neural networks the wrong way, or maybe my code is highly flawed. But at least I briefly know how does the neural network works already. I'm still a little confused with the maths though.

Tuesday 14 April 2009

...

Holy cow! Watching a debate is... enjoyable? Well, that was how I felt just now. More on that later.

Here's what I did today:

I went to MPBJ Library to help out with the State Level Malay Debate Competition ala Parliament Style.

All I did was direct some schools to the respective places. No biggie. And I also helped with the time keeping once. And that was the time I enjoyed the most, despite having such a boring job.

When the Timbalan Perdana Menteri talked, I was like OMG!!! She's really great at public speaking. She speaks with ... emotion... and elegance! When she talked, I was like, "Yes, this team will definitely win". Really, government won, and the best speaker was her, according to the judges. I really enjoyed her speech.

Well, the day wasn't as bad as I expected. There's one more day left. Tomorrow's the semi finals and the final round. Can't wait man! So "kan cheong"!!

Monday 13 April 2009

Sigh... skipping school...

For the next 2 days I won't be in school. Instead, I'll be at a public library, helping out with the state level debate competition. The best thing out of this, though, is that I'll get 5 points for Koko! Yeah!!

I'll be missing quite a lot of drama rehearsals leh, I mean for the BM interclass drama competition. I need to memorise my lines!!

Anyway, for Mr Ball, the Maze Editor is coming along great! Here's a screencap of it in action:




So far, the editor only supports floor plan editing. You can't add any objects yet. That's gonna be one hard thing to do. Well, let's see what I can do.

Thursday 9 April 2009

Omg, I can't believe it!

Here's Don't Forget from Demi Lovato


I don't know why, but I'm a little touched by the song. It's just so beautiful. At first, I hated this song, because it's not the rock-ish Demi song that I used to listen, but after listening to it for a while, I got attached to it, and now, I'm stuck to it. I don't know why, something about this song just makes me feel sad, but at the same time, it relieves my stress. Maybe, it's meant to be that way.

Either way, I'm currently a big fan of Demi Lovato. Okok, I'm actually a fan of quite a lot of Disney stars. Hehehe.

Monday 6 April 2009

Neural Networks, wth?

I'm delving into the world of artificial neural networks, one of the main tools to create artificial intelligence. I dunno why, but I'm fascinated by the math behind it, even though it's very hard to understand and all. So far, after like 5 to 6 tutorials on the net, I can only briefly understand how does the neural network works, but I still don't know how am I supposed to use it. Hmm... hopefully, I can learn everything by the end of this week.

Oh, and I have just started planning for the map editor. It won't be easy, but I'll try.

Sunday 5 April 2009

Maze system finished!

Ok, so now the First Person maze is finished
I don't know why, but I can get motion sickness from my maze. Maybe because I'm just to susceptible to it. So, right now, the player (who is the eyes and ears of Mr Ball) will be running around the dungeon and solving puzzles along the way. He won't be able to use his water gun in the maze for some reason, because of that, there won't be monsters, but there will be things that can hurt Mr Ball in the maze. And dying in the maze will be a straight game over, even if you have a lot of lives. Mr Ball can't really die yet in the maze.

Currently, I'm starting a "side" project. It's a Map Editor for the mazes, supposed to be fully customizable to incorporate whatever in the game that can be edited through the map editor.

Well, it'll take me a week to finish the map editor.

Whole day of fun and entertainment

I had a party yesterday in my house. A "Left 4 Dead + Resident Evil 4 + Fatal Frame 3" party! Yea, I invited Hong Sheng, Gavin, Jeffrey Teh, Shan Min and Jun Ray to come to my house. Sadly, Gavin couldn't come.

Well, anyway, we all had fun, and ate pizza for tea! Haha. The Pizza Hut jingle is still stuck in my head. 1 3 hundred 8 8 2 5 2 5, pizza hut special delivery!

Later, I'm going to play Squash for the first time in my life, with Hon Son! Yeah! I have no idea to play it, but it's just hitting the ball to the wall and hoping it bounces to the correct place. Hmm.. can't wait!

Thursday 2 April 2009

Yeah, first boss finished!

Here's a demo of the full boss fight!!



Actually, the first time I tested this boss fight, he was too powerful. I died like 3 times! Lol! Some more, my computer lagged. So, it means, the game drew too many stuff. I must cut down a bit on the number of ice spikes. I mean come on, 2 GB of RAM and it still lags? It won't look good for those with very little RAM.


Now, let's talk about school!

Today, I went for my first ever debate competition, well, it's an interclass competition for English Week. I never knew debating was so much fun! Even though 4BR, my class, lost to 4C by only like 20 points, it's actually the experience that counts. I have to admit, I went for debate just to look for fun. Hey, who says arguing can never be fun? I want some more man! So, I suggested to David and Hon Son so we can like create a group, where we can debate among ourselves. Whee!!