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

[1.3] Eye

Started by Sebra, 03 March 2012 - 07:33 PM
Sebra #1
Posted 03 March 2012 - 08:33 PM
Can I suggest an Eye for turtle?
It would useful to not be lost in the world…
Eye located in the middle of forward side of turtle.
Usage:
light, r, name, id, meta = turtle.look(a,:unsure:/>/>
where: a,b - a way to determine the scanline from the turtle eye, vertical and horizontal angles or tangenses;
light - light level of first block found;
r - if light level > 0 then r is a range to block found;
name, id, meta - if light level is high enough then turtle can see correct block info.


turtle.detect() can be upgraded too to
found, name, id, meta = turtle.detect()
where name, id, meta provided only if block found.

and of course slots contents needs to be known.

If you so much against giving out id and meta, at least allow us know the names.
Liraal #2
Posted 03 March 2012 - 09:15 PM
sebra i have a beta function that can detect (with limitations) what the turtle dug, so upgrading the detect is not so urgent. The eye's a nice idea however, I'd like to have the ability to know what light level the turtle's in.
passinglurker #3
Posted 03 March 2012 - 10:47 PM
I like it

it could mean simple security cameras especially when paired with the monitor coming in 1.31.

but i wouldn't want this to delay 1.31
rockymc #4
Posted 03 March 2012 - 10:48 PM
Turtles are blind.
Liraal #5
Posted 03 March 2012 - 10:50 PM
but i'd gladly see at least a playerDetect() function in 1.31
FuzzyPurp #6
Posted 04 March 2012 - 02:04 AM
I think they're will be a turtle.compare()
passinglurker #7
Posted 04 March 2012 - 02:39 AM
compare? what is that supposed to mean?
FuzzyPurp #8
Posted 04 March 2012 - 02:42 AM
compare? what is that supposed to mean?

Compare
passinglurker #9
Posted 04 March 2012 - 04:49 AM
I know that!
i mean what does that mean to the turtle and how is it supposed to detect a player with a function labeled compare?
Sebra #10
Posted 04 March 2012 - 07:59 AM
sebra i have a beta function that can detect (with limitations) what the turtle dug, so upgrading the detect is not so urgent. The eye's a nice idea however, I'd like to have the ability to know what light level the turtle's in.
All, we can do now, is look, which slot got digged result. It is not enough.
it could mean simple security cameras especially when paired with the monitor coming in 1.31.
Doubt it.
but i wouldn't want this to delay 1.31
I'm too.
Turtles are blind.
And I want that to change.
but i'd gladly see at least a playerDetect() function in 1.31
Mob and item detection needed too. But not all at once.
Casper7526 #11
Posted 04 March 2012 - 09:33 AM
You have mob detection now actually :unsure:/>/>
Liraal #12
Posted 04 March 2012 - 09:35 AM
like this?

if turtle.detect() and not turtle.dig then print("MOB!") end
Casper7526 #13
Posted 04 March 2012 - 09:36 AM
Yeah, detect will return false if a mob is in the way, but you won't be able to dig/move into a mob :unsure:/>/>
Liraal #14
Posted 04 March 2012 - 09:38 AM
but it'll behave badly when near bedrock :unsure:/>/>
Casper7526 #15
Posted 04 March 2012 - 09:45 AM
Bedrock: detect - true dig/move - false
Mob: detect - false dig/move - false
Sebra #16
Posted 04 March 2012 - 11:53 AM
So anything except mobs and bedrock can be digged?
Casper7526 #17
Posted 04 March 2012 - 11:53 AM
Yep pretty sure :unsure:/>/>
Liraal #18
Posted 04 March 2012 - 12:22 PM
how about ender portal frame? I suppose this calls for testing.
rockymc #19
Posted 04 March 2012 - 07:15 PM
sebra i have a beta function that can detect (with limitations) what the turtle dug, so upgrading the detect is not so urgent. The eye's a nice idea however, I'd like to have the ability to know what light level the turtle's in.
All, we can do now, is look, which slot got digged result. It is not enough.
it could mean simple security cameras especially when paired with the monitor coming in 1.31.
Doubt it.
but i wouldn't want this to delay 1.31
I'm too.
Turtles are blind.
And I want that to change.
but i'd gladly see at least a playerDetect() function in 1.31
Mob and item detection needed too. But not all at once.

You can't change it. Turtles will be blind.
coolblockj #20
Posted 04 March 2012 - 07:27 PM
I too, would LOVE the idea of security cameras for turtles. Well, something like that
Sebra #21
Posted 04 March 2012 - 07:39 PM
You can't change it. Turtles will be blind.
Bad. :unsure:/>/>
Liraal #22
Posted 04 March 2012 - 09:09 PM
No matter what, there has to be at the very least a way to tell players/mobs/solid blocks/opaque blocks from each other.
Cloudy #23
Posted 05 March 2012 - 03:44 PM
No matter what, there has to be at the very least a way to tell players/mobs/solid blocks/opaque blocks from each other.

There is technically a way. If turtle.detect() returns true, then it's a solid block. If turtle.detect() returns false, but yet turtle.forward() also returns false, then there is a mob in that space. Hacky, but works!

Edit: I'm so so so late.
Sebra #24
Posted 05 March 2012 - 05:22 PM
This way it is:
1. block detected - do not know what
2. cannot move - seems some mob
3. was able to move - seems way was clear
Blind detection: hard/soft/hole
Liraal #25
Posted 05 March 2012 - 06:13 PM
yeah, but i mean to detect them WITHOUT moving (security checkpoints, landmines, detectors, possibilities are endless)
Bard #26
Posted 06 March 2012 - 09:04 PM
yeah, but i mean to detect them WITHOUT moving (security checkpoints, landmines, detectors, possibilities are endless)

I do that using the sensors of Laser Mod :unsure:/>/>
I also use that with CC to control doors, lights, elevators and so on B)/>/>

