|
This is a small collection of mostly game example source codes. These source codes are made available to help PlayBasic programmers kick start their game programming journey.
Looking for more source code / tutorials & media, then remember to visit the PlayBasic Resource board on our forums.
Found #7 items in Algorithm category
Flood Fill Path Finder
|
By: Kevin Picone Added: July 31st, 2015
|
Category: All,AI,Algorithm
|
This code is a version of my flood fill path finding routine that was originally written way back in the late Amiga days, some 20 odd years ago now. The raw concept was inspired by the game Chaos Engine by the Bitmap Brothers, which featured a cooperative mode with a second AI player, even when playing in single player modes. What struck me was how well the AI player could fight and locate power ups, which seemed just like the a human player at the time. Today this kind of AI has is almost common place, but it seemed new back in the 16bit days. I don't actually know how Chaos Engine's AI algorithms work, just that it was seed for this idea. But like a lot of good ideas, this just ended up gathering dust on my legacy hard drive until now.
Download Path Finding Tutorial From Forums
|
|
|
|
Load Text File To Array
|
By: Kevin Picone Added: May 28th, 2007
|
Category: All,Algorithm,Strings
|
This example looks the fastest way to load a text file into a string array in PlayBasic V1.62 and bellow. It includes two versions of the Loader function. The first reads the data to memory then manually grabs cuts and pastes this into the individual strings, the second read strings and throws them into the array directly. While the latter is less code, it's also dramatically slower! Around 50 times slower in fact. So if you need to load a text file into a string array, i'd recommend using the first version !
Note: I've include a second version of this bellow, LoadStringToArray_Faster.zip this version offers a few more methods on fast ways to load text files into an array.
|
|
Download:
Login to Download
|
|
Pathfinding Algorithms
|
By: various Added: May 1st, 2006
|
Category: All,Algorithm
|
These algorithms are not "my own work". I got them from an old article in Game Developer magazine, but the authors of the algorithms would be AI researchers whose names I don't know. Anyway, there is no copyright in an algorithm. Alex
|
|
Download:
Login to Download
|
|
Viewing Page [1] of [1]
Want More Source Codes?:
Release Type:
The source code & tutorials found on this site are released as license ware for PlayBasic Users. No Person or Company may redistribute any file (tutorial / source code or media files) from this site, without explicit written permission.
|
|