Neverball / neverball

Tilt the floor to roll a ball through an obstacle course before time runs out.
https://neverball.org
Other
344 stars 79 forks source link

Support for level names #248

Open camthesaxman opened 2 years ago

camthesaxman commented 2 years ago

I think a nice feature would be to support actual names for levels and have these display in the UI during gameplay, similar to how it is done in Super Monkey Ball 2. When discussing levels in the community, it would be easier to refer to a level as "Stairs" instead of "Medium 12", for example. Some level sets (like Nevermania) already try to display a level title at the beginning of the level's message blurb. The levels have filenames, but the only place this is displayed in-game is on the level select screen underneath the screenshot. I think having an optional field in the .map/.sol format would be a solution.

Thoughts on this?

KodeBreaker-Has-SWAG commented 2 years ago

I like it, I second this!

camthesaxman commented 2 years ago

The question is how this will be implemented. Should we add a new attribute (call it "title") to the root entity of the map, or should we use special syntax (perhaps the "=Title=" like Nevermania and KodeBreaker's sets do) in the "message" attribute?

Where do level names come from in Quake games?

parasti commented 2 years ago

I think you are focusing on the wrong thing.

Level names are already possible and you have already pointed this out: Nevermania levels all have names. No file formats were changed to achieve this.

So ask yourself, if level names are already a thing, what is it you are really trying to achieve here? So you have a level name in the SOL file - now what? What do you use it for? That's what you should be focusing on in this discussion.

camthesaxman commented 2 years ago

Basically, I want to make it so that it's easier to tell which level you are on during gameplay. Currently, this is only shown when you first enter a level in the st_level screen (which people commonly gloss over), but never again, not even after retrying the level or pausing. The idea I have is something like my #156 PR, where the level is shown in the HUD, except I'd like to show a "friendly" name for the level as well as the number (just like Super Monkey Ball 2 does).

camthesaxman commented 2 years ago

Here is a screenshot as a proof of concept. screen00001

parasti commented 2 years ago

I see where you're going with the SMB2 reference, but given the amount of text and the default GUI look, this looks really ugly.

Some ideas to try: no background, smaller font size, less text.

The location of this also overlaps either the camera popup or the FPS counter.

KodeBreaker-Has-SWAG commented 2 years ago

I have an idea for this so it doesn’t obstruct the view. Maybe have it show only in the pause menu for the level? This way doesn’t obstruct the gameplay nor overlap camera and FPS.

camthesaxman commented 2 years ago

I agree, this text can be a bit much. I am using the smallest font size (GUI_SML), and I don't really want to add a smaller one just for this.

The pause screen seems like a good idea. I'll see how well that works.

As far as friendly level names go (which I decided to call the level's "title" in the code to avoid ambiguity), if the first line of the level message is surrounded by equal signs, I use that as the level's title. Otherwise, I fall back to "Level 02", etc. A large portion of the custom level sets use the equal sign convention. However, none of the preinstalled ones (besides Nevermania) do, so those may need to be edited if we want them to have proper titles.