Hey all! I am trying to create a “Tutle Logo” interpreter in C# for use within Unity3D. If you haven’t heard of Turtle Logo before, imagine a turtle that can move around the screen and upon user indication can also draw a continuous line behind it. It can also face any direction. It is controlled using the Logo programming language. How can I implement such a thing? Thanks in advance! ![]()
Where exactly is your problem?
You could just go ahead and create a Turtle-script containing the appropriate methods, like forward, turn etc.
And then call them in a fancy way from its start method.
Or do you want to create your own cmd window where you can enter and execute code from? That would be a little overdone in unity.
No in fact I am wondering how I can tell it to move two “blocks” in front… I guess I could implement a “grid” but I don’t know what to do exactly. Also, I need a way of spawning a continuous line that I can interrupt for a little while and then keep spawning.
You could use Vectrosity for the line-drawing stuff, and an invisible game object for the turtle. That way you can control it with Rotate and Translate functions. The hard part would be writing a Logo interpreter, though Logo is relatively simple and limited so it shouldn’t be super-hard.
–Eric
You just divide your coordinate system into a grid. For example make each square 1 by 1.