#0.14 Bevy Jam
8325 messages Β· Page 9 of 9 (latest)
Ooooh right
my trailing newlines get deleted on save, idk why
cool beans
approved π
I was thinking about pausing and the settings menu recently
I think it makes sense to wait with those a while until the current code has been bikeshed
Because the template is in a really solid spot right now imo
what do you think?
yeah i agree, there's other stuff to work on before adding more code
would make refactors / bikeshedding take more work
cart and francois haven't reviewed the template yet so there may be more changes requested
I'm a bit burnt out on CI right now, but I'd love to get https://github.com/TheBevyFlock/bevy_quickstart/issues/200 in
Removing the permissions stuff from the guide would be cool
that and support for workspaces would be nice
Agreed
also i'd like to put all the images in the workflows doc behind details sections
so you can see the bigger picture at a glance
Good idea!
I'd also approve a PR for the debug UI. I've seen your post about toggling it at runtime and it seemed a bit convoluted, so I didn't try implementing it
ive got an implementation for it already
Ah, really?
that's already it???
heh yeah that's all it takes
I thought it was way more convoluted π
well and adding the cargo feature in dev builds
i think it's just included in bevy/bevy_dev_tools though
We could add that right into /src/dev_tools.rs
yup
Since we lack the core mod
the more convoluted thing would be toggleable diagnostics logging: https://github.com/benfrankel/bevy_jam_template/blob/main/src/core/debug/diagnostics.rs
Oooooh so that's what I was reading
ah ic
also in this case it's toggled not by a key press, but by hot reloading a config file
with some bools in it
but in bevy_quickstart it would probably just share the F3 toggle key + some UI in the settings menu when that exists
for path in to_enable {
c!(store.get_mut(&path)).is_enabled = true;
}
The absolute raw power of tiny_bail in action 
yup, plus you get the information that this is expected to succeed, whereas cq would mean expected to fail
F keys are pretty bad to use on macBooks FYI
oh really
And some other laptops
Yeah, I've got a touch bar where the F buttons would be. I can make it display F keys by holding the fn key on my keyboard
or backtick
Which works, but it's a bit meh
want to avoid using a keybind that the user may want for actual game stuff
Same for many laptops that have their F keys set to just change brightness etc. by default and require pressing a modifier
sec, my rats are eating something and I need to check what
np
fuckers ran away
Backtick is often used to enable dev consoles
so there is a precedent for using that for debug stuff
okay, should be good enough as long as it's defined in a single place so it's easy to change
π
i'll make a quick pr cause this should be easy
Right there in the dev_tools.rs, I'd say
I would not start a keybinding abstraction or such
because the real answer is to just use LWIM
KeyCode::Backquote mm okay
yeah no i'm not even using LWIM for this in my template. cause it's just for debugging
Yeah, put that behind a constant in the same file and we're good
Fair enough
Until you want to debug while holding a controller, I guess
I think I've never gotten a full project working with controller anyways
But the newest LWIM release makes me hopeful
I read that but didn't get it
it's so tricky. there are a lot of subtle bugs
what was that again?
if you have key A held down which is mapped to some action
then you enable the action (from disabled) while the key is still held down
it sends a just_pressed
even though the user didn't "just press" the action
they've been holding it down
so for example if a user cancels my text input state by pressing Escape, it will immediately trigger a pause game action when i re-enable that action because Escape is still pressed (unless the user managed to press Escape for exactly 1 frame)
So, the timeline is:
- Action disabled
- I press A
- I hold A
- I enable the action
- It sends
just_pressedinstead ofpressed?
yes
Ooooh I see!
Great fix then π
even if you press A before the action is disabled, in which case you would get two just_presseds from one key press
or even more if for some reason the game keeps disabling / re-enabling that action :p
Can't have text input bugs when you don't have a text input 
This is great π
Where should we document this? Right in the readme?
maybe where we mention dev_tools.rs in the project structure section
Good idea
Could you add that to the PR? Looks good otherwise
done
The way you wrote it kinda implies that the entire plugin, including transition logging will be toggled
But eh, it's fine
Approved
The code is simple enough for people to find out what it does π
yeah hard to be more specific
for now π
btw, don't forget to update cargo-generate after you merge a PR
right
Can you not automate that?
we should be able to, it just hasn't been done yet. there's an issue for it
what's your workflow for merging main into cargo-generate?
git switch cargo-generate
git pull
git merge origin/main
git push
ah ok
Yeah, I imagine a workflow that the cargo generate tool excludes for users should work. Even better if it created an issue on merge conflicts.
Ping @lunar sail @obsidian ravine in case any of you two feel like doing some easy workflow stuff π
Nice work doing this. I forgot to say I also added this myself during the jam so meant to suggest it. Backtick is a fine choice. I put mine under either Delete or Backspace (canβt remember which) and I put Inspector Egui on the other one. Works well on macOS at least.
in my own code i toggle the entire bevy_editor_pls window with F4 π
by toggling the window entity's visibility
And you toggle the game with Alt F4
Huh, that's pretty close to macOS, where it's Cmd + Q
yeah my caps lock is mapped to "super key" which is the "Windows logo key"
so basically the same thing
yep it's super convenient. it's not just caps+Q, every alphabetical key does something different
window management stuff
the digit keys do something too actually
caps + enter opens a terminal window for example π
Oooo that looks fun
here's the issue for context: https://github.com/TheBevyFlock/bevy_quickstart/issues/129
workflow permissions before and after for the build job which requires Contents: write to upload a GitHub release
other jobs will have even further reduced permissions, plus users won't have to do the setup step of enabling write permissions repo-wide
tested in bevy_jam_template, works fine
oh that's great π
good job!
I suppose the whole itch.io shebang still works?
yup
the only thing that required any non-default permissions was the github release step
i edited workflows.md a bit as well
i'm only seeing it rendered now though
hmmm markdown doesn't work inside <summary></summary>
Yeah, I noticed that as well 
using HTML instead seems to work
Good job with the edits, it reads way nicer now!
this also avoids the error when you first create your itch page
if you don't set the type of project to HTML before you have a web build available, there will be no error
Yeah, that's smart π
ok im done making tiny edit commits lol
The one thing that reads a bit weird now is this
It's like "here's random env vars" and telling you you can edit them. But what are they? Why would you edit them?
Hmm, the old version was not much better
Fair enough then
Approved
Nice, I like how much simpler it is now.
yeah i guess so, all that info is in the comments
which you would have to expand to see
could write something like
Maybe something like "Your primary way of configuring the release workflow is through environment variables"
... contains a list of environment variables to configure the release workflow
or that
Yeah that's good too
Wanna do a quick follow-up or should I?
I'm a bit distracted by making sure my rats are not killing themselves while running around the living room
i'll do it rq. i'll make it a separate sentence, before the expandable section
(I swear they try their best)
the whole doc is so much smaller now that we can afford an extra line heh
It's really really clean now. Good work!
@hollow bluff where did you get your button sounds from? I would love to use them in the template, but I cannot find them in your credits.
In case you made them yourself, are they CC0 or CC-BY?
@bitter sparrow could you take a listen?
it's not perfect, but should at least be better
do you use the gh cli to check out a pr?
usually, yeah
sounds fine but it's quiet
That's pretty intentional
The sound as it was was too loud for repeated use
I wanna be careful here since I expect a lot of people to use the same sound effects again
So I think it's best to err on the side of a bit too quiet
if it's too quiet it sounds like a bug
Button hover doesn't really need a sound at all really, that's just a flourish
I can make the click sound louder, but hover gets annoying real fast
That is completely true
Or have it semi-integrated with the background music
would be nice to be able to associate volume / pitch randomization interval / etc. metadata with the sfx file path
but we don't have a design for that rn
By using an instrument that also appears in the BGM with a high attack
yeah, that should be easy with the current design
But I wouldn't include it
would that be like
replacing Handle in the map with struct Sfx { handle, .. }?
it's interesting though, we have settings for images
setting the image filter mode
does audio not have something similar built in?
It's all getting reworked because audio has infamously very little built-in
So maybe, but I would not count on it
Yeah, or the hacky variant of just checking the path in the play function π
I'll replace the OnPress sound with something a bit louder and more distinct
ok
Could you check again?
I tried to go for something I wouldn't mind hearing in an ingame menu as well
It's also louder than before.
approved, it's an improvement over the current sfx
triggered 0.1.0 release instead of v0.1.0? :p
you're not wrong about this. a lot of games kept the Escape -> return to title screen as well
i hit credits and hear the kevin macleod song every time it's so funny
Yeah, I got a real pavlovian response when I recently heard it in a YouTube video π
That one already killed my progress in one game accidentally haha
I think itβs nice that thanks to the template quite a few jam entries have a Bevy splash screen
yeah i like seeing the bevy branding, especially when they modify the logo somehow
whether that's allowed or not aside, it's cool
I wonder if the splash screen could be generalised a little to move through a vec of images? I did something like that for the jam but it was a bit hacky and had a warning I couldn't figure out.
But if you can add images by just adding something to a vec it's seems much more likely people will keep the bevy image
It's explicitly not allowed without cart's approval π
Could you elaborate on that? Like displaying multiple splashes after another?
yeah showing a sequence of images with fade in / out for each then transitioning to the title screen. And allowing users to add their own images by just appending a handle / path to the vec of "splash images"
Someone even modified the splash and changed the license text of the logo to say MIT π
Now that is cheeky
I hacked it together in the jam by adding a mut splash_screen: Local<u8>, to the check_splash_timer system and just showing one screen after another
That would be neat, but I doubt most people have an own splash
true. probably not for a game jam lol
Although some entries hacked in an Avian splash, which was cool
That's a decent implementation imo. You could also have a resource that is being drained. Not sure which variant is better.
yeah was just thinking about a resource. I'll have another go and submit a PR for discussion if I get something I'm happy with
an animation for the bevy splash would be cool too
like the one in that one video
Yeah, I love that one
Apologies if this video comes off as too negative.
I rarely talk about my mistakes so I figured it would be good to critically look back at what I've done so far.
=== Wishlist Astortion on Steam ===
https://store.steampowered.com/app/1993980/Astortion/
=== Support the Channel ===
https://www.patreon.com/aarthificial
=== Livestreams on the Sec...
@bitter sparrow @obsidian ravine @prisma delta
I released a new version of cargo-cache with the latest fixes, v2 should pick it up automatically :)
(PS: Is there a better channel than this one to talk about cargo-cache development? π
)
I thought GitHub actions only worked via tags and didnβt really have a concept of "version" per se? Or does it actually resolve tags according to semver?
No, I just moved the v2 tag to the newest commit :P
btw this is relevant #ecs message
instead of registering the one-shot every time the button is spawned, we could have used a newtype MySystem(SystemId), then Local<MySystem> and impl FromWorld for MySystem to register the one-shot once
Huh, that's an interesting pattern, didn't know about that one. Thanks!
got a trivial fix
@bitter sparrow ready again
putting JustifyContent::Center on the label to center it is whacky
it works because we spawn the label as a node with a text child
does it not get centered by ui_root already?
actually even the label node already has JustifyContent::Center. so i don't think that does anything
returning EntityCommands from label but it's pointing to the container entity and not the one with the Text component is weird
True
The container, but not the text inside
Try it, it actually does have an effect
for the text inside that should already be handled by the container's style
Yeah, but the container says to justify with flex start in that PR
looks centered to me?
That without the manual insert?
that's just main branch
It's a bit whacky in places, agreed
What should I do in my PR?
i'll just approve it it's w/e
awkward
there's no reason, it should be
Alright, alright, I'll merge it now π
no i already merged it before you said that i mean heh
we need to pull in bevy-inspector-egui so we can do UI without dying
and then remove bevy-inspector-egui after 
I'm not a UI person, so I'll just clean up some low-hanging fruits
okay, i'll make another pr after that then
honestly, it's probably faster to set up bevy-inspector-egui before working on a UI PR then remove it before submitting, than it would be to recompile 50 times
hold up
This does not accept BackgroundColor?
The heck
Or at least impl Into<BackgroundColor>
smells like bug
do you really want to do with_background_color(BackgroundColor(Color::foo))?
When that is in a constant, yes
have that as a Color in the constant
Yeah, but I imagine someone might want to have BackgroundColor as a constant for type safety
sure, it would be reasonable to support it, but in most code we probably should just be storing colors
Fair
another thing that's weird is with_text_justify(JustifyText::foo)
always feels wrong when i type that out
i think it's because it should be something like "with text justifytext"
because justifytext is a field of the text component, not a separate component
but nobody's gonna be confused by with_justify_text
I had way more, like an fn width(&mut self, width: f32) and fn centered(&mut self) on widget
Which worked, but turned the UI code in the credits into spaghetti
didn't like it, so I reverted it
yeah i prefer to overwrite the Style wholesale for custom styling
also on the topic of Style, not suggesting this for bevy_quickstart but i have my own extension trait for it: https://github.com/benfrankel/bevy_jam_template/blob/main/src/theme/layout.rs
so i can do stuff like this:
commands.spawn(Style::COLUMN_MID.full_size().node("Title"));
which spawns a NodeBundle + Name component using that style
or for customization:
Style {
margin: UiRect::vertical(VMin(9.0)),
row_gap: Vw(2.5),
..Style::COLUMN_MID.full_width()
}
That's hot
Are y'all still able to post here?
test
#1034543904478998539 for bevy_quickstart π₯Ί
Yeah, let's do that π
moving to #1271949921708146770
@bitter sparrow @slender belfry I'm beginning to work on automatic cargo-generate updates. Would you prefer using merge commits or rebasing off of main?
Rebasing is far cleaner, since it just shows the commits that actually make the branch different, but is less transparent than merge commits because it requires force pushing
Pretty sure we dont allow glob paths in there
Though the snippet infra hasnt been touched again since its initial implementation so its rather lackluster (as evident by only support 3 kinds as well)
Are we re-opening this channel for the 0.16 Bevy jam? (And if so, can a maintainer rename the thread? Thanks!)