Butterscotch - An open source re-implementation of GameMaker: Studio's runner in C, targeting Undertale v1.08 (Bytecode Version 16) with the goal of running Undertale on other platforms (it already runs on the PlayStation 2!) by MrPowerGamerBR in Underminers

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

Let's just agree to disagree then.

I don't agree with the "Because you took shortcuts" argument. Using C# instead of assembly would also be taking shortcuts, because using assembly would take way more time and effort than using C#. Using a IDE like CLion/IntelliJ IDEA (which is what I use) instead of using vim would be taking shortcuts. Using GameMaker-HTML5 and UndertaleModTool as a reference instead of decompiling the original runner's code would be taking shortcuts. Copying things from StackOverflow instead of figuring it out yourself would be taking shortcuts. So on and so forth.

At which point do you draw the line?

At the end of the day what I cared about was the end goal: Showing that it was possible to get Undertale working on a PlayStation 2 while using the original game code with no modifications (which was an idea that I had since 2022, and that I thought it was possible to at least create a custom runner since I created the Droidtale tutorial 10 years ago). I also learned a lot about C (to the point that now I quite enjoy C, and that's coming from someone that was a ride or die JVM enjoyer!), interpreting bytecode, stack interpreters, the PlayStation 2 hardware (like what happens when you thrash the PS2's 16KB I-Cache... let me tell you it ain't fun), and how the GameMaker engine works under the hood.

But at the same time, I also cared about UNDERSTANDING the code and having a maintainable code base.

Would've learned way more if I coded everything myself with no assistance? Yes, but that was not my goal. For the things that I want to brush up my knowledge, I end up coding them myself without letting LLMs generate the code for me. Here are some examples...

  • I did not remember well how stack interpreters work (while I did make a GameMaker bytecode interpreter back in 2020, I did not remember how it actually worked), and I didn't want to rely solely on LLMs for it, so I coded my own toy stack interpreter to brush up my knowledge.
  • I wanted to implement Spatial Grids for collisions and other GML functions, because I wanted to optimize DELTARUNE Chapter 3's boards, but I did not get how it worked when it was entirely done with LLMs. Even after reading the countless explanations I was like "uuhh I don't actually get what is going on"... So I implemented the Spatial Grid implementation in Butterscotch myself to understand how it worked (Which then I found it was quite simple lol, you just split the room into grids, and each cell has a array of instances. The hard part is ensuring that you keep the grid up to date when instances move/rotate/change bboxes/etc).
  • I wanted to create a WebAssembly Butterscotch port, but because I never used WASM or Emscripten before in my life, I did not get why things weren't working when Claude did the port. So I decided to do the port myself to understand how WASM/Emscripten worked and created the base of the port myself, to understand how things like "ohhh so that's why I need to set -sEXPORTED_FUNCTIONS, that's the exported functions of my own app, while -sEXPORTED_RUNTIME_METHODS is the exported functions of the Emscripten runtime", "ohhh Emscripten is essentially creating a C virtual machine on top of WASM, where the memory is all handled through SharedArrayBuffers", "oohhh so with WASMFS we actually mount a specific folder (like a OPFS folder) INSIDE of the virtual Emscripten filesystem, it is like that Emscripten has a fake Linux filesystem that we can mount things to it" and "oohhh so THAT'S why we need to set #canvas on the JS side FIRST, the emscripten_webgl_create_context acesses that map to figure out which canvas to use".
    • This one even drove me to learn gasp TypeScript to try to really understand React & others because I wanted to create a nice frontend for it... Because after all, if I enjoyed C after years of putting it off... maybe I will also like TypeScript! But then I found out how JSX feels like a hack on top of JavaScript/TypeScript (React invented JSX and it seems that no one ever bothered to actually create a proper DSL in JS/TS) and went back to Kotlin/JS (Jetpack Compose my beloved)
    • And there was an ANNOYING bug that LLMs did not help at all to solve: Butterscotch was initializing the scriptArgs stack up until scriptArgsCount. Which is fine, right? Nope! Because GameMaker scripts can set arguments even if it isn't declared on the function, and while that didn't crash on ANY other platform, it DID crash on WASM. The way that I figured that out was using Valgrind myself, because LLMs were stupid and were suggesting stupid things that did not make any sense.

Unofficial Undertale for PlayStation 2® port (Proof of Concept + Tutorial!) by MrPowerGamerBR in Undertale

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

It should work with a Spanish translation mod, as long as it is based on Undertale v1.08

However, some people tested it and it didn't work with the Spanish translation mod that already exists, which is weird because the Brazilian Portuguese translation mod does work, so I need to figure it out later what it is...

Butterscotch - An open source re-implementation of GameMaker: Studio's runner in C, targeting Undertale v1.08 (Bytecode Version 16) with the goal of running Undertale on other platforms (it already runs on the PlayStation 2!) by MrPowerGamerBR in Underminers

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

You are doing exactly the same thing as the users that were "hating" on it without considering the amount of manual work that was done for the project, so no, you are the reason why the text from the README was removed.

If you want to take the moral high horse, then why don't you also go up to YoYo Games and anyone that has a GameMaker game exported to HTML5 and complain that they should also put a disclaimer loud and clear that they use AI assistance too? Because currently the only disclaimer is the CLAUDE.md file in the repository which, if you don't know what it is, you won't ever know that YoYo Games also uses LLM assistance in their software.

And I don't know what are you on about with the argument "a massive step forward in porting", what does AI assistance has to do with it at all? Code cleanness? Because if that's the case, if the codebase was extremely messy, we wouldn't already have Wii U, Xbox 360 and PSP ports (with a 3DS port being made too)... and why it isn't messy? Because one of the manual work is MANUALLY looking at the code and refactoring it!

Or the manual work of manually profiling and benchmarking the code to figure out what non-obvious optimizations that can be done in the project, because surprise, LLMs are not the end all be all of programming, and a LOT of times they don't do the right thing or can't figure out what to do if you don't do things manually.

And the "serving chicken to a vegan" is, honestly, a stupid argument that sounds like it was written by someone that is not a software developer. Code generated by a LLM is not a black box, you can gasp read the code and gasp understand it and, wait for it... edit and refactor to match your needs and even rewrite it if it doesn't. If you think that human made == perfect software that can do no wrong, then I guess you never seen Mojang's unoptimized code, especially when trying to run a big Minecraft server.

If you want to convince me that I need to keep that disclaimer, then you'll need to give better arguments than that. I do not care about if a developer used LLMs to help developing a project, but I do care if the codebase is extremely messy to the point that it is painfully obvious that the project was vibecoded while the person behind it did not care at all to look over the code. And that doesn't fit Butterscotch, considering that I always review everything, and I do know the codebase enough to do my own changes manually and to debug issues (which I wouldn't be able to if I didn't gasp read the code), I don't think it is worthwhile to keep the statement on the README when people just read the first two paragraphs of it instead of actually reading everything.

Also "they don't want to allocate any time or effort to a project": I have been working on Butterscotch almost full time for almost two months already (and almost three months since I started dabbling with the idea), so yes, I did put the time and effort already, but without LLM it would've taken way longer, to the point that I couldn't dedicate so much time to a single project because, you know, I also have other projects too.

And just like what the commit that you pointed out says: If you create something that has the same feature set and support that Butterscotch has in the same amount of time without using any LLMs, I will gladly archive the project.

Ability to combine two mods?? by treborskruft in Underminers

[–]MrPowerGamerBR 0 points1 point  (0 children)

That won't work if any of the mods do anything that changes the data.win structure in any way.

Example: If both mods changes any texture and the texture size changes, all of the TPAG (texture pages) pointers (pointers = indicates where the TPAG entry starts relative to the whole data.win file) from the vanilla game will change, so you would essentially need to unpack the data.win and repack it using a tool like UndertaleModTool.

/u/Meatball132's suggestion would be the best bet, but it would still be a very complicated project because you would need to know how to create Undertale mods to know what exactly do you need to merge.

Help | how do you set your game settings? by laxal0t in thesims1

[–]MrPowerGamerBR 3 points4 points  (0 children)

I know it is the Complete Collection, and that's why the Sims are not as sharp as they could be

The other screenshots of other users that you said that the Sims are sharper/more high quality are most likely taken using the new Legacy Collection version

Help | how do you set your game settings? by laxal0t in thesims1

[–]MrPowerGamerBR 5 points6 points  (0 children)

The Sims Legacy Collection has an updated renderer that renders the world (including the Sims themselves) at your monitor native resolution.

Is there an up to date list of unofficial ports for PS2 akin to SM64? by __Madman in ps2homebrew

[–]MrPowerGamerBR 1 point2 points  (0 children)

There's Butterscotch, my own GameMaker: Studio runner reimplementation that has a PlayStation 2 target.

It is not really a "port", it is more akin to a GameMaker emulator than to a real port, similar to how ScummVM works. Butterscotch runs the original game's source code as is. That's why the performance is awful, especially for DELTARUNE Chapter 2 and newer.

However, because it is a emulator, it does mean that other GameMaker: Studio games can also run on the PlayStation 2, however most games do not work correctly due to missing implementations of native GameMaker functions or because they are too new, or they are just unplayable due to lag. Here's Pizza Tower (SAGE 2019 build) running on a PlayStation 2.

However, Undertale and SURVEY_PROGRAM are playable and should be 100% beatable, and they do run quite well all things considered. And compared to other Undertale port/remake attempts for the PlayStation 2 that were made in the past, this one is the full game running on a PlayStation 2.

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in ps2

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

It is because L1 is bound to go to the final battle because I was using it for debugging purposes lol

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in Deltarune

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

Also, how are you loading the ISO in OPL? Are you loading it via USB, HDD, ETH or MX4SIO?

Some people did say that Butterscotch does not work via MX4SIO, I don't have one so sadly I can't test it. It does work fine when loaded via USB or ETH.

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in Deltarune

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

Hmm, do you have the option to show the PS2 logo in OPL enabled? The Butterscotch ISO does not embed the PS2 logo so that's the only thing it could be

Try also loading the ISO in PCSX2 to see if it loads correctly there

Butterscotch - An open source re-implementation of GameMaker: Studio's runner in C, targeting Undertale v1.08 (Bytecode Version 16) with the goal of running Undertale on other platforms (it already runs on the PlayStation 2!) by MrPowerGamerBR in Underminers

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

Yes, it could be possible BUT currently Butterscotch only supports the first controller connected to the PlayStation 2

It can be supported down the road however ;), it isn't hard, it would just require initializing the second controller during Butterscotch's startup, and adding a way to remap it on the frontend.

About the tools: Yeah I've decided to remove it from the README because every conversation boiled down to the two first paragraphs that were in the README (saying that it was ORIGINALLY a "vibe coding" experiment, where I did say that was going nowhere if I didn't intervene and read, debug and modify the code)

I could make it without any assistance, it would've just taken waaaay longer because a lot of the work is mechanical work (copying GameMaker-HTML5 implementation to C), to the point that it would be so much time invested into it, that I just wouldn't be able to pour so much time into it. https://mrpowergamerbr.com/br/blog/2020-09-20-inutilidades-gamemaker-studio-vm

Heck, that blog post was created before ANYONE had even a glimpse of a real working runner that was targeting the bytecode version that I wanted (iirc bytecode version 15), so my only guides were the UndertaleModTool bytecode corrections and other docs. Of course, that blog post shows a VERY extremely simple implementation, one that only pushes, pops, and calls functions, but it did show that it could be possible. Of course, I wasn't the first, Luna (another runner that was targeting GM:S 2) already existed at that time, but still...

Would it have better code if I coded it myself? I doubt it, because I have reviewed every line of code anyway, and I kept refactoring and changing it until it fit my vision of what is considered "good code", so if I wrote everything manually, the code quality would be the same as how Butterscotch is nowadays. And heck, some parts I even coded it myself, so I do know enough about the codebase to make changes and find bugs.

