-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
More complex game examples #1248
Comments
Here's my personal starting list of ideas, roughly in order of how important I think they are. There are a lot of other super iconic games that could be useful as teaching example (2D platformers, snake etc.) but they tend to share a lot of the code with others on this list (especially Breakout) so are probably better as community tutorials. BreakoutAlready exists, although could probably use some cleanup to be more idiomatic. Nice simple demonstration of controls, 2D graphics and eventually simple sounds. Game of LifeVery elegant ECS design, and can be used for bikeshedding about how indexes and / or events should work. Choose Your Own AdventureA clean example of how to run Bevy without using the standard GUI plugins and in a non real-time fashion. Can also demonstrate dialog trees, state tracking and so on. JRPGDemonstrates how to implement turn-based mechanics in concert with simple animations and continuous UI events. Minecraft-cloneDemonstrates common 3D interaction on a first-person basis and allows for some more complex ECS behavior. Also useful for bikeshedding on UI models. This may want to depend on bevy_rapier? Isometric tower defenseComplex ECS behavior, isometric cameras, pick-and-place interaction paradigm, possibly some light performance stress tests. Ecological modelShowcase Bevy's use for applications outside of classical games. Run in a fully headless mode at maximum speed, and demonstrate how to do nice logging. |
Yeah I dig this idea. I think in-repo is a good idea because it keeps everything in sync and makes discoverability easy. We should just maintain the "minimal" requirement we currently apply to examples. The games need to be "small", idiomatic, and easy to understand. Frivolous features should be avoided. Eventually I'd like to have out-of-repo "template projects" for various game types, but imo those will have different constraints (ex: well documented, easy to clone and build off of, standalone, assets can be larger / bigger). I think which games we build / what we build first should be dictated by:
|
I'm a big fan of having a few showcase games! Having those showcases in external repos in bevy org makes more sense for me. Examples in bevy itself should be kept short and concise.
|
Yeah I think "showcase games" and "example games" would have different requirements. Showcase games don't need to be "minimal" and should definitely live outside of the repo. |
And there is an argument to be made that "showcase games" are more important than example games (maybe to the point that the distinction is not useful). But I do like the idea of having a small number of "example games" in repo that serve as "tests" that break when apis change. And being able to easily clone the repo and run |
What should be the size of an example game? Looking at breakout (~250 LOC, 5 systems), something that can be done over a weekend by one person (and not a Ludum-Dare person, some of those are crazy over a weekend, a regular-with-a-family-and-sleeping person) |
Yeah I think "breakout sized" is the target (with some wiggle room of course). I agree with your definition. Imo example games should be build-able in a day or so (maybe less) and should have very low code complexity (which makes them easy to read/understand and easy to keep them up to date). |
Whereas the only constraint for showcase games would be "high quality and idiomatic" |
So it sounds like there are five classes of examples:
|
I think its a really good idea to have a 2d platformer example. It's a staggeringly common type of game, and if you add collision, you could also show off how to integrate something like rapier into your game. |
Yeah, I think a 2D platformer is a perfect candidate for the first template game. Create something high quality and genuinely fun, with working functionality for all of the common gimmicks that users can strip out as they see fit (because ECS makes modularity really easy). |
Yeah I think thats a good call. I also think theres a very natural progression from "game template" to "showcase game". Once you have a minimal template, adding new features / real assets should be relatively easy. And they can feed back into each other when improvements are made. |
I gave a go at a small 3d example there: #1252 |
This would serve as an amazing ECS performance benchmark! It would be a realistic usage of the ECS, rather than the current suite of (mostly) micro-benchmarks stressing specific ECS operations. |
I made a small showcase game, Punch Ball, to experiment with Gamepad input. You're welcome to include and/or copy it in any sort of showcase collection if you like. Currently you need to have at least one gamepad connected or it doesn't do much. |
I'm interested in creating a tower-defence small showcase game. Been interested for a while tbh, the only thing that held me back was the lack of support for a fixed timestep, which has landed recently. That's pretty important for a TD since it makes things like slow-down/accelerate time trivial + added benefits for adding online play. |
@shironecko you might find bevy-tick-timers even better suited to this purpose :) |
@alice-i-cecile Huh, I took a quick look at the crate but the description is sparse. From what I understand it helps to schedule a one-off system run in n ticks (120 ticks per second by default) but for my purposes I need a way to run a bunch of systems at 33ms interval for example, while rest of the systems would be running as fast as possible interpolating the results of two runs of fixed time systems. I have actually ran into another road block, I'll need an immediate 3D drawing plugin, like |
There’s a nice collection of ECS demos made by Unity devs here: |
itch.io's Bevy tag has some nice examples. We could consider adapting one of those open source games for these purposes. |
I'd be willing to donate StarRust to the community as an ongoing FOSS example project. I'm working off of bevy Once 0.9 lands, I'd like to add things like volume control and particle effects and open up contributions to this game from more folks (maybe in the vein of SuperTuxKart). |
Oh neat; that may be compelling. There's a ton of polish that you could add. Something more feature complete (ala Nova Drift) may be a nice showcase that remains approachable. Would you be willing to continue managing the project @LarsDu? |
What problem does this solve or what need does it fill?
What solution would you like?
Extend the sample games from Breakout to include a larger variety of more complex games.
What alternative(s) have you considered?
Additional context
When adding games, we'll want to be mindful that their value is proportional to their upkeep cost. While there's a lot of possible use cases that would be nice to cover, we'll want to minimize overlap between examples to avoid duplication of effort. Demonstrations of specific features should be in minimal examples like we already have, while domain-specific tricks probably belong in awesome-bevy.
Upgrading the games as they break is also very easily delegated to community members: it's a fun task, their correctness is important but not critical and doing so requires no knowledge of the internal code base.
As is hopefully already the case, we'll want to avoid packaging these more complex examples (and any assets they use) as part of the standard cargo release of Bevy to avoid pointless bloat. Hopefully we can have each of these in their own dedicated subfolder within
examples/games
, withbreakout
as the first one.The text was updated successfully, but these errors were encountered: