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

Turtle Programming Mock/emulator

Started by Clem2095, 24 July 2013 - 05:45 PM
Clem2095 #1
Posted 24 July 2013 - 07:45 PM
Hello fellow players/coders,

I am new to Computer Craft (and Minecraft as well actually) and would like to explore the coding part as it allows a unlimited amount of customization.
I fell in love with the turtles, which I am sure is the case of lot of players, and would like to write some programs for it on my own.

So, basically I would like to know if there are mocks or maybe turtle emulator which can be loaded in an Lua IDE (I am using eclipse + Lua tools).
I am not looking for an IDE, already found the one I like, but more a way to simulate 'out of the game' the turtle behavior, this is to test my code before running it on an actual turtle in-game (I play only survival - so any resource is highly valuable).

Note 0x01: I would like to avoid to grab code from others as I do not think this would allow me to totally enjoy the DIY part of the game.
Note 0x02: Of course I posted here because I do not have access to create a new thread.

I hope the question is not too 'beginner' or 'stupid' and will generate some nice discussions :)/>/>

Clem
Lyqyd #2
Posted 24 July 2013 - 10:29 PM
Split into new topic.

The easiest option seems like it would be to whip up a quick turtle library that simply tracks the turtle position, fuel, etc. The most difficult part may be simulating what it digs, but that could be accomplished by examining the y value and picking probabilistically from a table of appropriate blocks for that y range.
Clem2095 #3
Posted 24 July 2013 - 11:57 PM
Actually I am writing something up, my goal would be to do:
  1. Mock/Stub the turtle api (should not be hard)
  2. Make it possible to input simple maps using tables, something like:

{{"B", "B", "E"}, {"B", "E", "B"}}

But was thinking someone would already have done the job (:P/>) for me.
Will post an update if I get some results :)/>