This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CoderJohn's profile picture

Turtle Scanner

Started by CoderJohn, 13 November 2012 - 01:24 PM
CoderJohn #1
Posted 13 November 2012 - 02:24 PM
This is a turtle scanner that will move around an area and create a 2d map of that area. It uses an algorithm I developed from A* Pathfinding, however the tricky part was to get it to make a path based on no knowledge of the world around it.

Without further ado…
http://pastebin.com/rey7R6W5

The turtle returns to where it started when done traversing the room. Bigger rooms take longer to traverse. I was planning on making a way to use networking to tell the turtle where to go after the map has been traversed, but now I am working on an EMAIL SERVER and CLIENT that adds support for GoldComputers but is still compatible with BasicComputers.

So feel free to use my code and upgrade it and what not. It is messy cause it was a MAKE-IT-AS-YOU-GO project.
CoderJohn #2
Posted 14 November 2012 - 02:16 AM
*Updated Turtle*
Now it's redraw function features it to move and it will always be centered.
There is no limit of where the turtle can move(except stack overflow - need to fix it not to recursively function.)
TheVarmari #3
Posted 14 November 2012 - 03:31 AM
Won't work. Run scanner, turtle rotates. Boom. Back in CraftOS.
CoderJohn #4
Posted 14 November 2012 - 10:59 AM
Don't use craftos to run it? I used in single player and multi….. Both work