#2687 closed enhancement (fixed)
positioning shared turtles
Reported by: | walter | Owned by: | walter |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | Unspecified |
Component: | Turtleart | Version: | Unspecified |
Severity: | Unspecified | Keywords: | 11.2.0 |
Cc: | erikos, godiard, tonyforster | Distribution/OS: | Unspecified |
Bug Status: | Unconfirmed |
Description
On Fri, Mar 11, 2011 at 12:11 PM, Simon Schampijer <simon@…> wrote:
Hi Walter,
Gonzalo and myself did get the current status of sharing in Sugar activities
yesterday. One thing we came across in TA was the following:
- the initial position is the same for both turtles, so you do not really
see when another person joins unless you move your turtle or the other
person is (or you look in the frame)
- when you drag the turtle around the position is not updated on the other
screen only on your screen
- you can drag all the turtles around
Some of the above might be design that is why I flash out some ideas here
first. Here are some thoughts:
- maybe one should be able to only drag the own turtle?
seems reasonable
- maybe the new position when you drag your turtle should be transferred?
also seems reasonable
- maybe a turtle that joins has an offset (first x-=100, second y+=100,
third x+=100...) or something like that?
I am not sure this is a good idea, as it will cause all the graphics
to be offset. I guess I need to think about this.
Filling a ticket for this so I can track it.
thanks for testing.
-walter
Regards,
Simon
Attachments (1)
Change History (21)
comment:1 Changed 12 years ago by erikos
comment:2 Changed 12 years ago by tonyforster
- Cc tonyforster added
comment:3 Changed 12 years ago by walter
- Status changed from new to assigned
I think that I have addressed #1 and #2 above. Still not sure what to do about #3, although since I don't reset the remote turtle any more on clean, it may be less of an issue than in the past.
Please test.
http://git.sugarlabs.org/turtleart/mainline/commit/e1bccd2cdbc1bd74c6fd4bd8b1fc30838f0c66ee
http://git.sugarlabs.org/turtleart/mainline/commit/e39c136f6ac3e2fafc7ff17e4e1d38a157f261cf
http://wiki.sugarlabs.org/images/c/cf/TurtleArt-107.xo
thanks.
-walter
comment:4 Changed 12 years ago by walter
I've coded up label as per Simon's sketch. It looks cute, but it goes a bit against the spirit of the Sugar color scheme. On the fence about it.
comment:5 Changed 12 years ago by walter
http://git.sugarlabs.org/turtleart/mainline/commit/bde0306a2345bddb991f8107c809136b6b0f5868 adds labels to remote turtles... check it and let me know what you think.
comment:6 Changed 12 years ago by walter
http://git.sugarlabs.org/turtleart/mainline/commit/18f75d3a8c8fbc42bff3638f544ad61edfc15f92 fixes a couple of problems:
(1) I no longer save remote turtles, which means that the restarting of a share seems to do the right thing;
(2) I fixed a long-standing problem with turtle selection that confused the default turtle with the selected turtle in some cases.
Please test and give me feedback.
(I am keeping v107 in the wiki up to date with these patches.)
comment:7 Changed 12 years ago by erikos
- Keywords 11.2.0 added
comment:8 Changed 12 years ago by walter
With this patch, I think that it is finally working as spec'd above.
http://git.sugarlabs.org/turtleart/mainline/commit/36f997b9b587448f1439a89a9f4f5dfd218a42f9
I still need to come up with a mechanism for sharing the initial position of each turtle, ideally in a way that is backward compatible with older versions. What I am thinking is to have the receipt of the turtle dictionary trigger the passing of the position of each participant's turtle. (The dictionary is distributed whenever a new user joins.)
comment:9 Changed 12 years ago by walter
- Resolution set to fixed
- Status changed from assigned to closed
Seems to work!!
http://git.sugarlabs.org/turtleart/mainline/commit/86389dec8d09e2e3fd228a735411d377b0aa5f9d
Closing this ticket. Please reopen if there seem to be any issues/bugs with the implementation.
comment:10 Changed 12 years ago by erikos
I did test your latest version 107. The positioning does look correct now. As well I can only drag my own turtle, congrats!
The text on the label are too small, at least on the XO I can not read them. And sometimes it seem to be drawn over the turtle instead of beside it.
comment:11 Changed 12 years ago by walter
Thanks for testing.
Re the text size, I made another change: use ellipsis instead of shrinking the name to fit. Don't know if that patch made it into the bundle or not. Will check.
Regarding the position of the label, I choose a fixed radius and random angle. But that could be an issue for certain orientations. Will check.
comment:12 Changed 12 years ago by walter
http://git.sugarlabs.org/turtleart/mainline/commit/75a6c367bf9ae7f367b9aad57cf410954b56ebf0
This patch seems to address the font-scaling issue.
Regarding the label, I pushed a bit further out, but at some angles, it will overlap the turtle somewhat.
comment:13 Changed 12 years ago by tonyforster
V107 current 00:37, 16 March 2011 (1.08 MB)
I like it, the concept, label size, location and ellipsis are good
issues (not necessarily needing fixing):
If you have created a second turtle, moving either your default or your second turtle moves the one turtle on the other's display
If you select the other's turtle, you can move it with fwd
turtle tony
fwd 100
on your display that moves the other's turtle but on the other's display, your turtle moves
(please keep the ability to select and read the other's turtle, at the moment its the only way to share data)
will play more ...
comment:14 Changed 12 years ago by tonyforster
probably due to swamping with many set xy commands
Traceback (most recent call last):
File "/home/olpc/Activities/TurtleArt.activity/TurtleArt/tawindow.py", line 1327, in _move_cb
self._mouse_move(x, y)
File "/home/olpc/Activities/TurtleArt.activity/TurtleArt/tawindow.py", line 1360, in _mouse_move
round_int(self.heading)])))
AttributeError: TurtleArtWindow instance has no attribute 'heading'
comment:15 Changed 12 years ago by tonyforster
Its very easy to swamp the receiving laptop with data. It can be unresponsive in TA for quite some time. If you alt tab, the screen does not redraw. Ideally, local action would get higher prioriry than received data.
Ideally, all the labels would be on a higher layer than the turtles.
If you quit, your label remains. When you rejoin there are 2 labels.
Further to the issue of selecting a remote turtle with
turtle name
You can alter the pen width of the remote turtle as seen on your screen (but not on theirs) I don't think its much of an issue, if you select someone elses turtle and write to it you should expect funny results.
comment:16 Changed 12 years ago by tonyforster
rescale the coordinates up on one screen
drag with the mouse, the turtle does not track with the mouse.
fwd 100
moves 100 on both screens
setxy 0,100
moves 100 on rescaled screen but 400 on unscaled other laptop
(reported ycoord is also wrong on other laptop)
comment:17 Changed 12 years ago by erikos
Tested with latest 107*:
- the text is bigger now, yeay!
- the label does ellipsize at the beginning, would be better to do that at the end
- rubber: what does the rubber mean in a shared environment? erase only my drawing or all of the drawing on my machine? Atm, when you use the rubber it does erase all of the drawings on your machine (should it only erase your drawings and leave those that are from another turtle (might be hard to do anyhow)?), a small oddity with that: when you use the rubber your turtle goes back to 0,0 and the drawings are erased on the other machine the turtle goes back to 0,0 (propagate the move) but the drawing does stay
- Walter, maybe in those cases you can use the new numbering scheme (107.1, 107.1.1...) to make it easier to recognize which version has which changes.
comment:18 Changed 12 years ago by walter
- AttributeError: TurtleArtWindow instance has no attribute 'heading'
A careless error on my part. Fixed.
http://git.sugarlabs.org/turtleart/mainline/commit/e46262988a4f02f1ebbcb6602f8d93fbd1dad907
- the label does ellipsis at the beginning, would be better to do that at the end
- Ideally, all the labels would be on a higher layer than the turtles.
This patch should take care of these.
http://git.sugarlabs.org/turtleart/mainline/commit/fe5a5552ebb1a2d1fb7930b31c631e23332b108b
- If you quit, your label remains. When you rejoin there are 2 labels.
Hmm. Not sure how to deal with that. I need to detect the disconnect somehow.
- rubber: what does the rubber mean in a shared environment? erase only my drawing or all of the drawing on my machine? Atm, when you use the rubber it does erase all of the drawings on your machine (should it only erase your drawings and leave those that are from another turtle (might be hard to do anyhow)?), a small oddity with that: when you use the rubber your turtle goes back to 0,0 and the drawings are erased on the other machine the turtle goes back to 0,0 (propagate the move) but the drawing does stay
It would be complicated to maintain separate drawing queues for each turtle (although in the Pango patch I wrote, that is how things work. But it is *very* slow.) I think the current behavior is anomalous but acceptable.
comment:19 Changed 12 years ago by walter
http://git.sugarlabs.org/turtleart/mainline/commit/c66c065ec761e167e68a63e2860c382f745b2eea seems to have fixed the duplicate label problem on a rejoin.
I think we are close!!
comment:20 Changed 12 years ago by tonyforster
"I think the current behavior is anomalous but acceptable" I am OK with it.
Yeah, I am not sure about the last part neither. It would be nice to somehow make it graphically visible that there is more than one turtle.
Another idea: maybe we can add something like a 'bubble' (see mockup attached) to the turtle including the nick when the turtle is in the 0 position or when two turtle are overlapping. Some anti-bubble-collision code would be needed for that.