43 karma · joined Dec 9, 2024 (1y ago) · 19 submissions
comment 1mo ago · link · parent
Foreach loops use compile-time duck typing, so if you don't intend to use your enumerable in LINQ then both the enumerable and enumerator don't need to implement any interfaces.
This optimisation covers only one common use case, but that's the way of things in C# land.
comment 7mo ago · link · parent
comment 1y ago · link · parent
var pixels = new uint[renderers.width * renderers.height];
var pixels2 = MemoryMarshal.Cast<uint, ulong>(pixels);
pixels2[idx] = ...
In NET9.0 pixels2 were Span<ulong>, but in NET10.0 a different MemoryMarshal.Cast overload is used and it is ReadOnlySpan<ulong> now, so the assignment fails.Spans is such a fundamental tool for low level programming. It is really unfortunate they were added relatively late to the language. Now every new version includes a slew of improvements related to them but they will never be as good as if they were there from the start or at least as early as generics were.
comment 1y ago · link · parent
I think for a civilization capable of sending reasonable amount of people people at reasonable speeds to colonize such planets, creating suitable atmosphere, lighting and heating is very much possible. Gravity is the only hard requirement.
comment 1y ago · link · parent
And I don't think any of the above is necessary. Even according to their graphs popular doom ports can render huge maps at sufficiently high fps on reasonably modern hardware. The goal of this project, as stated in the doomworld thread, is to be able to run epic maps on a potato.
comment 1y ago · link · parent
Software rendering engine, yes (and even then you can parallelize it). But there is really no reason why doom maps can't be broken down in polygons. Proper sprite rendering is a problem, though.
19.
Show HN: FakeDoom – software renderer written in C# and JavaScript(github.com ↗)
1 points · by kfuse · 1y ago · discuss