I would see it being useful if it could also detect what kind of entity it is… maybe.
But for now I think you can manage with some cables and other addons if you're interested
Liraal #27
Posted 06 March 2012 - 09:10 PM
sure, but that's not something you can CODE for the turtle, right? And the machine wouldn't be movable.
Bard #28
Posted 06 March 2012 - 09:21 PM
I think I misread your reply a bit, I thought you wanted to use the turtle as a stationary detector (like… place it somewere and leave it there, so I was suggesting some ways to do it), but reading it again now I see that's not what you meant at all when you said "without moving"..
Disregard my previous ramblings
skyeyemachine #29
Posted 25 March 2012 - 07:18 AM
EDIT: I read a bit further through the forums and found this bit from Casper7526, so I'll repost it here;

http://www.computerc...-color-control/

If you want graphics, you are able to modify the default.png file in the minecraft jar (the font file) and use the extended ascii characters as your "sprites".

The reason we don't have "full" pixel control for computers is for SMP purposes. To transfer that much data is almost literally impossible in the time frame it would need to be transferred.

There's over 5000 pixels on the default screen size alone. That's a tad more than the 900 characters it holds. So your looking at a 5x increase in speed RIGHT off the bat. (Obv less if you didn't draw on all 5000 pixels, but the point is that it would be possible to lag a server heavily "easily".

Does that mean that even a small, grainy sort of 'webcam' peripheral such as I described below (even one or two small one-block 64x64 cameras and displays, for instance) would be infeasible for SMP play? Sorry to have revived the thread unnecessarily if so.

Thanks.

—————————–

Hey all,

First, just wanted to say that I think this is a fantastic mod. I'm setting up a server shortly, and I expect CC will be a true centerpiece for it.

That said, I have something I've been trying to figure out with minecraft for a while, and that is a remote monitoring station. I know that it is possible to do a lot with text and scripting via sensors and such, but I think it is also just a lot of fun to be able to see what's going on as well, even if the picture quality is small/low, etc. I've looked at mods like The Robot Mod (a work in progress) and the CCTV mods (now defunct) and the RC Mod (all manual control) in the past and recently, but nothing currently seems suitable to a stationary monitoring station of any kind.

I understand based on this thread that turtles will likely stay blind, so I won't suggest that. I was wondering, however, if it might be possible to create some sort of stationary wired or wireless block that could send an image to a monitor, or even just a computer block's right-click window, or something similar. The key points for me are that it would be SMP-enabled, as I really enjoy playing with others, and that it becomes something at least semi-automated, so that it becomes possible to quickly check several feeds at once, or ideally view them simultaneously in one room along a wall or such. Maybe there could even be just one monitor that a computer can command to cycle between feeds with a timer, for example.

I'll just finish by saying I'd be the first to admit that I lack an understanding of how difficult or easy this would be to implement - I am a beginner programmer at best right now. However, I think a (stationary?) graphical camera and viewing system of some sort would be a very fun and useful addition to CC for a lot of people. Please consider it, and thank you for reading this far.

Cheers!