Help eachother with technical issues!
sudo apt install libasound2-dev libudev-dev
You may have to run on a session using x11 (wayland did not work for me)
You need pulseaudio-alsa installed to have sound
sudo pacman -S pulseaudio-alsa
arrayvec
." on MacOS Mojave?Upgrade your Rust version to latest Rust, 1.39.0 (I was on 1.17 when I got this error).
rustup update
Blank window is expected. See README.md:
Once the game has compiled and started running, you should see a blank window. Believe it or not, that's what we want! It means the game is running and displaying successfully.
cargo run
in WaylandWayland backend is broken where it doesn't support windows resizing. See this: https://github.com/ggez/ggez/issues/579. The workaround is to run it using X11.
export WINIT_UNIX_BACKEND=x11
before running cargo run
.
This requires XWwayland (in arch that is sudo pacman -S xwayland
)
Wouter Geraedts I'm figuring out how to limit the update framerate. Apparently it goes to 2500 FPS.
See the timer
documentation of ggez
on docs.rs. Add this to your update loop in mod.rs
:
while ggez::timer::check_update_time(ctx, 60) {
...<logic>
}
Ok(())
Or better:
if !ggez::timer::check_update_time(ctx, 60) {
ggez::timer::sleep(ggez::timer::remaining_update_time(ctx));
}
...<logic>
Ok(())
let _ = self.assets.bg_sound.play();
If you play it unconditionally it will just start over again and again, which is equivalent to it beeing silent. Check first if it is already running.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing