Tuesday, January 26, 2010

talk myself out of you... all!: main character's interactions

I've been having a lot of troubles giving name to my game, a good name... Therefore the name which I'm currently assigning to the game I'm currently working on will be: "Talk myself out of you... all!".

Below is the current progress of the game:

1. There are 3 different buttons which you could click on, in which each of them carry out different functions: attack, magic, and heal.
2. You can use any attack you want, but the magic attack (last button) won't work unless you have a certain level of confidence.
3. You need to keep on attacking until your confidence bar (the tube on the left side) is filling up itself. And when you get to a certain level, you can start using the magic attack.

Now, it's only been 2 days since I started working on this project, I've managed to finish coding the main interaction of the character, but haven't started on the enemy's AI, which to me is kinda complex, and needed 2 to 3 days to further working on it...

I'm also struggling with the perfection of the graphic, for instance: making sure the X and Y axis is in the range of rounded up numbers, and no decimal points, else I'll get all fed up about it.

Saturday, January 23, 2010

tough decision

I've finally decided, I'm gonna make a game for the LG competition I mentioned earlier; no matter what game it's going to be, I'm just gonna make one; whether or not I'm following the theme given or not, I'm just gonna make a game for it. It's 4:38am... nite...

Wednesday, January 20, 2010

like a mouse looking for cheese in a maze

Still got some time before this semester "actually" start, I decided to learn about pathfinding. I had already found a site just now and I'll begin reading through those "hundreds of pages" later. But first I would like to point out my very own theory of pathfinding in AS3. Cuz sometimes our thoughts are unexpectable, and kept on changing from time to time in terms of whatever we read. So I just wanna compare my thoughts as of right now, with the thoughts which I'll have later, after I read the whole thing.

To start off, first, the main object detects the distance and direction between the target and itself. Then, it'll start to move along to that direction it detected. And here's the thing, there's a lots of blocks and walls ahead of it, so how is it gonna pass through them and reach it's target.

Here's my solution: Using the if conditional statement, I'll make it detect all the blocks and walls it will hits when moving in a specific direction, and program it to move to the other direction after that.


this.y -= 10;

if (this.hitTestObject(wall) && this.direction = "front")
this.direction == "left";
this.y += 0;
this.x -= 10;

if (this.hitTestObject(wall) && this.direction = "left")
this.direction == "right";
this.x += 10;

if (this.hitTestObject(wall) && this.direction = "right")
this.direction == "down";
this.x += 0;
this.y += 10;

I haven't tested it out yet, but some problem will probably appear in the compiler. If I'm correct, it should move past all the blockage and reach the target; it I'm wrong, no big deal! I'll just write it again.

I'm not gonna read the whole thing at the moment, got a class to attend later, that's all for now...

Below is an example of a pathfinding project by bmod:

game prototype progress

I've spent 3 days working on this thing, although it still have some clinches, I'm kinda done with it, not sure what else should I add anymore. So I've decided to send it to my client, and see what they think. They probably will say it sucks... that's what worries me, since it's just a 3 days works.

1. Click on the screen to start the game.
2. Use your mouse to click on the jumping ghost which appears on the screen.
3. Your scores will be recorded at the bottom and shows up at the end.
4. You goal is to kill as many ghost as possible before the time runs out (just look at the moon).

Tuesday, January 19, 2010

rise of a new company

Haven't blog for a while now, many things has been going on this week. First off, my China pal, Wang Zi had agreed to form a team with me in game designing. We hadn't decide what name should we put yet, just wait till he's back and we could discuss further about it, but in the meantime, I'm just gonna put it as: "Studio 168", or "168 Games" something like that, but I would most certainly prefer a cooler name.

And on Monday, my lecturer told me about a small job offer in designing the graphics and animation for a iPhone game prototype, from some guy who's good at programming but not much on the graphics. I've accepted the offer and had been working on it since... Perhaps I'm not really good with graphic too, but I tried my best to do it, and here's what I'm came up with so far:

This is gonna be an iPhone game?

Still feels like it's lack of something about it... This is only 50% of the works, still got 50 more % to be finished...

Wednesday, January 13, 2010

leave me alone!

Finally decided on my next game's title. which I'm gonna submit for the competition. It's called "leave me alone", and it'll be one of those shooting game like 1942 (or 1945) with levels and bosses.

