DEV Community

Konrad Chmielecki
Konrad Chmielecki

Posted on

2 1

my experience with blazor

When I wrote my first project in this year, I don't even planed to used blazor. But my childlike curiosity directed me on that path.
I wanted to know, haw hard will be port game from desktop to web browser in .net. And I found out is not that hard.
But I have experience with similar tools before. I used gopherjs and emscripten.
Thanks to that I know what must to do, to communicate c# with javasrcipt.
I made working blazor port pretty fast. Not only server side but webassembly to.
Of curs create port for different platform always generate some problems.
Most weird problem I have in blazor is how floating point number behave.
I received in some cases NaN values. This problem I resolve adding value like 0.0001 in calculation.

Blazor server work differently then wasm. But I don't expected that server version will be cause game to flickering.

game flickering

This is happen when server don't have enough cpu power.

Now when I know pros and cons of blazor for creating game, I start thinking about next game.
But I focus only on wasm version and smartphones. This will be challenge, I do not doubt that.
Maybe blazor is not perfect tool for this task. But I see some potential, and is nice to use c# in web browser.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay