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

Wooden Turtle

Started by Buho, 06 January 2014 - 09:33 AM
Buho #1
Posted 06 January 2014 - 10:33 AM
What do you think of a wooden turtle?

Cons:
  • Catches fire and is destroyed in lava
  • Short-circuits on contact with water (reboots or shuts down)
    • or it simply cannot descend in water (it floats)
  • Has the blast resistance of wood - will be destroyed by explosions
  • Can be moved by player or mob pushing it
  • Zombies are particularly attracted to wooden turtles
  • Maximum fuel level of 1024
Pros:
  • Tools behave like player tools - can sense and dig up to 4 blocks away, sight-limited
  • Places blocks like player - 4 blocks away or closer if obstructed
  • Functions like turtle.detect() return a distance value in addition to Boolean
  • New ability to detect lava and water blocks (source and flowing)
  • New ability to detect mobs up to 4 blocks away (or maybe more), sight-limited
You're asking, "Who in the world would want to use such a terrible turtle?" Programmers. Honestly, I'm more interested in the extra challenges in the Con section. Kinda like CC Hardcore. If you want to get stuff done in your world, use an iron turtle. If you want extra challenges as a programmer, a wooden turtle might be fun.

I haven't thought through this completely (does it need a wasPushed property?); I'm just interested if there is anyone else out there who thinks this is a neat direction.
Csstform #2
Posted 06 January 2014 - 10:38 AM
……..yup…….that would be cool…….ohh, I like that idea….. Wait……can be pushed? Da heck?
Kingdaro #3
Posted 06 January 2014 - 11:17 AM
Half of these cons don't make any sense. Turtles and Computers in general don't actually run off of electricity, and short-circuiting doesn't exist in computercraft. Being able to be moved by the player or floating in the water wouldn't work because of the turtles' grid movement system. And why would zombies be attracted to a wooden robot?

In addition, a lower-tier turtle shouldn't have any "pros" beyond higher tiers, except for being crafted more easily and early game, but normal computers and turtles can be crafted pretty early game already, so a tier even lower than what's already easily obtainable wouldn't make sense to add at all. If you want challenge in your minecraft world, just challenge yourself; extra pointless features don't need to be added into the mod for you to simply abide by "hardcore survival" rules.
Buho #4
Posted 06 January 2014 - 12:20 PM
@The Doctor: Points taken. I added Pros as an enticement to try the insanity of the cons of a wooden turtle. :)/> Don't view this turtle necessarily as a "down-grade" as a "trade-off" commonly seen in engineering.

My first reaction when first learning about turtles was surprise: invulnerable to lava, water, and explosions? It sounded over-powered. (With experience, I'm now glad it's like that because programming turtles to behave correctly in a chaotic world is a challenge in of itself!)

Regarding "pointless features": we currently don't have the ability to detect water or lava. Making these obstacles very real dangers would, I think, justify a special sense to avoid them, something that would be over-powered in an iron turtle.

Why would zombies be attracted to a turtle? Ask a zombie why they're attracted to cymbal-banging monkeys in COD: Black Ops. My theory is they're idiots ;)/> The possibility of being pushed off-track would be a programming challenge to get back on-track (or avoid the zombie in the first place).

BTW, redstone dust does "short-circuit" when in contact with water ;)/>
Lyqyd #5
Posted 06 January 2014 - 12:23 PM
It seems like the only viable thing being suggested is better fluid detection, which might be a good thing for a peripheral to implement.
awsmazinggenius #6
Posted 06 January 2014 - 12:28 PM
@The Doctor: Points taken. I added Pros as an enticement to try the insanity of the cons of a wooden turtle. :)/>/>/> Don't view this turtle necessarily as a "down-grade" as a "trade-off" commonly seen in engineering.

My first reaction when first learning about turtles was surprise: invulnerable to lava, water, and explosions? It sounded over-powered. (With experience, I'm now glad it's like that because programming turtles to behave correctly in a chaotic world is a challenge in of itself!)

