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

Open ccsensor map

Started by Gamezdude, 06 December 2013 - 10:17 AM
Gamezdude #1
Posted 06 December 2013 - 11:17 AM
Im trying to create a colour map on a monitor like so. Obviously i will need a CCsensor (and a 'Sonic Sensor Card') with a computer and advanced monitor.

How do i make this image smaller/put it in as a spolier?

I already have an idea how to structure it, but im not sure how to achieve it. Let me clarify.

	    (X, Z, Y)
dim cordinates (1, 1, 130)

if (cordinates) = black then
           if (cordinates) = "soild" then
                   (cordiantes) = green ***
           else
                   if (cordinates) = "liquid" then
                             (cordiantes) = blue ***
                   else
                             if (cordinates) = "unknown" then
                                        (cordinates) = black ***
                   end
           end if
else
***
end if

This is what i expect the code to look like if writen in Visual Basic.

The colours are the pixels on the advanced monitor.
Solid, Liquid & Unknown are the type of block as seen in the sensorview.
*** means add 1 to the Z axis, so it does one block at a time on a loop until Z equals 32, then X will turn into 2 and do the process again until both Z & X equal 32, then 130 will decline to 129, then 128 and so on.

Im after a satalite view so i thought starting from layer 130 will get the top of the tress/structures and print then to the monitor, once those cords are printed the cords are ignored and the program works its way down each layer to fill the blanks until the map is full.


The issues are, i dont know how to get that information from the operccsensor and slap them onto the monitor using my concept program. Help? I just need a starting point. OpenCCsensors dont seem to be a largely support subject on the net.
Lyqyd #2
Posted 06 December 2013 - 12:25 PM
That image was probably generated using the inventory sensor and a vanilla map. You can read the actual map data and use it directly. The sonic sensor is rather broken.
Gamezdude #3
Posted 06 December 2013 - 12:58 PM
That image was probably generated using the inventory sensor and a vanilla map. You can read the actual map data and use it directly. The sonic sensor is rather broken.

Thats a good point, haven't considered that…i'll look in to that…