For the graphic, I'm thinking about making it pixelated, and then get some sounds from and that's all for this post. I'm just gonna focus on making and finishing this game, not gonna think about anything else.

Tuesday, January 12, 2010

happy + relieve + tears of happiness

As a beginner in AS3, I've encounter and made numerous mistakes in scripting, and sometimes unable to solve most of them, which resulted in causing my head growing more white hairs than ever. I mean, I can feel it, when my hair is turning into white.

When the problem first arises, I get a back-brain-ache. Then I can feel goosebumps on my hair, as if some hairs is trying dropped itself out of my head. After that whole process, my hair gets all oily and stuff, making it easier for me to comb it (only if I wanna comb), but it gets's kinda annoying to have oily stuff on my hairs, which is also part of the reason why I rarely use hair gel, I use more deodorant than anything.

When the problem is solve, all the goosebumps get going; back-brain-ache gone (but it'll soon be back as the next mistake could arise in a few more seconds); a shouted quietly: よかった; some tears dropping out of my eyes for a while (probably I hadn't have a good sleep for a while).

Just a while ago, I solve a small mistakes I made in more than 3 hours. It's such a small mistakes, and yet it brought me more troubles than I can ever imagine (it's imaginable for me sometimes, since I faced them most of the times), and I decided to post that relieving experience here...

Monday, January 11, 2010

love for pixelated games

If I were to choose the best type of graphic for a game's opening/title/introduction screen from a normal game and a pixelated game, I would've choose the second one.

Since we all are living in an era where colours are not that limited anymore on any digital device (gameboy, psp, tv, nds,etc...), most of us should be more interested in all these high quality, full coloured graphic 3d games. Instead, if you ask any fellow gamers in Japan (or even gamers like me who are into Made-In-Japan games), they would prefer pixelated games rather than that.

Why do I like pixelated game?
It's freaking cute, and also for some reason (haven't thought it out yet), I find pixelated stuff extremely amazing. So, I thought, if I ever wanna make a opening/title screen for my all my games, it would have to be pixelated.

Also, there's Pokemon Platinum, which could become a boring RPG game to me if the textures weren't all pixelated.

Lastly, I made myself a simple pixelated intro for my games which would appear later in the future. It's kinda simple, but I'll renovate it later when I've got time...

Sunday, January 10, 2010

getOffMyFloor, ants!


-Use the mouse to kill the ants on the "floor"/screen.
-You can drag the mouse to make the "light" bigger.

Type of attacks:
-red light: the smallest circle, kill enemy in the lowest time.
-orange light: the second biggest circle, kill enemy in a longer time than the red circle, but can kill more than 2 enemies at a time.
-yellow light: paralyze enemy (enemies) and stop their movement, basically useless.

-kill as many ants as possible before the limit of 20 ants.

-just dragged out the orange circle and use it.

-Don't put your PC's sound at the loudest. I didn't put a turn off sound button in this game, play it at your own risk (of your ears).


P.S. I'll update this game if I've got time... to update.
P.S.2 My current score for this game is 3700 points.

finally "done"?

Okay, I'm officially halting my current game making. I've been working on it for some time now, about a week, and I'll stop here to proceed to my next work.

Of course, I'm not just gonna leave it incomplete, in fact, I've kinda fix it up a little, make it seems to be completed, but actually it's not (if according to my plan, it is not). I'm really sick of this already. I've done so many mistakes in it, and it'll take one hell of a time to fix it all, probably another week or so.

But right now, I would like to start a new project for the coming competition, no time to think about anything else. And I swear this time, will not be like the last, I will plan the whole thing entirely, and make a great game using the rest of the time that I've got.

Below is the link to the game:

bad living habits

Now that I think about it, I've been having quite a bad living habit for the past few days. I've spent more than 12 hours everyday on my PC, doing programming, internet surfing and gambling, but most of the times were just programming...

This evening, I have some time to just go and visit my own garden for a while, and my eyes can hardly stand the sunlight. So I started to wonder, what will become of me if I ever go to work and live in Japan. Probably one of those NEETs I guess...

Saturday, January 9, 2010

emotion game

With just a few more steps and time till I could finish "getOffMyTable!", I've already come up with dozens of new game ideas. By removing all the bad ones, I only left with just one single game idea, based on a story I saw in a movie entitled "Tokyo!".

