Project goal is write from scratch 2D Snake in .net 6.
This project contains port for Blazor Server and Webassembly.
I adding Blazor for proof of concept. Game on Blazor don't
works 100% same way like desktop version.
Weird problem is with floating-point numbers. Is behave differently
between Desktop and Blazor.
And this create some problems with proper calculation.
- libraries:
- OpenTK
- OpenGL4
- tools:
- Rider
- Blender
- Linux
- Windows
- WebBrowser (experimental)
Function | Keys | |
---|---|---|
Menu | Escape | |
Option Up | W | ArrowUp |
Option Down | S | ArrowDown |
Accept Option | Space | Enter |
Turn Left | A | ArrowLeft |
Turn Right | D | ArrowRight |
git clone https://github.com/3mam/PolySnake.git
cd PolySnake
dotnet run --project Poly
Blazor server.
dotnet run --project BlazorServer
In browser go to this url.
Blazor webassembly.
dotnet run --project BlazorWasm
In browser go to this url.
cd Poly
For Windows.
dotnet publish -c Release --runtime win-x64
For Linux.
dotnet publish -c Release --runtime linux-x64