Replies: 1 comment 1 reply
-
|
I update the frame buffer in quite a different way - I'm using unsafe code and pointers rather than accessing the array elements through the index property. I've written a bit about this in part 5: https://www.jamesdrandall.com/posts/csharp_blazor_wolfenstein_part_5_decoding_maps_and_performance/ Part 6 is on the way and its fully rendering walls, doors and ceilings now and runs at about 30fps in a debug build and 40fps in a release build. The array index approach was definitely slower but I don't recall it being that slow. I think I was running at around 20fps. in a release build. Be interested to see what switching to pointers does, if its still running like a snail then pop the code somewhere and I'll take a look. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi James,
I was reading your Wolfenstein c# porting blog and decided I'd try looking at the endering code you'd implemented.
Following Part 1, I tried implementing identical code in WPF and Blazor Webassembly to see what the differences were.
To that end, I updated your
Rendererclass so that it showed a different image on every frame:For some reason, the FPS went right down to 1fps. Are you seeing a similar effect? Have you got to the point when you're updating the actual pixels on the screen through this method? Am I missing something that you've implemented further down the chain?
Beta Was this translation helpful? Give feedback.
All reactions