Release Beat2X 0.5 Released


jaycee900 said:
Hi, sorry still no go, that one doesnt even get to the loading screen...
This is what I get for rushing something out quickly... But... just to try something, delete your beat2x directories, restart your Pandora completely and then try again with that Pnd.

I'm going to test the same in a moment.
 
Last edited by a moderator:
This isn't about problems with your software. I just need help with something real quick.

I have a program and I don't know how to check what's in the /media/mmcblk#p#/pandora/appdata/programname/data.

How do you do it? Do you check a environmental variable to know where to look for packs in the packs directory under appdata/beat2x/packs?

I checked your PXML and your source code but it doesn't link to that directory specifically. Any hints?

Thanks for any help.
 
Noisome said:
This isn't about problems with your software. I just need help with something real quick.

I have a program and I don't know how to check what's in the /media/mmcblk#p#/pandora/appdata/programname/data.

How do you do it? Do you check a environmental variable to know where to look for packs in the packs directory under appdata/beat2x/packs?

I checked your PXML and your source code but it doesn't link to that directory specifically. Any hints?

Thanks for any help.
OK, I can confirm that the directory creating script doesn't seem to want to create any directories... don't know why... I suck at bash scripts.
The version I packed in that test pnd... had a typo... so it didn't even work. Even though I've fixed the typo it's still not creating the directories. I'm thinking of doing a check from within the app itself... C++ I can do...

RE your question... appdata is a special directory... it checks the appdata folder from that same SD that the PND was launched from. so basically from within the PND runner all reads and writes made by the program also check that program's appdata folder automatically. You only have to have code that appears to look in the applications working directory.

e.g.
on PC I have:
Code:
/MyGame/
       /MyGame.exe
If I write code to save a scores file "scores.txt" it would save to the working directory (usually same as the EXE)
Code:
/MyGame/
       /MyGame.exe
       /scores.txt
with PND it is automatically directed to the appdata folder(as long as you have setup your PXML correctly.)

Likewise any additional files you add into the appdata folder can be read as if they are in the working directory of the program. You can even overide files contained within the PND files with your own versions if you place files with the same names in the appdata folder for that app.
 
Last edited by a moderator:
Noisome said:
This isn't about problems with your software. I just need help with something real quick.

I have a program and I don't know how to check what's in the /media/mmcblk#p#/pandora/appdata/programname/data.

How do you do it? Do you check a environmental variable to know where to look for packs in the packs directory under appdata/beat2x/packs?

I checked your PXML and your source code but it doesn't link to that directory specifically. Any hints?

Thanks for any help.

I have seen people suggest using getcwd().

-God Ginrai
 
Last edited by a moderator:
I'm not sure I can do this with the bash script...
When I do the script it checks if the directories exists... which they do inside the PND file.
So I tried to copy the do_not_delete.txt into those directories to get it to make those dirs:
Code:
#!/bin/bash
cp ./packs/do_not_delete.txt ./data/DELETE_ME.TXT
cp ./packs/do_not_delete.txt ./packs/DELETE_ME.TXT
./Beat2X

And it says "Operation not permitted." I even put a sudo and it still said the same... is this possible to do through bash... or I can just code some Pandora specific c++ that just spits out a dummy file to each directory which will force those directories to be created in appdata.

EDIT: My latest attempt in Bash:
Code:
#!/bin/bash
if [ -f ./data/boing ]; then
echo "./data/boing exists"
else
mkdir ./data
cp ./packs/do_not_delete.txt ./data/boing
fi
if [ -f ./packs/boing ]; then
echo "./packs/boing exists"
else
mkdir ./packs
cp ./packs/do_not_delete.txt ./packs/boing
fi
./Beat2X_R
It complains that the dirs exist and the cp is not permitted...
So yeah I'm thinking more and more to do similar checks from within the app.
 
ok... I think I have the solution now! *sigh of relief*

Please download and test this PND: http://projectinfinity.org.uk/lib/exe/fetch.php?media=homebrew:games:beat2x:downloads:beat2x.pnd
I advise you to clear out your beat2x appdata beforehand. I have tested this pnd from this state and it creates the basic directories and runs the game. It should do the same for anyone else!

Once this has been confirmed working, I'll update the store and archive downloads!

Peace! :ph34r:
 
Hey good man! I can confirm it's working now, like you said, i deleted everything, loaded up beat2x, exited, then replaced my song packs in the packs folder it automatically created.

Thanks for finding the problem out!
 
Awesome!
Well to explain a little bit about what went wrong. Basically my original release I had bundled my own scorefiles and settings by accident. This was causing problems.
Then the fixed version with added directory checking... was checking the directories, but was not able to distinguish between the "in PND" directories and the appdata directories...(also similar checks in c++ had the same confusion... and was causing segfaults)
So the final solution was this script here:
Code:
#!/bin/bash
if [ -f ./data/loading.bmp ]; then
echo "./data/loading.bmp exists"
else
mkdir ./data
cp ./pnddata/loading.bmp ./data/loading.bmp
cp ./pnddata/splash.bmp ./data/splash.bmp
fi
if [ -f ./packs/do_not_delete.txt ]; then
echo "./packs/do_not_delete.txt exists"
else
mkdir ./packs
cp ./pndpacks/do_not_delete.txt ./packs/do_not_delete.txt
fi
./Beat2X_R

Basically it copys data from inside the pnd into the appdata folder... and that's it. Simples!
I also had to tweak my PND making script... but yeah ok... I'll get uploading :)

EDIT: Gameplay video:
 
Back
Top