stevedunn/pacmanblazor
This project, stevedunn/pacmanblazor, is a experiment in using Blazor WebAssembly to develop a game in C# with a focus on achieving a consistent 60FPS. The project includes a Pac-Man game, which manipulates the HTML5 canvas from C# code through Blazor interop. The game uses the Blazor.Extensions.Canvas
NuGet package for interaction with the canvas. The canvas has dimensions of 224x314, which is upscaled 3x3 to create a 672x944 canvas with a 0.711 aspect ratio. Sound is implemented using Howler, with C# code interacting with Howler via IJSRuntime
. Touch, swipe, and pan functionality are provided by Hammer.js. Upon starting the game, the C# world is initialized, and the JS code sets up input handling and animation frames. The game runs by calling a JS method every frame, which in turn calls the C# code.
Project Information
- Repository: SteveDunn/PacManBlazor
- Owner: SteveDunn
- Language: C#
- Created at: 2020-06-21
- Last Updated: 2024-10-31
Engagement Metrics
- Stars: 148
- Forks: 15
- Open Issues: 2
- Watchers: 148
- Subscribers: 11
Contribution Opportunities
- Issues are available for contributions.
- Project boards are active.
- Wiki is available for documentation and guides.
License
MIT License
Recent Contributors
SteveDunn
104 Contributions
stevedunnman
1 Contributions
dependabot[bot]
1 Contributions