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.

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up