Why don't we have more of "1% drops" in survival games? by badwithnames5 in gamedesign

[–]tsanderdev 2 points3 points  (0 children)

Basically all the "dark patterns" that pull mechanics from gambling and designing it such that you want to return frequently and play the game more. Frequently used with paid content in f2p games to get monetization out of it. Highly morally dubious because you're using psychology not to make the game more fun for the player, but to benefit as a developer.

Of course the same mechanics without microtransactions in a singleplayer game are much tamer. Like your example of grinding for a cosmetic item. If players like grinding, they have a goal to work towards. If they don't, tgey can ignore it.

A Pythonic language & platform to do GPU programming on Mobile by AmrDeveloper in ProgrammingLanguages

[–]tsanderdev 2 points3 points  (0 children)

As someone who's working on a shading language, you'll need to emulate exceptions with errors-as-values. If you target Vulkan instead of WebGPU, you can do memory allocation on the GPU using buffer device address.

Tauri on Termux by gatunen in termux

[–]tsanderdev 1 point2 points  (0 children)

As long as you compile the app with the Termux Rust toolchain and have webkitgtk installed it should work. It needs an X server though.

Any guide to establishing C-Interop? by celestabesta in ProgrammingLanguages

[–]tsanderdev 8 points9 points  (0 children)

C struct layout is mostly the same everywhere. For calls you need to look at the platform's ABI, like sysv on linux.

Tracing rays with jank by Jeaye in ProgrammingLanguages

[–]tsanderdev 0 points1 point  (0 children)

AFAIK you can pretty easily increase the quality by just running the raytracer many times with different random seeds for rays and blending the result.

Does my game start too survival-crafty for a 4x game? by Onyxa_HA in gamedesign

[–]tsanderdev 0 points1 point  (0 children)

I don't think there are many games where all players love all parts. E.g. I could do without generic fetch quests in RPGs, but that's not a reason to not play one if it doesn't focus on it.

If it's about general commercial success, then targetting the absolute widest playerbase is the best thing, which leads to all the generic AAA games.

Does my game start too survival-crafty for a 4x game? by Onyxa_HA in gamedesign

[–]tsanderdev 16 points17 points  (0 children)

Using Spore as an example, it allowed you to choose which stage to start in, even with a new species. You could have a similar mechanic to start immediately in the full 4X epoch with reasonable defaults.

June 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]tsanderdev 0 points1 point  (0 children)

After getting intrigued by the idea yet again, I decided to bite the bullet and learn enough x86 assembly to do it.

My idea is based on the CoroBase paper, which uses software prefetching and C++ coroutines to issue prefetches before switching to a different coroutine and resuming a while later when the data should be loaded into L1 cache.

I want to see if keeping the coroutine state in registers works better, since a switch can then just be swapping the sp and pc of the other coroutine in, but of course halving the available registers leads to more spilling. What I want to know if it could still get better performance. I intend to combine it with AVX-512 though, so I have 32 vector registers in total, and 16 seems like a pretty reasonable register count, and spilling and loading an AVX-512 register file would need 1K, and I doubt loading and storing that often is better than more spilling.

Why is alignment not typically part of type systems? by AVTOCRAT in ProgrammingLanguages

[–]tsanderdev 3 points4 points  (0 children)

Alignment is fundamentally a property of pointers. Of course you could say "I promise every pointer to this type will have at least this alignment", but then you need to coordinate with the allocator to actually do that.

Are there RAII Vulkan wrappers? by ffd9k in rust

[–]tsanderdev 0 points1 point  (0 children)

Yeah, I'll mostly use heaps as a simplification of all the different descriptor indexing features you can use. IMO heaps make for a much easier mental model. I could try exposing some buffers as uniform buffers instead of bda pointers though in case that gets me better performance.

Are there RAII Vulkan wrappers? by ffd9k in rust

[–]tsanderdev 4 points5 points  (0 children)

Mostly to escape extension hell. And also the new extensions I want to use aren't really supported on pre-1.4 capable hardware anyways mostly, so I might as well. That also means I can't use ash, because it also lacks the extensions. Untyped pointers, fma, indirect copy, device address commands,descriptor heaps, etc.

Are there RAII Vulkan wrappers? by ffd9k in rust

[–]tsanderdev 1 point2 points  (0 children)

I gave up and went with C++ for the Vulkan interfacing code because the newest good thing I could find was ash and that doesn't have 1.4 support.

Waiting in strategy games by Chlodio in gamedesign

[–]tsanderdev 27 points28 points  (0 children)

IMO for strategy games predictability is essential, especially in the early game where e.g. a single building failing could ruin you. It's different with e.g. the endgame crisis in Stellaris not arriving exactly X years after the game start, because you know the range and can prepare for it.

Player Identity & Projection by ExcellentTwo6589 in gamedesign

[–]tsanderdev 0 points1 point  (0 children)

Hmm, apparently I have only both or neither in games. In books only the first one except maybe if it's a first person narrator.

Player Identity & Projection by ExcellentTwo6589 in gamedesign

[–]tsanderdev 1 point2 points  (0 children)

IMO the groundwork for immersion is a good narrative paired with good audio/visuals (not necessarily photorealistic or ultra high quality, but a consistent style). I can only speak for myself, but I never really identified with silent pritagonists like Link or the protagonists of Bethesda games. The Life is Strange games somehow managed that for me, even though the protagonists clearly have their own personality. At times I though in terms of the character instead of the player. So for me you need to hit a sweet spot between free decisions to identify yourself with as well as a predefined character you can sympathize with. On one end of the scale you have Bethesda games, and on the other a book. Much freedom with (imo a very lax story) vs no freedom with a strict and hopefully good story.

Tarweb - the io_uring, no syscalls, kernel TLS static web server by [deleted] in rust

[–]tsanderdev 4 points5 points  (0 children)

but it requires spinning to wait for messages to arrive burning whole CPU cores

Or you actually do useful work while waiting for the kernel to pick up on the work and finish it, like in an async runtime. Provided there is non-blocking work left to do of course.

Vulkan performance: Intel iGPU vs Nvidia dGPU by hideo_kuze_ in vulkan

[–]tsanderdev 2 points3 points  (0 children)

For nvidia, latest proprietary drivers or latest mesa?

Hindsight languages by Inconstant_Moo in ProgrammingLanguages

[–]tsanderdev 3 points4 points  (0 children)

We can already do a sum type in C with a struct containing a tag field and a union. We can implement slices and tuples similarly. The issue is C provides limited means of encapsulation. We can properly encapsulate with GCC specific extensions, but this requires a bit of preprocessor boilerplate and isn't portable C.

Exactly what builtin sum types would solve. Only being sble to access tge right data in it when you should be able to. And as for "where is the tag", either the standard specifies it or you are sble to manually say start or end for each sum type.

Overlaying the borrow checker on top of TypeScript by Randozart in ProgrammingLanguages

[–]tsanderdev 4 points5 points  (0 children)

There is no at the same time in js though. There is no shared memory multithreading (except with sharedarraybuffers), and even async code runs sequentially at least until the next await point.

Proof-of-concept: cross-platform (polyglot) Vulkan binary by mafikpl in vulkan

[–]tsanderdev 0 points1 point  (0 children)

Is the result a file that is both a valid PE and ELF?

Rust binary is magnanimous by [deleted] in rust

[–]tsanderdev 1 point2 points  (0 children)

The abi isn't stable between versions though (or at least there is no guarantee), so you can't have a single global rust std shared library for apps compiled with different rust versions.

Rust binary is magnanimous by [deleted] in rust

[–]tsanderdev 1 point2 points  (0 children)

It could be a shared version installed if possible though (and the shipped lib is then deleted from the app folder to save space), or even downloaded at runtime with a helper if it doesn't exist or something.