headshot2017 / re-plants-vs-zombies

Fork of Patoke's PVZ GOTY decompilation with the intention of porting the game to other platforms (including game consoles)
Creative Commons Zero v1.0 Universal
8 stars 0 forks source link

need testers for Switch port on real hardware #1

Open headshot2017 opened 1 month ago

headshot2017 commented 1 month ago

i do not own a Switch, so my tests are limited to emulators. if you have a modded Switch, i'd appreciate it if you could volunteer

PVZ GOTY game data should be installed in SD card/switch/PlantsvsZombies

spaghetto207 commented 1 month ago

i'd be glad to test, i have a modded switch. i am VERY shocked to see this. this is crazy! I'd be glad to talk on discord, @ is spaghetto207 if you would like.

headshot2017 commented 1 month ago

great! we can talk here just fine. you can start by getting the NRO rom from the Actions page, just click on the first workflow run in the list and scroll down to Artifacts

and don't forget the game data as well

spaghetto207 commented 1 month ago

Alright, i initially compiled it myself though, ill download the artifact and tell you the details once i get it set up! Any reason to make a port to the 3DS btw? I know the DS & DSI versions exist but they are heavily downgraded to work with the system.

headshot2017 commented 1 month ago

there's actually a 3DS port in progress but the game and engine need some heavy modifications to consume less memory (VRAM is also a concern). it currently crashes at the title screen on New 3DS, and Old 3DS doesn't get that far

edit: oh you said REASON. well, no real reason at all other than to try getting it on that system

image

spaghetto207 commented 1 month ago

Alright, it took a bit of setup though; I initially used an extracted main.pak from steam GOTY. using an extracted main.pak made the loading super slow; it goes to the end of the bar before it allows you to continue, and it continues loading until it crashes from trying to compile one of the particles or reanims, After using the properties folder and main.pak from goty, it loaded just fine but has small stutters between animations, such as when pressing start adventure, it pauses for a brief moment before showing the hand, then it takes a bit to load the initial cut-scene before crashing with no error. If possible, it would be nice to have an output log because it sometimes crashes with no error. I can try to record footage from my switch, but I am away right from it right now.

headshot2017 commented 1 month ago

oh yeah, about the compiled definitions, i have here all the reanims and particles compiled for Switch - if i ever get to release this port, it will include this data to avoid any issues on that regard your crash during the intro cutscene might be related to that since i also experienced it on an emulator i should've sent this earlier, my bad compiled.zip

spaghetto207 commented 1 month ago

It's alright, i just got back home to test and yes, it seems to crash on the cutscene still. I'll make a fork and see if i can try to fix it.

headshot2017 commented 1 month ago

hold up, i crashed on the intro cutscene after "PopCap Games Presents:" image i might have an idea on what the cause is

headshot2017 commented 1 month ago

turns out the PC version also crashes on that cutscene, and i managed to find out why with gdb: image on CutScene.cpp, the game tries to draw the PVZ logo, but the title screen assets were unloaded after exiting the titlescreen widget, and the logo was one of those assets working on a fix for that now

spaghetto207 commented 1 month ago

Amazing! I'll test this soon. Have you also seen minerscale's fork? iirc it includes alot of fixes for things like this and includes vulkan support.

headshot2017 commented 1 month ago

yes, although i haven't really used it - it's a fork of the sexy-vk branch from the original repository, but i didn't use it due to certain reasons - vulkan is unavailable on switch homebrew, and last i tried the sexy-vk branch it consumed a lot of memory which didn't really sit well with me, so i went with forking the main branch

spaghetto207 commented 1 month ago

Alright, all is going well so far. The only "major" issue ive seen is the seed packet pickup at the end of a level, The first time it didnt show the plant, and crashes after picking it up. I cant seem to reproduce this error again though. Another issue are some issues ive seen in other decompiles, such as the tutorial arrows being positioned wrong, im unsure if theres more of these small issues but ill try to patch them on my fork.

headshot2017 commented 1 month ago

The only "major" issue ive seen is the seed packet pickup at the end of a level, The first time it didnt show the plant, and crashes after picking it up. I cant seem to reproduce this error again though.

do you remember which level that was?

spaghetto207 commented 1 month ago

it was the first level, when you get sunflower. it had no plant icon, just the seedpacket image and sun cost. i clicked on it only for the sun cost to show up, then crashed after a bit. i cannot seem to reproduce it

also, sometimes theres a sound glitch, its a weird beep that progressivley gets louder, this may just be my switch since its old but its never done that before. ill try to get a video of it