Not sure how I would set the scoring system yet, but I kinda figure out some of the most simple gameplay which I could possibly use if I ever wanna make it. and also gameplay ideas for those game ideas I trashed...

My current game is almost done, just need to fix a few bugs and error, and do some graphics... and add some script, still sounds like a lot of stuff to do though.

Friday, January 8, 2010

using Timer in class file

Use "import flash.utils.Timer;" after writing the package code.

problem solved, big relieve

Someone at Kongregate solved my long time AS3 problem, which I was struggling with 11 months ago. I encountered the same problem again and I posted it on Kongregate, and one hour later, my headache's gone.

However, when I found out that the problem can solved easily by anyone, even myself, I just didn't notice it for the past 11 months, my reaction was: nothing. I felt nothing, I don't care if I was really that stupid to not see the solution in front of me or what so ever, just want my problem to be solved and get done with it. Wonder if that's a proper behaviour for a game developer? I guess not...

removing a child

To make a child remove itself in a class file:
1. Use "removeChild();" on itself.
e.g. this.parent.removeChild(this);

2. Remove the freaking event listener which controls the first function:
e.g. this.removeEventListener(Event.ENTER_FRAME, theFunctionsName);

Replace "theFunctionsName" with your function's name... sounds kinda weird :)

Wednesday, January 6, 2010

external class file problem: seems to be solved by deleting "stage"

Well for some reason, adding "stage" in front of an ".addEventListener" in an external class file, will cause some problem onto it.

I've check some other sites, they also never place a "stage" in front of their event listeners, in their class files. Maybe it's because I was too keen to using "stage" for a long time, I've been using it whenever I I saw an event listener...

huge trouble with external class file

I tried to use an external class file to program a certain MovieClip's behaviors, but it didn't work out like I thought it would.

I might not be good in using class file yet, and thus, I've decided not to use any class file from now on, till I finish making this game. Then I'll start learning class file... all over again.

animating ants

