Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2021-04-27 00:00:00Z and 2021-04-28 00:00:00Z
Avatar
  • Remove unnecessary usage of m_pMenus from implementation of CUIElementBase, to eventually remove the member completely.
  • Add a convenience method SetColor(vec4) to the IGraphics interface.
  • Minor refactoring of CChat:
    • Reduce unnecessary string concat.
    • Remove unnecessary variables.
    • Adjust some variable names.
    • Move variable declaration closer to its usage.
  • Remove unnecessary indiretion of CButtunContainer.GetID with equivalent usage of the pointer to the obj...
Avatar
I think after all of those refactorings the modding can start again and even easier than before :D. 👍
Avatar
at the opposite, it tends to make modding harder to maintain in my experience. that's a lot of code changes for few functional changes
18:06
refactorings generally discourage staying up-to-date with master
Avatar
with that I do agree. I mean new mods. Compared to 0.6 0.7 was a great improvement in regard to ease of moddability.
Avatar
I'm skeptical it makes a big difference to new mods, both for newcomers and people experienced with Teeworlds code. More abstractions does not (always) mean easier to mod
18:32
You don't seem to have an easier to compartiment the mod code or anything, you just have to go through a thicker layer of OOP abstractions
Avatar
refactoring must not necessarily mean abstraction? Clean and easy to understand code, good naming of stuff already helps a lot.
18:35
easier to grasp tools that the vanilla base game offers.
Avatar
Avatar
jxsl13
refactoring must not necessarily mean abstraction? Clean and easy to understand code, good naming of stuff already helps a lot.
in this case, it seems to?
18:40
not the last few commits but the general direction
Avatar
These are not refactorings that are very involved with modding, there are certain refactorings that would make it much easier to mod cleanly and encourage keeping up with vanilla changes but these are not it
Avatar
yes, definitely
Avatar
If we want people to keep up with vanilla we should build interfaces that allow building mods without messing around in the core components of the game. IGameController needs to be cleaned up and extended. CGameContext should refer more to the gamecontroller and maybe even get refactored a bit to make it easier to inherit from
19:24
These are the ones that come to my mind from trying to rewrite ddnet in 0.7, though it has been a while and I'm sure we could come up with more ease of modding changes
Avatar
yeah, this sort of refactoring I can get behind
Avatar
(and this sort of refactoring would also allow vanilla to more freely do the other sort as it'd only be touching parts of the code that mods wouldn't be touching)
Avatar
Add void str_utf8_stats(const char *str, int max_size, int *size, int *count) to base system for later use with text selection etc. Calculates size in bytes and count of utf8 characters of a string at the same time, while not exceeding the max size and not breaking multi-byte characters.
Exported 18 message(s)