Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2020-09-23 00:00:00Z and 2020-09-24 00:00:00Z
Avatar
wasnt teeworlds meetup funny?
Avatar
i had seen some pictures from it, somebody was drawing mapres, someone was coding, table full of food and a bbq at the end (edited)
Avatar
who works during meetup
Avatar
uh, it wasnt called as meetup
20:08
idk how was it called xd
20:09
and site with these pictures is gone
20:09
eh, need to use wayback machine
Avatar
@TsFreddie the assert on group layer count is intentional. Obviously this is not something we want to keep in the editor in the future, we want to inform the user of the limit reached and cancel.
20:22
As for the others, if you're not sure open an issue or @ me
Avatar
yeah. was wondering.
Avatar
the editor is still very much work in progress
Avatar
noted
20:23
read that wrong
20:23
but still noted
20:25
for the history thing. i was thinking having a mapui entry and a uionly entry
Avatar
map UI?
Avatar
Map + UI snapshot / UI only snapshot
Avatar
I'm not sure I follow
20:31
could you elaborate?
Avatar
like if you change something in the map. you take a snapshot of the map and the tools/layers right?
Avatar
yes and those are separate
Avatar
what if when user only changes tools/layer, we also take a snapshot of only UI changes.
Avatar
yes and how do we determine what state to roll back to then?
Avatar
it might be easier for me to wrote a code draft
Avatar
or make a drawing on paint, those work too 😄
20:44
how about thisEeveeShy
20:45
also we can check if the last entry is a UI only entry. if it is, we update it with the current ui snapshot instead of adding a new entry. (edited)
Avatar
so you want the user to be back at editing layer 2
Avatar
pretty much
Avatar
which is the UI state the user was at when the last map snapshot was created
20:49
right? User edits layer 2, it creates a snapshot entry
20:49
(map entry)
20:50
and let's say we do a bunch of edits after this one, when we go back to the layer 2 edit we want to be on layer 2
Avatar
yes.
20:52
so to the map state of "MAP CHANGES ON LAYER 1" and the UI state of "SWITCH TO LAYER 2" if that make any sense (edited)
Avatar
Ah so this is different
Avatar
yeah, that explaination was pretty bad.
20:53
my bad
Avatar
don't worry about it 😄
Avatar
well in that case maybe we don't even need to do seperate type of entries (doesn't make any sense) (edited)
Avatar
so you want a different behaviour than what we have right now
20:53
which would be, the user gets back at editing layer 2
Avatar
yes. because when I switch to layer 2, made an edit and undo. i would expect to stay on layer 2
20:54
instead of whatever layer i changed last time
Avatar
but this is what happens currently right?
20:55
we stay on layer 2?
Avatar
i don't think so
Avatar
ok let me have a look
20:56
ok you're right
Avatar
thonk
🤔 1
wuhmm 1
Avatar
I would also like the user to stay on the same layer indeed
20:56
I think this is what I intended
20:57
well, it is pretty hard to tell whether it was a bug or a decision.
Avatar
currently when we create a map snapshot, we also make one of the UI (a basic one)
20:58
but that does not work too well
21:01
i think this makes more sense
Avatar
when is the map snapshot created on your graph?
Avatar
one sec
21:06
21:08
each one created after the action. (you can see the action 1 2 3 4 as mouse clicks)
Avatar
ok
21:08
so let me draw you something as well
21:12
21:13
ok it turned out bad
21:13
anyway
21:13
black is the map history
21:13
red is the UI
21:13
right now they are synced
21:13
which we don't want
21:14
we don't want the first UI snapshot entry
21:14
I'm not sure this is a good explanation 😄
21:15
and actually the drawing is wrong one sec
Avatar
so you restore different pairs of the history depends on if you are undoing / redoing?
21:16
so in english
21:17
we load the map, save the first snapshot (and the first UI state)
21:17
we then click on Tile 1, make a change then undo
21:17
we end up back on the state we loaded the map in (with the Game layer selected)
21:18
so instead, we don't create the initial UI snapshot
21:18
so when we undo we don't move from Tile 1
21:18
does it make sense now?
Avatar
kinda?
Avatar
did you take a look at the snapshot code already?
Avatar
i did
Avatar
so you know we go up when undoing (we move to the parent entry)
21:21
if there is no parent, we don't move up
Avatar
so in my example we have 2 map snapshots
21:22
[initial] -> [tile 1 change]
21:22
and one UI snap
21:22
[select tile 1]
21:22
so when we undo (go up)
21:23
we en up with [inital] (map) and [select tile 1] (ui)
21:23
yes?
21:23
so we don't want the situation where we only undo a tool / layer change?
Avatar
so this is the behaviour we want
21:24
do you expect to only change the UI state when undoing?
Avatar
like after you end up with [initial] (map) and [select tile 1], i would expect to have the ability to undo once more to revert back to the complete initial state [initial] (map) and [game tile layer]
Avatar
I don't think most people would expect that behaviour
👍 1
Avatar
we i guess i'm weird lol
Avatar
usually ctrl-z is for actions that do something
21:27
moving UI stuff/a text cursor doesn't get ctrl-z'd
Avatar
but it's probably not that hard to implement that behaviour as well if you want to test it
Avatar
but it did change something on the screen
21:28
even it is only on the ui
Avatar
when you move your text cursor on word/sublime text/vscode/whatever, if you press ctrl-z, it won't undo your text cursor movement, but the last thing you actually changed to what you are editing
Avatar
i don't think graphics editor and text editor are comparable tbh
21:30
but yeah, both cases should be pretty easy to do. maybe we can actually build both to just get a feel of them (edited)
Avatar
yes
Avatar
maybe even a setting
21:31
^ probably not
Avatar
probably not
Avatar
yeah, i do want the editor behavior to be stable so tutorial wouldn't be out of sync or anything.
Avatar
thonk made two simple hack for demoing. obviously will redo the implementation on the one we choose.
22:02
the one without "noui" is my idea.
22:03
only affect layer changes, again, for demoing.
Exported 123 message(s)