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

Remove SwiftGodotKit dependency by implementing parser directly #2

Open
PadraigK opened this issue Oct 13, 2023 · 1 comment
Open

Comments

@PadraigK
Copy link
Owner

PadraigK commented Oct 13, 2023

Binary size, build time and execution time could be improved a lot, if it wasn't depending on Godot's parser.

A fun thing to do would be to write something that could pull out the relevant parts of TSCN files, and then we could drop the SwiftGodotKit dependency.

TSCN file format
CPP File where Parser is implemented

@PadraigK
Copy link
Owner Author

This might not even be a good idea, since:

  1. The currently parser has been well lived on and is on the critical path for any Godot usage: it's probably very good and has already seen all the edge cases that only show up as you process 1000s of projects.
  2. We are currently guaranteed long term compatibility with Godot, even if they overhaul their formats.

But:

  1. The formats are extremely simple and should not be complicated to parse.
  2. It would be fun to implement 🤔 🤔
  3. Godot 4 migration from 3 is still ongoing and I feel safe in betting that a big transition in storage formats is not something coming anytime soon.
  4. The SwiftGodotKit dependency is heavy and makes it hard to ship SceneGen as a simple executable
  5. SwiftGodotKit currently spits out a lot of debug info on the commandline when we run SceneGen, though this is probably solvable without reimplementing the universe, I just haven't tried yet.

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

No branches or pull requests

1 participant