f2e-spec
f2e-spec copied to clipboard
Theming and text positioning
Something else I stumbled upon due to the wrapping thing...
Performous is supposedly themable; however, I couldn't get most things to work. Initially, I even thought it was a bug but turns out it's not, it's just dumb. Positions are overriden by calls to the Dimensions functions and on most screens, things are hard-coded at certain positions.
What this means is, we're currently going to no small pain to read size and positioning data from svg files only to then dutifully ignore them (except, I guess, the rare case that might not be positioned to anywhere in particular in the code)
The way I see it, only two options here make sense: Either
A) Get rid of all hardcoded text positioning in the actual code and switch to using only the SVGs for positioning or B) Get rid of the bit of code that reads those things from the svg files if we're going to override them later anyway.
Anybody got an opinion?
It seems those options are the way it should be used. Besides hardcording data in performous makes it harder to theme since the assets have to be made in that specific way. So i'd go for option A) And remove all code related to it (to overwrite it)
Many UI elements are placed in code because they must adapt to different display aspect ratios, preserving UI elements on screen without overlaps, out of screen UI elements or black bars. This cannot be done well enough with SVG coordinates only. The floor reflection effect on songs screen is another thing that more or less needs to use hardcoded coordinates.
Refactoring it in any way is going to be a lot of work, and I don't see anyone wishing to make custom themes in the first place.
I would suggest spending your development effort in improving the gameplay and graphics (especially the dance mode is ugly and would need to be improved). Everything around the actual game doesn't matter that much, and internal restructuring that cannot even be seen by the end user is lost effort at this stage.
FWIW, getting a new release published would be a good start before making any structural or feature changes. I wish you luck!
For future reference, the smart thing would be to use HTML5 for UI/themeability, and interface with Chromium Embedded Framework to do the rendering. It is a lot faster than what we are currently using, and would allow major freedoms in theming (CSS effects, Javascript animation workers). Even simple things like text shadow effects are a major pain with Inkscape/SVG.
Many UI elements are placed in code because they must adapt to different display aspect ratios, preserving UI elements on screen without overlaps, out of screen UI elements or black bars. This cannot be done well enough with SVG coordinates only. The floor reflection effect on songs screen is another thing that more or less needs to use hardcoded coordinates.
True; I'm talking specifically about text, though. SVG positions does actually influence textures.
I don't see anyone wishing to make custom themes in the first place.
Pretty much, yes.
Refactoring it in any way is going to be a lot of work
I'm already refactoring the way text is rendered and making pretty good progress. I stumbled upon this when I noticed some odd results resulting from positioning menu options and text-wrapping.
I would suggest spending your development effort in improving the gameplay and graphics (especially the dance mode is ugly and would need to be improved). Everything around the actual game doesn't matter that much, and internal restructuring that cannot even be seen by the end user is lost effort at this stage.
The text issue I'm already working on is pretty important IMO; this issue is just hair-splitting but I thought it best to bring it up as something to check in the future, before I forgot about it.
FWIW, getting a new release published would be a good start before making any structural or feature changes. I wish you luck!
Chromium Embedded Framework
That sounds like a pretty good idea for sometime down the road.
Dear all, I vote for option A. I made a total re-design "performous+" here: https://github.com/performous/performous/pull/920. (All free, nearly anything based on pixabay license) I talked with my designer friends. They would be more interessted if theming was easier.