Homebrew Batterycheck - 3DS

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
A few months ago I started my project and working to support multiple platforms including: Linux, Wii, 3DS and just started to add PSP. Before I restarted to make it multi-platform I did a lot of testing on the 3DS because it is portable and easy to carry arround. My original goal was to write it for the GameCube and Wii but that looked scary when I was just getting started. To give an idea of what Batterycheck is here is the description I wrote in my PSP thread:

Back in 1998 there was a campaign to promote recycling batteries in the Netherlands and part of that was a PC game on CD-ROM you could get if you brought 15 batteries in for recycling. It was based on the same engine as Jazz Jackrabbit 2 and therefore uses the same fileformats for the Tileset, Levels and Sprites. About 10 years ago the game was released as Freeware by the publisher but they removed it after a while. After some digging I found one of the companies that worked on the game and I contacted them. The game is licensed as Creative Commons but I need to ask them which specific version. I did get permission to share their download page where the game is listed but they warned about it getting removed in the future. I posted the link and instructions to download in my other thread (here)

I found a Let's Play video in English and they play through the entire game to the end boss..so it has some spoilers ;)

Just to be clear this video is NOT of my version of the game engine.

EDIT: Click here for the 3DS preview download
 
Last edited by Archerite,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
Thanks, I will upload a few screenshots shortly just to give an impression of what it looks like on the smaller screen. I have been rewriting a few parts which has delayed the 3DS preview a bit...sorry about that.:shy:
 
  • Like
Reactions: plug313

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
Here are the screenshots I promised...without the bottom screen as that was just debug text anyway.

batcheck-3ds-screenshots.png
 
Last edited by Archerite,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
For those of you waiting for the 3DS version I have some news. As I said in the Wii thread here I was fixing bugs and adding some new features and all the testing I did on the PC and Wii which had no issues. Somehow I broke the 3DS build and when that was fixed it crashed constantly and Citra gave memory errors in the logs. It took me a while to find the issue but I fixed it now and I even have the transparent water effect working perfectly on the 3DS!

I only need to sort out how to load the generated textures at runtime but I'll figure that out in a few days. Before uploading the 3DS preview I want to add some basic collision detection and player animations so it will be a playable demo instead of the Level browser it is now. You will not be able to complete the level since none of the interactive elements are working, but it will give a good impression of what it will be like.
 

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
Yesterday I spend many hours of reading through so much documentation and sourcecode my head and back literately hurt so much it kept me up last night! But in the end it was worth it...I think ;)...since I have finally solved my long lasting issues with generating the textures at runtime and using them with the existing libraries on the 3DS.
The collision detection took me a VERY LONG TIME to figure out and implement...and while it's the worst piece of code I might have written ever...it does kind of works! :yay: The main character Batteryman can walk around and jump on some platforms...fall off...and get stuck in the walls! Yes, that is how bad the collision detection is right now. None of the interactive elements are used for the collision map yet, but you can switch textures to see what it will be like later.

So with these issues out of the way I present to you... The release of the Batterycheck 3DS preview!! :yay3ds:

batcheck-3ds-preview-2-screenshot.png


There are a few steps to get the required game files onto your SD card which I already explained before in the Wii thread and since the steps are identical for the 3DS I kindly ask anyone wanting to try this preview to follow that guide. The files need to be stored in "sdmc:/data/batcheck/" on your SD card but the 3dsx can be launched from anywhere. In case you had already installed the original game on your PC you can skip the download and installation step and just copy the files from "c:\Games\Battery\*" into the folder "/data/batcheck/*" on your SD card directly. ;)

I have only tested using the Citra emulator on Linux and on "the homebrew launcher" with 3dslink on the real hardware. Since I got a bit obsessed with the 3DS a while ago I started collecting the different models so I can confirm it works on each of them: O3DS, O3DS XL, O2DS, N3DS XL, N2DS XL. They all have BS9 and rosalina v2.0.0 on the latest System Firmware 11.9.0-42E. No other methods have been tested or are going to be supported (sorry :shy:)
EDIT: Tested by @KleinesSinchen to also work with Soundhax on Firmware 11.0.0-25E

The controls are not that complicated but suggestions for change are welcome:
ButtonAction
UpDEBUG: Energy increase and linked to the Full and Empty counters
DownDEBUG: Energy decrease and linked to the Full and Empty counters
LeftWalk left
RightWalk right
AJump
BJump
YDEBUG: Fall through the floor (in case you get stuck in a wall)
XDEBUG: Walk in the air while pressed (to stop falling and look around...or when you fell to far down)
LDEBUG: Texture swap - Gameplay
RDEBUG: Texture swap - Collision map
StartExit to HBL


There is a small minimap on the left showing the collision map and a second one on the right showing the entire level with the green dot being the currently visible area. The collision map is actually slightly larger than what is on screen which helps a little with the reduced resolution of the 3DS and I might add some zooming or scaling options later.

Please beware that this is still a very early prototype and just a preview. Unlike the earlier Wii version this one is sort of playable and has a few character animations and debug features to explore the level, but it still contains bugs and unfinished features. Also keep in mind the original game was designed to run at 640x480 and none of the graphics are scaled at the moment.

Enjoy! :D

Click here for the newer preview v0.3 released on 26-05-2019

Edit: Changed installation instructions to the revised version
 

Attachments

  • batterycheck-3ds-preview-2.3dsx.zip
    135.7 KB · Views: 302
Last edited by Archerite,

MrHuu

Well-Known Member
Member
Joined
Sep 19, 2015
Messages
562
Trophies
0
Age
37
XP
1,591
Country
Netherlands
Not too much effort has gone into the original.. with the windows installation telling you to 'run jazz2.exe'..lol
I remember this game, still have 3 copies laying around.. never passed the 2nd level tho..

Your preview is running great on my new3DS. Awesome work there!

Also, while the original was based on Jazz2, and your main focus is to run BatteryCheck.
Are you developing this engine with only BatteryCheck in mind, or will it eventually be able to run other jazz2 based games?

I do think the 3DS is a great platform to play BatteryCheck again, thanks for this!

Proost!
(Cheers!)
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
Not too much effort has gone into the original.. with the windows installation telling you to 'run jazz2.exe'..lol
I remember this game, still have 3 copies laying around.. never passed the 2nd level tho..

Your preview is running great on my new3DS. Awesome work there!

Also, while the original was based on Jazz2, and your main focus is to run BatteryCheck.
Are you developing this engine with only BatteryCheck in mind, or will it eventually be able to run other jazz2 based games?

I do think the 3DS is a great platform to play BatteryCheck again, thanks for this!

Proost!
(Cheers!)
I have only a single disc copy myself and never really noticed that it named jazz2.exe while installing it. How did you get three copies of the game anyway? The second level is actually not that hard just a bit weird and empty compared to the first one, and I did finish it back then. Did not win any prices though....

My idea is to make the engine work as a general 2D platform game engine and maybe later isometric and eventually make it opensource. Through different plugins or something it will be able to load levels and graphics in different formats of which BatteryCheck and Jazz2 are one of the first to be supported. I have actually tested loading jazz2 levels (takes a few tweaks) and most of it works but since the engine does not know the Jazz2 objects I also had to disable all of that. So in short...yes...eventually Jazz2 will be supported! :D

Your welcome, and I hope you will finally be able to get past the 2nd level this time around. Thank you for letting me know it also runs fine on the one 3DS model I do not yet have myself. yet! ;)

I don't drink...but Cheers to you too :grog: (just think of this as a Cola instead :D)
 
  • Like
Reactions: Itzumi and MrHuu

MrHuu

Well-Known Member
Member
Joined
Sep 19, 2015
Messages
562
Trophies
0
Age
37
XP
1,591
Country
Netherlands
Having a few gameboys in the house helps generating empty batteries a lot.

I'll make sure to follow your progress as it get's along. This definitly has my interest.
Awesome project!

btw.. it also runs great on a old3DS. Average CPU: ~55% GPU:~16
 

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
I have been looking into adding the background music using libmikmod directly but could not get it to work on the 3DS, and then I saw it's only available as a dependency for the SDL_mixer library. I am not using anything from the SDL libraries but just to try if it would work I added it anyway...and it does work now! Unfortunately it has a negative impact on the gameplay that I do not think I will include it in the next preview. Just wanted to share the results of my first attempts at adding sound :D

While it's nice to have some background music in the game I think it's more important to improve and extend the collision detection. Like adding the interactive elements so the player can stand on them and not get stuck in the walls anymore.;)
 
  • Like
Reactions: Itzumi

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,433
Trophies
2
XP
14,884
Country
Germany
I have only tested using the Citra emulator on Linux and on "the homebrew launcher" with 3dslink on the real hardware. Since I got a bit obsessed with the 3DS a while ago I started collecting the different models so I can confirm it works on each of them: O3DS, O3DS XL, O2DS, N3DS XL, N2DS XL. They all have BS9 and rosalina v2.0.0 on the latest System Firmware 11.9.0-42E. No other methods have been tested or are going to be supported (sorry :shy:)
So... I got lucky and obtained a N3DS for less than 70€ in almost new condition with all stuff. What does this totally off-topic information have to do with Batterycheck?

Easy: It came with firmware 11.0.0-25E and I will for the next time not install cfw or update the official firmware. But I can confirm batterycheck-3ds-preview2.3dsx works by booting the Homebrew Launcher through Soundhax. Supported or not, I just wanted to share my test result.

Bare minimum files:
boot.3dsx
Soundhax file
otherapp.bin

and the batterycheck files.
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
So... I got lucky and obtained a N3DS for less than 70€ in almost new condition with all stuff. What does this totally off-topic information have to do with Batterycheck?

Easy: It came with firmware 11.0.0-25E and I will for the next time not install cfw or update the official firmware. But I can confirm batterycheck-3ds-preview2.3dsx works by booting the Homebrew Launcher through Soundhax. Supported or not, I just wanted to share my test result.

Bare minimum files:
boot.3dsx
Soundhax file
otherapp.bin

and the batterycheck files.
That is a really good deal for a N3DS in good condition! I am looking for one to...for no other purpose than to complete my collection...and only see them for € 120,- or more. I only said I did not support other methods or versions since I was not sure if they required a special build as is needed on the Wii U in some cases.

Really cool you have tested and confirmed that it does actually work, thanks for letting me know! Hope you don't mind but updated my post that you confirmed it worked.:) What do you think of the smaller screen on the 3DS with battery check?
 
Last edited by Archerite,

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,433
Trophies
2
XP
14,884
Country
Germany
That is a really good deal for a N3DS in good condition! I am looking for one to...for no other purpose than to complete my collection...and only see them for € 120,- or more. I only said I did not support other methods or versions since I was not sure if they required a special build as is needed on the Wii U in some cases.

Really cool you have tested and confirmed that it does actually work, thanks for letting me know! Hope you don't mind but updated my post that you confirmed it worked.:) What do you think of the smaller screen on the 3DS with battery check?
Yeah, I got really lucky with that N3DS. It’s from one of those resellers… you don’t know what you get no matter what the description says. Can be excellent or look like run over by a truck. It was cheap already and I had a “25% off” code.
In general Batterycheck suffers from the same problem as Jazz 2 does when running in low resolution mode: You don’t see enough of the level at a time. Batteryman himself is simply too big – he (and the game) looks better on the smaller screen in my opinion (although this does – of course – not change anything on the resolution problem).

Scaling the character, the objects and the background to adapt to low res is a problem and does not really look good – we discussed this in the Wii thread already.

However I’ve one suggestion (no idea if this is possible with a sane amount of work): Scaling only the HUD elements. Look at one of the 3DS screenshots you’ve provided and compare them to the Wii version. The HUD looks out of scale for the low res of the 3DS.
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
In general Batterycheck suffers from the same problem as Jazz 2 does when running in low resolution mode: You don’t see enough of the level at a time. Batteryman himself is simply too big – he (and the game) looks better on the smaller screen in my opinion (although this does – of course – not change anything on the resolution problem).

Scaling the character, the objects and the background to adapt to low res is a problem and does not really look good – we discussed this in the Wii thread already.

However I’ve one suggestion (no idea if this is possible with a sane amount of work): Scaling only the HUD elements. Look at one of the 3DS screenshots you’ve provided and compare them to the Wii version. The HUD looks out of scale for the low res of the 3DS.
I am not sure if it's just the smaller screen but it really does look nice on the 3DS. I agree the lower resolution limits your view of where to go and I want to work around this by implementing a zoom-out feature and making use of the bottom screen for a more detailed mini map. Our discussion in the wii thread was actually why I asked now that you have seen in person how it looks and feels on the 3DS.;)

I hope to reduce scaling artifacts with a shader of some kind using the Lanczos algorithm which looked acceptable on the NDS when I used it for testing the menu and splash screens. In the end this might still not look that good but for just the HUD it might be good enough but would be a change to learn about shaders at some point. I have also looked into using shaders for the Linux version to simulate a CRT and have found a few really convincing ones but writing one from scratch is something I have not done yet and I barely understand how they really work. The possibilities and effects possible with them are awesome though so might be worth it in the end.

The HUD elements are indeed far to big for the small screen and out of proportions so resizing them is a good idea. I have thought about doing this and actually is quite simple if would have used the center of the sprite for placing them and not had tweaked the positions by hand, now it's a little bit more complex. Luckily I already improved this after we discussed the overscan adjustment feature for the GameCube on a CRT with @niuus so the amount of work left is not that bad.
You have to indeed be lucky when buying used hardware and hope the seller is being honest about it. I got my 2DS really cheap at 37 euro and it's working perfectly, but it was so dirty I had to clean it inside and out before I dare touching it again. And I got an O3DS for just 27 euro including shipping with a damaged top screen and hoping I could just replace that I took the risk and bought it. When I received it the shoulder buttons were broken and the touchscreen is inaccurate and unusable for typing and is so off that even calibration fails. Researching how to perform the repairs I found out how difficult it would be and even for an experienced technician (which I am not) it would take between 4-6 hours! I have all the parts from china to do it but that long estimation has hold me back to actually perform the repair. Only replaced the shoulder buttons and broke two of the new wires while doing that!
 
  • Like
Reactions: KleinesSinchen

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
Luckily I already improved this after we discussed the overscan adjustment feature for the GameCube on a CRT with @niuus so the amount of work left is not that bad.[/SPOILER]
Hey! Nice to know thing are moving at the right pace. I was wondering what happened with BatteryCheck GCN, i see now that you were working on the 3DS port. Waiting to test your next PSP / GCN / Wii versions :yayu:
 

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,433
Trophies
2
XP
14,884
Country
Germany
I am not sure if it's just the smaller screen but it really does look nice on the 3DS. I agree the lower resolution limits your view of where to go and I want to work around this by implementing a zoom-out feature and making use of the bottom screen for a more detailed mini map. Our discussion in the wii thread was actually why I asked now that you have seen in person how it looks and feels on the 3DS.;)
Dang it! Reading my previous post again I have to admit: I did not express that very well. Because the character is so big, it looks better on the smaller screen of the N3DS compared to the XL models (which normally are more comfortable for my eyes... we all don't get younger). I've tried it before on O3DSXL with full cfw and just replied here to report the positive result with userland exploit only.
Yes, you're really ambitious. A mini map on the bottom screen sounds really cool. That should solve the problem. The map feature on the touch screen worked (for a different reason) really good for DS Castlevania games.
 
Last edited by KleinesSinchen,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
I have been talking on my blog about making the installation easier by unpacking the game files directly on each console. The main reason for that was the Raspberry Pi actually...but more on that some other time. The short story is I figured out how the files are stored in the Setup.exe that is inside the downloaded ZIP file and how they are compressed. I explained this in quite detail on the wii thread in a Spoiler blog since it's quite long.

I now have a simple 'installer' and modified it to run on the 3DS...it's HIGHLY EXPERIMENTAL but if you follow the steps it should work...
Here is what you need to do:
1 - Go to the Batterycheck Download Page on this site.
2 - Click on the Download button
3 - This will download a file called "batterycheck.zip"
4 - inside the zip file's structure open the "batterycheck" folder and after that the "setup" folder.
5 - There you will see the actual installer "Setup.exe" which is around 12MB and you need to copy this to the root of your SD card.
6 - Create the directories '/data/batcheck' on your SD card (the installer does not do this yet, sorry)
7 - Run the bc_setup.3dsx attached to this post
8 - Run the batterycheck-3ds-preview-2.3dsx

If all goes well you should see the installer unpack the files and finally say 'Done!' It took about 30 seconds on my new 2ds to complete. There is almost no error checking or file integrity verification done yet!! It might crash or it might not...hopefully! I did verify on the Citra emulator that the files are extracted correctly by this installer though. ;)


The idea is to integrate this installer into the startup of the main game and run when the game files are not found. Until there is more error checking and it's working on all platforms I will keep it as a separate executable. Then I will look into extracting the Setup.exe directly from the batterycheck.zip so you would not even have to do that on a PC!

Enjoy! :D






EDIT: I have been working on improving the installer and from the instructions above you can scratch step 4 and 5 now!! All that is going to be needed is batterycheck.zip on the root of your SD and the installer will unpack Setup.exe from it into memory, and then unpack the game files and write them into the '/data/batcheck' path on the SD card. This was working fast on my PC and even on the Wii emulator dolphin and also the 3DS emulator Citra had no real issues, but on 3DS hardware unpacking setup.exe was unbearably slow..it felt like minutes! The issue was reading and unpacking then writing back to the SD card is SLOOOOW on the 3DS...which is why I moved to an in memory solution for setup.exe with a nice side effect of unpacking the remaining files
a lot quicker and less garbage after installing. It needs a few extra checks before I will release an updated version though so it won't crash if batterycheck.zip does not exists.
 

Attachments

  • bc_setup.3dsx.zip
    109.4 KB · Views: 133
Last edited by Archerite,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,488
Country
Netherlands
It's been a while since I have posted any updates here since I mostly did that in the Wii thread....like this one below that is also interesting for the 3DS:

I have been diving into my collision detection functions...and I have found a way to include a very basic form of wall detection!! :yay: It's barely enough to prevent walking into the walls and in some cases it does still happen and you can even fall down because of it. I also had a "weird" bug near the one-way platforms in the lower center of the level where one tile was not detected as solid. It turns out that was because the tile is part of the laser-beam-floor animation and it it used the animationID to detect the ground...while that should have been the currently active frame. It's fixed in duct tape style like a lot of things actually :shy:...but the tile is now solid and you can't fall through anymore. :D

Another thing was that there was not so much to do but jump around for ever without a purpose. Well, now the energy bar is slowly running out even if you just stand around doing nothing! Walking and jumping uses energy and when you are all out........you are returned to the start! I need to put in an animation for that as it happens instantly as soon as the energy is all gone. To prevent the energy running out you have to go through the recharging gates and they will recharge your battery if you stand there long enough...walking through them too quickly will only give you a small boost in energy. This too does not have an animation yet except for the energy bar that is filled up.


I have tested these new features on Linux, 3DS (hardware and Citra) and Wii (hardware and Dolphin) and none of them show any issues beyond what I already described above. I expect to release a new preview version that makes use of the new installer and that has the new features explained above included. The 3DS version will come after the Wii though as I will focus on that one first but it will be before the end of this month! ;)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-