-
I am pretty new to rust, but I added this to my Cargo.toml:
I get this error when I try to
|
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 3 replies
-
Hi there! You've got the right idea and, in fact, if I take your cargo depdencies and paste them into a new project it works for me. Try running Edit: I updated the above paragraph, I meant to say "try to run |
Beta Was this translation helpful? Give feedback.
-
Is it maybe because I am using a workspace? I tried making a fresh minimal demo app, and got it working right away, so I can look at how to fix my workspace setup. I probly missed some dumb little thing, as I am so new to rust. Seems like the Cargo.lock angle is probly a good thing to look at. Thanks! Backstory for my issue that may or may not be relevant: I made the start of a demo game thing in love2d (using lua.) It works ok on a modern computer, but performance is pretty bad, which is super-important, as I am targeting pizero. Dependency-woes (love is great, but other setups in C++ for example require quite a lot from the end-user's system, in terms of installed libs and stuff, which can be tricky on such a low-end device) and being interested in rust (even though I am very new to it) drove me to look for a new 2D framework that will make a more efficient runtime, and be more self-contained (via cargo's awesome dependency management.) It seems like many of the popular rust game libs (quicksilver, ggez, etc) are dying/going into maintenance or have very different ideas about structuring an app (amethyst, for example, seems extremely different than I am used to.) Bevy seems nice, and your lib looks like a great start for a 2D app. I also really like the idea of the same code running on the web as a performant native runtime, so people can try it out on devices other than a pi, without having to install anything, but it will also run really well on the pi. Giving up, I actually started working on re-architecting the love/lua app a bit to make it perform better, and build for the web (using lovejs) as an alternate path, since I fear I may be taking on too many new things at once to actually get it done. I'd be more psyched about not giving up on rust/bevy/bevy_retro, though. It also may be a lost cause, even with a great deal of tuning. Vaguely related: I think I have seen in the bevy docs/site mention of some kind of more dynamic setup (but can't seem to find concrete examples) where there is a kind of scene-graph in a human-readable (seems like JSON) file that can be loaded (and even live-reloaded!) which maybe be a better fit for me (a bit closer to what I am used to, less rust code, more asset-driven game-making.) Is there a way to do this (or similar) with bevy_retro? This might be a good interim baby-step for me. Anyway, thanks your your help. I will try to fix that workspace. |
Beta Was this translation helpful? Give feedback.
-
Update That totally worked, in my workspace-setup. I got bevy_retro loading, and can draw a sprite to the screen. Thanks again for all your help. |
Beta Was this translation helpful? Give feedback.
-
Awesome! Glad you got it working! |
Beta Was this translation helpful? Give feedback.
-
Ah, sorry I forgot to reply to this:
Here's the bevy scene example which shows how to create scenes that can be loaded from a RON ( Rusty Object Notation, similar in concept to JSON ) file. It might be a little too verbose for what you're wanting though. It's possible to make your own scene file loaders for like a custom YAML/JSON format, but thats a little bit more involved. |
Beta Was this translation helpful? Give feedback.
-
Ooh! Yes, that is it. Thank you!
Really, it looks ok! It seems like it has extra stuff in it that JSON is missing that would be useful. I can work with this! An idea that comes to my head, initially, is get a basic scene loaded from that format, then move anything with simple code that needs interaction. This way I can live-reload my layout and stuff, and tweak things on the fly without recompile until I get it right, then add nice fast logic-code. Would you say this works well with bevy_retro, or is it like 2 totally separate paradigms? Does this work in wasm, like bevy_retro does? I'd be happy to contribute a good bevy_retro demo, if you think it'd be useful, as I'm trying to figure it out, anyway.
I might consider this, if I end up making an editor in some other language I am better with (JS, python, lua, etc) but ron seems great! |
Beta Was this translation helpful? Give feedback.
-
Yeah, I think that would work. :)
That would be 100% compatible Bevy Retro. Everything should work the same as they would in normal Bevy, the only difference is the name of the components.
It should. If it works on desktop it should also work in web, but you might need to enable a
I'd be fine with that! As long as it is an innocent theme: nothing gory, suggestive, or something you wouldn't share in a professional setting.
👍 👍 |
Beta Was this translation helpful? Give feedback.
-
Totally. I was thinking your theme of radishes, maybe even with the same assets. Alright, I'll dive in. Thanks again for all your help. |
Beta Was this translation helpful? Give feedback.
-
As I am looking at it, and this, I'm still not quite sure how it fits with bevy_retro. Would I use things like |
Beta Was this translation helpful? Give feedback.
-
Perfect!
Ah, looking at that again, it looks like I'll need to register the Bevy Retro types with Bevy to make it usable from the scene. I'm going to setup what needs to be done from the Bevy retro side and make an example, probably within the next 9 hours, then I'll comment back here when I've pushed the example. |
Beta Was this translation helpful? Give feedback.
-
No prob!
Yep, unfortunately due to license stuff, but it will probably be helpful to others. I ended up just falling back to love2d. I think I can tune it for performance and flesh out lovejs (wasm build) to do what I need. I also dabbled with dome which is cool, but also missing some key features (specifically networking and WASM builds.)
I got the same impressions, looking at several bevy issues around it, and looking at how Skip'n Go solves it.
That would be awesome. I will keep following the bevy issue queues. I am not great with rust, but pretty good with JS, python and lua, so maybe I could help push it forward. |
Beta Was this translation helpful? Give feedback.
Hi there! You've got the right idea and, in fact, if I take your cargo depdencies and paste them into a new project it works for me.
Try running
cargo update
and then runningcargo run
again and see if that helps. If that still doesn't work try removing yourCargo.lock
and running again.Edit: I updated the above paragraph, I meant to say "try to run
cargo update
" first.