Skip to content

Added some controls.#1

Open
YBTopaz8 wants to merge 1 commit into
taublast:mainfrom
YBTopaz8:main
Open

Added some controls.#1
YBTopaz8 wants to merge 1 commit into
taublast:mainfrom
YBTopaz8:main

Conversation

@YBTopaz8

Copy link
Copy Markdown

Tested on smart watch and should be looking good (at least work good) Works good on WearOS, even android TV (at least Android Marshallow)

Tested on smart watch and should be looking good (at least work good)
Works good on WearOS, even android TV (at least Android Marshallow)
@YBTopaz8

YBTopaz8 commented Feb 13, 2025

Copy link
Copy Markdown
Author

Will sure sit down during weekend to touch the UI again lol
Glad to see that drawing and connecting worked though

@taublast

Copy link
Copy Markdown
Owner

Thanks a lot for this PR!

image

I tried playing with these: maybe arrows should work when we are pressing them and not when we short-tap them?
Also currently this HUD is drawn from scratch on every frame, instead we should use drawnUi: once created this layer would be fast re-drawn every frame from cache (image/operations depends on complexity of the hud).

Couldn't merge this one for now because actually:

  • much more refactoring than new feats like 80/20 making it difficult to consider
  • not as fps-effective as it could be, critical for a game
  • hud is not optional, we must not have it on desktop at all

Maybe I should create the optional HUD layer, and you could adapt it to your needs, add any buttons there etc, how's that sound?
What would you get:
1 more separation between hud view and doom rendering logic
2 hud would be graphically complex while easy to draw
3 would redraw faster
4 gesture handling would be more touch-friendly
I hope to be able to work it out this weekend.

My bet is the community would love to see this running on watchOS, can we collaborate on making this happen?

@taublast

Copy link
Copy Markdown
Owner

Hey some good news, watch os is getting hardware acceleration: mono/SkiaSharp@2245753

Soz for delay will add options layer this week, another good news will be done with not with Xaml but with fluent extensions, I guess people will love it :)

@YBTopaz8

Copy link
Copy Markdown
Author

I guess it's good news for others.

Bums a bit for those who prefer xaml like myself 😅

Looking forward to that.

Been working on this PR on and off, so I guess I'll wait first then

@taublast

taublast commented Mar 8, 2025

Copy link
Copy Markdown
Owner

Just pushed some code to main:

strife.mp4

The hud is showing while playing only, not in menu. It's disabled by default to enable need to set flag inside MauiProgram

@taublast

taublast commented Mar 8, 2025

Copy link
Copy Markdown
Owner

We now have:

Whats New

  • Sound fixes for Android, using new sound nuget
  • Added MainPageCode to create UI from code-behind to profit from C# HotReload
  • Added example for displaying custom HUD while playing, enable with MauiProgram.ShowKeys

So normally must be faster to play with code as we have c# hotreload now working.. That is the main reason I created the keypad by code and not xaml, this lets us to reload app after any change made somewhere deep inside the engine etc..
Please feel free to play with this basic example, I hope it could be useful as an example of using drawn controls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants