I created my new website with JoomLa!
BLProductions
I'll slowly phase out from Blogger and use that website. Though, I must warn you, that website is only on when I'm on. I'm usually online most of the time, so don't worry...
Sunday, 20 December 2009
Saturday, 19 December 2009
AI
Artificial Intelligence eh? I wonder have I ever disclosed the AI system of Mr Ball? It's not that advanced really, as compared to today's AI, which uses things like Neural Networks and stuff like that. Those are serious maths, but in Mr Ball's case, the AI system is basically a...
Random Number Generator
Not convinced that the whole game is governed by a random number generator? Well, here's the proof:
See the random(...) command there? That's the proof!
Well, I'm just using what's given to me in Game Maker to my advantage. But it's just a number generator, how significant is it?
Now, the whole AI system of the enemy is basically like this:
-choose a random attack
-executes that attack
-repeat
But then, if you were given a chance to look deeper into the source code, it's not that simple. It used to be only that simple, but as the AI system grew and matured for 4 years, it has many more additions.
The AI system is actually a big timer. Whenever the timer reaches its target, it executes a long list of codes, which is the "main code" for the boss character (the one that makes the boss attack).
When the battle begins, the boss character sets one of its properties, aprev, to -1. This property just means "previous attack". Each attack has its own id number.
Attacks that are very simple will not change the value of aprev. But for an attack that is made of chains of different motions and animations, that attack change the value of aprev to its id number.
Every boss has this part of code:
if(aprev>-1)
{
a=aprev;
}
else
{
a=floor(random(.... /*Number of attacks*/))
}
which basically means that when "aprev>-1", keep executing the same attack as the previous, otherwise, choose another random attack.
Chained Attacks (the ones like the Deperation Attacks, or attacks that require the boss to move to a specific place) are subdivided into many different parts, which are called "phases" in the system. So, everytime the "main code" is executed and a Chained Attack is chosen, the "main code" will execute once for every phase.
This may sound a bit confusing, but that's just the way how Mr Ball works.
This system, as I have said, it's about 4 years old. The longest "main code" that I have written so far stretches for 958 lines (around 17.8 KB, for about 30 different attacks, in Mr Ball 2D)
There is one bad flaw about this system though, it's very HARD to debug. Yea, whenever something goes wrong, sometimes, it's very difficult to look for the error.
Another bad thing about this system is that the timer for the "main code" must always be reset. If the timer were to stop, the main code will not execute and the boss will do nothing. Now, this may not be so bad in some cases, but most of the time, when the boss stops doing anything, the level becomes boring. This is usually one of the most annoying bugs in the game.
Well, that's all about the basics of the AI system of Mr Ball. Nothing much to it really, it's just a creation of my imagination. It may not be the best, but as long as it works, it's good enough for me. See you then!
Random Number Generator
Not convinced that the whole game is governed by a random number generator? Well, here's the proof:
See the random(...) command there? That's the proof!
Well, I'm just using what's given to me in Game Maker to my advantage. But it's just a number generator, how significant is it?
Now, the whole AI system of the enemy is basically like this:
-choose a random attack
-executes that attack
-repeat
But then, if you were given a chance to look deeper into the source code, it's not that simple. It used to be only that simple, but as the AI system grew and matured for 4 years, it has many more additions.
The AI system is actually a big timer. Whenever the timer reaches its target, it executes a long list of codes, which is the "main code" for the boss character (the one that makes the boss attack).
When the battle begins, the boss character sets one of its properties, aprev, to -1. This property just means "previous attack". Each attack has its own id number.
Attacks that are very simple will not change the value of aprev. But for an attack that is made of chains of different motions and animations, that attack change the value of aprev to its id number.
Every boss has this part of code:
if(aprev>-1)
{
a=aprev;
}
else
{
a=floor(random(.... /*Number of attacks*/))
}
which basically means that when "aprev>-1", keep executing the same attack as the previous, otherwise, choose another random attack.
Chained Attacks (the ones like the Deperation Attacks, or attacks that require the boss to move to a specific place) are subdivided into many different parts, which are called "phases" in the system. So, everytime the "main code" is executed and a Chained Attack is chosen, the "main code" will execute once for every phase.
This may sound a bit confusing, but that's just the way how Mr Ball works.
This system, as I have said, it's about 4 years old. The longest "main code" that I have written so far stretches for 958 lines (around 17.8 KB, for about 30 different attacks, in Mr Ball 2D)
There is one bad flaw about this system though, it's very HARD to debug. Yea, whenever something goes wrong, sometimes, it's very difficult to look for the error.
Another bad thing about this system is that the timer for the "main code" must always be reset. If the timer were to stop, the main code will not execute and the boss will do nothing. Now, this may not be so bad in some cases, but most of the time, when the boss stops doing anything, the level becomes boring. This is usually one of the most annoying bugs in the game.
Well, that's all about the basics of the AI system of Mr Ball. Nothing much to it really, it's just a creation of my imagination. It may not be the best, but as long as it works, it's good enough for me. See you then!
Tuesday, 15 December 2009
Talk about cataclysm!
I just updated Mr Ball 2. I just made a new "special" attack, but it's not for Mr Ball (boohoo!)
Yea, it took me a total of 5 hours to finish it (and that includes 1-2 hours of constant testing). It wasn't easy, but I managed it. This "special" attack uses a new system.
Usually, the "special" attacks that I have made before this are all controlled by a single "controller". The Controller does all the work like moving the camera and timing the special effects and the voices.
This time, I split the work to 4 different "sub-controllers", 1 for creating the glyphs (my proudest work! =D), 1 for moving the camera, 1 for creating the random laser beams and 1 as the "master", which basically starts the whole process.
So, all that increased the source code by about 1MB. gg.com!
Yea, it took me a total of 5 hours to finish it (and that includes 1-2 hours of constant testing). It wasn't easy, but I managed it. This "special" attack uses a new system.
Usually, the "special" attacks that I have made before this are all controlled by a single "controller". The Controller does all the work like moving the camera and timing the special effects and the voices.
This time, I split the work to 4 different "sub-controllers", 1 for creating the glyphs (my proudest work! =D), 1 for moving the camera, 1 for creating the random laser beams and 1 as the "master", which basically starts the whole process.
So, all that increased the source code by about 1MB. gg.com!
Tuesday, 8 December 2009
Tales of vesperia FTW!
Though it's in Japanese, it's still fun! I guess spending some time learning Katakana is worth it. I love to use spellcasters in Tales games, especially Rita Mordio. Gosh, when you start to spam her most powerful spells, you'll know what I mean.
I'm gonna try Grade Farming, so when my sis and I start a new game, we can get more bonus. Seriously loving the game!
Anyway, I just came back from a scouts camp, and it was fun, if not amazing! There were so many firsts for me during the camp, like walking on burning charcoal (yea, that's right, I walked on burning hot charcoal!!) and surviving in the wilderness. Though, I have a very BIG phobia of the jungle, not because of the creepy noises and the darkness, but it's because of the insects and spiders. Really, I don't like insects at all. I can practically scream like a girl when I even think of it. Leeches, well, not too bad, but they are a little freaky to me.
The best part of the camp was the campfire. We did one of the longest sketches in our campfire history. It's basically a long musical/sketch thing where we spontaneously insert a music/parody of a music randomly. The list of music is in mah friend's blog.
Hmm... 30 over music in a single sketch.
I came back all battered up and bruised, with cuts and slits all over my hands, all because of my carelessness while cutting the bamboo. Never knew bamboo was that, erm... sharp. To tell you the truth, I never really felt anything slicing my epidermis and through my dermis while I was cutting the bamboo. It was when I saw my hand bleeding, then I noticed something just opened a wound on my hands (wait, make that 11 wounds!)
So, through out the entire camp, I had to endure the sharp and intense pain from the cuts. It was worse when I dipped my hand into the river water and touched salt.
Did I mention how much fun chopping logs can give you? Though it may be tiring, but when you feel the satisfaction from breaking the log into two, the tired feeling seems to fade away. You feel all pumped up.
Too bad I do not have any photos as I did not bring my camera along. To summarise it, it was really awesome! Encountered 5 leeches, but only 2 of them managed to suck my blood.
I'm gonna try Grade Farming, so when my sis and I start a new game, we can get more bonus. Seriously loving the game!
Anyway, I just came back from a scouts camp, and it was fun, if not amazing! There were so many firsts for me during the camp, like walking on burning charcoal (yea, that's right, I walked on burning hot charcoal!!) and surviving in the wilderness. Though, I have a very BIG phobia of the jungle, not because of the creepy noises and the darkness, but it's because of the insects and spiders. Really, I don't like insects at all. I can practically scream like a girl when I even think of it. Leeches, well, not too bad, but they are a little freaky to me.
The best part of the camp was the campfire. We did one of the longest sketches in our campfire history. It's basically a long musical/sketch thing where we spontaneously insert a music/parody of a music randomly. The list of music is in mah friend's blog.
Hmm... 30 over music in a single sketch.
I came back all battered up and bruised, with cuts and slits all over my hands, all because of my carelessness while cutting the bamboo. Never knew bamboo was that, erm... sharp. To tell you the truth, I never really felt anything slicing my epidermis and through my dermis while I was cutting the bamboo. It was when I saw my hand bleeding, then I noticed something just opened a wound on my hands (wait, make that 11 wounds!)
So, through out the entire camp, I had to endure the sharp and intense pain from the cuts. It was worse when I dipped my hand into the river water and touched salt.
Did I mention how much fun chopping logs can give you? Though it may be tiring, but when you feel the satisfaction from breaking the log into two, the tired feeling seems to fade away. You feel all pumped up.
Too bad I do not have any photos as I did not bring my camera along. To summarise it, it was really awesome! Encountered 5 leeches, but only 2 of them managed to suck my blood.
Tuesday, 1 December 2009
The power to conquer demons, Fatal Circle!
My Mr Ball 2 is still suspended as I do not have the mood to continue, but I won't give up on it. I still have 3 more levels to create before I can make the final build of the game. In the meantime, I'm trying to make an "extreme" version of Breakout. It won't be the normal, move platform, bounce ball, hit brick type of game. There'll be more and I'll probably incorporate stuff from my Mr Ball game (don't worry, there won't be Mr Ball).
Mr Ball 3 will be a very "highly unlikely" game to be made, as I do not have plans for it. But who knows? Anyway, if I were gonna make it, I'm gonna have to remake the Battle System as it's getting quite old (2-3 years old to be precise) and it's too sophisticated to the point that it's very hard to add new things into it.
Well, that's basically all about my progress in Mr Ball.
You may have noticed that I'm not that active in blogging anymore. Actually, I just have too little time these days and everytime I come back from school, I'll doze off.
I'm kinda overdue for another Math Twister post, where I make everyday math a little bit more complicated for no apparent reason. Well, I will be digging something up, so you Math freakos out there who can't live without numbers, hold yer horses.
Mr Ball 3 will be a very "highly unlikely" game to be made, as I do not have plans for it. But who knows? Anyway, if I were gonna make it, I'm gonna have to remake the Battle System as it's getting quite old (2-3 years old to be precise) and it's too sophisticated to the point that it's very hard to add new things into it.
Well, that's basically all about my progress in Mr Ball.
You may have noticed that I'm not that active in blogging anymore. Actually, I just have too little time these days and everytime I come back from school, I'll doze off.
I'm kinda overdue for another Math Twister post, where I make everyday math a little bit more complicated for no apparent reason. Well, I will be digging something up, so you Math freakos out there who can't live without numbers, hold yer horses.
Subscribe to:
Posts (Atom)