Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor v2: Project and Contributing #2486

Open
LordSk opened this issue Mar 11, 2020 · 6 comments
Open

Editor v2: Project and Contributing #2486

LordSk opened this issue Mar 11, 2020 · 6 comments
Labels

Comments

@LordSk
Copy link
Member

LordSk commented Mar 11, 2020

I've been working on remaking the editor for quite some time now and we recently decided to make a public branch to make it easier to follow and contribute to its development.

The Project

As stated in #1301:

Redo the editor by using the client ui and clean it up or use something else.

Now this is pretty vague so here is what I planned so far:

  • Start from scratch, write simple and stable code
  • Undo/Redo (history) as a primary feature and foundation
  • Feature parity with the old editor where it makes sense

Then improve on it:

  • Editor console: Every action should have a corresponding command (when it makes sense)
  • Customisable binds
  • User friendly "envelope" editing. Something like Adobe After effect, easy to edit timeline and animation recording.
  • Better "quad" editing. Most of the time the user simply wants to position and scale an image.
  • Default map templates: User selects "Medium jungle map" and everything is set up for them.
  • etc

The important part is to think about the editor from a user perspective, not as a developer tool like the old one started out as.
As an example, changing a layer/group's order is done by dragging and dropping, as opposed to the old incrementing/decrementing the "order" number.

What is done so far

  • The history system
  • Map loading / saving (saving is broken though at the moment)
  • Layer and Group creation, deletion, reordering
  • Layer details: Size, clipping, colour, etc.
  • Tilemap editing. Painting, automapping.
  • Various UX features: Game view, highlight layer on mouse hover, grid and more.
  • Temporary UI solution
  • (I'm for sure forgetting stuff here)

Contribution

There is now a new editor branch which I am in charge of, alongside with @oy. Same contribution rules for the master branch apply, plus a few more.
This is very much a work in progress (as opposed to the rest of teeworlds which is mostly done), which means the source code is a lot more volatile and temporary. The end goal vision is more important than how we get there.

Do:

  • Every pull request should fix (at least partially) an issue. If no issue exists for the problem, open one.
  • Make the most direct and simple code possible (like this).

Don't:

  • Refactor code. As tempting as it may be, a lot of the code is not final (like the UI stuff for example), so these efforts will be wasted. Refactoring will become obvious at some point, at which we'll open an issue for it.
  • PR without opening an issue first (except for very small code changes)

What's next

I will open issues for what needs to be done, but here is a broad overview:

  • I would like to have tilemap editing nailed down properly, it must feel great from a user perspective.
  • Remove / change tools.
  • Think about the quad / animation system.
  • Expand teeworlds console system to replace the temporary editor one.
  • Expand teeworlds bind system to use in the editor.
  • Finalize the UI (it could look like this concept from Fisico).
  • Use teeworlds UI instead of the temporary editor one.

Conclusion

If you would like to change anything about this project (you don't like the colour purple for example), I am completely open to suggestions. You can find me on the teeworlds discord and irc channel, I'm @LordSk, or here on github of course.

Here is a bonus 'making of' album of screenshots: https://imgur.com/a/Wq7QRYA
And a few videos:
https://www.youtube.com/watch?v=Og05YbFIi5s
https://www.youtube.com/watch?v=sCs3a3Uz8cw

@LordSk LordSk added the editor label Mar 11, 2020
@Robyt3
Copy link
Contributor

Robyt3 commented Mar 12, 2020

Very nice. I'll take a closer look next month and rebase #2469 if required.

What to do about other "editor"-tagged issues? Should all editor work go towards the new editor instead, or should issues for the new editor be tagged with [editor2]?

Can we split the editor files into multiple components sooner than later? A single 5000 LOC file is hard to work with and will result in more merge conflicts. Something similar to MVC:

  • editor (model)
    • editing core (commands, history, storage)
    • has console command interface
  • editor_ui (view)
    • all UI and DrawRect functions that are agnostic to the editor
    • clear interface that shows what the refactored overall UI will have to support for the editor
  • editor_menus (controller)
    • UI representation layer for editor core

@ChillerDragon
Copy link
Contributor

So will the editor console be separate from local client console? Having its own config file?

@AssassinTee
Copy link
Contributor

You (or we) should really split the classes in editor.h into multiple files, it's still 1000 lines long, which is still better then 5000. Is the current version working? I already found (and fixed) some issues with the automapper.

I think @Robyt3 is right, we should add an editor2 flag

@LordSk LordSk added editor2 and removed editor labels Mar 14, 2020
@LordSk
Copy link
Member Author

LordSk commented Mar 14, 2020

Alright, new label [editor2] created. I'll also split the files and start opening issues.

So will the editor console be separate from local client console? Having its own config file?

Yes and no probably.

@Fisico
Copy link
Contributor

Fisico commented Mar 14, 2020

If you need more UI concepts, let me know. I did not just design it I also thought about usability. I hope these ideas are transported with the screenshot. But I fear not.

The idea was, to create tools like in other pro software, Brush-Tool Move-Tool, Selection Tool, Quad Tool, etc…. I should work as simple as possible.

@oy
Copy link
Member

oy commented Mar 15, 2020

All editor work should be done for the new one. When existing editor issues are already fixed in the new one they can be closed. Will close active pull request for the old(current) editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants