EXAMPLE SOURCE CODES


     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 #11 items in AI 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







 Pong 666

By: Vee Added: May 6th, 2009

Category: All,Games,AI,Beginners


     This is my first game in Play BASIC. I played around with some of the functions and I think it's an awesome language!

     This game is evil. You wont have fun playing it, because you will always lose since I implemented the best possible Pong A.I. At least I can think of no way to improve it, if you have an idea, please tell me. Since the bots are inhuman good, it's really funny watching them fight against each other, so I recommend pressing 3 at the beginning. If you want to see how the AI works, press Space.


Download: Login to Download




 Simple Character Control

By: Kevin Picone Added: November 10th, 2008

Category: All,AI,Input,Beginners


This package includes a hand full of solutions for controlling a character on the X axis, The Y axis and the combined XY axis (8 direction movement). The package includes version of the demos for keyboard and JoyPad as well as bigger example with a fully animated Doggie character.
Download: Login to Download




 Line Of Sight

By: Kevin Picone Added: October 17th, 2008

Category: All,AI,Demo


The aim of this example is demonstrate an approach for performing line of sight calculations between game actors and the player within a world space.
Download: Login to Download




 Character Avoid Player

By: Kevin Picone Added: May 6th, 2008

Category: All,AI,Demo,Beginners


The aim of this sample is build some simple 'run away from the player' styled behavior into our dumb game actors, which are represented by simple blobs.
Download: Login to Download




 Character Movement Paths

By: Kevin Picone Added: February 4th, 2008

Category: All,AI,Beginners


This example uses the path movement helper library to build (create/delete/ add/insert etc) a path and then demo's a method to make a sprite follow the path. Useful for building some basic AI for your games.
Download: Login to Download




 Field Of View

By: Kevin Picone Added: January 27th, 2008

Category: All,AI


The aim of this example is to demonstrate a method of detecting if the Player (or Actor) is within another actors Field Of Vision (FOV).
Download: Login to Download




 Basic Text Adventure Framework

By: Kevin Picone Added: February 6th, 2007

Category: All,Games,Strings,AI

This example isn't a fully functional adventure game engine, but does include the bare bones of a user command parser, plus a few extras like an inventory and the start of the location system. While it's not finished, I'm not sure when i'll be able to find time to really write something decent. So feel free to continue it. Have fun !
Download: Login to Download




Viewing Page [1] of [2]



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.

 

 
     
 
       

(c) Copyright 2002 / 2024 Kevin Picone , UnderwareDesign.com  - Privacy Policy   Site: V0.99a [Alpha]