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!

avatar Ade Malsasa AkbarAde Malsasa Akbar

Pemula-1Bismillahirrahmanirrahim,

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.

Preparation

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

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

Optional

  • (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

Description

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.

Features

  • 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

Shareware

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

DMG Canvas

Description

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.

Notes

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!

Intro

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

Preparation

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)

Optional

  • 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

Finish.

Tutorial Inno Setup 13

Yes!

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!

Notes

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