Animating an ant walking based on an original insect locomotion (also suitable for spider since it's got both 8-legged and 6-legged insect locomotion) I found on the web:

Took some time to extract the red ant out of a complex image using Photoshop CS4... it is better than CS3 in a way which couldn't describe.

Tuesday, January 5, 2010

directing scenes

Forgot to post this last time...

Learned a new changing scene skills from the turn-based game which I worked on last time...

Using .gotoAndPlay(a, "b"), in which 'a' is for the frame number, while 'b' is for the scene's name. Have to use the "" symbols (I have no idea what it was called till now) when writing the scene name; as for the frame number. no need to.

live borderless

I finally found the site which contain infos about the LG flash game making competition I mention a few blogs back. The site's URL: LGBorderless.

It turns out, there's a theme! I should have thought of that and look for it on the net before I start making my game!!! "Live borderless", their theme, reminds me of Borderlands again, haven't play it in days, kinda miss it.

Well, I'll have to restart the whole operation again: get a new idea, plan, brainstorm, and make the game...

I'll still continue making "get off my table!" at the moment, while thinking of a new idea.

The good news is, the contest ends on the 28th of February 2010... still, I have to be fast! Think fast!

the freaking if conditional statement

Not sure how I can explain the situation in a professional way, I'll just explain it my way then...

Here I have a circle, and it's own properties:
Condition 1: If the size of the circle MovieClip is less than a certain amount, say 25p (pixel) by 25p, it'll turn red.

Condition 2: If the width of the MovieClip is between 25p and 45p, and it's height is higher than 25p, it;'ll turn orange.

Condition 3: If the size of the MovieClip is higher than 150p by 150p, it'll turn yellow.

So, while I was working on it using the IF conditional statement, I mis-insert an "else" at Condition 2, which causes the Condition 1 to stop working. It seems that if all the conditions are related, and "if" is inserted instead of "else if" in front either the 2nd or 3rd condition, will cause the 1st condition to stop working.

Below is example of what I mean:

Without "else":


function colourChange(evt:Event):void
if (pointer.width <= 35 && pointer.height <= 35)
if (pointer.width <= 45 && pointer.height >= 35)
else if (pointer.height <=45 && pointer.width >= 35)

With "else":


function colourChange(evt:Event):void
if (pointer.width <= 35 && pointer.height <= 35)
else if (pointer.width <= 45 && pointer.height >= 35)
else if (pointer.height <=45 && pointer.width >= 35)

inaccessible problem

My long smooth programming has finally come to encountering a problem. Not a real AS3 problem to be exact, but a stupid mistake everyone could make.

When adding a new scene into a project, I forgotten to add a "stop();" code into the previous scene which I'was working on, and resulted in an output error, saying:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at getOffMyTable_fla::MainTimeline/moveLight()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at getOffMyTable_fla::MainTimeline/moveLight()

This error has been my No.1 enemy since a year ago, when I first started learning AS3. Better to avoid creating more of these errors in the future... Double check!

Monday, January 4, 2010

final decision

I gave myself a few thoughts about what kind of game which I wanted to make this holiday. I need to be fast, because it'll end in 2 weeks time. A great flash game developer I know once said: Rushing is not best way to make a great flash game.

But dude, I've only got 3 weeks left to make a flash game to be submitted for the upcoming flash game making competition!!!

So I've got myself 2 ideas:
-a RPG game about a mucus-like monster trying kill other monsters and their bosses, and complete the 7 stages game.

2. "get off my table!"
-a simple flash game about killing ants with a magnifier, and get them off your table.

Still have a lot on my list, but this 2 were the one which I thought was the best among them.
Since I've already started working on "get off my table!", I suppose I'll just continue working with it then...

a working script displayer

Been looking all over the net for a working code/script display box for my blog. Finally found a "working" one, on WebUpd8.

It's not like the rest of the tutorials doesn't work, but they tends to get my scripts all distorted-like, un-fixable, and sometimes bugged.

Here's an example of how it works:

hi, i'm jakel168, and this is my blog!

drag & enlarge mouse cursor

While working on a game project, I was trying to create an effect where I could enlarge a mouse cursor by simply dragging it.

Script which makes it work:

pointer.enabled = false;

stage.addEventListener(MouseEvent.MOUSE_MOVE, moveLight);
stage.addEventListener(MouseEvent.MOUSE_DOWN, dragLight);
stage.addEventListener(MouseEvent.MOUSE_UP, dropLight);
//Proper mouse cursor function.
function moveLight(evt:MouseEvent):void
pointer.x = this.mouseX;
pointer.y = this.mouseY;

function dragLight(evt:MouseEvent):void
//Stop cursor from following for a moment.
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveLight);
//If the mouse move out of the MovieClip, start rescaling.
if (mouseX >= pointer.x && mouseY >= pointer.y && mouseX <= pointer.x &&
mouseY <= pointer.y)
pointer.addEventListener(Event.ENTER_FRAME, rescaleLight);
//When user stop holding on left click, resume the movement of the cursor,
stop dragging and scaling the cursor.
function dropLight(evt:MouseEvent):void
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveLight);
pointer.removeEventListener(Event.ENTER_FRAME, rescaleLight);

function rescaleLight(evt:Event):void
//Number variables which represents the distance between the mouse and cursor.
var dragSizeX:Number = pointer.x - mouseX;
var dragSizeY:Number = pointer.y - mouseY;
//If the distance between the mouse and the cursor is a negative value,
multiply a negative number to make it positive. Else, no need to.
if (dragSizeX >= 0)
pointer.width = dragSizeX * 2;
else if (dragSizeX <= 0)
pointer.width = dragSizeX * -2;
if (dragSizeY >= 0)
pointer.height = dragSizeY * 2;
else if (dragSizeY <= 0)
pointer.height = dragSizeY * -2;

Explanations are provided inside the script box above, in black font.

Sunday, January 3, 2010

good time with flash

Currently watching this vid... the interesting stuff starts 16 minutes later... so just wait...


This wasn't the first time I'd created a new blog called "JakeL168 in Blogger", should be the 3rd time if I'm not mistaken... Well anyway, I've been casting my previous "JakeL168" blog (the 2nd) away for a while before I've decided to make a more professional portfolio based blog.

I also realized that I will have to buy a domain or get a web host, pay some cash to get a "" site myself to seems more professional. I just don't have that kind of cash at the moment, still trying my best to create games, join competition, win it's prize (especially the cash prize), and pay my mom the money I owed her for the new desktop.

I'm now working on a new project, not sure what it's called yet, just know that it's new and it's gonna be a flash game. And I'll be joining a flash-game making competition, held in Malaysia. Good luck to me!