#0.14 Bevy Jam
1 messages ยท Page 2 of 1
looks good
Theme: IKEA
build the engine yourself
it's not giving bevy. but there is contrast
Bevy has no accent colors T_T
Maybe the real Bevy was the components we inserted along the way?
bevy website colors
I think that's too somber
Yeah it's generic slate. Jams are more fun than that!
where are the web designers when you need them
@night saddle help
Literally bikeshedding me here :p
Going to launch it in 15
which was imitating the bevy jam page
The more I look at it, the more I like it ๐
i don't like it ๐ค
But it looks so happy and joyful!
genie sounds
โจ
ha I just got the pun with the image
im not getting happy and joyful from dark blue and yellow personally
Oh esteemed coding wizard, do you have a palette that will fit?
oh I struggle with color palettes every time I do a web project
is so much more cursed lol
the yellow makes me think under construction
So, like Bevy engine? ๐
but anyways w/e the colors are i will cope ofc
More refined gold to compare
how about white font on dark bg?
This is my favourite theme for jars of jam
I like this one
white font is definitely better for a darker bg
bg2: #5b83c2
text: #ffffff
link: #dfbf43
Yeah, I'm liking this better
#ececec would be bevy white
There we go, I changed from #ebebeb to that :p
This is so much nicer on my eyes than the first design ๐ Good job everyone!
oh it was so close already lol, i thought that was #ffffff
graphic design is my passion
The poor birds are swimming in their own blood T_T
@slender belfry says that he unironically loves it and will stop contributing to bevy if this doesn't become the offical bevy jam color ๐
I do kinda like the logo: good choice of red
citation needed
Color Thief is your friend :D
i ironically love it if that helps
Alright, time to spam thousands of people
I'm laughing my ass off at this comment ๐
yes, mention 4000+ users individually instead
Thanks y'all ๐ Very pleased to have this set up so quickly after the release
And the feedback was really helpful
Hi people who arrived by clicking on the announcement post! Please note that the comment I'm replying to contains the real theming of the jam. Make sure your submissions are strawberry jam themed!
the #jam-theme-voting is a red herring, Alice will veto all themes
@prisma delta description of #jam channel is outdated
Good call
Maybe we should ship the winner Bevy merch from an experimental merch provider lol
They can alpha test it for us!
Perfect theming for the engine really
That's actually a good idea ๐ค
I'll also accept merch from an experimental merch provider
I mean it can't be worse than TeeSpring TBH
for testing reasons
What was so bad about them? I'm out of the loop
Shirts peeled super bad
Quality was just terrible
We sold one (1) water bottle to me though, and it's frickin' great
I still have my sticker on my water bottle and my hoodie although it is pretty peeled ๐ฆ
@bitter sparrow @agile dirge I addressed your comments 
yep
i'll just consider it approved by me, i don't want to reread and create infinite code review loop
I'll do more refactoring, but I want to have individual PRs so you two don't have to read through hundreds of lines at a time ๐
yep
at least give approve cause you requested changes
ok
yeah I need that because of branch protections
what's your next refactor target?
Naming
we should group all state transition logs into debug
Can you elaborate?
Ah, I see
good idea!
yeah those lines should move into the dev plugin
and if we are in a cfg feature dev, we can just import dependencies that are dev, no need to address them fully
also, chaining those log systems is a good idea
from root order
huh. came across https://goodfirstissues.com/, which links to some of our issues lol. probably not what we want, i'll rename the tag to uncontroversial
hype ๐ ; a link to #jam-theme-voting on the announcement would be welcome
I've never actually worked with sub-states before, so thanks @agile dirge for teaching me this pattern ๐
im still figuring out how to lay it out
i started by dumping the whole hierarchy in a single file...
appr
@bitter sparrow would you mind doing a pass on the states and substates? I feel like I'm not knowledgeable enough in that regard to critically evaluate them.
(the structure not the names ๐ )
yes, ive been putting this off also because i will surely have comments
so rather do it after the prs are in
renaming is easy. so yeah can always bikeshed that once everything is working
Obligatory pyri_state handles this better ๐
Hehehe
in pyri_state i enable logging for a state type with #[state(log_flush)] on the enum itself, and i have a state debug settings resource that allows globally toggling certain transition messages
including on-exit, on-enter, on-transition (because those happen at different points in the schedule, so it's useful to separate them)
I wouldn't call more macro usage as strictly better
the point is you're localizing the configuration
Would you mind doing it now? I'd rather have that cleaned up sooner than later
sure
Foxed
i'll do this as a PR
Nice, I'll wait with follow-up PRs then. Ping me when you're ready ๐
#jam message this cracked me up lol
ok so before i do this refactor, gonna ask opinions
the way i have things split up in my template:
core: cross-cutting things like audio, camera, config, debug, physics, theme, window pluginsgame: game mechanics / content / logicutil: self-contained re-usable utilities like ui, despawn queue, some animation stuffscreen(can rename this): the "main" app state flow, boot -> splash -> title -> loading -> playing -> end, with each state having its own module
imo having the main app state flow as a single state type is nice. that was before substates were added ofc
Having ui be a util feels wrong to me. I wouldn't expect it to be in there.
it doesn't contain stuff like "the game HUD"
it's ui util
screen sounds like physical screen settings to me, but I see why you'd name it like that
it's font utils, tooltip, button interaction utils
yeah it's definitely not a perfect name, it's the best i've found until now though
core and game is also good for me
game_state?
main_app_state?
i just don't like that because it's ambiguous in a larger game
i also had it named "sequence state" previously
I have no opinions on that and will defer to you. All I've ever used is just a single ol' enum because I didn't invest much thought, haha
"game state" would be the name commonly used in tutorials etc. because they're not real games imo so it's obvious in context
and this?
i'm fine with going with a different name though, the structure is the bigger thing
Structure-wise it sounds good to me ๐
Something like a specific quest implementation would be game
i can see the point of separating out gameplay from menu navigation
better question, do we have enough content in the template to fill all the spots in the template
game would be small
I'd put the character movement code in game
i feel like if the name isn't clear and there is no example, there is no point
in my own template, game is tiny
what's example content in game
i have doc comments at the top explaining at least :p
let me get some examples from an actual game im writing
I'd put both in there
then what does core have
game: actor, combat, fog, projectile, weapon, resource, world_gen
and actor splits into a bunch of stuff
core: audio, camera, config, debug, freeze (aka pause), input, physics, theme, window
Also asset loading, I imagine
hm
yeah that would go there if it needs something cross-cutting
i don't like the name
common better?
core or game?
would
honestly
design pattern-wise it's adapters and bridges
engine
i think this fits
I also thought of that
It's not perfect, but better than core
im happy to delegate the naming since im kinda dictating structure :p
ok
structure is good tho ๐
yeah now that things are cleared up I'm alright
I'm just happy everyone is fine with my pub(super) plugin(app: &mut App) { ... } pattern so far, haha
I was ready to start an essay over that one
just wait til my plate clears and i start thinking about it 
nonoonononon
no need ๐
fsfs
okay, so we each make our own template and then we fight and the winner's PR gets merged
Is that a snake doing a scary sound? ๐
whoever places highest in the game jam, using their own template
That sounds like a great jam idea ๐
use jam to decide the next template xD
it's "forsureforsure" ๐
frfr
rea, as @fresh drift would say
i'll test that @agile dirge @slender belfry
you know, I was just wondering about that
test @bitter sparrow
i was looking at this channel
do it on me again
We are geniuses
ok @agile dirge @slender belfry
good to know
normal new stuff
Welp, good to know
so you edit in a mention and then complain they don't read mentions
definitely not doing this as part of this PR but
quick thoughts on foo.rs + foo/ vs foo/mod.rs?
mod always
first one for single files, second one when there's nested stuff
But honestly, I'm fine with all options
ok i'll keep it as the latter
it's weird to separate the module core from the rest of the files
i just got confused during code review with dangling mod.rs files in the nav bar
i didn't find a use case so far
I usually do the former as well for libraries, but have found it to be rather hard on my organization when working on big crates like a game.
because they aren't even sorted to the top in github
in vs code you can make it sort files inline with folders btw
which helps a lot
right
having everything in one folder is definitely a + for mod.rs
that was why they added it
Wait, you mean you can make it look like it goes in the folder?
well they'd be side by side
no, but it's next to eachother
what i long for is foo/foo.rs and IDE knows to sort it at the top ๐
Explorer: Sort Order = mixed
idea: allow .mod.rs
thanks!
btw my template loads config during boot, before the window is visible
this is useful because config may include window settings like fullscreen etc.
we're not doing config rn because bsn, but in the future some code there may change
also regarding system naming
i like to make it just explicit enough that you can understand what the system is if you were reading its name in an editor
outside the context of the code where it's defined
so enter_title instead of setup or enter
this is because i use bevy_mod_debugdump where you do in fact have to be able to do this
will edit the PR description with an overview of changes, but wanted to link the PR asap first
I left a review. Looks pretty good overall!
In fact, I'm very happy with the structure you propose ๐
@bitter sparrow if you're gonna rework the template rework the template
not paste your template here
cause now i gotta go around and catch what you missed
Hmm? What do you mean?
yeah idk what you mean
Window plugin is missing comment and visibility property
It's still all there
why there? it's window plugin configuration
mm i'd argue otherwise
It's more of a boot logic than a real windowing configuration
I'm personally fine with leaving it in either, but I definitely see the reasoning here
Although instantiating the Window with visible = true to instantly set it to false in the boot system is a bit ugly
if it helps the pr get merged i'll move it back
if you managed to get all of that together I'd say it's plugin worthy
I suppose setting it to cfg!(target_os = "windows"); in the windowing plugin and then having the boot system change it would be splitting that behavior too far appart, right?
After @bitter sparrow's PR is merged, I'll do one more refactoring pass, ask you for feedback / bikeshed and then implement the character movement stuff. Does that sound alright?
sounds good to me. you can rename modules to w/e you two prefer as well
The more I think about it, the more I'd prefer that variant. Would that be alright for you @bitter sparrow and @agile dirge? The change I propose is to leave everything as-is but move .visible = cfg!(target_os = "windows"); to window.rs
But it's also fine if you disagree; I'm okay with having everything in window.rs or boot.rs
it's a small thing in the larger PR so i'm willing to defer
@bitter sparrow I'm curious about this, didn't notice it before
ah yeah, that's because those plugins add the bevy AssetPlugin / WindowPlugin themselves
I asked for description to that, still working on the review
Oooh I see, that makes sense
I know what it does, but it's not a common pattern
Would be good to have a comment there at least
explanatory comments is fair
I'm okay with moving it out of the window plugin, but since Ben managed to get it all in a single place, I'd group the deflicker stuff together into a separate plugin
then we don't need to explain it 3 times and it won't mix with actual boot code, like asset loading
@bitter sparrow could you undo this one? https://github.com/TheBevyFlock/bevy-template/pull/56/commits/43187a4f18352b8330b0a1d17de49e1671a25f89
oh, sure
You explanations make sense to me ๐
i did that before the discussion on the comment continued
Maybe add them as a comment?
will do
That's a good idea as well. I like that.
It's also good that it has a nice descriptive name like that
Okay, so the deflicker and total flattening of state is my main feedback here
everything else looks good
(will want to change core to engine in future PR)
and maybe screen to navigation?
yeah i was feeling the boot state being separate = reasonable
very subjective
but i flattened it so i could get the pr working faster
we can leave it and add it later
ok. that can go together with the deflicker pr
sure
so just document the default asset swapping in this one ig
personally I like to group my states based on valid transitions
And this ^
but now that i think about it i broke this one rule myself so eh
yeah title -> credits is understandable as well
I'm pretty happy how the template is shaping up btw ๐
It looks like it will be hella useful ๐
Good job everyone so far!
I'd also like to get some feedback from @prisma delta at some point, but that can still wait
yeah, the game <-> credits doesn't really make sense, but thinking about the 5/6-deep hierarchy I had, this is probably better
Depends on the game imo
yeahh
See how Death Stranding has its credits right there in the game while you're playing
I think these state transitions can be left to the user. The only one that is pure nonsense is going back to Boot
๐
there is a world where you want to perform the whole startup sequence again, without restarting the application
but that's too niche
I swear Noita has so many mechanics that are beyond human understanding
love noita
I watched the talk about Noita physics
the only thing noita is missing is online co-op
it's stupidly simple but also very complex
but that would be crazy if it had that
nope, there is a mod for synchronized multiplayer
it's also partially written in rust
PR LGTM now
thank you for reviews
I assume the follow-up will take a few minutes to be ready, so I'll go give my pet rats some play time in the living room in the meantime. Ping me when I should come back, I'll leave the speakers on loud ๐
sure
just waiting for the merge then
CI ๐ฅฑ
damn version control getting in the way of agile development
honestly utils could be a separate crate in the same workspace, then "self-contained" would be enforced and #![allow(dead_code, unused_imports)] would not be needed
^\_(``/)_/^
the logic for it? probably in utils
doesn't sounds right
wdym exactly by sprite animation?
if you could see the same code being copy/pasted into another game and being useful there, it would go in utils imo
ok maybe that's not the best criterium considering we're writing a template
๐
i thought screen at first, cause it's graphics
but that's not the criterium for screen
(the name started to make sense)
yep which i will admit is mildly confusing
shorter tho i might steal that
actually nah
mmm all four top level modules being 4 letters long
so tempting
no cause core is getting renamed ๐
rea
well i'll agree that it should go in bevy
both are "below" game and screens, so technically both fit that
we can argue about the viability of such crate, but thats a fuzzy condition
okay, CI passed
so like
i do the deflicker plugin
where does it go ๐
mm i'd put it in core tbh
it would be a decent 3rd party crate
true, but it's like intrusive
it does stuff to your app when you add the plugin
whereas util plugins just set up plumbing so their components will function
well utils have plugins but it's like
app.add_systems(Update, update_font_size)
er
like the systems won't do anything if you don't use the util's components / resources
okay i can see that as a condition
so say
i have a health component
i want a display healthbar functionality
i add it to utility
if the separation seems somewhat arbitrary, that's because it is, i originally made the split in my own game code because i just had too many top-level modules
and only make it work on Health + DoHealthbar marker
yeah, I'd rather make the separation clear for myself and users
yep agreed
if i can't tell what goes where, there's no way a new user will be able to
we can iterate on that intrusiveness idea
it seems reasonable
i'd put a health component / healthbar in game/
because each game will handle health / healthbar differently
would probably put them in the same module, game/health.rs
but what if the healthbar is non intrusive
god dammit
lol
ok so
- core: intrusive, may or may not be game-specific
- game: may or may not be intrusive, game-specific
- util: non-intrusive, not game-specific
we're in a game engine, everything is game specific
oh i mean specific to this game
just less or more generic
even if this is this game specific
a healthbar mechanic can be shared between games
pretty easily
yeah but with modifications most likely
mm if you can make it fully generic and not depend on a Health component
then yes i agree it would fit in util
i don't like "ready to ship" as a condition ngl
the difference is very small
and the practice should be to make everything loosely coupled
That's what I'm tempted to do
But I don't wanna rush it
wait, game?
i meant util into core
util is non-intrusive and core is intrusive tho
merging util into game would mean that "healthbar" is unambiguously in that category
i like the "util = generic, can copy/paste it into other projects np" for my own projects
but i can see an argument for it being unnecessary in this template
minor problem in deflicker
we don't want it to modify state
probably?
it's a weird place to go from boot to title
Came back for a second to read up on the discussion.
yes, it should use a parent state
i agree with that atp, may change my own template to do that
I think these categories make sense as a starting point. Things like "where does a healthbar go" don't have to be clearly defined imo, it can be every game designer's own choice where they put it. The important part is that they see how such a split can be made and how they can modify or extend it.
epsecially as a small disconneted plugin
i mean that Screen can be a substate of BootState::Ready
since it's moving to core that's fair game
not the problem here
Heck, if they see healthbars as util, that's also fine for them
oh. well Screen should default to Title, if that's the issue?
alright, you'll see when i submit the PR
I think it's fine
the problem is, Boot is good for asset loading, yet the progression is controlled by a frame counter in a small plugin
yes therefore iyes_progress lol
sadly we do not have barriers yet
agreed that there will be an issue later on
personally i don't block in the boot state for all asset loading, just for the config (which includes window config like Fullscreen)
i have a loading screen after title screen that is only entered if asset loading is not fully complete at that point
Depends honestly. In Wasm you theoretically don't want to load everything upfront because the memory will never be freed.
You could also go from Boot to AssetLoading
that's what i was trying to say
:p
but it can be a root state
it's disjoint from boot
if you have no assets and boot changes on frame 1, then you will never see the window
(I'm back to the rats
)
yeah i was saying like enum Screen { ... } substate of enum BootState { Booting, Ready }
unless you still mean something different
tbh
enum WindowState { Booting, Ready } and put it in core/window.rs, then later we can load window config in there as well as waiting at least 3 frames to deflicker
is the real answer imo
https://github.com/TheBevyFlock/bevy-template/pull/57
I added the deflicker, onto the boot separation
loading assets
currently i only use a boot state for window config and deflicker in my own stuff
loading assets should prob not block the window from coming up
so imo remove it
thoughts on this?
would be a small refactor from your pr anyways if wanted
i don't wanna bind random visual thing to any asset loading/game logic
the deflicker is always 3 frames, everything else can run just fine during that
you mean no substating Screen?
i can see being a substate of WindowState::Ready reading as more reasonable
but for deflicker yeah fair enough
i wanna introduce substate but agh
we don't have an excuse
so boot is out the window
unless we add title screen graphics hmmhhmm?
games have fancy title screen graphics
i load that during splash screen
and i embed splash screen in app
if it's not loaded before splash screen is done i extend splash screen until it is :p
we can do splash screen
this kind of asset loading management will probably be rough without iyes_progress and bevy_asset_loader though
yeah..
i was working on a barrier primitive for that, but it's not ready
something generic enough to get upstreamed in a week
asking for thoughts on this again :p it would be an excuse to use substates
i don't wanna add substates for the sake of adding substates
it isn't
it only seems that way because we don't have window config yet
will make more sense once that's added
but we probably won't add that before the upcoming jam anyways ig :p
WindowState::Booting is the initial state, hides the window and loads the window config, then switches to WindowState::Ready once that's done
Screen is a substate of WindowState::Ready, and defaults to Screen::Title or splash or w/e
but flicker doesn't block anything
suppose there's a splash screen and it's an animation
and you don't want to miss the first 3 frames of the animation :p
something like that
but we don't have a splash screen ;-;
or more if loading window config takes longer
yeah this is all speculative about future features, fair enough
it's not adding substates "for no reason" though
it makes some sense
Better to not have too much in there for future features imo, because we'd need people to understand how, where and why they would have to put them there
my argument is moreso that waiting for the deflicker before entering the initial screen is "more correct"
fair enough
there was an issue that i thought was about a splash screen, but it was closed as dupe so maybe not
ok in that case yeah dupe
I'd have nothing against a splash screen
aight, splash screen it is then
hooray
Nothing too important, but if someone implements it, I'd be happy ๐
i have it in my template but i'd prob have to re-implement it to not use any 3rd-party crates etc
Just looked at the PR. Yeah, very much in favor of this
ouch
Why ouch?
I wasn't here for most of the discussion, I'm maybe missing context ๐
i don't see it as a valid argument without a splash screen
well, i can just implement splash screen next
Alright, fair
after this pr
I'll approve it like this then
Alright ๐
Also fine to leave it like this and change it in a PR that actually adds a splash screen
Your choice
might as well make a splash screen >.>
Pyrious, start figuring out how to await for both, splash screen image to load and deflicker to finish
Man I'm going to steal so much of this for the examples :p
im gonna steal some of this for my own template before the jam too hehe
please don't it's bloated ๐ญ
@agile dirge here's a cool splash screen for inspiration: #general message
it's very cool but video splash screen in bevy ๐จ
Add three bird sprites after each other and rotate them
ah
do we know what font is used in bevy logo?
I'm taking the entire hierarchy for Foxtrot as well, haha
@prisma delta might know
i feel like the glyphs are hand-drawn
created splash screen issue: https://github.com/TheBevyFlock/bevy-template/issues/58
not
@rigid geyser is the one to ask
ehh, plugin order is important ._.
can't add state in window, needs to be after states
since "states" are more closely tied to the ECS itself, the plugin should probably be added early
for now.. maybe provide two plugins in core/window.rs
and add them separately in core/mod.rs, with a comment pointing to an upstream bevy issue
since we plan to load assets in the booting state
it's not strictly bound to window
so i just made a new module
well the way it works with bevy_asset_loader at least is you can app.init_collection anywhere, and it'll start loading the assets asap
there
so the window plugin wouldn't have to know about it
idk if it's possible to decouple like that with raw bevy_asset
aand fixed
i added the suggestion by hand, was slightly faster :p
5 min break while CI finishes
Nope
๐
Oh, great โค๏ธ
im just gonna be adding screen/splash.rs
Font seems very much like this one: https://fonts.google.com/specimen/Baloo+Da+2?preview.text=BEVY&classification=Display&stroke=Sans+Serif
Pyrious want me to add the component for hover colors?
i ended up doing that in my template anyways
interesting
yea sure
i name it InteractionPalette in my code but you may have a better name
i can work with that
less bikeshedding for me ๐
im not a big fan of Pressed since for buttons the screen usually changes and you don't really see it
some buttons are act-on-release
I made the state transition on button releases in my case
yea
don't think it's worth adding here
oh, im gonna readjust palette to fit our jam page

@prisma delta would you mind sharing the exact colors?
thanks
true
convenient that we have linux, windows, and mac between us
there we go
(idk why I replied to a specific comment there, whoops)
Nothing crazy in there
There are some pub modifiers that should be pub(crate) in the widget stuff, but I didn't want to cause you merge conflicts @agile dirge
thanks, lmk which ones when i get a PR out :)
everything that is pub should be pub(crate)?
technically if an item and its module are not re-exported in lib.rs, there's no difference between pub(crate) and pub iiuc
Yes and no. Logically it ends up the same, but tools such as rustdoc and clippy treat them differently
In general, there are a lot of false negatives for unused code that can be avoided when restricting visibility IME
Yeah pretty much
It's not that big of a deal, but it makes other tools work nicer
@agile dirge tiebreaker opinion probably wanted: https://github.com/TheBevyFlock/bevy-template/pull/59#discussion_r1667817295
Yes please, there are two people willing to compromise here ๐
i think app. should be before each statement, im sorry ๐
oh no
wrong ending
when i said willing to compromise i didn't mean like this ๐ญ
i mean i don't hate that
I'll undo that change then ๐
tbh no app. chains probably means better autoformat indentation
because the chain adds 1 level of indentation, then if you have to split a method call into multiple lines that's a second level
so i can see the vision
and we're already reducing 1 level of indentation by using a fn instead of a struct
oh and you can delete or move a line without affecting other lines / git diff
genius mini
moving lines between groups becomes easy too
btw this is why i don't like rust's use foo::{ ... } syntax
all the same issues
plus hurting greppability
No please don't make remove the app chains entirely, I love them too much ๐ข
app.remove_chains
btw the "screen" name came out of the fact that i was using that as a suffix for like everything
"title screen", "end screen", "credits screen", "splash screen"
just remembered
yeah, that's when it clicked for me
the problem with increasing the documentation coverage in the project as a whole is that my new prs will have to include more documentation to be consistent ๐ก
Just deny missing docs
100% doc coverage in my bevy jam game ๐จ
Oh and document internal items too so you can't cheat
btw we'll probably want to add Name component to every spawned entity :)
we haven't been doing that so.. not now but a later PR
Ooooh right!
thanks for the reminder
thanks
the amount of issues is increasing at a dangerous rate
yeah yeah, right after we're done with the animated splash screen ๐
hehe that one's important!
I'm doing character movement now ๐
btw the first splash screen pr will not be animated or even have fade in/out
I'll try to keep the changes in the game folder so that others don't have merge conflicts
it sounds like a fun jam challenge
fun for the first 8 days for sure
ah
you'd add each dev's plugin to the app in a random order determined at startup
so the last plugin can't just override w/e it wants and you have to try to stay decoupled
next bevy jam fs
i don't have to
are you at gunpoint? ๐
thought so
I'm very happy with the refactor
i split the ui traits to RootContainers (only for Commands) and Widgets (anything with spawn, so commands/child builder)
not in love with the way embedded asset paths work:
asset_server.load("embedded://bevy_template/screen/splash/splash.png"),
but ok ig
splash screen should be 100% guaranteed loaded at startup imo
embedded asset still supports hot reloading for example
good to have a demonstration of how embedded assets work too, tbh
how are embedded different from 'normal' assets, i've never used them
don't you need macros to do that?
embedded_asset! is the macro, provided by bevy
embedded_asset!(app, "splash.png");
ohh, that's how you reference it?
yup
the splash.png file goes in the src/ directory. which makes sense because we don't want it copied into the package, because then it'd be present 2x (in assets/ and in the binary)
so you can just assign it to a const or something
nope it returns nothing
and wouldn't be able to assign to a const anyways because it requires app, but a resource would be possible
Agreed, it looks very nice now! Thanks for the advice @night arch ๐
i dont like childbuilder personally because it leads to JS-like indentation/closure hell
Seriously this pattern is so much better than vanilla bevy_ui
but it's fine, the other way is weird too
thats good
actually, root doesn't even need to accept a closure, we can just use with_children
gonna do that
ah right, didn't even notice
good job with the palette as well ๐
getting it from Alice was the most stressful part ๐ฐ
removing my_. thank you
i wanted that
i'd put the .insert(StateScoped) before the .with_children?
pretend that's a comment on the PR, i just had discord open
oh yeah, i can do that now
it all falls into place
hm
workflow is not being cancelled
4 commits have workflow running when only 1 should

