bevy_snake
azure-sdk-for-rust
bevy_snake | azure-sdk-for-rust | |
---|---|---|
8 | 9 | |
91 | 650 | |
- | 2.6% | |
0.0 | 9.3 | |
about 1 year ago | 4 days ago | |
Rust | Rust | |
- | MIT License |
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_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
azure-sdk-for-rust
-
What features would you consider missing/nice to haves for backend web development in Rust?
Take a look at this https://github.com/Azure/azure-sdk-for-rust
-
Should we switch to Rust?
Source: I'm an active contributor to the Azure SDK for Rust
- Mark Russinovich (Azure CTO): "it's time to halt starting any new projects in C/C++ and use Rust"
- `into_future` has been stabilized!
-
Experience 6 Months of Go
FWIW, AWS now have an official SDK for Rust in beta:
https://aws.amazon.com/sdk-for-rust/
There are people at Microsoft working on a Rust SDK for Azure, but it's explicitly a volunteer effort at the moment:
https://github.com/Azure/azure-sdk-for-rust
These days I probably would not look at any language that did not have SDKs for AWS and Azure, for similar reasons.
-
Help Microsoft shape the Azure SDK for Rust
Incidentally I have posted this today so if you believe in that feel free to put a thumb up there to voice support. I would be more than happy to extract the relevant parts of my code and contribute it there. https://github.com/Azure/azure-sdk-for-rust/issues/731
- Feedback on the unofficial rust SDK
- Has anyone built azure functions with Rust ? Functions with which you can say upload to a blob storage in azure ? Any GitHub repos / articles are appreciated!
-
What's everyone working on this week (9/2021)?
As for this week specifically, I'm trying to figure out the first bits of building a web service... aka authentication. Toying with Azure Active Directory right now, using the still-unofficial and incomplete Azure SDK for Rust. We'll see how that goes...
What are some alternatives?
bevy-yoleck - Your Own Level Editor Creation Kit
mp4 - MP4 library, CLI tool, server
Platformer - Learning webgpu in rust by making a simple platformer
field_names - proc-macro for accessing struct field names at runtime
snake_pixels
rustfuif - Performance & correctness oriented beursfuif implementation in rust
life - Game of life in sdl
profligate - Caesar cipher library with automatic letter-frequency decryption.
objstor - object store
rust - Empowering everyone to build reliable and efficient software.
autocxx - Tool for safe ergonomic Rust/C++ interop driven from existing C++ headers
gock - HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