bevy-yoleck
bevy_snake
bevy-yoleck | bevy_snake | |
---|---|---|
3 | 8 | |
157 | 91 | |
- | - | |
8.5 | 0.0 | |
7 days ago | about 1 year ago | |
Rust | Rust | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bevy-yoleck
-
Announcing version 0.9 of my level editor plugin - Yoleck. This is a big breaking overhaul
Version 0.9 is a big overhaul the completely breaks the API. If you are upgrading from an older version of Yoleck, please check the migration guide: https://github.com/idanarye/bevy-yoleck/blob/main/migration-guides/MIGRATION_TO_0.9.md
-
Is there a way to make a Schedule to run its systems in a deterministic stable order without explicitly defining it?
In my plugin bevy-yoleck I have a list of systems that draw on the same egui frame. The way I do it is register them all into a resource, and then in an exclusive system I take out the resource and the egui context from the world, create the frame, insert it into the world as a resource, and then run all the systems one by one.
-
Announcing bevy-yoleck - Your Own Level Editor Creation Kit
Crate: https://crates.io/crates/bevy-yoleck Repository: https://github.com/idanarye/bevy-yoleck Docs: https://idanarye.github.io/bevy-yoleck/bevy_yoleck
bevy_snake
-
can a 2d game be made with rust without a game engine?
Here I implemented Snake game with just pixels. I did it after following Snake with Bevy tutorial to see how much more or less difficult it would be. In my experience the code turned out a little bit longer, but conceptually simpler.
-
We Need To Talk About The Bad Sides of Go
I don't quite know about that. Rust has lots of features that make it possible to write code that's nearly impossible to read with human eyes, code which REQUIRES the use of additional tools to understand. For example, you can define implementations for things which implement traits IMPLICITLY, essentially giving things methods that they don't define in their own implementation. Figuring where the hell the implementation is, even with Rustdoc, can be a HUGE pain, since the definition of the thing doesn't contain its entire implementation. For example, the bevy game engine in rust (e.g. where does the method 'snake_eating.after' get defined and what does it do here?: https://mbuffett.com/posts/bevy-snake-tutorial/)
- Question on Queries / With
-
Learning rust
Yeah bevy is a good way to learn rust. You could try making a snake clone using this tutorial to get your feet wet.
-
Using `rustic`, `eglot`, and `org-babel` for literate programming with `LSP` support in `emacs`
#+AUTHOR: granitrocky #+TITLE: Literate Programming Example -- Snake #+OPTIONS: H:3 toc:2 #+STARTUP: overview #+MACRO: setup-file (eval (if (eq org-export-current-backend 'html) "#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-bigblow.setup")) {{{setup-file}}} # Local Variables: # eval: (add-hook 'after-save-hook (lambda () (setq-local filename (org-html-export-to-html)) (rename-file filename "docs/index.html" t)) 0 t) # End: * Purpose This document is an attempt at putting a complete Bevy game and Design Document in a single file. We will be creating a document based on [[https://mbuffett.com/posts/bevy-snake-tutorial/][this tutorial]] ** Why? The reason for this workflow is to keep all our documentation and code in a single place. It's practice for creating a living org doc that will be my standard for creating projects in the future. That is, the code for this project is pulled directly from this document using ~org-babel~ * Specifications ** Use Bevy In our [[*Cargo File \[2022-07-19 Tue\]][Cargo File]], we define Bevy 0.7 as a dependency. Bevy allows us to create a game using ECS and built in 2D and 3D renderers and compile it to wasm32 for web games. In our case, we will be making a 2D snake game and embedding it in this file. ** Show a snake ** Move the snake ** Accept User input ** Grow the snake when it collects pellets ** End the game if the snake hits a wall or its tail ** OPTIONAL Keep a score * Code ** Cargo File [2022-07-19 Tue] :Code: #+begin_src conf-toml :tangle "Cargo.toml" [package] name = "literate-snake" version = "0.1.0" edition = "2021" [dependencies] bevy = "0.7" rand = "0.7.3" #+end_src ** Start The Game [2022-07-19 Tue] :Code: #+begin_src rust :tangle "src/main.rs" use bevy::prelude::*; fn main() { App::new() .run(); } #+end_src ** Systems ** Add Camera System [2022-07-20 Wed] :Code: #+begin_src rust :tangle "src/main.rs" fn add_camera(mut commands: Commands){ commands. } #+end_src **
-
How to create collisions ?
So currently I am learning Bevy, I had already followed this tutorial on how to create simple snake game. Now I have decided that I would like to TRY and create a clone of the space invaders. However I gut stuck, I had managed to create simple player movement and shooting, however I can't figure out how to make colision detection.
-
Problem with the snake tutorial: can't use .iter() on a ResMut.
I was following the Creating a Snake Clone in Rust, with Bevy tutorial but I've run into an error. In the section where I make it so that the snake's tail follows the head it says that there is no implementation of `iter` for the `ResMut` struct.
-
Experience 6 Months of Go
> Cannot make a type in a foreign package implement an interface
I would only push back on this point, and this point alone. Sure, it would be very convenient for me, an author to be able to just extend the implementation of anything that I import. However, when I am not an author and am instead a reader of code, doing this is the number-one way to causally make code totally unreadable. By allowing anyone to extend a type anywhere, it makes it impossible to just read the code. If the package that declares a type is the sole controller of that type, then reading code is easier.
"Where is the definition of this method?" Answer: It's next to everything else for that type, in package where that type is defined. However, if anyone can extend any other type, figuring out what methods even exist for a type becomes so difficult that you are forced to use a language-server (with all related dependencies installed) in order to use "go-to-definition". If someone wants to understand the code, requiring them to have a full-fledged IDE and/or development environment is pretty awful and quite onerous, and makes codebases tough to get into.
For example, take this line[0] from a tutorial[1] on creating a simple snake game using the Bevvy engine in Rust. The main() function wires up loads of entities, including a `snake_eating()` function. But it also calls a mysterious `.after()` method of the snake_eating() function. If you do a ctrl-f on the file, you won't find an .after() method defined for the function snake_eating(). Just reading the code in that file, the only file in the program, you'll never find what the `.after()` method does or where it comes from. Only by opening that code in an IDE with go-to-definition will you learn that it's set via an automatic macro in the bevvy library[2] which causes all functions of certain signatures to implement the System trait. Which... is pretty tough to get into, and means just reading code without computer aid is effectively impossible.
In your languages, please don't allow packages to extend the interfaces/traits/types of other packages.
[0] - https://github.com/marcusbuffett/bevy_snake/blob/0.7/src/mai...
[1] - https://mbuffett.com/posts/bevy-snake-tutorial/
[2] - https://github.com/bevyengine/bevy/discussions/1137
What are some alternatives?
bevy_hanabi - 🎆 Hanabi — a GPU particle system plugin for the Bevy game engine.
Platformer - Learning webgpu in rust by making a simple platformer
bevy - A refreshingly simple data-driven game engine built in Rust
snake_pixels
life - Game of life in sdl