@lisyarus@mastodon.gamedev.place
@lisyarus@mastodon.gamedev.place avatar

lisyarus

@lisyarus@mastodon.gamedev.place

He/him

I live in a totalitarian state, teach computer graphics, and make videogames

Check out my cozy traffic simulator: https://store.steampowered.com/app/2403100/Costa_Verde_Transport_Department/

This profile is from a federated server and may be incomplete. Browse more on the original instance.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Bringing the harvesting tool UI in line with the building tool, using these cute hex lines. I think this might be a nice enough general style for tools/selections/tasks/etc

video/mp4

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Your daily reminder that in almost all aspects of technology (and probably life as well) the answer to any question is not one of the fanatical "die on this hill" extremes, but a boring and unenlightening "it depends".

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Stress-testing the villagers' AI. There are quite a few bugs, but overall it performs quite well!

The video isn't sped up, but the in-game simulation speed (i.e. # of updates per frame).

video/mp4

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

The downside of using my own ECS implementation is that every week or so I need to fix an increasingly notorious low-level object lifetime / caching / etc bug

Though, I knew exactly what I'm signing up to

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So I was casually re-deriving some stuff from the VNDF sampling paper, and stumbled upon the humble "Jacobian of the reflection operator", tried computing it, and how I'm in a deep rabbit hole. Anyone got any ideas? :)

https://math.stackexchange.com/questions/4912592/jacobian-of-the-vector-reflection-operator

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

Somebody on math.se came up with a very nice argument, simply looking at how the Jacobian acts as a linear operator in a convenient basis, neat

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Say I'm manually profiling my code, e.g. recording how much time a function takes. Right now I'm storing all samples to build statistics (e.g. percentiles) on exit, but that means O(n) memory usage for samples. Are there (necessarily approximate) O(1) memory alternatives?

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Another weird raytracing bug! The black patches on the border are expected - these are artifacts due to having an extremely low-poly metallic surface with interpolated normals.

The white circles, however, are probably some funny floating-point business

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Quite a lot of people asked me to add an RSS feed to my blog, so here it is: https://lisyarus.github.io/blog/feed.xml

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I was reading about resource/asset packing file formats game engines use, and it seems that the answer always is "ad-hoc engine-specific binary format".

I'm starting to think that I'll just slap a zip file in here and be happy.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

There's also the thing about modding - to help modders you really want all formats to be dead easy and preferably just standard & widespread. I quite like the idea that the core game is just a special mod; and storing each mod as just a zip file makes things really convenient.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Managed to hack together a BVH and render this 10k-vertex Stanford bunny. At 1k resolution it takes several seconds per sample, so I guess I'll focus on optimizing that.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

GPU Monte Carlo path tracing goes brrrrrrr

This looks much smoother in reality, I had to massage vsync to prevent tearing when recording this

video/mp4

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So I was accumulating Monte Carlo samples using good old blending here, now I've switched to a compute shader explicitly blending into a storage texture and it is ~10x slower, interesting

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

So I messed with it a little and it seems that the storage texture itself isn't a problem (writing random values to it works with ~200 fps). Seemingly the core loop over the scene geometry is slower with compute. Interestingly, max ray depth doesn't affect the performance, as if it's prefetching all the data and then looping over it cached.

and folks, does anybody have a clue what's going on? This is wgpu-native, btw.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Made quite a few optimizations to my WebGPU pathtracer:

Ordered BVH traversal: 15 -> 19 FPS
Store vertex indices instead of triangle ID's in BVH: 19 -> 20 FPS
Don't use indexed geometry: 20 -> 24 FPS
Separate vertex positions from other attributes: 24 -> 27 FPS

Not bad

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I was really confused that the original Veach 97 paper that introduced multiple importance sampling describes something not directly applicable to pathtracing, with some unclear-how-to-use heuristics

I ended up re-deriving MIS myself and verifying it in several other sources

Now it turns out the pathtracing-relevant part is in the very end of the section, and only needs the simplest heuristic, and is equivalent to what I've derived earlier

That's a relief :)

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

My next (and final) lecture in the raytracing course will be about adding textures, so my plan for today is to slap some colors on this bad boi

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

You're in the Matrix, Neo

video/mp4

eniko, to random
@eniko@peoplemaking.games avatar

i know im supposed to be on break but i got bored and started working IM SORRY

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@eniko No idea, unfortunately :(

I could recommend going outside, doing something physical far from the computer, but I know from experience that it doesn't work :(

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

A guy sitting in a subway train, drinking adrenaline rush

I guess he's now
s i t t i n g
f a s t e r

eniko, to random
@eniko@peoplemaking.games avatar

i dont understand achievements. i dont understand why the act of playing literal video games needed to be gamified

note: please don't explain achievements to me. it will not help me understand, it will only annoy me

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@eniko I know many people who love them. I usually don't care at all. The only interesting thing is comparing your achievements to others, e.g. in Steam. Not as in "haha I'm better than you", but just seeing how many players reached a certain point in game, and comparing it to my own feeling of how difficult it was to reach it. Maybe it's just my inner game designer analysing stuff, though :D

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So I was giving a guest lecture in local school about random math that turns out to be useful in gamedev, and now their programming teacher is asking for my email

Oh no

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

My guess is they want to offer me to teach some programming-related courses, which is cool by itself, but I'm already drained of energy and also schoolchildren are sooo much harder to work with than grown up students

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Third day debugging GPU workgroup atomics to squeeze more perfomance from my raytracer, but it still hangs :(

Here's a cool debug visualization though :)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

Here's another fun viz. This one is especially cool because you can directly see the GPU warps (little 8x4 pixel blocks) as opposed to workgroups (which are 8x8 here)

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So I decided I don't want behavior trees for my game's agents' AI, so I implemented GOAP, then realized GOAP doesn't work for me, so I implemented a simple "reusable action queue" thing, then these actions became stateful and suspendable and hierarchical, and guess which pattern allows for hierarchical stateful suspendable actions...

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

Btw to anybody saying to "just write AI as code": the AI in this game is one of the heaviest and most complicated things, and without adhering to some structure it instantly turns into a unhinged undebuggable mess. Trust me, I did it this way a dozen times, it just doesn't work.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • tester
  • InstantRegret
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • provamag3
  • megavids
  • lostlight
  • All magazines