A-STAR Pathfinding AI for HTML5 Canvas Games

April 4, 2013 § 1 Komentar

Knowing how to get from point A to point B is something many games require. Whether you’re designing a deep turn-based strategy tactics RPG or a simple puzzle game, navigating your game world often requires more intelligence from your game characters than merely pointing towards a goal and moving in a straight line.

You wouldn’t want the units in your game to walk through walls. Nor would players permit units to bump into walls and get stuck when a way around an obstacle is clearly visible. There’s nothing more frustrating than a real time strategy game’s units being unable to make their way to a target location.

This is where pathfinding algorithms come in. Pathfinding is the basic building block of most game A.I. (artificial intelligence), and with a little help from the proper code your game will be that much smarter for it.

To get to their goal, your game entities may have to walk around obstacles, find their way though a dungeon maze or drive around the city streets. It isn’t enough to eventually arrive at the destination via some frustratingly circuitous path – the route they take should be the shortest possible route.

Solving this problem isn’t a trivial task, but it is worth the effort. Enemies that choose wisely can often appear nearly intelligent. Your players will appreciate that things “just work” and will be able to focus on strategy and tactics instead of worrying about having the babysit broken AI.

The standard method that a majority of games use for pathfinding is called A*, which is pronounced “a star”. « Read the rest of this entry »


Maret 21, 2013 § 1 Komentar

Kalau mau belajar Linux secara otodidak, pakai aplikasi ini!

Ade Malsasa Akbar


Halaman ini dimutakhirkan pada 14 Agustus 2016

Dengan mengharap rahmat Allah, saya merilis aplikasi Otodidak versi 1 hari ini. Otodidak adalah aplikasi open source baru yang terinspirasi dari Electrodroid, dengan kegunaan utama sebagai aplikasi belajar Linux yang all-in-one untuk pemula. Otodidak mulai dibuat pada 6 November 2012 dan siap diunduh hari ini. Dengan antarmuka GUI berbahasa Indonesia, prinsip click and run, beserta dominasi gambar untuk menjelaskan, jadilah Otodidak aplikasi khusus untuk orang awam dan pemula dalam belajar Linux. Otodidak dirilis untuk Linux dan Windows (serta Mac OS X) dengan harapan bermanfaat bagi seluruh umat manusia. Otodidak dirancang agar bisa dimanfaatkan oleh perorangan, sekolah dasar maupun menengah, perguruan tinggi, korporasi, warnet, dan siapa pun yang ingin migrasi ke sistem operasi Linux. Kini dengan Otodidak, diharapkan pembelajaran Linux dapat dikurangi kerumitannya karena cukup membuka satu aplikasi ini untuk:

1) Simulator Terminal (Anda bisa belajar Terminal tanpa Terminal).

2) Kumpulan tutorial…

Lihat pos aslinya 226 kata lagi

Fancy Mac DMG For Your Unity Game

Maret 15, 2013 § Tinggalkan komentar

My last tutorial focused on the creation of a Windows installer for Unity games, now I want to show you two useful tools to create a fancy, customized Mac DMG for your Unity game.

It’s very easy to create an Apple Disk Image, even from command line:

hdiutil create name.dmg -srcfolder /path/to/folder/

But how do you create one of this fancy designed and highly polished Mac DMG files? You can do this from command line as well, but there are handy tools that ease up this process and let you work in a WYSIWYGkind of way.


You need following files/resources to create the disk image:

  • An actual build of your game! (MyGame.app)
  • A nice background image


  • (An alias to your Applications folder)
  • Your license and/or other notes prepared as .txt or .rtf documents
  • An icon for the DMG
  • Extra files (Documentation, License, Credits, …)

PS: You can convert a .png/.jpeg/.gif into an .ico file easily with one of the bazillion online converters out there, for example ConvertIcon! (clean & ad free).

Open Source

The open source option is dmgCreator and it’s available at SourceForge.net completely free!



dmgCreator is a Mac OS X Application which allows simple and easy creation of customized dmg disk images with custom background images. It ensures the correct presentation of the disk image content irrespective of the current Finder configuration.


  • Creates compressed and internet enabled DMG files, i.e. for software distribution
  • Add a background image and a custom volume icon
  • Add a symbolic link to the Applications folder
  • Content positioning at a pixel level
  • The disk image’s content will always look the same


The shareware variant is DMG Canvas, available reasonably priced for 15$.

DMG Canvas


DMG Canvas builds disk images from template documents that you create. Simply design your disk image’s appearance using the graphical editor and click Build. Each time you release a new version of your disk image, simply click Build again and DMG Canvas will pull together all of the latest versions of your files. DMG Canvas also allows you to specify the license agreements displayed when the disk image is mounted, and use localized versions for non-English end users.

DMG Canvas can do the very same as dmgCreator. However it has some nice extra features like the possibility to change the size of the icons, text tools, help with aligning items and more. It’s also possible to do automated builds using the command line. All in all there are a lot of comfort features and the handling is very good.


I didn’t do a real tutorial because I think the apps are full self-explanatory and very easy to use. Just download them, try them out and decide yourself which one suits your needs. If you want to see a nice designed disk image, please go ahead and download the DMG of Of Light & Shadow!


Source: Martin Klappacher

Windows Installer for Unity Game

Maret 15, 2013 § Tinggalkan komentar

In this tutorial I’ll show you a really simple way to get a Windows installer for your Unity game with totally free tools but without any scripting involved in less than ~10 minutes!


I was part of a team which created a game as their master project. It’s called Of Light & Shadow and we released it under CC BY-NC-ND 3.0. In the end, I did the research and the actual creation of the Windows installer of our game but since i can’t code, I needed something rather simple to work with and here is the way I did it. Hopefully this is helpful for other people as well!

I think there are a couple of reasons why you might want to create an installer for your Unity game:

  • You get one small file thanks to excellent file compression!
  • Your license and/or extra notes will be seen at least…
  • The game gets installed in a safe place per default (C:\Program Files)
  • No manual extraction of files and/or moving them to other locations/folders
  • You can create shortcuts to the executable and to your website
  • It’s very easy to uninstall/remove the game
  • An installer might look professional to some people 😉

The Tool

After some research I chose Inno Setup by Jordan Russell for several reasons:

  • It’s free and licensed under some kind of open source license!
  • It has a graphical wizard, you don’t have to script to create a basic installer!
  • Inno Setup is in active development since more than 15 years, it’s proven software
  • However it is very customizable and it has support for multilingual installs


You need following files/resources to create the installer:

  • An actual build of your game!
    (MyGame.exe & MyGame_Data folder – they should be stored together in a separate build folder)


  • Your license and/or other notes prepared as .txt or .rtf documents
  • An icon for the setup executable
  • Extra files (Documentation, License, Credits, …)

PS: You can convert a .png/.jpeg/.gif into an .ico file easily with one of the bazillion online converters out there, for example ConvertIcon! (clean & ad free).

Step by Step

The first time you start Inno Setup, this welcome-dialog greets you.

Tutorial Inno Setup 01

Choose Create a new script file using the Script Wizard and click OK.

Tutorial Inno Setup 02

Just click Next.

Tutorial Inno Setup 03

Fill in all necessary information and click Next.

Tutorial Inno Setup 04

Change everything as you like, I chose the default settings.

Tutorial Inno Setup 05

Point the wizard to the main executable of your game, in my case C:\Users\Martin\Documents\#Shadow_Build\OfLightAndShadow.exe. Now we have to add the MyGame_Datafolder. Click the Add folder… button but, IMPORTANT, do not choose the MyGame_Data folder directly! Instead choose the parent build folder (which includes the MyGame.exe as well).

Tutorial Inno Setup 06

Click Yes – and Next.

Tutorial Inno Setup 07

Change everything as you like, I checked everything.

Tutorial Inno Setup 08

Optional: If you want your license and/or extra information to be shown during the installation process, add them here as .txt or .rtf documents.

Tutorial Inno Setup 09

Choose the languages (translations) of the installer, I selected all.

