#0.14 Bevy Jam

8325 messages Β· Page 9 of 9 (latest)

bitter sparrow
#

maybe .editorconfig doesn't recognize that the file is json because of the lack of .json suffix

bitter sparrow
#

my trailing newlines get deleted on save, idk why

slender belfry
#

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?

bitter sparrow
#

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

slender belfry
#

Removing the permissions stuff from the guide would be cool

bitter sparrow
#

that and support for workspaces would be nice

slender belfry
bitter sparrow
#

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

slender belfry
#

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

bitter sparrow
#

ive got an implementation for it already

slender belfry
#

Ah, really?

bitter sparrow
#

its pretty small

slender belfry
#

that's already it???

bitter sparrow
#

heh yeah that's all it takes

slender belfry
#

I thought it was way more convoluted πŸ˜„

bitter sparrow
#

well and adding the cargo feature in dev builds

#

i think it's just included in bevy/bevy_dev_tools though

slender belfry
bitter sparrow
#

yup

slender belfry
#

Since we lack the core mod

bitter sparrow
slender belfry
#

Oooooh so that's what I was reading

bitter sparrow
#

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

slender belfry
#
for path in to_enable {
    c!(store.get_mut(&path)).is_enabled = true;
}

The absolute raw power of tiny_bail in action cooltofu

bitter sparrow
#

yup, plus you get the information that this is expected to succeed, whereas cq would mean expected to fail

slender belfry
bitter sparrow
#

oh really

slender belfry
#

And some other laptops

bitter sparrow
#

what would be the alternative for a debug mode in those cases?

#

like, / maybe?

slender belfry
# bitter sparrow oh really

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

bitter sparrow
#

or backtick

slender belfry
bitter sparrow
#

want to avoid using a keybind that the user may want for actual game stuff

slender belfry
#

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

bitter sparrow
#

np

slender belfry
#

fuckers ran away

slender belfry
#

so there is a precedent for using that for debug stuff

bitter sparrow
#

okay, should be good enough as long as it's defined in a single place so it's easy to change

slender belfry
#

πŸ‘

bitter sparrow
#

i'll make a quick pr cause this should be easy

slender belfry
#

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

bitter sparrow
#

KeyCode::Backquote mm okay

#

yeah no i'm not even using LWIM for this in my template. cause it's just for debugging

slender belfry
slender belfry
#

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

bitter sparrow
#

im glad my fix to LWIM is included

#

wrt disabling actions and just_pressed

slender belfry
bitter sparrow
#

it's so tricky. there are a lot of subtle bugs

slender belfry
#

what was that again?

bitter sparrow
#

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)

slender belfry
#

So, the timeline is:

  • Action disabled
  • I press A
  • I hold A
  • I enable the action
  • It sends just_pressed instead of pressed?
bitter sparrow
#

yes

slender belfry
#

Great fix then πŸ˜„

bitter sparrow
#

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

slender belfry
bitter sparrow
#

also true

slender belfry
#

Where should we document this? Right in the readme?

bitter sparrow
bitter sparrow
slender belfry
#

Could you add that to the PR? Looks good otherwise

slender belfry
#

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 πŸ˜„

bitter sparrow
slender belfry
#

btw, don't forget to update cargo-generate after you merge a PR

bitter sparrow
#

right

prisma delta
bitter sparrow
#

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?

slender belfry
bitter sparrow
#

ah ok

slender belfry
#

Ping @lunar sail @obsidian ravine in case any of you two feel like doing some easy workflow stuff πŸ˜›

willow remnant
bitter sparrow
#

by toggling the window entity's visibility

slender belfry
bitter sparrow
#

not on linux but true

#

for me it's actually caps lock + Q (or backspace)

slender belfry
bitter sparrow
#

yeah my caps lock is mapped to "super key" which is the "Windows logo key"

#

so basically the same thing

slender belfry
#

Aaah, that's cool πŸ™‚

#

I imagine that's easier to access with the pinky?

bitter sparrow
#

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 πŸ˜„

bitter sparrow
bitter sparrow
#

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

slender belfry
#

good job!

#

I suppose the whole itch.io shebang still works?

bitter sparrow
#

yup

#

the only thing that required any non-default permissions was the github release step

bitter sparrow
#

i edited workflows.md a bit as well

#

i'm only seeing it rendered now though

#

hmmm markdown doesn't work inside <summary></summary>

slender belfry
bitter sparrow
#

using HTML instead seems to work

slender belfry
bitter sparrow
#

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

bitter sparrow
#

ok im done making tiny edit commits lol

slender belfry
#

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.

bitter sparrow
#

which you would have to expand to see

#

could write something like

slender belfry
#

Maybe something like "Your primary way of configuring the release workflow is through environment variables"

bitter sparrow
#

... contains a list of environment variables to configure the release workflow

#

or that

slender belfry
#

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

bitter sparrow
#

i'll do it rq. i'll make it a separate sentence, before the expandable section

slender belfry
#

(I swear they try their best)

bitter sparrow
#

the whole doc is so much smaller now that we can afford an extra line heh

slender belfry
slender belfry
#

@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?

slender belfry
#

@bitter sparrow could you take a listen?

#

it's not perfect, but should at least be better

bitter sparrow
slender belfry
bitter sparrow
#

sounds fine but it's quiet

slender belfry
#

The sound as it was was too loud for repeated use

bitter sparrow
#

the previous sound was too harsh

#

also too loud but not really that loud

slender belfry
#

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

bitter sparrow
#

if it's too quiet it sounds like a bug

slender belfry
#

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

bitter sparrow
#

pitch randomization makes it less annoying

#

but that's a whole nother thing

slender belfry
#

Or have it semi-integrated with the background music

bitter sparrow
#

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

slender belfry
#

By using an instrument that also appears in the BGM with a high attack

slender belfry
#

But I wouldn't include it

bitter sparrow
#

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?

slender belfry
#

So maybe, but I would not count on it

slender belfry
#

I'll replace the OnPress sound with something a bit louder and more distinct

bitter sparrow
#

ok

slender belfry
#

I tried to go for something I wouldn't mind hearing in an ingame menu as well

#

It's also louder than before.

bitter sparrow
#

approved, it's an improvement over the current sfx

bitter sparrow
#

triggered 0.1.0 release instead of v0.1.0? :p

slender belfry
#

Thx

bitter sparrow
#

i hit credits and hear the kevin macleod song every time it's so funny

slender belfry
slender belfry
#

I think it’s nice that thanks to the template quite a few jam entries have a Bevy splash screen

bitter sparrow
#

yeah i like seeing the bevy branding, especially when they modify the logo somehow

#

whether that's allowed or not aside, it's cool

sinful hull
slender belfry
slender belfry
sinful hull
#

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"

slender belfry
#

Now that is cheeky

sinful hull
#

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

slender belfry
sinful hull
#

true. probably not for a game jam lol

slender belfry
#

Although some entries hacked in an Avian splash, which was cool

slender belfry
sinful hull
#

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

bitter sparrow
#

an animation for the bevy splash would be cool too

#

like the one in that one video

slender belfry
#

Yeah, I love that one

bitter sparrow
bitter sparrow
lunar sail
#

@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? πŸ˜… )

slender belfry
lunar sail
slender belfry
#

Ah, I see πŸ˜„

#

Thanks for the fixes πŸ™‚

bitter sparrow
#

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

slender belfry
slender belfry
#

got a trivial fix

slender belfry
bitter sparrow
#

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

slender belfry
slender belfry
bitter sparrow
slender belfry
bitter sparrow
#

looks centered to me?

slender belfry
bitter sparrow
#

that's just main branch

slender belfry
#

The issue is on my PR

bitter sparrow
#

right

#

i didn't look at where we were removing center from

slender belfry
#

πŸ˜„

#

I was considering adding a label_centered

#

or a centered container

bitter sparrow
#

yeah no this just needs a followup pr

#

the whole UI is borked

#

layout-wise

slender belfry
#

What should I do in my PR?

bitter sparrow
#

i'll just approve it it's w/e

slender belfry
#

I'll see if I can improve it a bit

#

don't merge yet

bitter sparrow
#

awkward

slender belfry
#

why is this not a single thingy anyways?

bitter sparrow
#

there's no reason, it should be

slender belfry
bitter sparrow
#

no i already merged it before you said that i mean heh

slender belfry
#

ah, I see

#

hahahaha

#

alright, I'll refactor in a new branch

bitter sparrow
#

we need to pull in bevy-inspector-egui so we can do UI without dying

#

and then remove bevy-inspector-egui after bavy

slender belfry
#

I'm not a UI person, so I'll just clean up some low-hanging fruits

bitter sparrow
#

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

slender belfry
#

hold up

#

This does not accept BackgroundColor?

#

The heck

#

Or at least impl Into<BackgroundColor>

#

smells like bug

bitter sparrow
#

do you really want to do with_background_color(BackgroundColor(Color::foo))?

slender belfry
bitter sparrow
#

have that as a Color in the constant

slender belfry
#

Yeah, but I imagine someone might want to have BackgroundColor as a constant for type safety

bitter sparrow
#

sure, it would be reasonable to support it, but in most code we probably should just be storing colors

slender belfry
#

Fair

bitter sparrow
#

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

slender belfry
#

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

bitter sparrow
#

yeah i prefer to overwrite the Style wholesale for custom styling

#

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()
}
prisma delta
#

Are y'all still able to post here?

bitter sparrow
#

test

prisma delta
#

Great

#

I tried marking it as "Closed"

bitter sparrow
#

#1034543904478998539 for bevy_quickstart πŸ₯Ί

prisma delta
#

Yeah, let's do that πŸ™‚

bitter sparrow
#

moving to #1271949921708146770

obsidian ravine
#

@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

pure depot
#

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)

gilded lance
#

πŸ‘€

#

Preparing for the next jam already?

obsidian ravine
#

Are we re-opening this channel for the 0.16 Bevy jam? (And if so, can a maintainer rename the thread? Thanks!)