Just a quick note that I needed to make, this video explains how the fourth wall breaks of OneShot worked in the original PC version, not the World Machine Edition which is the version that is on consoles and that just released on Steam yesterday as of the writing of this comment. The World Machine Edition uses a completely different game engine compared to the original PC version (not sure which one) and instead of using the actual operating system to do its fourth wall breaks, it does them through a virtual "operating system" implemented within the game itself, which is how the game can work on consoles. A lot of the ideas and philosophies for these fourth wall breaks are still the same between both versions, but their implementation I'm almost certain is different. Anyway, just a heads up in case anyone has any questions relating to which version I am covering in this video.
As a game modder turned professional software engineer, I feel like I have to shout out the best method name I have ever seen. intelCPUsAreDumbAsBricks Which is the name of a method that takes a single value of any type and returns it, completely unmodified. It also has an annotation to make sure the compiler doesn't optimize it away, implying the compiler agrees with the author. I'll leave it up to your imagination whether that gem is in a game or not. It's pretty funny to see, either way.
@@ocelotmadness6287 I have no idea, that's the best part. Probably nothing but legacy code nowadays, but the original codebase is old enough that it could have at one point been fixing something
3:08 i'd like to clarify: mkxp-oneshot is ACTUALLY the game engine OneShot is running, it's also a fork of mkxp, which is a reimplementation of RPG Maker XP's engine
I have completed OneShot on Windows before, but I'm about to replay the game on Linux. The fact that even different desktop environments have special handling for desktop wallpaper is super interesting to me. No indie game developer in the world would go that far imo
3:15 im not sure if this is a reimplementation of the game; eliza is a developer for oneshot, and they forked mkxp for oneshot, but due to licensing, they need to open source it (which is how you can see that code)
i remember specifically trying to drag the game window when Niko does they're thing and was amazed that they werent just apart of the actual game somehow.. This game is so cool and awesome and i love it so much! And your explanations were great :3 !!
I appreciate the way you built up from the simple to the complex! Due to the ordering of this video's reveals, I was able to guess how the last one was done before you showed it!
//Spoilers: . . . I still remember the ending, I remember playing it as soon as it came out, every one in a while for whatever reason i keep remembering it, and i always go in my head "i remember you niko". I know it's weird to do it, but at the same time it became this fun little ritual i really enjoy doing. The excitement after you randomly remember something like that, you just go "wow! i still hold that moment inside my head"
i was so amazed by the oneshot mechanics, when i first time played it. my mind literally blown. so explaining the code from your video. it fascinated me.
The best video about OneShot, it was very interesting to look at the game code, even though I didn't understand anything^_^ Amazing video. Amazing game.
As an experienced programmer, the main takeaway for me is that mkxp exists, which is pretty cool. I didn't know about it. The actual implementation of things seemed pretty standard/trivial though (as expected and as they should be) If I recall though, I think the game actually reverts your desktop wallpaper to what it was before. I wanted to know some details about where it kept your wallpaper information and what niche features it possibly neglected to include in what it saves. Especially on Windows, wallpapers have some pretty weird and niche properties. (Things like slideshows and other dynamic things. They really experimented a lot with that during the Windows XP - 7 era) I also just remembered that Wallpaper Engine exists, which might make the entire mechanic impossible (without disabling WE) for some people. That's... oh well. TL;DR: pretty cool video! I liked how a lot of stuff was still implemented in RGSS, by mostly only using mkxp as *bindings*, or wherever it wouldn't be very reasonable P.S. I'm amazed they went out of their way to make a Linux version of the game, by the way. Linux has next to no guaranteed-to-be-available standards for anything so the work the devs put in to make it all work in various situations is very commendable.
I believe that Named Pipes are the windows equivalent to Unix Domain sockets, and so Oneshot uses message passing for its IPC rather than shared memory.
People generally forget that games are software. Displaying the graphics is the normal functionality, but any game in theory has near full access to the computer while it's running. DDLC also relies on tricks that, if you think about it, most games do anyway but don't bluntly say so to preserve suspension of disbelief. Though whatever being a programmer spoils meta surprises is subjective.
I THOUGHT I'D ALREADY SPOILED MYSELF TOO MUCH TO PLAY THE GAME AND THEN I DISCOVER THERE'S STUFF I DIDN'T REMEMBER BUT NOW DISCOVERING THAT MEANS DISCOVERING THE SOLUTION SO IM FULLY SPOILED AGAIN SO I DONT HAVE A GOOD REASON TO PLAY IT AAAA
I think the experience of playing oneshot is really cool. It's up to you of course but I watched a single playthrough before playing it and still enjoyed it.
@@solsystem1342 it still has been a bit since ive seen anything so maybe it'll be fun to just read the dialogue. I'll see how much it costs (i might have killed freeware niko :( )
24:41 Sadly on linux version niko will just disapper :( (Could be fixed cuz the game got a good amount of updates after i beat it in both windows and linux version)
So... the 7th method... there's ONE other way to pull off the same trick... which I've done in total error, as have many other C++ coders dealing with the WIN32 API directly (they were using SDL, which is much more recommended). TLDR.... if you do drawcalls to NULL, this is the desktop itself. So, in theory, you could draw on the screen without creating a window class... and things get very weird. Granted, this is NOT multi-platform friendly at all, and I'm sure that many Linux desktop environments absolutely forbid this kind of action.
Hearing TehAwesomestKitteh said out loud out of nowhere made me suddenly feel physically ill For those who are unaware, TAK draws nsfw of niko, alula, and other underaged characters and has been known to harbor and blindly defend groomers in their discord server.
For the desktop wallpapers, when you close the game, the wallpaper reverts back to your original wallpaper. How does the game do this? Does the game store your original wallpaper somewhere before changing it, then restores the wallpaper when the game finally closes? Or is there some windows function that allows temporary wallpapers? (This is a newbie question) As for the journal, how does the game make the window transparent? Does it just check what the color of the pixel behind is and then display that? Or do windows windows just have the ability to set a transparency value to the pixels? (I've never seen any other software do this so that's why im asking)
@@zaptrap4802 interesting questions! I looked back into those wallpaper binding functions and yea, just before the desktop wallpaper is set, OneShot does save the parameters of the old wallpaper into some global variables. There's another function in the binding class called "wallpaperReset" that sets the wallpaper parameters to those old values, so maybe OneShot runs that function when the game closes and is why it can reset it. For the journal, I believe the window uses a mask to accomplish its transparency. There are green pixels in the journal images in the places that would be transparent in the window. Those green pixels are masked out when those images are drawn which makes those pixels transparent. I'm not too versed with Windows API stuff so I am not exactly sure on the details of it. On the Unix version of the journal program, the window is set to have a translucent background. The pixels of the images in the unix version are transparent to begin with so there's no crazy masking going on with displaying those.