@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

Now that I've fixed most bugs & memory leaks, I can get back to actual content. Continuing with trees, I want chopping them to feel pretty involved, so here the guys remove the trees' leaves & branches and saw them into individual logs:

video/mp4

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@andrybak Both! And also for crafting, and the branches that will later come out of trimming the trees will also be used.

Pretty nice actually, technical issues aside, I'm more or less following it!

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,
@lisyarus@mastodon.gamedev.place avatar

One idea I had is to record the sum of samples, sum of squares, min & max, then assume the maximal entropy distribution on [min, max] given mean & variance (truncated normal), but that's just a shot in the dark.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox Yeah, that's what I'm doing right now, but I was interested of there are smarter ways of doing this :)

Someone on twitter suggested log-scale bucketing (with some granularity), which in practice should use very little storage

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox Oh, interesting!

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@pkhuong Very nice, thank you!

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@rojun Interesting idea!

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

Finally finished rewriting the AI using behavior trees, fixed all the outstanding & newly emerged bugs, and I can now move on to more exciting stuff! ^_^

Footage of a village building game prototype where a bunch of villagers pick up axes and proceed to cutting down a bunch of trees.

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

God this one was hard to debug. A tiny very specific error in the ECS messed up entity metadata, which led to duplicate entity IDs, which led to different AI instances operating on the same erroneously shared data, which led to single-threaded code behaving like multi-threaded code without locks.

Ooph.

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

Peak

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@curved_ruler What's Delaunay noise?

lisyarus,
@lisyarus@mastodon.gamedev.place avatar
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,
@lisyarus@mastodon.gamedev.place avatar

@eniko Right! And I can add any unhinged features that I feel like.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@slembcke I'm hoping to get to that state soon as well :)
Just not there yet...

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

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@dotoscat Well that would've been hilarious

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

https://carette.xyz/posts/state_of_vulkan_2024/

TL;DR: Too hard to learn; many people stick with OpenGL. In the meantime, a colleague at my university asked if it would be safe to basically switch to path tracing altogether for year 2 courses next year, using the APIs to render 2 tris essentially...

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@BartWronski @dotstdy @jbikker @gob I've been teaching a real-time graphics course for 3 years by now using OpenGL. In one semester we manage to get to things like deferred shading & volumetric shadows, while with Vulkan we could probably get to rendering a textured quad by this time.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@gob @nical I agree with what you've said, but for me, a hobbyist gamedev, WebGPU actually strikes the perfect middle ground: I'm sick of OpenGL, and I want to use a modern API if just for a cleaner API, while Vulkan is simply too much for me.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@BartWronski @dotstdy @jbikker @gob Yep, exactly! I wouldn't blame your attention span here. While learning, it's immensely important to know the reason behind stuff, to keep track of context, and to absorb things slowly, one at a time. Vulkan just doesn't allow that.

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

In other news, made an icosahedron from coloured magnets

image/jpeg

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

Rewriting the current villagers' AI using my behavior trees library. On one side, I now remember why I dislike this pattern (verbosity, hard to debug, information flow hacks), but at the same time I see how my code simplifies and gets more robust, so there's that.

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 Been there done that

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

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

@kwramm I have a post about designing a behavior trees library in C++, though it's more about library design than about the pattern itself: https://lisyarus.github.io/blog/posts/behavior-trees.html

There are Bobby Anguelov's streams about game AI in general:

https://www.youtube.com/watch?v=G5A0-_4dFLg

https://www.youtube.com/watch?v=5ZXfDFb4dzc

There's also this GDC talk about GOAP specifically:

https://www.youtube.com/watch?v=gm7K68663rA

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