Tutorial Inno Setup 10

Change the folder where you want the setup file to be stored after compilation and give it a name.
Optional: You can add the icon for the setup file as well.

Tutorial Inno Setup 11

Just click Next.

Tutorial Inno Setup 12


Tutorial Inno Setup 13


Tutorial Inno Setup 14

Save the script file and click Yes, the compilation starts automatically afterwards.

Tutorial Inno Setup 15

The main window with the script after the compilation and after a successful test of the installer (click to enlarge). If you want to try the result of this process, please go ahead and download the setup of Of Light & Shadow!


If you absolutely want to change the visual appearance of your installer, you should check out ISSkin. Take a look at the Getting Started page for a decent tutorial and some example code (2013-02: Seems like ISSkin has been abandoned). For any other script modifications, take a look at the Documentation!

Source: Martin Klappacher

11 Tips for Making a Fun Platformer

Maret 13, 2013 § Tinggalkan komentar

platformer is a game in which a character runs and jumps around a level consisting of platforms floating in the air. Although this article focuses on platformers, the philosophy behind each idea can be applied to any type of game, whether 2D or 3D. This list does not only include tips for the product (a fun game), but also for the development process.

1. Keep the user interface simple

The player presses the jump button to jump. That is a simple user interface. The challenge for the player is pressing the jump button at the right time to complete the game. In other words, the challenge is not using the interface, but using it at the right time.

The more transparent and intuitive the interface is, the better. If drivers on the road had to concentrate on how to turn their vehicles, there would be many more accidents.

The simple interface also applies to the menus and all other interactive sections of a game. It must be easy to navigate between menu items and to select items.

2. Make important information easy to see

Make it easy for the player to see important things in the game. Platforms that the character can walk on must stand out from scenery in the background. Collectable items must be easy to recognise. One glance at the HUD should give you all the information you need. An easily readable font is a necessity. The player must know what is going on in the menu.

3. Mind your collision boundaries

The collision boundary of a friendly object is bigger than the object. The collision boundary of a harmful object is smaller than the object. Friendly objects include power-ups, switches, ladders, and swinging ropes. Harmful objects include enemies, enemy bullets, spikes and rotating blades. The bigger collision makes it easier to interact with, or collect the friendly object. The smaller collision makes it easier to avoid the harmful object.

02_collisionThe green rectangles are the collision boundaries of friendly objects, and the red rectangles are harmful objects. The yellow rectangle is the player.

(The collision boundary can also be referred to as collision rectanglecollision bounding box,collision spherecollision regioncollision polygons, etc. The player collides with an object if the player’s collision boundary overlaps the object’s collision boundary.)

4. Make it easy to jump over gaps

The player can jump when he is in the green area. The larger green area on the right makes it easier to jump across platforms (that’s a good thing).

Traditionally in games – and realistically – a player can only start jumping if he is standing on something. Allow the player to start jumping when he is in mid-air, when he just stepped off the edge of a platform. Have a leeway of about one second in which the player can start jumping. (After the one second he can no longer jump, and continues to fall downwards.) This makes it easier to jump from one platform to another.

5. Make it possible to change animation states anytime, anywhere

The character’s animations should follow the player’s movement, not the other way around. In other words, the player’s movements should not be limited by the animations. Ideally, any animation should be able to start from any other animation, at any time. The player wants to run, jump, grab onto a ladder in mid-air, climb up, shoot his gun, and jump off the ladder. The animations should allow him to do that.

Also, the player should never have to wait for his character’s animation to end before he is able to move again. Do not disable input while an animation is playing, causing the player to wait for the animation to end before he can move again.

6. Provide plenty of power-ups and collectables

Most kids collect stuff, purely because it is fun. That same feeling of joy happens when you collect things in a computer game. Put collectable stuff in the game. The more, the better.

There is no logical reason for it. It is just fun.

7. Write generic, but versatile AI

Design and code a small number of base AI agents, each containing a small number of variables. The variables are given different values to create a large variety of AI agents.

Examples of base AI

Walking AI

Walks on horizontal surfaces.

