thombruce / verse

🚀 A universe in progress
Other
8 stars 0 forks source link

Start Menu #20

Closed thombruce closed 1 year ago

thombruce commented 1 year ago

closes #17

By submitting this pull request, you agree to follow our Code of Conduct: https://github.com/thombruce/.github/blob/main/CODE_OF_CONDUCT.md


Internal use. Do not delete.

thombruce commented 1 year ago

Marked as draft.

It's messy but it gets the job done. I've littered some TODOs throughout to be addressed before this gets merged.

It's also worth refactoring a little and making some considerations about file structure. For instance, the menu blink effect currently lives in state and is used by the "menu" in menu.rs and the pause screen in state.rs. The state file is not the place for it - perhaps it should find its way into a new ui.rs or ui_effects.rs, something like that, where it can be imported and used by either the menu or the pause screen.

I believe some tidying up is due in terms of function and struct names, too.

The main thing though will be intelligent usage of state conditionals and OnEnter and OnExit. The state system is new, and this is pretty messy right now. Good opportunity to clean it up for ease of use in the future.

thombruce commented 1 year ago

Todo

Important to check number one off in particular before next release. Though I believe the attribution given already is largely sufficient, I really just want to provide in-game attribution anyway.

thombruce commented 1 year ago

Easiest way to handle credits at this time:

From StartMenu, press 'C' to switch to Credits state. Press 'Enter' or 'Esc' to return to StartMenu.

In a credits setup function, spawn text bundle(s) with the attributions.

Other things worth adding to the credits:

Ideally the credits would scroll, right? Particularly if they get too long... we'll have to work that out later.

Also ideally we'd be able to load the credits from a file. Maybe not markdown but... JSON or... I dunno. Is this natively supported or do we need something like bevy_common_assets for that? (I've struggled to set it up previously; perhaps I'd have a better shot at it now.)

thombruce commented 1 year ago

All of my messy todos are cleaned up and the state module is a lot more lean and fit for purpose. There are still systems I could do with generalising and activating based on components... but for now, this is good.

Last thing before I'm satisfied and can merge this is to add credits in some form. No need for loading from a text file yet if it proves too difficult, but we should have a credits state and give attribution for used resources.

thombruce commented 1 year ago

Credits were implemented on a simple toggle using the 'C' key (or 'North' button on controllers [PlayStation triangle, XBox Y, etc.]) due to an issue where StartMenu was immediately switching back into credits after exiting, but I'm satisfied for now.

Everything else can be bumped into the future - what needs to be done is done.