@molecularmusing@mastodon.gamedev.place avatar

molecularmusing

@molecularmusing@mastodon.gamedev.place

Founder of Molecular Matters • C++ & low-level programming • Created Live++: https://liveplusplus.tech

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

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

Somebody submitted Live++ to the orange site and the comments did not disappoint.

It's simple: use DLLs, reload them, and tell your devs to never use anything stateful like globals, function statics, or TLS. Done.

In fact, Casey built this in a single day for Handmade Hero.

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

Same time, last year... gosh, I still miss you so goddamn much my big white buddy.
Still heartbroken that you're no longer with us.

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

As a surprise holiday gift, I am excited to announce that after several months of work, Live++ will finally be coming to PlayStation®5 in 2024!

https://youtu.be/g1-94kqUN08

Watch this space for an announcement of a Closed Beta soon.

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

I heard people doubting whether Live++ could ever be brought to consoles, since it's allegedly tied to Visual Studio and the MSVC toolchain. This is proof that there's always a way.

Hot-Reload, Hot-Restart, Hot-Deoptimize, it's all there.

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@Doomed_Daniel Let me finish this one first :D

But yes, maybe, who knows...

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

Overall, I quite like Mastodon, but what drives me absolutely, completely, totally, bonkers is how it handles, or rather doesn't handle, post history.

Example: a few weeks ago I posted a question about optimized binary search implementations. The resulting thread contained a lot of really good info from various people. I saved it, thinking I'd go back through it later when I had space for it in my brain.

Now, when I visit that post, there's almost nothing left: https://mastodon.gamedev.place/@rovarma/111246663566919985

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@rovarma Summoning @badlogic because I think:
a) he understands why it is like it is on a technical level and
b) wrote a client that can show you all replies.

At least I hope so!

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

@pervognsen in your experience what is the nicest way to do a platform abstraction over something like say "sockets", the two approaches I have been able to come up with which are very common is:
A) inside a struct have a pointer-to-handle and define that handle on the platform layer.
B) define the structs in a platform exclusive file and use your build system to select the correct file.

B avoids one allocation that might happen in A but I don't have the experience to see their full implication

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@pervognsen @Sharlock93 Where possible, I try to avoid unnecessary abstractions and let the layers use a typedef-ed platform-specific type instead, e.g.:

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

Bringing Live++ to remaining consoles is hard, but I get to do some assembly programming again, which is a lot of fun and something I haven't done in a long time.

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@badlogic Nope, Nintendo wasn't very interested the last time I talked to them. Will try again once PS5 has shipped.

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

I've been researching optimized binary search implementations for environments where every cycle matters, particularly w.r.t. cache efficiency/branch prediction.

Stumbled on these excellent articles by @pkhuong from a long time ago:

https://pvk.ca/Blog/2012/07/30/binary-search-is-a-pathological-case-for-caches/

https://pvk.ca/Blog/2012/07/03/binary-search-star-eliminates-star-branch-mispredictions/

Any more resources I should know about? Context is binary search through a large-ish (512K-2M elements) fixed-size array with assumed pow2 no. elements and 16b per element. Other algorithm suggestions also welcome!

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@rovarma @pkhuong How often do you perform the binary search? Is this something where you get the keys from an external source and then binary search through the data just once?
What's your ratio of "store data in large array" to "perform a lookup" here?

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@rovarma That was my suspicion, and in that case, I would recommend Swiss Hash Tables.

I use them in a few places, e.g. repeated lookups against 4M+ of symbols, and they won against everything else I tried.
I only use binary search in "build once", "lookup once" cases where the data comes in sorted anyway.

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@pervognsen @rovarma Thought about that as well. In @rovarma 's case, the keys do have locality, so repeated binary lookups against similar keys could be faster.

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

edit-and-continue is just broken, right?

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@c0de517e @pervognsen Out of curiosity: do you think 10€ per month are too much for that kind of software or is this more of a general "don't like to pay for software for private projects"?

molecularmusing, to gamedev
@molecularmusing@mastodon.gamedev.place avatar

Live++ 2.3.2 out now:
Improved compatibility with Clang, support for large PDBs containing nil pages.

https://liveplusplus.tech/releases.html

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

Is there a disassembler on Windows or online for x86-64 that will show an instruction's encoding with all the prefixes, opcode, ModR/M, SIB, down to the bit-level?
I need to massage instructions and this would certainly help.

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

Dear Unity board members: You need a CEO that understands and loves game engines. I'll take the job for $11 million a year. Look, I just saved you $1 million dollars a year. Dividends are already starting to pay off.

molecularmusing, (edited )
@molecularmusing@mastodon.gamedev.place avatar

@grumpygamer You'd save them a ton more:).

Throughout 2021, JR sold shares worth $25M on average per month.

haukethiessen, to Unreal
@haukethiessen@mastodon.gamedev.place avatar

To all the users who feel validated in their engine choice: The decline of means that Unreal is losing its primary competitor. Simultaneously, the use of in-house engines is becoming less viable for many companies, as CD Project Red's switch to Unreal shows.
Just give Epic 1-2 years, and you'll see adjustments to their licensing options to adapt to this altered market situation.📈

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@pervognsen @haukethiessen 100% agree.

Fortnite is 96% of Epic's revenue and they have grown to ~4000 employees.
If Fortnite revenue falls off a cliff, everybody can do the math what that means.

pervognsen, to random
@pervognsen@mastodon.social avatar

Il Maestro.

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@pervognsen Nice, going from O(log n) to an assumed O(log(n)^2) to a final O(1).

Can you teach me how to do that please :D ?

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

With PDB sizes getting alarmingly big these days (approaching 8GB), I whipped up an example for RawPDB that shows the individual PDB stream sizes, the biggest offenders, etc.

This could be useful for people trying to get their PDB sizes down to at least have a bit of a starting point of what contributes the most to a PDB.

https://github.com/MolecularMatters/raw_pdb

image/png
image/png

molecularmusing, to gamedev
@molecularmusing@mastodon.gamedev.place avatar

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

"Why does the Live++ video feature Quake? Isn't that quite old?"

Good question!
It's a showcase to convey the fact that your C/C++ code doesn't have to be written with Live++ in mind.

Quake is 27 years old by now, Live++ wasn't around back then.

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

Dear Squeaks,

Thank you giving us 2 more days for saying our goodbyes.
Thank you for 10 years of your companionship, your affection, and your love. You were such a kind and gentle soul.

Know that we loved you every single step of our way together. You will be dearly missed.

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

What should have been a Win32 ShellExecute() API one-liner is turning into an odyssey of having to write my own magic .lnk files, opening them instead as a workaround just to get Windows Explorer to open some "very special" folders.
Sigh.

molecularmusing,
@molecularmusing@mastodon.gamedev.place avatar

@Doomed_Daniel Very special folders on a certain console platform. Only Windows Explorer can access them.
You can't ShellExecute() to them. You can't create a PIDL for them. You can't navigate to them using COM/Shell automation.

Creating a .lnk and opening that instead is my last resort!

The .lnk itself also is very special and cannot be created using the IShellLink interface, for the reasons stated above.
Have to create a magic .lnk by writing a binary file containing the correct data myself.

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