Health Speed Jump height Attack style
1 = Easy 

3 = Medium

5 = Difficult

0 = Static (remains in one spot, e.g. Venus’s flytrap) 

1 = Slow

2 = Medium

3 = Fast

5 = Super fast

10 = Slow, but fast when the player is nearby

0 = Cannot jump 

1 = Low

2 = Medium

3 = High

10 = High when the player is directly above

0 = None, just wander around 

1 = Near range melee

2 = Medium range melee

3 = Shoot projectiles

Examples: KnightArcherFire ElementalGiant Venus’s flytrapElf.

Flying AI

Flies around in the air.

Health Speed Fly diagonal Attack style
1 = Easy 

3 = Medium

5 = Difficult

1 = Slow 

2 = Medium

3 = Fast

5 = Super fast

10 = Slow, but fast when the player is nearby

0 = Cannot fly diagonally 

1 = Can fly diagonally

0 = None, just wander around 

1 = Near range melee

2 = Medium range melee

3 = Shoot projectiles

Examples: HawkGryphonGhostAir ElementalDwarf in gyrocopter.

Crawling AI


Walks on any surface: horizontal, vertical, diagonal and upside down.

Health Speed Drop down Attack style
1 = Easy 

3 = Medium

5 = Difficult

1 = Slow 

2 = Medium

3 = Fast

5 = Super fast

10 = Slow, but fast when the player is nearby

0 = Cannot drop from the ceiling 

1 = Drop from the ceiling randomly

2 = Drop from the ceiling when the player is beneath

0 = None, just wander around 

1 = Near range melee

2 = Medium range melee

3 = Shoot projectiles

Examples: Giant SpiderWormKiller SnailSlime Elemental.

8. Have a story and atmosphere in mind

Define the game’s story early on in development. The story is a guideline for the game’s overall atmosphere, art style, and goals. The story can be complex or a single line of text. You can reveal the story to the player in cut scenes and dialogue, or you do not need to show it to the player at all. As long as everyone working on the game knows what the game’s story is.

Example story: A lone marine fights hordes of zombies and demons on a moon base.

From this story we know what the game is about.

  • lone – single player, solitary character
  • marine – fighter, army, military, tough-as-nails, guns, shoot stuff
  • fights – action, fighting
  • hordes – many enemies, relentless
  • zombies – gore, gun fodder
  • demons – supernatural, dark
  • moon base – sci-fi, futuristic, remote

9. Define scope and time clearly

Make a list of everything that needs to be done to complete the game. Then estimate how long it will take to implement each item in the list. The amount of time you end up with is the minimum time it will take you to complete the game.

To put it into perspective: If your design document is 50 pages long, and it takes an average of 2 days to implement the features per page, then it will take you at least 100 days to make the game. It is natural to have an initial design doc which does not include everything that will eventually be in the game. More pages will be added to it during development.

To put it into perspective again: If it takes an artist 2 weeks to create and animate a character, then it will take 20 weeks to create 10 characters. That is 5 months – almost half a year. If you have two artists, then it will take half the time to complete the characters. But it still takes 20 weeks of actual work. In other words, you still pay for 20 weeks of work.

It is very easy to think of new features to add to a game throughout the development process. However, every time you add a new feature, you push the release date further away. Continue to add features on a regular basis and your game will never be complete. When you add a new feature, be prepared to take another one away to meet your deadline. Make sure that you prioritise your initial list of features, so that the least important ones can be dropped if (or when) you run out of time.

Do not be ashamed to make a game which has a very limited number of features. The people laughing at you are probably working on an MMO that will take them 15 years to complete.

Remember, one of the most rewarding feelings in the world is to complete a project.

10. Prototype before finalising theoretical fun

10_prototype_aThe prototype, with placeholder graphics. The green block is the main character, and the red blocks are the enemies. Compare with the image below.

There are thousands of good ideas for computer games, but not all of them are fun. The best way to find out which are fun, is to prototype the game. The prototype is a quick-to-make and quick-to-change version of the game that helps you to test out your ideas.

Why prototype? It saves you time in the long run. Have you ever had to recreate art or reprogram a system because the design changed as a result of the game not being fun?

To save time, use an existing game engine and download free resources from the internet to create the prototype. The prototype may be done in the same engine used for the final game, and some of the code can be reused.

The final game with Renaissance art.

The prototype may also be a completely separate program (or programs) that will be discarded when the final game is in full development. For this reason, there are people who do not like prototyping. They believe it is a waste of resources and time, because the final prototype ‘product’ is discarded. Think of the prototyping as another idea phase of development. During this phase you test out your ideas, change them, replace them, and tweak them, until they are fun. The prototype ‘product’ is, therefore, a tool used for testing ideas.

Remember: Prototyping must also be included in your list of things to do, and, therefore, must be part of your schedule.

11. Involve everyone in the team in the design

Would it be better for an artist to work on a character if he or she was involved with designing the character? Or better yet, if he or she came up with the idea for the character? Would it be better for a programmer to code a system if he or she was involved with designing it?

The answer is yes. It will also be better for the game.

A game is a creative collaboration. If only one or two people design the game, then it will be creatively limited. People generally feel happier and more devoted to a project if they are included in the design process. Therefore, encourage everyone to be involved in the design process. And it does not always need to be a formal process. In other words, you do not always need to schedule a meeting where everyone is involved. People can send emails, talk in the kitchen, or shout across the room.


Source: Devmag

Maret 10, 2013 § 1 Komentar

Dia, Diagram Editor Untuk Linux dan Windows

Deduksi Sederhana

Sebelum membuat sebuah aplikasi atau software dengan tingkat kekomplekan tinggi, tentu diperlukan perhitungan dan perencanaan yang sangat matang, serta harus melewati life cycle tentang pembuatan software, mulai dari analisis hingga pengembangannya. Bagi seorang analisis adalah suatu kewajiban untuk membuat desain sistem yang nantinya dilakukan oleh software tersebut ke sebuah diagram atau flowchart agar lebih mudah dibaca dan dipahami.

Diagram tersebut meliputi DFD, ERD, Class Diagram, Use Case Diagram dan lain sebagainya. Maka dari itu digunakanlah sebuah software yang fungsinya untuk membuat gambar-gambar yang menyangkut diagram tersebut. Bagi pengguna Linux seperti Ubuntu, Fedora atau distro lain, salah satu software yang dapat dimanfaatkan untuk membuat diagram-diagram tersebut adalah

Lihat pos aslinya 168 kata lagi

September 10, 2012 § 2 Komentar

Ingin menambahkan icon di homescreen BlackBerry? Ini tutorialnya 😉

Blackberrydeveloper's Blog

Sudah beberapa minggu ini blog developer blackberry Indonesia ini agak sepi. Saya nggak tahu kenapa, mungkin pada sibuk sama proyek atau sibuk ngabisin duit beli baju lebaran 😛

Baik, kali ini saya akan share bagaimana cara menambahkan icon notifikasi kecil di home screen Blackberry. Ini sebenarnya juga sudah saya post di blog saya tapi gak ada salahnya saya share di sini. Secara mungkin lebih banyak yang berkunjung ke sini.

Inti dalam code snippet kali ini adalah:

  1. Bagaimana menambahkan icon notifikasi
  2. Bagaimana menghapusnya lagi


Menambahkan icon notifikasi

try {
            ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance();            

            EncodedImage notify = EncodedImage.getEncodedImageResource("img/xxx-notify.png");
            ApplicationIcon icon = new ApplicationIcon(CustomBitmapUtil.scaleImageToWidth(notify, 24));           

            ApplicationIndicator indicator = reg.register(icon, false, true);
        } catch(Throwable e) {
        	System.out.println("Gagal kasih notifikasi");

Menghapus icon notifikasi

try {
            ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance();
        } catch(Throwable e) {
        	System.out.println("Gagal kasih notifikasi");

Batasan: minimal digunakan untuk OS 4.6.

Selamat mencoba.

Lihat pos aslinya

%d blogger menyukai ini: