使用Rust和WebAssembly进行游戏开发:学习如何在构建游戏的同时在Web上运行Rust

使用Rust和WebAssembly进行游戏开发:学习如何在构建游戏的同时在Web上运行Rust

使用Rust和WebAssembly进行游戏开发:学习如何在构建游戏的同时在Web上运行Rust
在Rust中为web编写一个无休止的runner游戏,并使用WebAssembly工具链测试、部署和调试2D游戏
主要特征
通过这本有帮助的指南,用彩色打印的关键图片,从头开始为web构建和部署一款无止境的跑步者游戏
了解如何通过WebAssembly使用Rust进行web开发
探索现代游戏开发和编程技术,使用Rust构建2D游戏
书名
Rust编程语言连续6年在Stack Overflow上保持最受欢迎的技术排名,而JavaScript连续9年在每个web浏览器上运行,成为使用最多的编程语言。现在,多亏了WebAssembly(或Wasm),你可以在无处不在的平台上使用你喜欢的语言。
这本书是一本易于阅读的参考书,帮助你开发自己的游戏,教你所有关于游戏开发的知识,以及如何从头开始创造一个无穷无尽的跑步者。首先在浏览器窗口中绘制简单的图形,然后学习如何在屏幕上移动主要角色。您还将创建一个游戏循环、一个渲染器等等,所有这些都是完全用Rust编写的。在屏幕上显示简单的形状后,您将通过添加精灵、声音和用户输入来扩展挑战。随着您的进步,您将发现如何实现程序生成的世界。最后,您将学习如何保持锈迹代码干净有序,以便继续实现新功能并在web上部署应用程序。
在本Rust编程书的末尾,您将在Rust中构建一个2D游戏,并将其部署到web上,并且有足够的信心开始构建自己的游戏。
你将学到什么
使用WebAssembly在web上构建并部署Rust应用程序
使用wasm bindgen和Canvas API绘制实时图形
写一个游戏循环,用键盘输入动态动作
探索碰撞检测,创建一个动态角色,可以在平台上跳上跳下,并从孔中坠落
使用状态机管理动画
为无止境的跑步者按程序生成水平
加载和显示用于动画的精灵和精灵图纸
测试、重构并保持代码的干净性和可维护性
这本书是给谁的
本游戏开发书面向对Rust感兴趣的开发人员,他们希望在web上创建和部署2D游戏。希望在web平台上使用WebAssembly而不使用C++编程的游戏开发人员,或者希望探索WebAssembly和JavaScript web的web开发人员,也会发现这本书很有用。这本书还将帮助那些想要从服务器端转移到客户端的开发者熟悉WebAssembly工具链。基本编程知识是假定的。
Game Development with Rust and WebAssembly: Learn How to Run Rust on the Web while Building a Game
Write an endless runner game for the web in Rust and test, deploy, and debug your 2D game using the WebAssembly toolchain
Key Features
Build and deploy an endless runner game for the web from scratch through this helpful guide with key images printed in color
Learn how to use Rust for web development with WebAssembly
Explore modern game development and programming techniques to build 2D games using Rust
Book Description
The Rust programming language has held the most-loved technology ranking on Stack Overflow for 6 years running, while JavaScript has been the most-used programming language for 9 years straight as it runs on every web browser. Now, thanks to WebAssembly (or Wasm), you can use the language you love on the platform that’s everywhere.
This book is an easy-to-follow reference to help you develop your own games, teaching you all about game development and how to create an endless runner from scratch. You’ll begin by drawing simple graphics in the browser window, and then learn how to move the main character across the screen. You’ll also create a game loop, a renderer, and more, all written entirely in Rust. After getting simple shapes onto the screen, you’ll scale the challenge by adding sprites, sounds, and user input. As you advance, you’ll discover how to implement a procedurally generated world. Finally, you’ll learn how to keep your Rust code clean and organized so you can continue to implement new features and deploy your app on the web.
By the end of this Rust programming book, you’ll build a 2D game in Rust, deploy it to the web, and be confident enough to start building your own games.
What you will learn
Build and deploy a Rust application to the web using WebAssembly
Use wasm-bindgen and the Canvas API to draw real-time graphics
Write a game loop and take keyboard input for dynamic action
Explore collision detection and create a dynamic character that can jump on and off platforms and fall down holes
Manage animations using state machines
Generate levels procedurally for an endless runner
Load and display sprites and sprite sheets for animations
Test, refactor, and keep your code clean and maintainable
Who this book is for
This game development book is for developers interested in Rust who want to create and deploy 2D games to the web. Game developers looking to build a game on the web platform using WebAssembly without C++ programming or web developers who want to explore WebAssembly along with JavaScript web will also find this book useful. The book will also help Rust developers who want to move from the server side to the client side by familiarizing them with the WebAssembly toolchain. Basic knowledge of Rust programming is assumed.

评论可见隐藏内容
此处内容评论后可见

温馨提示:此处为隐藏内容,需要评论或回复留言后可见

评论/回复

OR

付费隐藏内容
此处内容需要权限查看

该内容查看价格:¥5 / VIP会员免费

登录后购买 开通VIP免费查看
分享到 :
相关推荐

发表回复

登录... 后才能评论