Approved 
Alright, it's getting pretty late here, I'll do the finish the player movement thing tomorrow. Good night everyone ๐
cya
same here ๐ซก
ill just get this merged
replied to the comment
cause i need appr
splash screen and maybe css spinner PRs will be up tomorrow
btw something i just noticed in the logs (that pyri_state again does better ๐ ):
2024-07-08T02:14:40.050794Z INFO bevy_dev_tools::states: bevy_template::core::booting::Booting transition: None => Some(Pending)
2024-07-08T02:14:40.050813Z INFO bevy_dev_tools::states: bevy_template::screen::Screen transition: None => Some(Splash)
2024-07-08T02:14:40.115567Z INFO bevy_dev_tools::states: bevy_template::core::booting::Booting transition: Some(Pending) => Some(Done)
the substate's transition is logged before its parent state's transition. which is confusing because that's not the order that the transitions happen
moving the actual logging into the respective transition schedules instead of Update would resolve this
splash screen PR turned out pretty nice imo: https://github.com/TheBevyFlock/bevy-template/pull/66/files
unrelated, i see target/rust-analyzer taking up 448M on my pc. that's honestly not bad compared to the 7.6G in target/debug
our git history is a mess lol. i assume there are some repo settings that other bevy projects use
not a big deal but yea
is this better? (previously: all 3 checkboxes ticked and set to Default message)
I usually squash all
Exactly this
make sure to create an upstream issue for this (i think you have more context to create the issue)
imo, at least like 5 days before the jam starts, we should wrap up the template in an mvp / usable state and announce that it's ready in #jam
so people have time to check it out, clone it / set it up, learn how it's structured etc
that's in 8 days and we're already almost there, so we've got plenty of time ofc
Haven't read all of this chat- is TheBevyFlock/bevy-template become (or is becoming) the blessed GH template for bevy jams?
iirc there were several template repos floating about
Ah, reading the itch.io post now, it's even linked there. So blessed then ๐
I don't think it's an issue, at most i can add a more descriptive error message
Yes! Itโs not in the official Bevy org because thereโs not enough maintainer-power to keep it up to date and because a project like this is automatically pretty opinionated. Treat it as semi-official for now ๐
Also feel free to take a look and bikeshed if anything stylistically rubs you the wrong way. We already discussed a whole bunch of things, but feedback is still very welcome.
For practical usage, this is more of a template for templates/example of bevy project structure and code conventions
Because we do not use any 3rd party Bevy crates, we are pretty limited in what we can do, going for a more opinionated template with a ui crate would help
a project like this is automatically pretty opinionated
It would be nice to have in the project README how exactly it's opinionated
Yep, thereโs an open issue for that
Ah ok ๐
Yeah, readme is the last thing to update
The current readme is just the one from the Bevy CI template
We should split readme into few files
As we used that as a starting point
last thing
Before? The jam?
After we get all the features in
After some more TODOs we have
The template is very volatile right now so external docs like readme get outdated too fast, not worth updating
For example, I want to add a feature for controlling a sprite with WASD so that users know where to put their actual game code
I see you have issues for impl reflect and Name for entities etc. and I was like huh?? I thought this was a CI template only.
But I see you have interesting goals like a splash screen and credits etc., this is very interesting! Will monitor repo
Hmm ๐ค Is this too opinionated?
The CI-only template already exists ๐ This is really more of a starting point for people wanting to participate in jams
We agreed a 2d base for a jam game is better, 3d isnt doing too hot on wasm
And basic logic is pretty light and localized
We need some game code in there to properly guide a user, and WASD top-down movement seems like the smallest possible implementation of that imo
Ok, I'm typically only interested in 3D, but it's not a problem.
Same thought
I like 3d but that was also the worst experience on last jam
the idea is the user is expected to fully delete the example "gameplay" code and replace it with their own ๐
that code should be named fn blender_cube then
I dont delete my blender cubes
Would be pretty funny to leave a default cube inside of every 3d model
I can review the spinner and splash pr when im home in 2-3h but if Jan reviews them you can merge too, there isn't much to argue about those
it's crazy that no 3rd-party crates => we need to write our own Velocity component btw, lmao
Lmao
Update: I want the movement code to demonstrate how to correctly use a fixed timestep, as a lot of jam submissions would benefit from doing this the right way.
There was an open issue on Bevy about having an official example showing how to do this, but I can't find it anymore. In any case, I'll be upstreaming the movement code to Bevy first in order to get feedback on it and then use that same example code in the template. Good thing about that is that I won't need to add a ton of comments to the template and can just refer to the example.
merged splash screen because it has 2 approves
tbh, there isn't much left
the game logic that Jan is doing, then few tweaks to the code (Serde, Reflect, Name components, app. convention)
then readme
readme is gonna be big
Since "audio" is explicitly a criteria this time around, it would be good to play a sound somewhere as well imo
But yeah agreed, not much left ๐
Objective
This example shows how to properly handle player input,
advance a physics simulation in a fixed timestep, and display the results.
The classic source for how and why this is done is Glenn...
here we go
@dapper sail I know that you know how to do this properly. Would you mind taking a critical look at my PR?
And here's the companion PR for the template https://github.com/TheBevyFlock/bevy-template/pull/70
Adapted from bevyengine/bevy#14223
Resolves #11
I can confirm that adding review comments one by one does in fact save a button press
Gonna answer the level/player comment here, I have a wall of text and I don't think it's reasonable to post it ๐
So, I do think there is value in providing a spawn_level, but we don't really have a level
Giving users the idea that player is a hardcoded part of the level is bad imo
The best solution for spawning non-static level elements (that I'm aware of) is through events, but now that we have observers that's even better
so a spawn_player would be reusable piece of logic
and enemies and pickups can follow that convention
then spawn_level can still use those
sounds perfect
could you add a comment about how spawn_player can also be used for enemies/pickups etc.?
i think spawning player is special enough that people may just miss the possibilities
Could you elaborate on that?
the convention of adding spawn_X that has an associated event
do you think it's obvious from spawn_level and spawn_player that you should use it for enemies and pickups?
maybe i'm overly cautious
I think it's obvious when I also split the files ๐
okay, level + player is actually better because it goes a step further and shows composition
thanks for rubber ducking my dumb ideas
Jan jumpscare
Same ;-;
github embeds been weird last few days
oh neat
yeah that's a good idea
the spawn module
I think that makes it really really obvious how to structure things like enemies ๐
yup
my thought is: why observers when this could instead be more similar to the util/ui stuff
like probably not an extension trait on commands
but a spawn_player helper function or struct Player.spawn
this way you can skip providing asset-related arguments and focus on the values that actually interest you
the asset logic is all localized
okay that is true
passing args through is annoying
bsn pls
idk what bsn even does at this point i'm just gonna assume it would fix this
Yeah this is why I coded up an entire crate to emulate this kind of mechanism back in the day
and EventWriter type event would not be suitable for this because you don't want to wait until the next time a spawn_player system runs.. or have that system check a run condition every frame
custom command would also be an option though?
Why though? Observers are made exactly for this kind of thing
yeah, observers do the same thing though
๐ค
Commands are more for "plz change something in the ECS", e.g. how reparent is implemented.
but then you'd need an extension trait for nice calls
yeah true
observers don't do structual changes
at least, that's how I use them
commands.add(spawn_player)
lol
Also observers were made with recursion support in mind, idk if commands do that as well
i mean commands.spawn exists
idk either
but i think observers work and are easy to setup
the fact that we can have a struct containing all relevant spawning data is nice
you can serialize that
tbh i feel like observers are more worth if there's an entity target
the target is ZA WARUDO
i'm not opposed to observers i'm just wondering how you're even supposed to choose between observers, commands, one-shot systems, events, etc. at this point
that's what the name implies ig ๐ค
good point
we entered a teritory of multiple solutions with observers
Events vs observers too
One-shot is the only one that can return something on the spot, if you're willing to do an exclusive system
true and you can pass around a type-erased SystemId
Events can run in specified schedules and have more ability to parallelize
I think it's just a matter of taste and convenience now
oh schedules are another thing too
Observers are just hella neat
ok so i guess one thing about observers
Hooks give you the ability to change something so quickly that there is no in-between state
you can add more systems (observers) to the same commands.trigger(SpawnPlayer) event
in different parts of your code
i don't think we want that in this case.. but yea
You want that for a third-party crate so that the user has the ability to also do something on an event. Note that there is no way to order how the two observers will run though.
Spawning is happening rarely so we don't need the parallelization ability of Events<E>
Commands are a teeny tiny bit more annoying to setup, especially if you want to store all spawn data in a struct
Exactly my thoughts
commands.add(SpawnPlayer { ... }) vs commands.trigger(SpawnPlayer { ... }) no?
assets
wait no
reading comprehansion is not my strong point
you need to impl Command for SpawnPlayer
that's inconvenient
i feel like observers is just like a suite of commands for the same commands. call
yeah ig so but you don't have to have a plugin that registers an observer for SpawnPlayer
it's in the type system instead
so either way you gotta do something
true
You'll have to ask #ecs-dev for the exact technical differences
sure i'll put the question there
i do think this is a question of the same nature of "do i put it in core, game or util"
Yeah, agreed.
so i don't think you'll get a clear answer
I think it doesn't matter too much and the user can easily switch if they prefer something else
it's a mix of personal preference and convenience, whatever you do will probably work
we can add a comment about it if you want
ok SpawnPlayer as a command and SpawnLevel as an observer ๐คช
One thing I like right now is that the template shows different ways of doing things. It's kinda neat to see how Commands, Observers and ComponentHooks can be used hand-in-hand
clearly we need a 3rd spawn for Events<E>