• Posts in this page

  • Looking for something?


[ « Previous Page ] [ Next Page » ]

Development Blog - Page 4

Cheating AI from Hardcourt – Plan it out

Hardcourt

Hardcourt

Working with AI is a real pain, but I say, it most likely depends on what your game needs, what you want it to do. Most developers who are new would quickly ask the magical word “how?” or “how to start?”. If you haven’t had experience or good experience with AI patterns and behaviors, hear me out on how I did it with this game.

With my first game, Hardcourt, it was also my first time to encounter programming (or should I say cheating) artificial intelligence (AI). I myself didn’t have proper educational background with AI patterns and behaviors else haven’t even read anything about it when I made that game (I still had dial-up before, so no online tutorials too). With the first build of Hardcourt there were no AI so no playing with CPU, it was just a 2 player on a single PC game. After some time I decided to make it into a much complete game and had been finalized as it is now. I’ve had received good reviews with how the AI performs. It can totally beat the players up (esp with quick play, hard mode).

AI was the most troubling part as I thought; I didn’t even have an idea where to begin with. Now let me share a little knowledge on how I have dealt with this so called “artificial intelligence” and cheated my way through it. This shall be some multi-part discussion on the step by step methods when I dealt with them.

[ Read more... ]


Applying cel-shading with Flash

Cel-shading

Cel-shading

I’ve introduce cel-shading – my personal preference on art style (and its currently the best I have ;) ) – in a previous post Using Cel-shading. And now I have something to share on basically how to apply them in flat drawings using flash. This is based on my experience from how I started drawing it to how I do it these days.

With tools provided with flash we can achieve a cel-shaded effect in quite different ways and yet achieve similar (if not so the same) results. As for this, we’ll be using the rectangle tool, line tool and brush, but of course all with the help of the selection tool and paint bucket tool for our color fill needs.  Just remember the base rule, to have consistent light source when adding the shades.

Our sample character

Our sample character

I’ve prepared a hand drawn character where we will be applying shading. Now, don’t tell me that my drawing doesn’t look any good, it’s all that I can do. :-p

Rectangle Tool

First off the bat, is the rectangle tool. Why the rectangle, not the cirle? Hence the edge points will be needed to snap on other line’s edges. The rectangle tool is only good for simple shapes with not so much detail, so for this example I can only see the nose to be simple enough. [ Read more... ]


Do you know ActionScript? AS3 Stage

Stage

Where are my display objects?

Before, the Stage class in AS2 is treated as a class whose properties are all static, but with AS3 the new and better Stage class is now a display object. Both making the stage class the main drawing area and where flash content is shown. Basically, just think of it as a practical stage, all actors and props are all objects on display and those who are backstage are objects which are simply not included in the stage yet.

The Stage is a singleton class whereas there can only be one instance of it (imagine watching a play where there are 2 or more stages, its just impossible). Even if you add multiple instances of display objects to the display list, the stage property of each display object still refers to the same Stage object (that goes for loaded SWF files too).

Did you know that the stage is not globally accessible – you can’t call it or reference it from anywhere (unless manually referenced in a variable of course). The simplest way to do so is to use the stage property from any of your display objects which were added to the display list.

Yes, you heard it right from “any” display object, but take note, only if it is already added to the display list. It doesn’t matter if your display object is a child of another display object or how far the display heirarchy it is, as long as it is included in the display list.

Don’t confuse yourself with “Stage” (with capital “S”) and “stage” (with small caps). “Stage” refers to the class flash.display.Stage and “stage” is it’s instance.

Just remember, from a common coding convention: classes begin with capital letters and variables don’t.

If the display object is removed or not yet added from the display list the stage property is just set to null.

[ Read more... ]


Using Cel-Shading

Cel-Shading

Cel-Shading

As most of the games I’ve designed so far, it has come to me that I finally have my favorite and primary drawing style. I’m not a fantastic nor a pure talent but I believe I don’t completely lack the skills needed for me to draw my own art. And so I’ve been comfortable with drawing in 2d cartoons then shading them properly to add life – and so, cel-shading.

I first discovered my quirky drawing skills back when I was in grade school but soon after I just lost interest and my drawing did not improve by then. But during flash development, the need was called forth again, “Learn to draw!!”. From my previous games until now the progress of digital art is noticeable should I say. Digital art is present in almost all online and video games these days. From poker games to Nintendo, you hardly ever find animations that are completely 2D. 3-dimensional or realistic graphics are getting more streamlined than ever but that doesn’t mean that traditional designs would be outdated.

Cel shading or toon shading has been a traditional drawing style, which expresses the hand drawn style of comics and cartoons. The term came from painted cels from clear sheets of acetate which was used for traditional 2D animations.
[ Read more... ]