wasm-snake
Uno.Wasm.Bootstrap
wasm-snake | Uno.Wasm.Bootstrap | |
---|---|---|
2 | 1 | |
7 | 354 | |
- | 0.6% | |
7.7 | 8.4 | |
2 months ago | 6 days ago | |
WebAssembly | WebAssembly | |
- | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wasm-snake
-
Classic Snake in Direct WebAssembly Text
All of the game graphics, state and logic are written in WebAssembly Text. The host environment (Javascript) is responsible for:
Game tick loop
User input
Providing characters "0123456789GAMEOVER" byte data on game startup
Blitting the pixel buffer to the display with WebGL2
The game uses 3 virtual pages of memory (64kb each) for a total of 192kb. Within those exist the pixel buffer contents, the characters data and snake positions. For more detailed breakdown you can check src/snake.wat.
The memory is shared between WASM and JS. On each game tick, the pixel buffer region of the memory is transferred to a WebGL2 texture, uploaded to the GPU and blitted to the screen.
For more info you can refer to the repo - https://github.com/gnikoloff/wasm-snake
Uno.Wasm.Bootstrap
-
Safely embedding .Net core in C++
If you want to give this a try, start with Uno.Wasm.Bootstrap. Most .NET wasm stuff you find online is Blazor-related, but the Uno bootstrap project lets you build a minimal .NET wasm application.
What are some alternatives?
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
Bridge.NET - :spades: C# to JavaScript compiler. Write modern mobile and web apps in C#. Run anywhere with Bridge.NET.
assemblyscript - A TypeScript-like language for WebAssembly.
dotnet-webassembly - Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.
Uno Platform - Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
raw-wasm - Raw WebAssembly demos
owi - WebAssembly Swissknife
awesome-wasm-langs - 😎 A curated list of languages that compile directly to or have their VMs in WebAssembly