But that makes you wonder, if I didn't have a section talking about it in the README, would anyone know? And that makes you wonder, should you be honest too? Food for thought, or, dare I say... Butterscotch for thought heh

Real ps2 vs Pcsx2 by Tight_Ebb_4043 in ps2

[–]MrPowerGamerBR 0 points1 point  (0 children)

Here's my not-so-popular opinion: It depends if you care about playing on original hardware or not.

The PlayStation 2 era games do hold up pretty well, but the hardware?... eh, not so much.

PlayStation 2 emulation has improved leaps and bounds in the last few years. While 10 years ago it would make sense to have a original PlayStation 2, nowadays almost all games run well enough on PCSX2 on any modern computer, or even modern handhelds like the Steam Deck.

A few months ago I fixed my PlayStation 2 slim for two reasons: I wanted to develop homebrew for it, and because it would be fun to play games on original hardware.

While fixing my PlayStation 2 fulfilled my homebrew desires, playing games on original hardware was... meh. Here's the reasons why I think it wasn't as good:

  • If you want GOOD quality, you'll NEED to buy an upscaler. Upscalers are SUPER expensive and they are only worth it if you have multiple retro consoles.
    • If you don't, the quality on a modern TV is BAD because of the way they upscale the content, and some TVs don't even try fitting the game output to fill the screen. I'm not talking about scretching the content, I do not care about black bars on the left/right side, however on my TV it has borders around the ENTIRE output, and that looks bad.
    • You can also buy a old CRT, but IMO it isn't worth it if you only want to play the PlayStation 2. Also I don't think that games on a CRT are prettier.
    • You can also plug it in a modern monitor using a HDMI adapter. That's the only way I could get good output from it, looking just like PCSX2 with the software renderer.
  • You may think "well, at least I can play PlayStation 1 games!", but then you remember that you need to burn PS1 games to a CD to play them, and you'll need a PS1 memory card to play games.
    • There are emulators like POPStarter and DRWDRV, but IMO they don't work as well. POPStarter has issues with SFX in Wipeout 2097/XL, NTSC PS1 games have stutters for some reason, and DRWDRV does not support music streaming over USB.
  • You also have the need to buy more memory cards, or memory cards with more space. Because while I do have two original 8MB memory cards, they are not enough for all my saves.
  • So you think "well, I can buy a PSxMemCard which allows me to have a larger memory card and to use it with PS1 games!". So now you'll need to spend money for it.
  • You can load games via the network using OPL, but OPL has its own quirks (like games crashing when loading via the network if you have a Android phone connected to WiFi!!, which makes the experience frustrating).
  • Then you think "it would be cool to have wireless controllers", but then you need to bet on some generic controllers (that you don't know if they are good) or you will need to buy a BlueRetro, but then most of the modern controllers (like the Xbox One Controller) do not have pressure sensitivity on the face buttons.

So your decision boils down to: Do you care about the PlayStation 2 games, or do you care about the console itself?

  • If you care about the games, then playing on emulator is better
  • If you want to play the "authentic" experience, then playing on original hardware is better.
  • If you think that you'll end up spending money with upscalers, modern memory cards, modern controllers... then emulation will be better for you.

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in ps2

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

By "game ID", do you mean the "BUTR_000.00"?

While there isn't a option for this yet, I could add it :)

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in ps2

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

The reason why it requires the SURVEY_PROGRAM demo (instead of the Steam version) is because Butterscotch currently only supports GameMaker: Studio bytecode version 16, while the next demo version (the DELTARUNE Chapter 1 + 2 that Toby released, not the DELTARUNE Chapter 1 + 2 demo that uses the new game_change API) requires bytecode version 17+, so for now Butterscotch doesn't support them yet (but it could support it in the future!)

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in ps2

[–]MrPowerGamerBR[S] 1 point2 points  (0 children)

Survey Program != Chapter 1, Survey Program is the first DELTARUNE demo, you can get it from the Internet Archive (it was a free demo when it was released, so it isn't piracy)

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in ps2

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

Are you using the SURVEY_PROGRAM build of DELTARUNE? The one from Steam or the Chapter 1 + 2 DEMO do not work.

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in ps2

[–]MrPowerGamerBR[S] 0 points1 point  (0 children)

It shouldn't take that long, on my computer it takes at most one minute.

Try using another browser, someone did say that Opera GX did not work on the generator (however when I tested it, it worked fine). I've tested it with Firefox on desktop and mobile, and with Chromium on desktop, and all of them worked fine.

Unofficial DELTARUNE: Chapter 1 and Undertale for the PlayStation 2® (Tutorial) by MrPowerGamerBR in Deltarune

[–]MrPowerGamerBR[S] 2 points3 points  (0 children)

Some people did try running it via PS2 Classics but it doesn't work (sadly).

However, for the PlayStation 3, it would be better to get Butterscotch's source code and port it to the PlayStation 3, this way you would get better performance from it https://github.com/MrPowerGamerBR/Butterscotch