Regarding "pointless features": we currently don't have the ability to detect water or lava. Making these obstacles very real dangers would, I think, justify a special sense to avoid them, something that would be over-powered in an iron turtle.

Why would zombies be attracted to a turtle? Ask a zombie why they're attracted to cymbal-banging monkeys in COD: Black Ops. My theory is they're idiots ;)/>/>/> The possibility of being pushed off-track would be a programming challenge to get back on-track (or avoid the zombie in the first place).

BTW, redstone dust does "short-circuit" when in contact with water ;)/>/>/>
Tip: Use quotes. And his name is Kingdaro. Mine is awsmazinggenius.

Redstone just gets destroyed by water. You want a reboot. I'm not sure how hard that would be to code Java side. And we do have ways to check for water/lava, FYI.

EDIT: Lyqyd ninja'd me.
Edited on 06 January 2014 - 11:29 AM
Kingdaro #7
Posted 06 January 2014 - 05:06 PM
It seems like the only viable thing being suggested is better fluid detection, which might be a good thing for a peripheral to implement.
Fluid detection would be nice to have in the mod, maybe even as a core feature.

Also, turtles aren't invulnerable to explosions, last I checked. I had one nicked by a creeper when I had it tunneling, but that was a long time ago, so it might've changed since then.
Lyqyd #8
Posted 06 January 2014 - 08:41 PM
I believe that there's some combination of dig and detect return values that can tell one with some degree of certainty that a block is a fluid, and obviously two empty buckets can be used to pick up a fluid and ensure that one bucket now isn't empty. I think the biggest thing that could be added to the mod itself would be the ability to compare bucket contents with fluids in the world, which I think, having not worked extensively with Forge Fluids, can be done in a generalized manner to allow compatibility with any mod that correctly implements fluids as well as the vanilla ones.
awsmazinggenius #9
Posted 07 January 2014 - 01:38 PM
I believe that there's some combination of dig and detect return values that can tell one with some degree of certainty that a block is a fluid, and obviously two empty buckets can be used to pick up a fluid and ensure that one bucket now isn't empty. I think the biggest thing that could be added to the mod itself would be the ability to compare bucket contents with fluids in the world, which I think, having not worked extensively with Forge Fluids, can be done in a generalized manner to allow compatibility with any mod that correctly implements fluids as well as the vanilla ones.
What about other mods that add different buckets, such as DiamondBuckets+, which currently has "some support for ComputerCraft" by means of turtle.refuel() only counting one unit of lava per bucket as fuel, instead of the whole bucket, which means that a bucket that holds 5 lava that has turtle.refuel(1) used on it will still have 4 lava left in it, if that makes sense.
Lyqyd #10
Posted 07 January 2014 - 01:43 PM
I don't see that being likely to happen. Maaaybe if they work correctly in furnaces, but I wouldn't count on it. Dan seems to tend to try to avoid needing to special-case things into ComputerCraft, perhaps because you'd run into situations where vanilla stuff works a certain way, but mod-added stuff that players would expect to work the same way doesn't.
awsmazinggenius #11
Posted 07 January 2014 - 02:07 PM
Anyways, the "dig and detect" values are something like this:

local function isFluid()
  if not turtle.detect() then
	return false, "No block in front of Turtle."
  end
  turtle.dig()
  if not turtle.detect() then
	return false, "Block is not a fluid."
  end
  return true, "Block appears to be a fluid."
