Society of Robots - Robot Forum

Software => Software => Topic started by: corrado33 on July 13, 2011, 08:13:21 PM

Title: Sloppy wavefront in Qbasic
Post by: corrado33 on July 13, 2011, 08:13:21 PM
Yes I know we already have visual basic examples, but I used qbasic, and more is always better.  (Except in the case of fertilizer...)

So I've been programming on Qbasic because I can write basic programs on my palm, and it's much easier to debug on the computer.

I've finally figured out the wavefront, and I figured I'd share my EXTREMELY SLOPPY code.

But read these few things first.


My program lets you pick the size of the array, pick the robot location and goal location.

I have no idea if I'm doing a recursive or normal wavefront...

I just followed admins pseudo code on the wavefront page. 

My program takes any size array and outputs the array to wave.dat probably wherever the wavefron.bas file is located (or just C:, I have no idea)

And I think I want my poor little palm to do way to much.  Right now I have a 150x150 array set up on it for my robot to go through.

It took my computer 5 or 8 or so seconds to go through a 60x60 array.  My palm wouldn't have a chance. lol  I guess I need to think smaller.   ;D

So, without further adieu, here's my (terribly programed) file.  (And I've included basic with it, not sure if that's legal or not... whatever, qbasic is free)

http://www.box.net/shared/g3v7dcuu189xs7z1e0jm (http://www.box.net/shared/g3v7dcuu189xs7z1e0jm)

Oh, you can open the wavefron.bas file in notepad, in case you don't feel like looking at it in qbasic.