Questions tagged [ggez]
10 questions
2
votes
0 answers
How to use ggez + imgui + wgpu?
In my game I need to render some in-game textures into UI (I'm using ggez 0.8.1 and imgui 0.8.0). As ggez 0.8.1 uses wgpu for rendering I need to use wgpu backend for imgui. So there's my question: how can I render imgui's DrawData inside ggez's…

mertwole
- 49
- 4
1
vote
1 answer
ggez resize window without distording drawn elements
I use ggez and would like to resize the window. The only way I found is
graphics::set_drawable_size(&mut ctx, width, height);
However, when I use it, the white circle I drawn turns into a white ellipse, and a seemingly grey circle appears below. So…

Samuel
- 51
- 6
1
vote
1 answer
Cannot flip image over x axes
I am using ggez rust crate, trying to develop 2d game. Currently I have a problem, where I want to flip image over x axes. So for example if character is looking in right direction, it would look left after transformation. Could not find anything…

Sharmiko
- 543
- 4
- 21
0
votes
1 answer
Getting `ResourceNotFound` error for files within the `resources/` directory
I'm trying to add a spritesheet to my Ggez game, and getting the following error when running cargo run:
Error: ResourceNotFound("/sprites.png", [("/home/pablo/Dev/rust-game/target/debug/resources", IOError(Os { code: 2, kind: NotFound, message: "No…

The Oddler
- 6,314
- 7
- 51
- 94
0
votes
1 answer
ggez Rectangle doesn't show up on canvas
I am trying to draw some black rectangles on a white canvas with ggez. I've looked at the Generative Art example that's linked at in the ggez docs.
My problem is, I'm not getting the rectangles to show up, all I get is a white canvas. I've debugged…

sobek
- 1,386
- 10
- 28
0
votes
0 answers
Cannot Build Rust GGEZ
I'm starting a new Rust project and included the ggez package in Cargo.toml
[package]
name = "Project"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at…

Joshnaks
- 1
0
votes
0 answers
"ALSA lib pcm_dmix.c error when running Rust project: Cannot connect to server socket"
I am encountering an error when trying to run the ggez snake game example in Rust., The error message is:
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect…
0
votes
1 answer
Struggling with 2d platforms physics
Im making a game in Rust(Im a beginner) for my son and am somehow struggling with platforms - specifically modifying their length. I can get the platforms if i use certain numbers but if i try to modify the platform width I run into problems.
If i…

cbs
- 5
- 2
0
votes
1 answer
Cannot load image in ggez/rust due to path not absolute
I get this strange error that ggez cannot find and load my image file. But even an absolute path still makes an error. Wtf man?
MyGame {
carimage: Image::new(&mut ctx,…

ArekBulski
- 4,520
- 4
- 39
- 61
-1
votes
2 answers
the trait `Drawable` is not implemented for `Result`
I am using the ggez library to create a simple pong game.
My code on the line of error:
let racket = graphics::Rect::new(10.0, 10.0, 300.0, 150.0);
let racket_mesh = graphics::Mesh::new_rectangle(ctx, graphics::DrawMode::fill(), racket,…

Nibodh Daware
- 3
- 4