Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jackpotdk/BlazorGame
BlazorGame is a small proof-of-concept project to investigate the feasability of Blazor-based C# game development.
https://github.com/jackpotdk/BlazorGame
Last synced: 19 days ago
JSON representation
BlazorGame is a small proof-of-concept project to investigate the feasability of Blazor-based C# game development.
- Host: GitHub
- URL: https://github.com/jackpotdk/BlazorGame
- Owner: jackpotdk
- License: mit
- Created: 2020-06-03T13:46:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T04:30:57.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T15:04:14.688Z (4 months ago)
- Language: C#
- Size: 916 KB
- Stars: 21
- Watchers: 2
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BlazorGame
BlazorGame is a small proof-of-concept project to investigate the feasability of Blazor-based C# game development.A quick build is hosted [here](https://blazorgametestbuild.azurewebsites.net/). Once the black square appears, click inside the square to spawn a new sprite.
This project relies heavily on the work done in [Blazor Canvas](https://github.com/BlazorExtensions/Canvas). However, as this has not been updated for a while, I have included (an updated version of) it as part of this project.
Once/if BlazorCanvas gets an update, this project will be updated to support the NuGet.
# What it does
Not much, but some basics and essentials that are nice to have running for anyone looking to do games:
- Opens a re-sizable Canvas.
- Demonstrates calling into JS from WASM, and calling back to C# from WASM.
- Hooks up requestAnimationFrame
- Hooks up eventlistener for mouse clicks
- Renders an object (using WebGL) when you click inside the Canvas.# Notes
- Builds against the release version of Blazor WebAssembly (3.2.0) and .NET Core SDK (3.1.300 or later).
- "Sprites" are rendered by updating the vertices of all sprites each frame. I realize this is not ideal, but it works for this test.
- texImage2D support in BlazorCanvas is broken, so the textures is loaded through a JS interop call to loadTexture.
- The GarbageCollector is very busy. Either I may be doing something wrong, or there is room for improvement.# Contributions and feedback
Please feel free to use / learn from this code, open issues, fix bugs or provide feedback.
# Contributors
If you want to get in touch, reach me at [email protected]