@SonnyBonds@mastodon.gamedev.place avatar

SonnyBonds

@SonnyBonds@mastodon.gamedev.place

PROGRAMMING / MUSIC / GAMES

C++, music and silly games as Sonny Bonds

Life as Anders

Owner/founder of Kilohearts

Former Meqon, AGEIA and Power Challenge

Somehow can't stay away from build systems.

he/him 🇸🇪

#cpp #audio #programming #gamedev

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

pervognsen, to random
@pervognsen@mastodon.social avatar

This came up in another thread today but I figure I'd throw a brief comment to the timeline. The concept of "grace periods" where you separate the logical and physical deletion of resources is something you see in RCU, EBR, QSBR, etc, but it's just as useful in single-threaded code where you only have pseudo-concurrency through subroutine calls. Like the age-old pattern of deferring deletion until the end of the game loop, or autorelease pools in Objective C which get drained by the run loop.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen What would you say the big upsides of e.g. "slot arenas" are compared to classic allocation of objects? Memory locality is obviously one, although I'm thinking that mostly affects operations that involve sequential iteration over objects?

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen Can you have generations in an arena with different object sizes? I'm thinking an old generation value should never end up in the middle of a new object, if that makes sense.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen Got it, just wanted to double check if there was some trick I hadn't thought about.

My most recent foray into it was mostly for a different reason; having clonable arenas so a full state can be synced between threads or stored for undo etc etc. But that means the arena location isn't static and needs to be passed around together with references and I never came up with a satisfactory way of doing that.

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

It looks a bit funny but Rc<Arc<T>> seems like a reasonable choice in a lot of cases. Specifically, you have locally shared ownership of a remotely shared resource instead of directly sharing ownership of the remote resource (which comes with contention issues). Most of the time you probably wouldn't literally have Rc<Arc<T>> but Rc<LocalStruct> where LocalStruct (transitively) has an Arc<T>. But same thing really.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen I've been thinking about this a bit in C++ but at that point I thought of it as some multilevel RC thing and for some reason it felt like it wouldn't work easily. But just wrapping an Arc in a Rc (or corresponding types) is a good and clear way of thinking about it!

(I did however try switching all shared_ptr for a nonatomic version and saw no apparent improvements on perf so I stopped thinking too much about it.)

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen Well unless I'm misunderstanding, it only needs one indirection for accessing the data and one for accessing the refcount since it stores both pointers (which may be a problem in itself by all means). But yes when doing both it needs to dereference two independent pointers.

There are of course other implementations than shared_ptr though, and std doesn't even have a non-atomic one. Was just thinking conceptually about the nesting.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@artificialmind @pervognsen We (ab)use weak_ptrs quite a lot for some event listener management and stuff so we don''t use make_shared for a lot of stuff. (We have a macro for Reasons for our UI components and it doesn't do make_shared.) It probably doesn't make a difference as the structures are neither huge nor allocated/deallocated a lot, but feels conceptually right.

For some other things that are more blobs of data and stuff we do use make_shared though. More of a vibes based policy. :)

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen @artificialmind Yes I totally see what you mean. Conceptually it's not really a 1:1 match, especially since the resources aren't really shared but has a pretty strict ownership hierarchy. The thing I like about it is that the refcount gives you lifetime extension. As long as you hold a ref you know it's valid, and can avoid rugpulling stuff like a component removing itself while it's processing an event etc etc without deferred freeing.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen @artificialmind Yeah there probably are better ways. I've messed a bit with arenas lately just prototyping things but haven't quite internalized how to work with it in a way that I really like.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@pervognsen @artificialmind Yes absolutely. I think a complicating (but not disqualifying) factor in our case is that we're making plugins and don't really have control over the "main loop". There's rather multiple entry points from both host and system. It's of course still possible to do it, autorelease-style or otherwise, but it makes it a little bit more annoying.

SonnyBonds, to firefox
@SonnyBonds@mastodon.gamedev.place avatar

Firefox users, is there any way to search youtube in the address bar? In Chrome I just type "you" and hit tab and it goes into a search right in the bar. Same for some other sites.

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

In my quest to reevaluate games I bounced off before, I’ve now moved on to Elite Dangerous, which I last played in 2019. As a bonus I now have a Thrustmaster Airbus edition flight stick (a friend found a job lot in charity shop and kindly gave me one) which improves the experience. I had to re-learn a lot and keep remapping the controls as I went so I didn’t get that far, but I didn’t hate it? I got bored really quickly last time but I’m kinda enjoying the chill space ship management. We’ll see

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@sinbad I really like the sound design in it. The calm and fairly silent environment really adds to the vibe.

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

If you use Mastodon on desktop (as opposed to mobile), I cannot praise highly enough Phanpy https://phanpy.social/
It really cleans up my timeline, handles replies very nicely, and allows for a great "refresh" (view updates) experience.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@xoofx @aras @BartWronski Also having to "open" a post to favorite it felt a bit cumbersome. Even for reply actually. I realize it makes the UI cleaner but not sure I like it.

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

After 6 months, I've had to resubscribe to Adobe PS. I work with too many people who send me PS files and there is no alternative that can open and save them reliability. It sad how many "helper" apps Adobe installs and how often they try to connect to the internet. I block them all, but it's scary. I have to unblock them every 30 days. Please do not suggest alternatives unless you know for a fact they load and save .psd files seamlessly. Do not suggest GIMP or I block you.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@grumpygamer I uninstalled it the other because even though I have a subscription from work I don't really use it.

I wasn't logged in, and had to log in to be able to uninstall. 🤯 Had to download a separate uninstall program to get rid of it without logging in.

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

Anyone running any nice shell on Windows that's not Powershell or regular cmd?

  • Tried nushell but didn't quite feel it.
  • I guess I could run any linux shell through WSL, but it has its whole own environment and I'm not sure I want that.
  • There are a few bash variants (git-bash, msys, etc etc) but it feels a bit boring. :D

Not sure what I'm looking for, just random suggestions!

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@SirLich Yeah maybe some bash variant is really what I should be using, idk.

pervognsen, to random
@pervognsen@mastodon.social avatar

Finally got so fed up with Windows that I installed Arch on my laptop (without the help of archinstall so it was a good learning experience). Gotta say, KDE Plasma 6 has blown me away. A few annoying defaults I had to change (e.g. floating panels as a default) but such a great experience coming from Windows 11: https://kde.org/announcements/megarelease/6/

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@wolfpld @pervognsen Out of curiosity, do you run any non-linux plugins in Reaper? Does that work well? LinVst or something else?

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@wolfpld @pervognsen
Cool I might check that out as well then.

No modern ASIO driver for an actual audio interface hijacks the system audio as far as I know. Not sure about asio4all etc but running WASAPI is possibly a better bet there anyway.

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

For the dev of my new game I've ditched Slack in favor of Discord for the dev team. One advantage of Discord is that most devs have a Discord account so I am not asking them to sign up for something new. So far, it's a big win. Slack has turned into a mess.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@grumpygamer I think Slack works well enough to at least not change for our existing team, but something I really miss is the same type of message replies as in Discord. The Slack threads are so cumbersome.

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

This is not a place of honor

No highly esteemed deed is commemorated here

What is here was dangerous and repulsive to us.

http://netflitwitter.com/

Tijn, to random
@Tijn@dosgame.club avatar

Discord on my old Mac just updated itself to a version my computer can't run 🙃

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@Tijn To be fair 10.14 isn't maintained.

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@Tijn Yeah agree. Chances are an old version isn't compatible with api updates and won't function anyway though.

gwEm, to random
@gwEm@mastodon.social avatar

I think Gen Z is absolutely correct : the thumbs up emote is most often rude

SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@gwEm I just sent a thumbs up text and immediately though "i wonder if that came across as passive aggressive"

SonnyBonds, to cpp
@SonnyBonds@mastodon.gamedev.place avatar

Any dyld/linkage experts out there that can make a wild guess as to why one plugin (ours) in loaded in a host process would call straight into another (someone else's)? On macOS.

I think our plugin is calling std::generic_category() but ends up in another module instead of libc++. (Can't reproduce it locally so my context is limited.)

Address in target module is always the same relative its base, which makes me think it's somewhat deliberate and not a jump to garbage address.

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

Don't want to start a war but if someone who may or may not be me would hypothetically try out linux, what distro should they try out?

  • Developer workloads, but want the average user desktop experience.
  • Possibly dual boot on a laptop.
  • Bonus points if easy to try out in a VM first.
SonnyBonds,
@SonnyBonds@mastodon.gamedev.place avatar

@drakonite I do use WSL (ubuntu) for testing some stuff, but would like to check out the full desktop situation.

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