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

I Made This Today (Sensor Block Is Cool)

Started by Tinyboss, 17 September 2013 - 08:42 PM
Tinyboss #1
Posted 17 September 2013 - 10:42 PM
Posting in General because the code is still too ugly to share. But I guess you could come on my server and steal it if you really have to have it.



It reads the positions of any players on or over the floor, and prints their name and height, at their current position. It uses the Sensor Block from OpenPeripherals.
PixelToast #2
Posted 17 September 2013 - 11:02 PM
oooh nice, does it have proper math when finding the exact X and Y of the character on the screen?
ikke009 #3
Posted 17 September 2013 - 11:04 PM
Looks cool! I've never looked into openPeripherals so I don't know how advanced this stuff is, but I can see some fun applications for your program :D/>
PixelToast #4
Posted 18 September 2013 - 01:11 AM
the sensor block is actually from OpenCCSensors not OpenPeripheral
Tinyboss #5
Posted 18 September 2013 - 10:18 PM
oooh nice, does it have proper math when finding the exact X and Y of the character on the screen?
Sort of proper. It does an affine transformation to get from world to screen coords (that sounds proper, right?), but I used trial and error to get the coefficients, so it won't work for different screen sizes, screen orientations, text scales, or sensor locations. I'm currently working on a touchscreen-style calibration routine (stand on this X, now stand on that X) that can work for any random assortment of sensors and monitors. I've got the sensor part mostly done.

the sensor block is actually from OpenCCSensors not OpenPeripheral
Well, maybe that's where OpenPeripheral got it, but I don't have OpenCCSensors installed, so…
oeed #6
Posted 18 September 2013 - 10:38 PM
Awesome! It's reminds me of this:




(It's called 'The Map', it's in an exhibit called OurSpace at Te Pa Pa (the national museum of New Zealand))

http://www.tepapa.govt.nz/whatson/exhibitions/pages/ourspace.aspx#map

Basically, when you walk over part is displays little bits about where you are standing.
theoriginalbit #7
Posted 19 September 2013 - 01:06 AM
Very, very cool! Have you played around with text scale on the monitor yet? You may be able to dive into some cooler things with that, who knows.

I was thinking of doing something like this at a later stage when we get a "monitor_touch" event for walking. I was also thinking that whole, lines on the floor thing leading to places like in army bases in movies would be cool :)/> Touch the line and it tells you where it goes.

the sensor block is actually from OpenCCSensors not OpenPeripheral
Actually OCS is officially no longer supported and will no longer be developed. The sensor (as it was known in OCS) has been absorbed into OpenPeripheral as the sensor block.
oeed #8
Posted 19 September 2013 - 02:27 AM
I was thinking of doing something like this at a later stage when we get a "monitor_touch" event for walking.

Sounds awesome, is it confirmed?
Mitchfizz05 #9
Posted 19 September 2013 - 06:17 AM
I was thinking of doing something like this at a later stage when we get a "monitor_touch" event for walking.

Sounds awesome, is it confirmed?
It is planned: http://www.computercraft.info/forums2/index.php?/topic/14378-new-event-monitor-walk/
CIoody #10
Posted 19 September 2013 - 09:18 PM
Sensor Block be a cool Sensor Block
oeed #11
Posted 20 September 2013 - 06:29 AM
Sensor Block be a cool Sensor Block


Whaaaaat?

AlktatStudios #12
Posted 03 October 2013 - 06:45 AM
Plus, this is on Tinyboss's server. Go on it and test it out!