not-fl3/macroquad được TopGit xếp vào nhóm dự án di động, với 4.7k sao trên GitHub, viết chủ yếu bằng Rust. Cross-platform game engine in Rust.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This will produce .wasm file in target/wasm32-unknown-unknown/debug/CRATENAME.wasm or in target/wasm32-unknown-unknown/release/CRATENAME.wasm if built with --release.
mkdir MyGame.app
cargo build --target x86_64-apple-ios --release
cp target/x86_64-apple-ios/release/mygame MyGame.app
# only if the game have any assets
cp -r assets MyGame.app
cat > MyGame.app/Info.plist << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>mygame</string>
<key>CFBundleIdentifier</key>
<string>com.mygame</string>
<key>CFBundleName</key>
<string>mygame</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
</dict>
</plist>
EOF
xcrun simctl install booted MyGame.app/
xcrun simctl launch booted com.mygame
For details and instructions on provisioning for real iphone, check https://macroquad.rs/articles/ios/
Tips
Adding the following snippet to your Cargo.toml ensures that all dependencies compile in release even in debug mode. In macroquad, this has the effect of making images load several times faster and your applications much more performant, while keeping compile times miraculously low.
[profile.dev.package.'*']
opt-level = 3
async/await
While macroquad attempts to use as few Rust-specific concepts as possible, .await in all examples looks a bit scary.
Rust's async/await is used to solve just one problem - cross platform main loop organization.
Details
The problem: on WASM and android it's not really easy to organize the main loop like this:
fn main() {
// do some initialization
// start main loop
loop {
// handle input
// update logic
// draw frame
}
}
It is fixable on Android with threads, but on web there is not way to "pause" and "resume" WASM execution, so no WASM code should block ever.
While that loop is blocking for the entire game execution!
The C++ solution for that problem: https://kripken.github.io/blog/wasm/2019/07/16/asyncify.html
But in Rust we have async/await. Rust's futures are basically continuations - future's stack may be stored into a variable to pause/resume execution of future's code at a later point.
async/await support in macroquad comes without any external dependencies - no runtime, no executors and futures-rs is not involved. It's just a way to preserve main's stack on WASM and keep the code cross platform without any WASM-specific main loop.
Community
Quads Discord server - a place to chat with the library's devs and other community members.
Awesome Quads - a curated list of links to miniquad/macroquad-related code & resources.
not-fl3/macroquad thuộc nhóm Mobile trên TopGit, cùng 5 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về not-fl3/macroquad ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/not-fl3/macroquad là nguồn chính thức.
not-fl3/macroquad có bao nhiêu sao?
not-fl3/macroquad có 4.7k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/not-fl3/macroquad. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
not-fl3/macroquad có những chủ đề gì?
GitHub topics của not-fl3/macroquad: "android", "game-engine", "ios", "rust", "wasm". TopGit xếp repo vào nhóm Mobile.
not-fl3/macroquad còn đang phát triển không?
Commit gần nhất trên not-fl3/macroquad là 3 tháng trước (theo timestamp GitHub). Repo có 441 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
not-fl3/macroquad viết bằng ngôn ngữ gì?
not-fl3/macroquad chủ yếu viết bằng Rust. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao not-fl3/macroquad được xếp vào nhóm Mobile?
TopGit xếp not-fl3/macroquad vào nhóm Mobile dựa trên GitHub topics và mô tả của repo (gắn thẻ: "android", "game-engine", "ios"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về macroquad?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về macroquad.