afska / piugba

🎮 PIU simulator for the GBA.
https://discord.com/invite/JE33cc2
MIT License
95 stars 6 forks source link

Compiles to Black Screen #13

Closed DinsFire64 closed 4 years ago

DinsFire64 commented 4 years ago

Hey there this is a really cool project.

I compiled this natively on my arch installation using the devkitpro package repository.

I am happy to say with slight modification (I'll submit a PR once it's all good) I was able to get everything to build properly, import some SSC/MP3/PNG combos, and get an piugba.out.gba.

Problem is going to run it leads to a black screen on both emulator and console (vbam / EZFlash 4).

I have very little knowledge of GBA debugging, but is there anything I can do to debug why I'm getting no output?

afska commented 4 years ago

Hi!

A few things to check:

engine->setScene(new SongScene(engine, fs, song, chart));



That being said, the song importer is heavily under development right now and needs some work. If you want, send me the charts you're trying to import and I'll try them in my machine to discard any problem with the SSC format.

Note that emulators have audio lag so if you play with the EZFlash you must [set this to zero](https://github.com/rodri042/piugba/blob/master/src/gameplay/TimingProvider.h#L7) before compiling.
DinsFire64 commented 4 years ago

Thanks for the response!

files.gbfs is correctly being appended by your package target in make, and the JSON output of your node script is looking valid (although lastMillisecond is maxxed out to 999999000).

Newlines is always a good thought in this case, but luckily didn't give me much of an issue here.

Well actually what's most interesting is I was able to launch a song by directing the scene to it as you suggested. The BGA is all red, but the song plays and the game is playable.

To be thorough here's the code I ended up swapping out for the original setScene

  SongFile *songFile = new SongFile("0-Dawgs");
  Song *song = Song_parse(fs, songFile, true);
  Chart *chart = Song_findChartByDifficultyLevel(song, DifficultyLevel::CRAZY);

  engine->setScene(new SongScene(engine, fs, song, chart));

With the following needing to be thrown to the top.

#include "scenes/SongScene.h"
#include "gameplay/models/Song.h"

static const GBFS_FILE* fs = find_first_gbfs_file(0);

That leads me to believe that something may have went wrong compiling the assets or similar for the SelectionScene considering the red BGA and issues with using the scene.

afska commented 4 years ago

Red is the default debug background, which allows me to log things on screen while developing. You can disable DEBUG_MODE in DebugTools.h if you'd like. I have as a pending task to automatize this build process in Makefile.

Would you mind uploading the mp3/ssc/png files? I really want the import process to work well

DinsFire64 commented 4 years ago

Sure thing.

One thing I had to do was ensure the stepchart has both a #TITLE and #SUBTITLE. Both versions of the stepchart that I had (from Pro and from StepF2) either had one or the other. I have included the StepF2 chart in the zip.

https://u.pcloud.link/publink/show?code=XZspuIkZTFbzEap6uxQOdYBtMxphUQaHtNYk

Let me know how else I can lend a hand.

afska commented 4 years ago

Oh, it wasn't related to the song. I've made some changes yesterday to record the last played song but that isn't working well, so I disabled it here. Now it should work with the latest code on master.

Thank you for your help!

Re: #TITLE, I'll try to make it so it uses one of these and requires less mandatory props!

DinsFire64 commented 4 years ago

Yeah I figured it was something small, because as I was playing through and getting used to the controls, the engine sent me back to the SongSelect screen, which was entirely functional.

But thank you for the quick responses and the cool engine! I'll be sharing this around with some local friends when the outside world is settled down. We always loved to mess with the PSP ports of pump, so this is just perfect.

And this is just the smallest change, so I don't think it warrants a PR, but when preforming git clone for the first time, content/_compiled_sprites is not a directory. And as such assets.sh doesn't run.

So I added mkdir -p "$DESTINATION" right after line 6 to ensure the directory is always been made. Don't know if that's how you want to handle it, but I did run into that issue.

afska commented 4 years ago

I always loved the PSP ports, that's the reason I started with all this hehe.

So I added mkdir -p "$DESTINATION" right after line 6 to ensure the directory is always been made. Don't know if that's how you want to handle it, but I did run into that issue.

Sounds great, I'll add that line, thanks!

I'll close this. Feel free to raise a new issue if you run into any other problems!