haldric
haldric copied to clipboard
Learning from old mistakes
We discussed the things that we want to have in our prototype. What might also be interesting to know, especially for the new volunteers, is what mistakes we don't want to repeat, which have been made in the Wesnoth 1.x. series. So please, go ahead and tell us what the mistakes there were and how we could improve on that!
Stop exposing yourself in public.
Wesnoth 1 has far too many subsystems which would be good except that what should be private implementation details are public interfaces.
I'm not quite sure what you mean. Could you give an example?
I guess he means that you should only make vars/methods public that should be used by others, and keep the internal ones private so they don't get used/accessed outside of the module/sub-system.
Well that's somewhat probematic given that gdscript does not support encapsulation.
Using an underscore to mark private methods like _methode
should be enough (though I don't know if this changes any behaviour in gdscript because its python similarities)
yeah I'm generally using underscores to mark functions that are not supposed to be called, but gdscript does not prevent you from calling them anyways.
Perhaps a loose coding standards document should be drawn up then solidified once the majority of the project has been prototyped
@spartanatreyu while not enforced everywhere (yet), we do follow this style guide: https://docs.godotengine.org/en/3.1/getting_started/scripting/gdscript/gdscript_styleguide.html (also linked in the CONTRIBUTING.md)