end
EDIT: Damn editor messing with my indents.
EDIT 2: Also, there is the fact that a turtle can move into water/lava as a block. You could use that to check as well.
Edited on 07 January 2014 - 01:09 PM
oeed #12
Posted 07 January 2014 - 02:51 PM
I think that these should function the same as normal turtles, except because they're much cheaper the tools (which would be wooden) would have a durability. Maybe longer than what the tools normal have, but short enough to become a fairly common occurrence. It seems OP for a cheaper turtle to be able to see and dig further. I like the lava and water thing though. Basically, the main pro is their cheaper cost.
Csstform #13
Posted 07 January 2014 - 09:45 PM
If we get these, I will personally make a add-on turtle that carries a flint and steel and have him burn a wooden turtle. (unless I'm blind and don't see that turtle)
CCJJSax #14
Posted 10 January 2014 - 01:12 AM
I sorta like it with all/most of the cons. I don't like the idea of any pros to it other than it's cheaper. But I think that these turtles, if implemented, shouldn't be able to use diamond tools. Perhaps it could also have a smaller file storage limit (I think it's 2 megs per computer now). I say a smaller inventory. I can see this being OP, so I am focusing on cons of using a wooden turtle. I kinda like the idea, but overall I'm personally on the opposed side.
oeed #15
Posted 10 January 2014 - 01:33 AM
I sorta like it with all/most of the cons. I don't like the idea of any pros to it other than it's cheaper. But I think that these turtles, if implemented, shouldn't be able to use diamond tools. Perhaps it could also have a smaller file storage limit (I think it's 2 megs per computer now). I say a smaller inventory. I can see this being OP, so I am focusing on cons of using a wooden turtle. I kinda like the idea, but overall I'm personally on the opposed side.

Yea, it's not like they're really that expensive in the first place really, other than the diamond tools.
awsmazinggenius #16
Posted 10 January 2014 - 02:15 AM
I don't really see this being implemented in ComputerCraft :(/>, but after some discussion it has turned into a decent idea.
oeed #17
Posted 10 January 2014 - 02:18 AM
I don't really see this being implemented in ComputerCraft :(/>, but after some discussion it has turned into a decent idea.
Well, apart from the mentioning of liquid detection, which wouldn't be that useful really, it's mainly the removal of features. At this stage I don't believe it serves a purpose unless it had something like stone tools that broke.
awsmazinggenius #18
Posted 10 January 2014 - 02:23 AM
If it uses stone tools, that's way too cheap. Plus a Wooden Crafty Mining Turtle could carry some wood, mine some stone, and easily reproduce it's tools.
oeed #19
Posted 10 January 2014 - 04:25 AM
If it uses stone tools, that's way too cheap. Plus a Wooden Crafty Mining Turtle could carry some wood, mine some stone, and easily reproduce it's tools.

Yes, but if they broke with use it'd be less OP. I see where you're coming form though.
Csstform #20
Posted 10 January 2014 - 07:20 AM
Or use wooden tools, which kindof ruins it for end - game, but is a great beginning. Then it can only break wood stone and dirt. Perhaps it could even not have an inventory, an a toned-down version of cclua, without all the features. It would probably move slower, and, it can be burned. That means you will have to watch out for PvP and creepers near it.
Buho #21
Posted 10 January 2014 - 10:23 AM
I've been thinking more about this. You all make great points.

And reading the suggestions in this forum, responses fall into two categories: it can already be done, or a peripheral can be made for that. On the first category, I'm actually pretty impressed with what turtles can already do. They're player-simulators with the ability to move, mine, compare, think, and place. What more can there be?

Well, the turtles move more like blocks than players. We can exist at a fractional x,y,z location but turtles cannot. You might see them move smoothly but I think that's an animation trick to mask their constantly integer block location. One of the "features" above was that players or zombies could nudge the wooden turtle. I'd like to expand on that. Make a wooden turtle like a mob instead of a block. That means it cannot levitate. Give it new API functionality:
  • float, float, float turtle.accelerate(float, float) –x, z, also returns current values, useful for determining "at rest on ground"
  • float, float, float turtle.velocity()
  • bool turtle.jump() –attempts a vertical acceleration of a certain amount, will only fail if in the air not touching the ground
  • float, float, float turtle.heading(float, float, float) –target yaw, pitch, roll, turn is at a constant rate, also returns current values
Think about the Slime Block that will be introduced in MC 1.8! 1337 parkour turtles, anyone? How about a Wooden TNT Turtle where you can control your own creeper?

Those are some back-of-the-napkin API ideas to get the idea across. I think a mob-like turtle is sufficiently different from the block-like iron turtle to make this a compelling suggestion. It opens up an entirely different world of programming problems in Minecraft. It also makes sense that it is destructible, as mobs are destructible, too, and likewise with floating in water. It probably shouldn't have a diamond pick. Maybe make wooden turtles unable to mine but only interact (like Adventure mode).
awsmazinggenius #22
Posted 10 January 2014 - 11:48 AM
What do you mean by "float"? If you mean the numbers with decimal points, we don't have them in Lua. We have one "number" type, which stores integers and floating-point numbers. Otherwise, these are decent ideas.
Buho #23
Posted 11 January 2014 - 09:42 AM
AWS, I understand there's just one "number" type, I was illustrating the kind of data that is being passed around.

Thinking more on this, I'm a bit concerned this isn't even possible in Minecraft, at least at the detail I outlined above. These calculations have to happen server-side and Minecraft is not a physics simulator. It's limited to ticks, 1/20s. I guess the thing to do is match the Wooden Turtle's ability to the inputs available to a player communicating to a server. turtle.forward() doesn't quite cut it, as a player can press forward for 1 tick and nudge himself forward a hair. Maybe turtle.forward(seconds) that can be combined in the next line with turtle.left(seconds) to move diagonally a certain amount.

Also, I'm thinking the Wooden Turtle needs to see, sense its environment better/faster than iron turtle block detection. Like a player can see the horizon, except not that far for the turtle. A long time ago I wrote Java code to control a tank in a 2D arena that had tread, gun, and radar (of only a small FOV), which could all be controlled independently to strafe, detect the enemy, and shoot independently. I'm wondering if a limited-range 3D radar/sonar can be installed on the Wooden Turtle. I'm not sure of how to read this input, though. A 3D table in memory of block locations, a virtual map of the environment the turtle is sitting in? Again, even if this were done, I have a feeling that turtle programs to read this and make sense of it will lag the server too much – Minecraft isn't a physics simulator.

One final thought: What's the use of a Wooden Turtle as described here? This is all movement-based and iron turtles can move very reliably and precisely. I think that question shows a Survival mode mindset. What about Adventure mode? Again I bring up that Java tank game where you wrote AI to outsmart another programmer's AI. A Wooden Turtle could be an excellent learning environment to learn how to programmatically move around in real space with physics. After all, real-world robots have to deal with these issues. It seems Dan is pushing heavily into the education area, and this might fit in with his vision.
awsmazinggenius #24
Posted 11 January 2014 - 12:34 PM
I do agree that this would be a challenge for programmers,and I like the idea, but I just don't see it being implemented into ComputerCraft, at least not currently. With the new advanced turtles, turtles almost need their own creative tab because there are so many variants of them now (this is one of the things I am thinking of suggesting). With the hopefully upcoming ComputerCraftEdu, assuming this is used in (more) schools, it could also make for a great lesson of problem-solving, where you have to make the wooden turtle accomplish a certain task, while working with the constraints it has.
aaa #25
Posted 14 January 2014 - 12:17 AM
Destroying and placing blocks like player is an interressing feature, allowing cactus farming.
Csstform #26
Posted 14 January 2014 - 01:52 PM
I do agree that this would be a challenge for programmers,and I like the idea, but I just don't see it being implemented into ComputerCraft, at least not currently. With the new advanced turtles, turtles almost need their own creative tab because there are so many variants of them now (this is one of the things I am thinking of suggesting). With the hopefully upcoming ComputerCraftEdu, assuming this is used in (more) schools, it could also make for a great lesson of problem-solving, where you have to make the wooden turtle accomplish a certain task, while working with the constraints it has.
Suggest it to engineer - he's making peripherals so maybe it could be a test of sorts.
http://www.computercraft.info/forums2/index.php?/topic/16669-computercraft-peripherals-what-do-you-want-to-see/
Edited on 14 January 2014 - 12:55 PM