[racket] racket library for minecraft pi edition
thanks for the reply.
I found a short write-up on the API. It shows
>
> setBlocks(x1, y1, z1, x2, y2, z2, blockType, blockData) - set lots of
> blocks all at the same time by providing 2 sets of co-ordinates (x, y, z)
> and fill the gap between with a blockType
>
> If a similar function is available for get blocks, that would speed up
> your code hugely.
>
as far as i know, there is not.
> Every single command sent over TCP has overhead associated with it, so
> attempting to read 128^3 times over a network is going to take a while.
>
that is kind of what i thought. i wasn't sure if "block buffering" had
anything to do with it, where i could package up a bunch of commands in a
buffer to send at once... however, this doesn't really matter if the
Minecraft API is reading them one by one and sending data back one at a
time. Am I understanding this correctly?
>
>
> As for the data structure, lisp has multi-dimensional arrays:
>
>
> http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_make-array.html
>
> (make-array '(128 128 128))
>
> with a variety of keywords to control how its created. That website in
> general has everything on lisp.
>
>
thanks for that tip, i'll have to do some reading about arrays and how to
process them.
> For a modern computer, such data is in no way too large (~2 million * size
> of data...say 64 bits = 8 bytes so 16 MB total). BUT sending 2 million TCP
> commands is too many!
>
glad my instinct was correct. i knew there was some fatal flaw in what i
was trying to attempt. now, if i was using some free software clone of
minecraft instead of the Pi Edition API.... i could likely create some
kind of "world.getBlocks" command in order to pack a bunch of data into one
command.
Again, thanks for the reply. I'm new to this list, but already am glad I
came.
-grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130611/d836dcff/attachment.html>