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

Remote Controlled Turtles (RCT) by 44shades44 [v1.0b]

Started by 44shades44, 28 March 2014 - 11:00 AM
44shades44 #1
Posted 28 March 2014 - 12:00 PM
Hey guys! This is just something I've been working on recently.

Current Features:
  • Just move, Move and dig, or just dig up, down and forward!
  • Move backwards! :o/>
  • Turn! Woah!
  • Refuel (from slot 16)
  • Place blocks up, down and forward!
  • Attack up down and forward!
  • Slick UI
  • Slicker PDA UI (Thanks Aus4000)
  • Bugs
v1.0b(current):
SpoilerPastebins:
SpoilerComputer: M2EaKHvt
Turtle: RbhA7dw7
Changelog:
Spoiler+ Added "turtle talkback", so turtle can send messages to computer
+ Added PDA support (Thanks Aus4000)
^ Fixed Refuelling

Planned features:
Spoiler+ Ability to suck items out of a chest/off the ground
+ Ability to throw items
+ Ability to send/recieve redstone pulses (from any side)
+ Ability to switch weapon/tool (thanks to the CC 1.6 update)
+ Ability to compare block in selected slot to block infront/above/below
^ Run other programs remotely
^ Better UI
^ Location of turtle relative to computer, or any point in space really…, using GPS
^ Maybe an indicator as to which slot is selected and how many items are left in said slot
^ If the indicator happens, might remove the 1-8 system and just have +1 and -1 button to select slots (like a scroll wheel kinda)
^ More stuff for this list…

Previous versions:
Spoilerv1.0a:
SpoilerPastebins:
SpoilerComputer: AWAaeJVK
Turtle: gVUPTwyQ
Features:
SpoilerMove*: Forward, Back, Up, Down
Turn: Left and Right
Dig**: Forward, Up, Down
Move and Dig: Forward, Up, Down
Place blocks: Forward, Up, Down
Attack: Forward, Up, Down

Feel free to use this code, and develop on it, your suggestions are much appreciated.
If you find any bugs post them here and I'll fix them as soon as I feel like it :P/>
If you have any questions/suggestions please do ask/suggest, and I'll be sure to answer/accept***

Happy Computing!

Notes:
Spoiler*Turtle will move without digging unless you "Move and Dig", this is mainly so that when using it in your base, you won't break your stuff.
**Turtle will dig without moving, basically just to remove blocks (maybe to place a different one, I don't know.)
***To the best of my ability.
Edited on 04 July 2014 - 08:52 AM
44shades44 #2
Posted 31 March 2014 - 08:28 AM
I should fix refuelling…
aus4000 #3
Posted 04 April 2014 - 09:35 AM
OK, I changed some things to be a tad bit more compatible with the new PDA's introduced in 1.6 :)/>

This starts from line 31 to the end:

function controls()
  sleep(1)
  term.clear()
  term.setCursorPos(1, 1)
  if pocket then --This part revamped for PDA's by Aus4000
    print[[
		   RCT
	    Controls:
   +------------------+
   |Action|F|B|L|R|U|D|
   +------+-+-+-+-+-+-|
   |Go/Trn|W|S|A|D|R|F|
   |Mine  |M|#|#|#|T|G|
   |GoMine|^|#|#|#|Y|H|
   |Place |<|#|#|#|U|J|
   |Attack| |#|#|#|X|C|
   +------------------+
   |Refuel:Z (Slot 16)|
   |Select-a-slot:1-8 |
   +------------------+
	  By 44shades44]]
  else
   print[[
		   Remote Controlled Turtles (RCT)
					  Controls:
	    +-------------------------------------+
	    |Direction  |  F  | B | L | R | U | D |
	    +-----------+-----+---+---+---+---+---+
	    |Go/Turn    |  W  | S | A | D | R | F |
	    |Mine	   |  M  | # | # | # | T | G |
	    |Mine &amp; Go  | Up  | # | # | # | Y | H |
	    |Place Block|Enter| # | # | # | U | J |
	    |Attack	 |Space| # | # | # | X | C |
	    +-------------------------------------+
	    |Refuel: Z  | Select slot 1-8: 1-8    |
	    |Turtle refuels from slot 16 (last 1) |
	    |Turtle selects slot 1 after refuel   |
	    +-------------------------------------+
				    By 44shades44]]
  end
end
term.setCursorPos(1, 1)
if pocket then --also added by Aus4000 for PDA's
rednet.open("back")
RCTC()
else
print("What side is your modem on?")
rednet.open(read())
RCTC()
end
McDonald072 #4
Posted 04 April 2014 - 07:27 PM
Sorry if that's an obvious question, but what's the use of RC turtles?
aus4000 #5
Posted 05 April 2014 - 07:26 AM
It's a fun way to get used to the turtle API. Also, me and my friends have been known to turn them into battlebots.
TheDoctor #6
Posted 08 April 2014 - 05:23 AM
I was wondering, (quite new so if this is an obvious or stupid question please forgive me :D/>), is there some way to look through a "Turtle's Eye View"?
McDonald072 #7
Posted 08 April 2014 - 08:18 PM
Nah, it would be very cool if it was possible :/
TheDoctor #8
Posted 10 April 2014 - 12:02 AM
Ok thanks.
44shades44 #9
Posted 04 July 2014 - 07:58 AM
Wooooo!
Say hello to 1.0b
It's been a while but I finally got around to updating this project!
Enjoy finally being able to refuel.
Also added ability for turtle to talk back to the computer.
Thanks a bunch Aus4000 for your smaller PDA UI layout. (Please use the code tag next time though :P/>)
Might actually put some more time into this now. :P/>
44shades44 #10
Posted 04 July 2014 - 08:06 AM
Okay so after a bit of messing around with 1.0b, and some minor code changes, there is a small problem.
During the first 10 seconds or so, the turtle is quite slow to respond (almost a second delay), however after the 10 seconds it seems to be almost-instant. Don't know if this is just my computer or an actual bug. :S

EDIT: Seems to have something to do with the new refuel function :(/>. Whenever I leave and re-enter a computer, it goes slow until I refuel, then it runs fast again. Will release a "c" version when I figure out how to fix it :/
Edited on 04 July 2014 - 06:15 AM