Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[added] Two new components: Bell & Display #2008

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Apr 12, 2024

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

Description

[added] Load component Bell
[added] Passive component Display

This PR adds two new components.
They will probably not see uses in TDM, but will possibly be enjoyed by Sandbox players.
Feel free to suggest changes.

Bell

Will ring when powered.
Free sound taken from here: https://pixabay.com/sound-effects/ac-bel-105874/

Sprite ticking performance is good.
I checked with for (int i = 0; i < 10000; i++) loop around the code that sets offset and rotation of bell spritelayer and ringer spritelayer. With one Bell it is barely noticeable while with two, there is quite a bit of lag.
This result is satisfactory, because it means it takes 10000 Bells before there is lag just from the ticking. In reality lag starts happening when there are like 300~400 blobs just existing.

bell

Display

Will work like a junction that displays the current power number.
While it is possible to use g_debug = 1 in console to display power numbers, I would like an in-game way of showing it.

It can display from 0 up to 16, higher values will display Er, standing for "Error". In actual game-play, only 9 can be reached since power sources are coded to start with power 10.

screen-24-04-12-10-38-55

@NoahTheLegend
Copy link
Contributor

you should make display background color fully black probably. Dark green doesnt contrast with blue well

@mugg91
Copy link
Contributor Author

mugg91 commented Apr 13, 2024

@NoahTheLegend
Thanks for your advice. Although I think the color contrast is ok. I'm afraid making it fully black will look odd although it would be possible to give it a dark grey outline.

That being said, I added a commit that makes improvements to how Bell looks and animates.

Copy link
Member

@Vam-Jam Vam-Jam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work from my testing (I can not test the audio since linux).

When placing the bell, the blob appears to be semi broken.

I'm unsure about the screen's colour, it does look out of place.

@Vam-Jam Vam-Jam added feature pitch A pitch for a new feature or mechanic no functional change PRs with no gameplay change or visible bug solved; generally tagged for refactor PRs labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature pitch A pitch for a new feature or mechanic no functional change PRs with no gameplay change or visible bug solved; generally tagged for refactor PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants