Batterycheck - Remake of an old PC platformer

Discussion in 'Wii - Emulation and Homebrew' started by Archerite, Nov 14, 2018.

  1. KleinesSinchen

    KleinesSinchen The backup reminder

    Member
    7
    Mar 28, 2018
    Germany
    @Archerite: Sounds like an ambitious project, porting (or remaking) the game for so many platforms. I did not even know this nice little game existed (it's probably not very well known outside the Netherlands). Thank you for your work and contacting the company behind the original!

    Battercheck seem runs in 640*480 resolution on the computer. The original game works flawlessly under Wine 2.0, openSUSE Leap 42.3 but I could not get it to work correctly on my only (modern) Windows (10) computer. Jazz 2 could set multiple resolutions from 320*200 up to 640*480 (if I remember correctly).
    How would this look like on the 3DS with it’s bad resolution? Running Jazz2 in 320*200 was a pain and the 3DS is only slightly better with 400*240. I could never see enough of the stage (as it is a quite fast game) to handle this. In Batterycheck the level is a big maze. Not easy with the 3DS in my opinion.

    Your project shows that homebrew and custom firmware is not just about illegal copies of commercial games for consoles. Looking forward to this.

    Supporting Jazz 2 would be even more fascinating (for me at least). I tried to run Jazz 1 in Dosbox a few years ago on the Wii, but it did not run at full speed.
    GameCube would be really nice. The preview dol did not work on the cube (as expected). One thing about this early demo is already better than most commercial Wii games: Support of multiple controllers options. Very few Wii games support the good old GameCube controller.

    Loading iso from SD-gecko can sometimes make a difference. As far as I know the official Game Boy Player Disc can be booted as backup DVD by Swiss but not from SD (I never got it to run except for booting retail and backup DVD with Swiss). I have three Mini DVD-R left (and no use for them, so if needed I would be glad to use them for tests).
    The Cube is really bad in reading burned media (you probably know already). I don't think DVD+/-RW that work with it exist. Would be nice to test without wasting discs though.
     
    Archerite likes this.
  2. migles

    migles All my gbatemp friends are now mods, except for me

    Member
    14
    GBAtemp Patron
    migles is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 19, 2013
    China
    Earth-chan
    i have no issue to load the game boy player disc in the sd card trough swiss.
    it does exist, you can find some people in the internet that say a specific brand\model worked for them, i found one or 2 retailers around here that have some old stock of mini dvds, bought 3 types so far, didnt get any luck..
    but i believe it probably only works trough potting the drive which i don't have a modchip so i didnt cared enough to open the console and try that
     
  3. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    One thing I learned from reading all the documentation for these platforms is that they are very much the same when you look at it from a higher level. You have some user input and a place to store files and an interface to the graphics and sound. Abstract that away and the "game engine" does not care much where it runs. That does of course not make it any easier or less ambitious because I still need to write this extra layer of abstraction. I do work from a single code base now and when I fix the bug with the animated tiles for example I do not have to repeat that for each platform...just a simple recompile is enough.

    It was actually @Cyan who suggested me to contact them but I am glad I did, because now I know a the license of the game and got the permission to share the download page. In any case your welcome and I hope you are enying the game since that was one of my other reasons to choose Batterycheck for my project. You are right that it runs at 640x480 on the PC and it's good to know there are more people running Linux around here...although I imagine the Wii U linux group is likely to have it too. Weird that it does not run well on Windows 10 and that is just anther reason to have this remake also on the PC. The Linux version will have the latest new additions a little earlier than any other port and likely to get a debug mode with larger resolution, would you be interested in testing this?

    You are right that the lower resolution on the 3DS is a slight issue but not as much as on the NDS/DSi I was using before that. To give you and others an idea on how it looks at the lower resolution I could post a picture in the 3DS thread later. I am still considering scaling the graphics for the DS consoles but that looked so "bad" I dropped that platform for now. The 3DS's slight increase in resolution appears to me to be just enough to make it playable but I have to admit some places are hard to see or reach unless you know where to go. The original has allows you to look up and down already and I was thinking some sort of "zoom-out" function could be included so you could look around the player in case your lost. Would that help?
    If you would take away the WiFi, Bluetooth, USB and SD-Card the WIi is pretty much a faster Gamecube actually. When I started the multi-platform codebase the Gamecube was one of them but not being able to emulate the SD Gecko in Dolphin made testing really hard. I can not take all the credit for supporting so many controller options since most of that comes from libogc, all I did is read all of them out with the provided functions and translate them into my own button values for the Engine (I use this word a lot I think). When I upload the next preview version I make sure to also include a Gamecube version for you to try...but no guarantees that it will work though. Or even better start the Gamecube specific thread and continue the ISO and disc related discussions there.

    The GC-Linux tutorial states that it actually means Generic Boot Image and from what I saw there and in the sourcecode it contains both the banner (which is the image you see including the description) and an apploader executable.
    A real disk is an option after the ISO could be build but that was not my goal for wanting an ISO. It was really just to make Dolphin list the game like any other backup with a logo and such. I have a Datel SD Launcher myself and have been using that to run Swiss. The constant swapping of SD cards got old really quick which is why I moved over to the Wii for most things now. I still have many plans for the Gamecube though since I like that it has no real OS to get in the way and one of my crazy ideas was a modern IPL replacement with a Raspberry Pi...seeing nobody replied in that thread I gues there is either no interest in the cube anymore or my idea was just a bit "to much" without a proof-of-concept. I just don't have the extra time for taking this idea any further for now.

    Sorry about the long post, but I am not very good at writing short replies ;)
     
    Last edited by Archerite, Dec 8, 2018
    KleinesSinchen likes this.
  4. niuus

    niuus GBAtemp Advanced Fan

    Member
    6
    Mar 4, 2016
    Venezuela
    Color me interested. B-)
     
    Archerite likes this.
  5. migles

    migles All my gbatemp friends are now mods, except for me

    Member
    14
    GBAtemp Patron
    migles is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 19, 2013
    China
    Earth-chan
    i am interested in that, there had been new stuff released for it lately, for example HDMI adapters, so i am not sure if there is lack of interest in the cube.. but yeah i agree there is a lack of stuff like modchips..
    could ya link the project of the dude who made a modchip using the raspberry pi? is it something that an average joe can make?
    the first model of gamecube has a serial 2 port that nothing uses it.. i already seen people talking that theorically there could be done something to maybe load games trough it
    but why use a raspberry pi? usually i see people designing custom PCB and components, well instead of using the official lan adapter of the gamecube to load games via network i guess we could use the pi for that
    i would buy a ODDE or loader device that allowed me to still use the official discs..
    wouldn't an arduino be more suitable for that job? i mean, i guess the arduino is better at controlling stuff?
     
    Archerite likes this.
  6. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    @niuus and @migles : Good to know there is some interrest in that after all. I have included the link in the other thread since it's more on topic over there. I mostly meant modchips are impossible to get beyond the xenogc. I got as far as solderingwires to the driveboard of my second cube...but never tried any kind of modchip on it because of the before mentioned Wii and 3DS being much easier to develop for. So never tried the Rpi modchip project myself, but it should not be more difficult than installing a xenogc.

    I suggest we won't go to much offtopic here about the gamecube rpi subject but I would like to add that I wanted to use a Rpi because it's about 20x more powerfull than an Arduino. Without the Linux kernel running it's a very cheap and powerfull ARM board. I did unfortunatly find out that th rpi slave spi, which is essential for my plan, is not exposed to the gpio header. Meaning it's a bit more work to use the rpi for that.I also have a thread about Wii debugging and replacing the USB Gecko with somethin simple an modern. May be I combine those project when I get to it.
     
    KleinesSinchen and niuus like this.
  7. KleinesSinchen

    KleinesSinchen The backup reminder

    Member
    7
    Mar 28, 2018
    Germany
    Long replies are good. If you have to explain much (and you did!) why not write everything?

    For the small screens the 3DS resolution is not that bad. There are some pretty nice graphics out there for low resolution devices. But simply scaling down doesn't look very good. Look here for example. Hex-a-Hop also normally runs in 640*480. It is okay on the 3DS (and I played some time with it) but with graphics drawn especially for low res, it would look better.
    https://gbatemp.net/threads/release-hex-a-hop-for-3ds-using-lib-sdl-1-2.464812/
    Zoom in/out sounds interesting (for all devices) but this sound like a hard piece of work (again).

    A little off topic

    I always wanted to do such a project myself, but as I'm not healthy and not able to concentrate for a long time, it never worked out. If I can help you by testing something (Linux, GameCube, 3DS, Wii), just tell me what to do.
     
    Archerite likes this.
  8. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    I didn't follow your project since we last talked, I read quickly what has been said so far and I'm glad everything went well with contacting the developers :)

    I like your view on why you don't create a game entirely (I'm like you I lack graphic and sound and arts experience or time to do it), I think it's a good idea to make an engine over existing free to use assets, it's between new game and ports.
    Seeing your goal to make the game on many consoles it's also a very good way to learn a lot and fast.

    Good luck on completing your project and I hope to see more things from you :)
     
    Archerite and migles like this.
  9. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    Good to know that it's not always a bad thing to have a long reply, but just like this one..it makes me think to long and abuse the "save draft" feature way to much though. ;)

    I have only tested image scaling when I was using the old DS and it looked nice with Lanczos but it changed the color palette so much that I ran into 256 max color limitat of the DS GPU. The zoom function should only require adjustment of the projection matrix...but I am not very good at the required math. The biggest issue with scaling is that a lot of the detail is lost especially on the borders of thin lines. Until I find a better algorithm that gives good results I just keep the original size on the 3DS.

    I am sorry to hear about your health... and I hope asking you to test a few things will not make it worse. At the moment I have nothing that might need testing since I have been working on getting the PSP port compiling (just a plain "hello world" and button input so far) and also did some digging in the 3DS graphics libraries. I want to share what I have on github to make testing easier for everyone who wants to look at it, but I want to cleanup a few parts of the code before I do that. I am thinking of splitting the code up in three repositories since it's a combo of: A multi platform layer, the "2D Platform Game Engine" and the Batterycheck specific code that uses them.

    I barely use windows either but this just shows how good Wine is at running windows software. Even better than Windows itself...hahaha. But seriously though it could just be a "compatibility setting" or whatever it is called to run in Windows 98 or Windows XP mode. Maybe I can include a port to windows at some point since OpenGL and GLFW are meant to make that easier...but the PSP and PS2 are more challenging and fun to add first :D

    I was really happy they answered some of my questions and allowed me to share their download page. Still need to reply back to them though...:shy:...was hoping to show them a working playable version I guess. :D

    I am glad you liked my view on creating the engine and I could not have imagined that I would be releasing it on all these different platforms when I started. Definitely learned a lot by adding each platform to work with it's respective libraries and CPU. There is still much to learn about many topics but I just take it one step at a time...or I try to at least. ;)

    Thanks, expect many more crazy things...:lol:
     
  10. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    I have posted this image in the 3DS thread a moment ago...
    [​IMG]

    And now that I look at it again I started thinking ahead....would be fun to add split-screen multi-player in mario kart style. When I get to the point of running Jazz Jackrabbit 2 battle levels on my engine this would be awesome I think ;)
     
    Brawl345 and niuus like this.
  11. niuus

    niuus GBAtemp Advanced Fan

    Member
    6
    Mar 4, 2016
    Venezuela
    Daum, man... those look awesome! Multiplayer would definitely be awesome, too.
     
    Archerite likes this.
  12. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    Thanks, I think I will just make it work in single player mode first. :lol:

    Here is a list of the changes made since the last preview: (I hoped to release the next preview this weekend but it's not quite ready yet)
    - Data files are searched in "sd:/apps/batterycheck/data" and fall back to "sd:/data/batcheck" in case they are not found. (Thanks to @niuus for the tip)
    - Belts are now rendered correctly without spacing. (can be seen in the 3DS screenshot above)
    - Added the only two types of enemies in the game (No animations or AI yet)
    - Water effect with changing surface level and partialy underwater items (took me almost the whole week to get this one right! :D)
    - Not all pools should be filed at startup, so they are not filled now
    - Falling water drops from pipes (not animated)
    - Fixed the bug in the Tile animations that caused flickering.
    - Added debug feature to show collision map (just a texture swap really ;))
    - Another debug feature is a simple minimap showing the level size in relation to the camera view
    - Updated the code to compile for Gamecube (untested but will be included in next preview)
    and maybe more that I forgot....

    What I want to add before the next preview is basic collision detection and a player that can be controlled. You won't be able to complete the level without the interactive elements but it won't be the "level browser" it looks like now. I also want the make the floating platforms work in the collision map and have them actually floating. This also needs gravity to be implemented so they will fall down to the bottom of empty pools. I feel these are the minimum new things to add to justify a new preview upload instead of two very shortly after each other.
     
    niuus, KleinesSinchen and Cyan like this.
  13. niuus

    niuus GBAtemp Advanced Fan

    Member
    6
    Mar 4, 2016
    Venezuela
    Nice changes, man. I'm glad that you're progressing steadily. I can test that Gamecube build too if you need, coincidentally, i connected my GCN homebrew setup yesterday.

    I'll be patiently waiting for your next preview :yayps3:
     
    Archerite likes this.
  14. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    I had promised to include a working and playable demo for the second preview right? 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.

    Here is a screenshot taken inside dolphin for those that did not follow the install instructions...
    batterycheck-wii-preview-2(dolphin).

    So here are the controls on the Wiimote (horizontal): (Most of these controls also map to the Gamecube, Classic Controller, and Wii U Pro Controller but I will let you find out for yourself ;))
    Left - Walk left
    Right - Walk Right
    1 - Jump
    2 - Jump
    A - DEBUG: Fall through the floor (in case you get stuck in a wall)
    B - DEBUG: Walk in the air (to stop falling and look around...or when you fell to far down)
    Minus - Switch texture to "Collision Map"
    Plus - Switch texture to "Gameplay"
    Home - Exit

    Please beware that this is still a very early prototype and just a preview. Unlike the previous version it is now sort of playable and has a few character animations and debug features to explore the level but it still contains bugs and unfinished features. As promised I included a Gamecube build this time but I have no idea if it will actually work at all...you have been warned! Also note that it is possible to run the Wii version in the Dolphin Emulator if you prepare an SD card image (I even have it working on my Android phone this way) but it will not run as smooth as it does on real hardware!

    I hope you all like the changes and progress I made so far.:D
     

    Attached Files:

    Last edited by Archerite, Dec 27, 2018
    Brawl345 and KleinesSinchen like this.
  15. KleinesSinchen

    KleinesSinchen The backup reminder

    Member
    7
    Mar 28, 2018
    Germany
    Wii version works - only replaced boot.dol
    Smooth scrolling and the jumping feels quite good. As you said, the collision detection is not perfect yet, but it does kind of work. Keep up the good work. Thank you!

    For the GameCube version: Are there any special instructions what to do? I put it on the SD-card for SD-gecko with the data files in both places you mentioned and only got a green screen with some "garbage":
    GC_Swiss. GC_batcheck.
    The round lines in both pictures come from the poor camera. With this small lens, taking pictures of a TV requires long exposure times so it looks like sh.. Sorry for that. I don't have any recording equipment that will record PAL60. Neither the good old VHS- nor the DVD-recorder do this.
     
    Archerite likes this.
  16. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    Thank you for testing it, I am glad the scrolling and jumping are good enough at first sight...I still feel the animation is wrong while jumping/falling compared to the original. Special thanks go to the Sonic Physics Guide for explaining how the sonic games handle collision detection/correction and physics on the MegaDrive with only 64KB of ram.
    Most of the collision detection I have implemented is based on that guide and weeks of research I did months ago and used in my 3DS prototype which I did not release. Nothing about the collision detection is optimized in any way and I did not even start on correction yet, I can accept how it works for now but really need to improve before the third preview. Next thing on my list is getting the 3DS version out before the end of the year! I have also worked on the PSP version a little and got GPU quads working which is an upgrade from the pure text based debug terminal I had before.

    I appreciate the effort you took for testing it on the Gamecube and uploading the pictures, I know it's very hard to take a sharp picture of a TV and that is no problem at all....a picture tells more than a thousand words right ;)
    My first guess is a memory issue on the Gamecube since generating the textures at runtime uses a lot of RAM. The exact path used on the Gamecube is "/apps/batterycheck/data/%s" where %s is replaced by the filename when the engine needs it. I won't have time to look at it right now but in a few days I will look into disabling a couple of things and see if I can get it to work on my own Gamecube.It could also be something with accessing the SD Gecko or a path prefix I need to use...it's really a shame that Dolphin does not support it. I looked into adding it myself and I think it's possible but a lot of work and not exactly a priority right now.
    Maybe I can implement the menu system and then test it on the Gamecube with an SD Gecko (or maybe that is also possible on the Wii). The menu uses only a few textures which don't require as much memory as a full level does. If I go that route I might open a specific Gamecube thread actually so we do not have to go too much offtopic in the Wii thread here. :)

    What I forgot to mention is that I also made a small start on a Jazz2 port to my engine. Only tested a few levels and for the most part it seemed to work. Needs a lot more work before I would show any of it here but thought I should let you know :D

    Thanks again for your feedback and testing it on both the Wii and the Gamecube.

    EDIT: I just looked at your pictures again and I now see that Swiss calls it "sdb:/" which might be the required prefix to use actually. :unsure:
     
    Last edited by Archerite, Dec 27, 2018
  17. niuus

    niuus GBAtemp Advanced Fan

    Member
    6
    Mar 4, 2016
    Venezuela
    Dude! Runs smooth as butter on the Wii, looks really fun to play again on the comfort of a console. I am really liking your progress so far.

    BTW, i have a surprise report for you...

    [​IMG]

    That's your BatteryCheck on the cube! :yayps3:
    Gamecube Indigo, NTSC-U, SD Media Launcher to boot Swiss (r528), on Slot B.

    Mind telling me how to insert files into the virtual SD that Dolphin generates? Always wanted to try, but didn't have much luck in the past.

    Eager for more tests! :lol:
     
    Archerite and KleinesSinchen like this.
  18. KleinesSinchen

    KleinesSinchen The backup reminder

    Member
    7
    Mar 28, 2018
    Germany
    Encouraged by this success I tried again with another SD-card. Can confirm this now: Got the same good result. Works on PAL GameCube. I still get the garbage screen I posted last time instead of the Swiss menu to select options for the current dol - but it boots the game on pressing "A".

    Sometimes the cube is picky with SDs. Did not consider this because my main SD worked for anything else. Thanks @niuus !
     
    Last edited by KleinesSinchen, Dec 30, 2018 - Reason: typo
    Archerite likes this.
  19. Archerite
    OP

    Archerite GBAtemp Regular

    Member
    4
    Sep 16, 2018
    Netherlands
    Thanks, it keeps amazing me how well it actually runs on the Wii hardware without much care for optimization. I plan on doing that when I go to more limited hardware like the DS(i), PSP, PS2 where both RAM and CPU speed can impact how well it would run. It is so awesome you got it working on the GameCube because when I started this whole project that was the platform I wanted to write it for! (no offense to you @KleinesSinchen I had no idea the SD card could be a problem) I was planning on getting my Gamecube connected again somewhere tonight or tomorrow and test it to see what the problem could be. I had a few other things todo and got a little sidetracked by the PlayStation Classic.....after the massive price drop and the fact it runs Linux and comes in a nice looking case with two controllers and has real USB ports (unlike the Nintendo mini's)...I bought one! :yayps3: The most "on-topic" thing to say about this is that I want to add "just another platform" for BatteryCheck to run on...which in this case should be easy since it runs Linux already. :D In case anyone wonders there is no change of porting it to the original PSX without rewriting pretty much everything!

    The dolphin Wiki instructions will guide you through the steps for each of the mayor Operating Systems. So just follow that and copy the files to the correct locations and it will just work fine. If you want to use it on Android be prepared for some manual editing of INI files but you can use the exact same SD card image for the PC, just know that it's a global setting for all games even if they do not use the SD card and you can have trouble launching any game if something is wrong.

    I had so many plans for the Gamecube but got tired of swapping SD cards because my SD MediaLauncher could not read cards larger than 2GB or 4GB. And after a reboot or crash I had to do all that again...and again...and again :wacko:...so like I said above I had no idea this could have been an issue. I am glad to hear you got it working now but maybe we can figure out at some point why the Gamecube is so picky about the SD cards. Do I understand correctly that it only crashes when you want to set other options and not when launched normally? If that is the case it must be something that Swiss is looking for and crashes when it's not found or something.

    Either way I am really really happy that you both have tested the gamecube version and got it working on NTSC and PAL machines. Does it run any different on the Cube compared to the Wii that you could notice? Like a slowdown or other glitches during "gameplay" that I should look at? I am also not really sure what frame rate it runs at on NTSC vs PAL on the Wii or the Cube since I am just using VSync for everything.

    I have finally implemented texture generation and loading on the 3DS version and hope to upload it in a few hours...so if you are up to some more testing keep an eye on the 3DS thread and prepare your SD card (files go in: "sdmc:/data/batcheck/%s"). Just need to think about what icon to use since I do not have permission to use the real batterycheck icons, Proabbly just a stand-in with text "Batterycheck - 3DS" or something like that;)

    Thank you both for testing the latest version and your feedback.

    EDIT: @niuus I see just noticed that on your CRT the HUD is going outside of the visible area, should I fix that or is it normal for other games as well? I have connected my Wii through an HDMI converter on a LCD monitor so I do not have that issue myself What is that called again? Overscan or something right?
     
    Last edited by Archerite, Dec 30, 2018
  20. KleinesSinchen

    KleinesSinchen The backup reminder

    Member
    7
    Mar 28, 2018
    Germany
    The thing with setting different options was my mistake. Mixed two things up. Concentrations was bad again. When launching ISO images of commercial GC-games, Swiss asks for settings each time before booting – so it does for GBI for the Game Boy Player because it has a special config file. Normal .dol files just boot without showing a settings window before; this confused me. And the crash happens only on one SD and not on the other. This brings me to another topic:

    The SD Media Launcher can use bigger SDs. It’s the crappy software made by Datel that does not support modern cards – Swiss does. After all the SD-gecko is just as passive adapter with no electronic function at all. But… my experience with the GameCube and SDs can at best described as random.
    I don’t have the smallest idea what this means (or if I’m doing something wrong without noticing). I'm not really a coder, just an end user. But here is a weird example: An md5sum checked image of Luigi’s Mansion directly dumped from the legit disc on two SDs and Batterycheck of course (although visible only on one picture). When I see this, I just want to transform into a gigantic question mark:

    MainSD. OldSD.

    The GameCube version of your Batterycheck preview has no speed/lag problems. As fluid as the Wii version. The framerate should have been the same compared to NTSC because I used PAL60(480i). The Wii version looks a little better, but this is probably because of the better output via component cable (don't have the rare and expensive component cable for the digital AV-out on the Cube). My CRT TV shows the “overscan” effect as well, but not as much as in niuus’ example. Compare the capital letter “S” from “Swiss” on niuus’ picture with mine. Overall the GameCube version seems to be in no way inferior. GameCube version shown on CRT:

    Screenshot_CRT.JPG
     
    Archerite likes this.
Loading...