Homebrew Batterycheck - Remake of an old PC platformer

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,421
Trophies
2
XP
14,855
Country
Germany
And here is how it looks when the dumped screenshot is shown by the Wii on my CRT:
Looks great – and weird. A “setup.exe” running on the Wii.

Really: Great, but I still have one question (not a complaint!): What made you think about Windows XP when choosing a style for the installer? I mean, Batterycheck/Jazz 2 are older than XP. My first idea would have been a classic Windows 9x theme.
 

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
Looks great – and weird. A “setup.exe” running on the Wii.

Really: Great, but I still have one question (not a complaint!): What made you think about Windows XP when choosing a style for the installer? I mean, Batterycheck/Jazz 2 are older than XP. My first idea would have been a classic Windows 9x theme.
Thanks, I know it's weird and totally unnecessary to make it look like WindowsXP especially on a Wii. I am still considering a more native theme for in game settings and other things but the biggest reason for going with a WinXP theme is that I don't really like the looks of Win9x with it's flat gray buttons, although this one on xfce-look.org does not look that terrible. But mostly because it's the only theme that renders without nasty glitches in my self made "XFWM4 theme engine parser" and it does fit the time frame from when the Wii was introduced.

And ofcourse just because I thought it would be funny to make some people believe their Wii suddenly is running WindowsXP :rofl:
 
  • Like
Reactions: niuus

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
Thanks niuus, but I think you know more than you give yourself credit for...how else could you manage to modify the Snes9x GX emulator into the new RX version. ;) (I must admit I have not really looked into what you have changed about it)

Like I said before I did not really like how my simple blue window theme looked, maybe I can fix it with different colors but it would just be too much work for what I need right now. I have been researching how the themes work in my XFCE4 Linux environment and it has been a lot of trial and error figuring it out what the images are used for. There are literally 140+ windowing themes on my system and even more could be downloaded if I would want too. Since Batterycheck is orginally a Windows game I thought it would be fun to try out a Windows XP theme to use with the installer for my game...here is an early mock-up I made using PyGame in Python3.
View attachment 166304

The top theme is called "RedmondXP" using "Windows XP Luna" widgets and should be familiar to everyone who have used WindowsXP before. The bottom one is "Windows XP Royale Dark" using "Greybird" widgets which is a mix of old and modern style. I am not sure which one of these I prefer yet or if I might choose an entirely different theme...maybe more like old style MacOS? :lol: I have put this screenshot as a static "background" into a test DOL and run it on my really small 36cm CRT TV on my Wii and it looks surprisingly authentic from what I remember WinXP looked like, hahahaha. I have been using Linux as my main OS for almost 12 years now so I have a few mixed feelings about using this theme, but it's also more fitting for the original game somehow. Another option I have been considering is using libwiigui or at least the looks of that to make the installer feel like an actual "Wii Menu App" or something like that.

I am curious how others think about making the Wii (and Gamecube) look like an old WinXP machine during the installation of Batterycheck.....;)

Edit: I have been digging into the blob of data in Setup.exe again that I had discarded earlier and found the graphics used by the installer inside of it. I changed the prototype window to look more like the original setup with a few checkboxes and the image extracted from the blob. And here is how it looks when the dumped screenshot is shown by the Wii on my CRT:
View attachment 166419
It's not functional or finished yet but I definitely think this looks great already and how I might do it. Next thing I will add is a cursor that can be moved with the wimote, nunchunck or Gamecube analog stick. I hope to release it in this style really soon...my plan is within 2 weeks. Always good to have a deadline right? :D
Dude! I am really diggin' that XP on Wii style! Ha ha ha. Cool job, @Archerite
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
Dude! I am really diggin' that XP on Wii style! Ha ha ha. Cool job, @Archerite
I went even further...and added the XP startup sound I found as an OGG file. It's working perfectly but I can't include it in the actual installer since it's copyrighted unfortunately. It was mostly just to see if it would work and how much trouble it would be to add this. Turns out that it's extremely easy to do but it does increase the DOL size a bit for the extra libraries required for playback.

Yesterday I have been experimenting with converting the XM background music into OGG...and use it as the background music. It was not super simple but I got what I wanted and even if it increases the file size from 1.5mb to almost 6mb....it does play! Since the 'ogg player' example runs all the updating code on a separate thread the speed of gameplay is not even slightly affected by it. Still silky smooth in every situation as far as I can tell. :D
But again I can not distribute this converted OGG since the original is copyrighted. I have searched for month to find a solution that will play the XM file directly but it's complex stuff and most examples I see of other homebrew use either MOD or OGG for music. What I can and will most likely do is check if the background music file is on the SD card in OGG format and load that in if it exists, this way a workaround is available until I find something better.

While I was testing the background music it annoyed me that the belts and floaters were still not 'solid' to stand on them. And I have finally put in some effort to have a very rough implementation that at least allows standing on them...kind of. All solid tiles are at 32x32px boundaries so to make it work I had to find a way to work with that. The entire collision detection and correction needs to be rewritten from scratch to be more flexible and easier to maintain. I won't do that before the next preview though as it might take a few weeks/months to do it properly.

I am afraid the menu system will not be included yet either since it''s having a couple of issues, and working on the installer took a lot of my time away from it. The overscan settings screen won't be there either but I will include a simple config file to allow changing it. Either XML or JSON format I think.

While the 'solid' parts are getting better it's only the ground or platforms that are detected. Walls,doors and other barriers are still completely transparent to the player. And in a few places even the ground is not detected correctly, mostly in the left corner of pools but also on a few regular solid filled wall parts.

I have also been thinking of adding 'battery collection' and making the gauges work with that to count up. This also comes with a small animation and sound sequence that I might skip for now. But I want this in v0.3 so the player can start actually doing something instead of just jumping around without a goal. I have also been thinking of using the energy bar to slowly drain as you walk and jump and require you to recharge at the energy gates to fill it up. And then when the energy is out....you die...with an animation sequence and return back to the starting point.

I hope my random thoughts and progress reports here were not to long or anything, just letting know I am not only focusing on the installer anymore :D
 
Last edited by Archerite,
  • Like
Reactions: niuus

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
What I can and will most likely do is check if the background music file is on the SD card in OGG format and load that in if it exists, this way a workaround is available until I find something better.
That's what engine ports tend to do (Wii Doom, Chocolate Doom Vita, Quake Vita, etc.) which is perfectly fine.

I am afraid the menu system will not be included yet either since it''s having a couple of issues, and working on the installer took a lot of my time away from it. The overscan settings screen won't be there either but I will include a simple config file to allow changing it. Either XML or JSON format I think.
That would suffice for the meantime.

I hope my random thoughts and progress reports here were not to long or anything, just letting know I am not only focusing on the installer anymore :D
Keep up! As i've told you in the past, i do enjoy the technical explanations and intricacies. I think BatteryCheck is very much worth it, including when it is fully fledged to support Jazz Jackrabbit.
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
That's what engine ports tend to do (Wii Doom, Chocolate Doom Vita, Quake Vita, etc.) which is perfectly fine.
...
That would suffice for the meantime.
...
Keep up! As i've told you in the past, i do enjoy the technical explanations and intricacies. I think BatteryCheck is very much worth it, including when it is fully fledged to support Jazz Jackrabbit.
I actually thought using OGG instead of the original files was just a crazy workaround, but it's good to know this is common practice used by others. I will add it as an optional feature and let the end user figure out how to convert the XM into OGG, in fact any valid OGG file (for the provided libraries that is) that is named "binnen.ogg" and small enough to load into memory should work. I do find that the background music adds a lot of atmosphere to the game...which is kind of the point I guess. ;)

I am going with XML for the settings since it's very common and I can use the practice with the library to load custom levels at some point. While I was figuring out how to interpret the level data I exported it to be used with the Tiled LevelEditor which uses XML for it's native format. I had even made a simple testing level with some copy/pasted parts from the large level to create the "jumping and gravity" code...seems like ages ago but I think it was september last year or something like that, hahaha :lol:

I know you have said that but I always feel that after writing a long post explaining everything I left things out or went to much into details, but I will try to hold back on the apologies next time. ;) I am glad you think BatteryCheck is worth it and seeing how many views this thread has had already it seems more people like to follow the updates about it. Even though Jazz Jackrabbit might be more familiar at least I have brought some more attention to this great little puzzle platformer from the past that not many had heard about before. :D

And since I am here anyway.....

Now that I have started to add limited music support I was thinking it would be nice to have a few sound effects as well. I know where they are stored and I have found an old python script meant for Jazz2 that can kind of extract them and convert it into wav files. What I mean is that it produces a bunch of files but they are really short and some are almost the same, so I think it's misreading the length or something. I will have to do some more research on it and rewrite that script into C++ for further analysis of the sound data.

I said before that my current collision code works on 32x32px blocks and just returns a "yes" or "no" if the player is within those pixel coordinates. The reason I made it that way is because it was much easier to detect if a tile is solid or not than if only a part of it should be solid. And since there is no correction check yet to move back if the player is actually inside of a block you get the situation that sometimes you land "halfway" inside. Looking at the tile masks I think the original game uses single pixel collision detection and it must be using some clever lookup tricks to make that work as fast as it does. I have a few ideas on how to recreate that level of precision but not so much on how to implement it in a short time. The shortest explanation of what needs to be done is writing efficient coordinate conversion functions that use all available level data and then use a "lookup table" to see which mask tile is required and then check if a pixel is solid or not. As with the sound it's going to take a bunch of extra research to find an efficient solution. This is what I meant by saying I have to do a complete rewrite from scratch and do it right this time!

With so much exciting new things going on at the same time it's hard to keep track of what I was actually doing. Since I gave my self a two week deadline for the v0.3 release that makes use of the new installer I think I will focus on making that usable first before going wild on sound effects and a new collision detection system. All the installer really needs to do is give a few options and show a progress-bar during installation and things like generating logo.png can be added later. I do think I have found a nice background music to use for the installer but need to make sure it's free to use.

I think that is enough for now ;)
 
  • Like
Reactions: niuus

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
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 and Wii (hardware and Dolphin) and none of them show any issues beyond what I already described above. It's crazy that I have not tested it personally on the Gamecube yet since that is the platform that inspired me the most to even get started on creating this game. I just realized as I was going through my backups that it's almost a year since I started this "Write my own game" adventure which started around the end of June last year. I think I have learned quite a lot in a short time and really made a lot of progress on improving the experience.

Looks like I am going to make that deadline next week to release v0.3...:D
 
Last edited by Archerite,

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,421
Trophies
2
XP
14,855
Country
Germany
Interesting to read – as always.
Looks like I am going to make that deadline next week to release v0.3...:D
Yeah! Ready to test. Besides: Did you ever release a Linux version yet? I can't remember.
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
Interesting to read – as always.

Yeah! Ready to test. Besides: Did you ever release a Linux version yet? I can't remember.
Thanks! I did mention a release on the Raspberry Pi being possible but I needed the installer to function for that...but no...I have not actually released it yet. And for desktop Linux the requirement for very specific library versions that are different between distributions held me back.

I will look into it as it was a promise I made. :)
 

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
I have finally figured out how the sound data is stored and how to use it!! The samples are 8bit mono PCM at 22050khz...and the coolest part is that the libasnd driver has support for this build in!:D

It will take a few days to rewrite the script into C++ and integrate that into my engine so it can work on all platforms....but we might have sound effects in v0.3!!! :yay: It's a bunch of about 68 sound samples and some are easy to recognize but there a quite a few I have no idea about. In a few cases I think different samples play shortly after each other which makes perfect sense actually.

To test it I added the jumping and recharge sounds as embedded waves to just see if that would work. It's surprisingly easy to just tell the audio library to take the data, the format and audio rate...and it plays that sound. Since I kind of hacked it in there are some distortions and clicking if the 'play' command is given to soon for the same sound. And because the samples are converted into wav files the headers give random noise too, more of a clicking sound.

This will add a LOT more life into the game with not as much effort as I thought all this time. Compared to all the trouble I had with converting the graphics....this is easy! At least it is now I know how it works... ;)
 
Last edited by Archerite,
  • Like
Reactions: niuus

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
It's crazy how fast things are going....but I have integrated the sound sample loading code into my engine already!!! :D

After optimizing some functions it became even simpler to add new sounds. I now have the following sounds:
- Jump
- Land on ground
- Batterycollect (only the sound trigger)
- Recharge
- Die when out of energy

And each is triggered at about the correct time they should except for recharge, which only plays when you walk away from the gate. I have not found an actual mapping between animations and sound effect yet inside the data files. It might be that they programmed that into the original game engine directly. Since there are only about 68 sounds anyway I might do the same and just tie them to the start of an animation or other event.

And I have tested the new sound system on Wii, Linux and...3DS!! On the last two I even have the background music playing from the original XM file directly. If only there was libmikmod for PPC in devkitpro... :(...guess I will have something to contribute after this :lol:
 
Last edited by Archerite,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
All of this started when I got a second GameCube last year and read so much about how the low level hardware works I got inspired to write software for it. So I thought it was about time I tried it on the GameCube myself! After setting it up and plugging in the cables I went through the pain of figuring out again how to get into swiss using the SD MediaLauncher and the crappy SD reader. Luckily I now have more than a few SD Gecko's from china so I could plug in two SD cards at the same time removing the need to swap the "boot" card with my actual larger 16GB SD card. I also kept in mind the issue reported by @KleinesSinchen that some SD cards might not work properly while I was getting ready....but my latest version kept crashing into an exception screen :sad:.

Since I knew that preview v0.2 worked on the gamecube as tested by both @KleinesSinchen and @niuus I put it on my card and was relieved that one actually worked! Meaning my cube and SD cards were fine but something in the newest version was causing the crash. To test a new version I have to through quite a few manual steps: Take SD from cube into reader -> copy file from PC -> put SD card back -> power on cube -> watch awesome nintendo gamecube animation (yes it really is!) -> wait for SD MediaLauncher to boot and show 1GB SD card in SDGecko-B so I can start Swiss -> navigate on 16GB SD card in SDGecko-A to my game DOL and launch it!! Just had to know and measured that from start to finish this takes at least 40-50 seconds each TIME!!! Now I remember why I "gave-up" on using the GameCube as a development machine so early and went to the Wii for most of it, And you won't hear me complaining about homebrew channel needing 5-10 seconds to initialize the network anymore! (if I do just remind me of the GameCube, hahahaha :lol:)

All kidding aside I just had to find out what caused the crash and after more then a few attempts I figured out that disabling the new sound features fixed it. To be more precise it's the converted background music in OGG format embedded in the DOL that caused it. I slowly tried putting back the sound effects and when it was all restored it still launched without problems....except that they did not actually play. No sounds at all and no crashing, while I was past this I tested the "new and improved" collision detection and all of that is working great on the cube. So knowing the issue was with the OGG player I thought it might be to big so I just edited it to be half it's original length to make it smaller....and the crashing was back! Then I tried the Devkitpro audio examples with MOD, MP3 and OGG players and each of them run fine. So as a kind of last resort I tried the OGG from the example in my game...and guess what. It runs and even brought the sound effects back!?!?!?! :wtf:

I have no idea yet why it crashes or why the OGG libraries are required to enable the sound effects. I suspect that a special DSP program is used to offload decoding of the OGG file. Or maybe it just does another initializing step that I missed somewhere. Since I can not use libmikmod yet to play directly from the XM file I used a shortcut and embed a converted to OGG version inside the DOL like the examples also do. I might just make a really short silent OGG file so the player can initialize and play just once and have the sound effects enabled until I have ported libmikmod to the PPC for usage on the GameCube and Wii. For those that do not know about what MikMod is it's a library that can play MOD, XM, IT, S3M and a lot of other MusicTracker files that where in popular use during the 90's for game music. And those are the formats my game engine needs to support in order to later playback these files used by Jazz Jackrabbit 2 level background music. I am already using that library on Linux and 3DS so it makes sense to also use it on Wii/GameCube to share some of the music and effects functions with all other ports.
EDIT: I have just figured out what the issue was and why there was no sound without the OGG playing!! Going through the sourcecode of libogc to see what the ASND_Init() function does I saw that this is what uploads the DSP program that allows mixing multiple "voices" or audio samples into a single output stream. Maybe the OGG library uploads an alternative version but I have not looked into it, what's important is that I read in the documentation that the sound output is paused by ASND_init()!!! And you have to call ASND_Pause(0) to enable the output...so I did and now it works without the OGG player! :D

As for actual new features I have been looking into the animations and movement of the player. I feel the jumping and walking animations are not quite right and are missing a few frames or steps. Walking should be more related to the traveled distance instead of just "WALK" and while going left the offsets are entirely wrong making it look really weird. Looking at this also made me rethink about how and when sound effects are triggered. Usually a sound effect is directly matched with an animation sequence of the player or an object on the map, making it logical to combine the start of an animation to also trigger the corresponding sound effects. The only issue is that my game engine is a big jumble of functions all over the place and I REALLY need to fix that...after v0.3 is out!

And since I also have a few other issues to fix or implement before Friday 24-05-2019 20:00 CEST I do not want to get distracted into rewriting a mayor component that could delay that release date! The only reason for that deadline is to force myself into actually doing things and delivering on at least one promise I made a while ago: adjustable overscan settings...:shy:...although I think you might find the new defaults to be a lot better now @niuus ;)
 
Last edited by Archerite,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
I kind of lost track of what I said would be included in v0.3 so I have started reading this whole thread again from the start to find out. A few things made it in but a couple of others did not and to make sure I will list them just once more:

- Working menu system (not ready!)
- Fix the jumping animation (not a priority---jumping animation is made from 3-4 smaller sub-animations and need more work to get right---not sure if I can fix it in time)
- Maybe some idle animations (would be fun to have one or two...but already have the sound of one of them included!)
- Completely rewritten collision detection (not ready!)
- Adjustable HUD overscan settings (DONE! Configurable through settings.xml)
- Recharge animation when walking through a gate (DONE! Optimized a few things to make this a lot easier.)
- Basic "wall detection" so you can not walk into a wall anymore (MINIMAL: When you walk into a wall you have a bit of force that keeps you out. Had to disable it while jumping so you can still get stuck!)
- Standing on interactive elements: conveyor's, floats, doors, elevators (kind of works. Except for the doors....)
- Custom installer to unpacks directly from "batterycheck.zip" or Setup.exe on the console itself (working....but needs some work to detect either one automatically )
- Error messages on screen when files are missing (installer will make sure files exist in the right place)
- Generate icon.png and meta.xml with the installer for Wii Homebrew Channel (not-done-yet)
- Create required directories on installation (working....but ignores any errors)
- Cleanup old installation file locations, if requested by user (not ready! .... need more time to figure this out)

Some unexpected new features:
- Sound Effects!!!!
- Jumping, Landing, Recharge, Green Battery, Blue Battery, Extra Life, and...ehm...when out of power (Has a working animation now!)
- Collecting Green Batteries, Blue Batteries and extra life's (has a HUGE bug though)
- Working energy bar that slowly runs out
- Working recharge gate...including the sound effect. (And the animation!)
- Jumping uses extra power
- Background music from original XM (only on 3DS)
- Background music from converted OGG (only on Wii...until XM can be played with MikMod)

I think this gives a good idea of what I have listed before as planned improvements and the state they are in. The bug in the collection of batteries I mentioned means that after you pick one up it play's the sound and increases your counter by 1....except sometimes it does not remove the battery from the map and keeps increasing the counter. If it get's higher than 99 it's starting to show the wrong sprites...need to fix that at least to prevent higher than 99 anyway! The counters can't get to high anymore but the bug still counts to many batteries.

The installer is working as I said before but needs a better GUI so it will "look nice". Not sure if I am still going with the WinXP imitation look as that was mostly just testing what it would look like. Most important thing I need is a font and functions to write text on the screen. FreeType is available on all platforms but it looks...complicated. I will try it anyway and if all else fails I will keep it as is with a text only interface since it's not that important right now.

This thread is starting to look like a blog, hope that's not a problem for the forum as it is mostly on topic. ;)


EDIT: Removed temporary message and the rainbow of colors....
 
Last edited by Archerite,
  • Like
Reactions: niuus

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
It has taken a lot longer than I planned....but here it finally is: Batterycheck Wii - Preview v0.3

I have tested it on two Wii's so I do not expect many issues, when I have confirmed it also works on the GameCube that version will be attached to this post too.

Enjoy!:D



The controls have not changed much since last time but there are quite a few improvements:
- Multiple sound effects are working now!!
- Improved wall detection so you can't easily walk through them anymore
- Added collection of Batteries, Extra Lifes and Super Batteries (which has a bug that does not remove the object properly sometimes)
- Energy bar is working and slowly runs out
- Use the recharge gate to keep your battery charged (has animation and sound effects!!)
- Jumping and landing sound effects
- You can now stand on interactive elements like: Floats, belts, elevators and laser-beam-one-way-platforms


Please beware that even while it has been improved with new features this is still a prototype and just a preview. The are still bugs and debug features enabled and a lot of unfinished features that prevent you from completing the level.

The new installation instructions for both new and existing users:
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 - Copy this file to "/batterycheck.zip" on your SD card without unpacking it!
5 - Download "batterycheck-wii-preview-v0.3.zip" from this post and unpack that into "/apps/batterycheck/*" just like many other homebrew channel apps onto the SD card.
6 - Put your SD card back into the wii and lauch the Homebrew Channel
7 - There should be a new entry "Batterycheck Installer". Run it to start the installation
8 - The text based installer will unpack the required files from the ZIP file and put them in the right place.
9 - When the installer is done click "Start" or "Home" to exit.
10 - You should now see the "Batterycheck Wii - Preview" entry in Homebrew Channel which is the now installed game. (boot.dol is replaced automatically)


Finally tested the GameCube version!
Since there is no homebrew channel for the GameCube and there are a few different ways to launch a DOL on the cube I have only included the DOL in the ZIp file attached here. Other than the instructions are mostly the same as the Wii and it will create the directory "/apps/batterycheck" and install the gamefiles there from "batterycheck.zip" and put "battery-gb-preview-3.dol" (yeah that's a typo, sorry). Use your launcher to navigate into the /apps/batterycheck directory and you should see the preview-3.dol with a little typing mistake in it name. :shy:


EDIT: Changed it to be more like the 3DS post I have just made using boxes. Looks much better I think.
EDIT2: Updated download instructions
 

Attachments

  • batterycheck-wii-preview-v0.3.zip
    585.9 KB · Views: 196
  • batterycheck-gc-preview-v0.3.zip
    436 KB · Views: 189
Last edited by Archerite,

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,421
Trophies
2
XP
14,855
Country
Germany
It has taken a lot longer than I planned....but here it finally is: Batterycheck Wii - Preview v0.3
That's really an improvement over the last preview. Sadly I do not have the time now for a complete test – will do this tomorrow. But with the energy bar/gates working, sounds, collecting stuff this actually feels like a game. Running through walls seems to be gone. Nice.

One thing: I found a strange glitch(?). You can collect this one battery near the starting point over and over again and the counter increases FAST – not like i++ but like i+=5. (Sorry for the bad screenshots. I really have to get some modern capture device)

Wii_version1.jpg Wii_version2.jpg
 
  • Like
Reactions: Archerite

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
That's really an improvement over the last preview. Sadly I do not have the time now for a complete test – will do this tomorrow. But with the energy bar/gates working, sounds, collecting stuff this actually feels like a game. Running through walls seems to be gone. Nice.

One thing: I found a strange glitch(?). You can collect this one battery near the starting point over and over again and the counter increases FAST – not like i++ but like i+=5. (Sorry for the bad screenshots. I really have to get some modern capture device)
No worries, I know good testing takes time and I am glad you could still spare a few minutes for a short test. If those screenshots came from an analog capture device they are not bad at all! The glitch all comes down to a perfect case of bad programming! :lol:....the way I have implemented the collectables was a "quick-and-dirty" method to add some fun and make the collectables work in v0.3 without doing a complete rewrite and more delays.
What did you think about the installer unpacking directly on the console? I know it's not the WinXP experience I have showed before and started wondering if that might not just be "overdoing a simple thing" or something. I kept it text only because of the way I wrote and tested it was really meant for a terminal and has a lot of printf() statements in it. Quite a mess to clean that up in such short notice ;)
The glitch is happening because I am abusing the "solid map" for detecting the batteries and while that works for standing on a platform it does not when trying to clear the collectable. It also does not happen with just that one battery you pointed at but at each and every one of them as the code that handles it is the same.
Code:
  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  //  Event - Collect Battery
  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  if(solid_get(cm_x,cm_y-1)==0xB1) {
    gamestate.batt_full++;  //Increase battery full counter
 
    uint8_t* event = (uint8_t*)map_events+  (((sy)*(rw*4)) + ((sx)*4));
    #ifdef GEKKO
      event[3] = 0x00;  //Clear eventID on big-endian
    #else
      event[0] = 0x00;  //Clear evenID on little-endian
    #endif
    player.playSound(1, PLAYER_SFX_COLLECT_BATTERY);  //play sound effect
  }
As you can see the battery counter is actually increased a single time but it lacks any good checking before clearing it in the event map. This is caused by an error in precision and/or miscalculation of the solid_map and the player's X,Y coordinates. And because the battery is not removed from the event map properly it is detected again and again until the positions map correctly. I just wanted to give the player something more to do in this version and saw a quick-and-dirty solution that works 60% of the time.

Not that it changes the fact this is actually a bug or anything...just wanted to explain the choices I made and make it more clear of why this is happening. As you can also see the playing of a sound effect is highly optimized already and I need to do the same thing for the events on the map and one of the things I will do before v0.4 comes out. Not putting a deadline on that again though...too much energy drinks and stress!!!! Hahahaha :D

Thanks again for testing and reporting the issues you found in your short time you had, I hope you will find the other improvements further along in the gameplay to be adding to the experience as well. Somewhere this weekend I will be uploading the GameCube and 3DS version's too and if you like you could take a look at them too.:D
 
Last edited by Archerite,

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,421
Trophies
2
XP
14,855
Country
Germany
A bit late
I am sick of booting Swiss on GC with Windwaker save exploit so I bought a XenoGC modchip. Soldering – especially small points – with my shaking hands is a nightmare. It took an hour to tin the points and even more to solder the chip onto the drive board.
Effect: All my backup DVDs start flawlessly – but not the disc with Swiss!
motz.gif


Still using the save exploit. Well… It was worth a try.
As a tester I did some stupid things on purpose:
Wii version:
  • Missing batterycheck.zip → Wii installer crashes with DSI exception and Stack Dump.
  • Corrupted setup.exe inside batterycheck.zip → Installer complains about wrong checksum for setup.exe and continues. Files within setup.exe still okay→ Success. Game works.
  • Corrupted setup.exe (other part) → Installer complains about wrong checksum for setup.exe and Anims.j2a → ZLIB data error… returns to Homebrew Channel without crash.
  • Missing game files → Error message; (Start) or (Home) returns to Homebrew Channel.
GameCube version:
  • Missing batterycheck.zip → GameCube installer gives an error message; (Start) reboots.
  • Missing game files → Error message; (Start) reboots.
  • No further tests with stupid things because of reason above. Booting Swiss gets tedious.
The installer does it’s job and I personally work so much with the terminal… I like a simple text based interface and don’t need a GUI.

Now to the game: It is actually already pretty fun to play it. With the sounds it is a lot more satisfying than the previous version. The collision detection still needs some improvements. Don’t get me wrong here – I really like the game and appreciate your efforts bringing some full game to multiple platforms. You said this yourself about the collision detection.
While the walls are already pretty solid (not easy to clip inside), there is nothing preventing the player from jumping through ceilings. Two other things:
  • With a little trying it is possible to clip inside platforms. When a sideway jump towards a platform is timed correctly, Batteryman’s feet are inside the platform instead of on the platform. Jumping straight up again fixes it.
  • When running/walking against a wall, the complete image is shaking a little.
Edit: Example of the clipping inside a platform (from the 3DS version)
feet_inside_platform-png.168851

Both the GameCube and Wii version run as fluent/fast as the previous preview without any slowdowns. All in all nothing to complain about.

If you want me to do some further tests, just tell me what to do.

Thank you for your hard work.
 
Last edited by KleinesSinchen,

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
A bit late
I am sick of booting Swiss on GC with Windwaker save exploit so I bought a XenoGC modchip. Soldering – especially small points – with my shaking hands is a nightmare. It took an hour to tin the points and even more to solder the chip onto the drive board.
Effect: All my backup DVDs start flawlessly – but not the disc with Swiss!
motz.gif


Still using the save exploit. Well… It was worth a try.
As a tester I did some stupid things on purpose:
Wii version:
  • Missing batterycheck.zip → Wii installer crashes with DSI exception and Stack Dump.
  • Corrupted setup.exe inside batterycheck.zip → Installer complains about wrong checksum for setup.exe and continues. Files within setup.exe still okay→ Success. Game works.
  • Corrupted setup.exe (other part) → Installer complains about wrong checksum for setup.exe and Anims.j2a → ZLIB data error… returns to Homebrew Channel without crash.
  • Missing game files → Error message; (Start) or (Home) returns to Homebrew Channel.
GameCube version:
  • Missing batterycheck.zip → GameCube installer gives an error message; (Start) reboots.
  • Missing game files → Error message; (Start) reboots.
  • No further tests with stupid things because of reason above. Booting Swiss gets tedious.
The installer does it’s job and I personally work so much with the terminal… I like a simple text based interface and don’t need a GUI.

Now to the game: It is actually already pretty fun to play it. With the sounds it is a lot more satisfying than the previous version. The collision detection still needs some improvements. Don’t get me wrong here – I really like the game and appreciate your efforts bringing some full game to multiple platforms. You said this yourself about the collision detection.
While the walls are already pretty solid (not easy to clip inside), there is nothing preventing the player from jumping through ceilings. Two other things:
  • With a little trying it is possible to clip inside platforms. When a sideway jump towards a platform is timed correctly, Batteryman’s feet are inside the platform instead of on the platform. Jumping straight up again fixes it.
  • When running/walking against a wall, the complete image is shaking a little.
Both the GameCube and Wii version run as fluent/fast as the previous preview without any slowdowns. All in all nothing to complain about.

If you want me to do some further tests, just tell me what to do.

Thank you for your hard work.
I know what you mean about the tedious procedure of booting swiss everytime....and I am hooping to find a way of making that faster. A few months ago I did read a lot about the XenoGC and even prepared my second GameCube for it with wires coming out on the side....never continued with it though. What I do remember from looking through the source code is that it has a few different firmware's with payloads to run on the PPC after boot. It has it's own little config menu with a few options but it could also be replaced by something to boot a DOL from SD Gecko or a memorycard!

Still strange that it won't let you boot your disc with swiss on it though.
It's awesome you did such an extensive test to see what would break my installer, hahaha.

  • When the ZIP is not found the fallback is to open Setup.exe from the SD card, but Looking through my code I see the error handling is marked as new! Meaning that I might have added those lines after building the Wii installer which is confirmed by the same test you did on the GameCube. Good catch!
  • I am not using a ZIP library and just blindly read from the known offset inside of the "official" ZIP without any attempt at making sure batterycheck.zip is the correct one. It does surprise me that you managed to corrupt it inside the ZIP and not having ZLIB freak out over it though. That it continues after a wrong checksum is obviously a bug I need to fix! The files only make up about 5MB of the entire setup.exe and most of it is actually DirectX that it has included which I obviously do not need to unpack. How did you even came up with this test? It's a really good one!
  • Now that is what I expected from ZLIB when a compression stream is corrupted but weird that it does not do that on setup.exe itself which you corrupted. Exit to HBC is the expected behavior in this case but might be better to have the user press a button first so they know it failed.
  • Like I said in the spoiler block I completely understand you did not do any more tests
I don't need a GUI either and use terminals every day too....just thought it was cool to have a fake WinXP experience a few weeks ago when I posted that. Then I figured it would not really be worth it to spend so much time on a GUI that is only used to install it and seen for maybe 30 seconds....little more on the GameCube as I noticed it was a little slower there. Like you say the installer does it's job and just needs a few extra tweaks and more error handling so it will not crash in those weird situations you created for it! :lol:

In one of my very first posts in this threads I explained why I was not making a game from scratch and among other reasons I said sounds are not something I am good at. Never thought my little experiments in "adding a WinXP experience" would lead to a better understanding of how sound works. So I am glad you say the sounds really make a difference and that it makes the game much more satisfying than before. In my opinion that is the biggest improvement that made this preview worthy of release, otherwise it would only be the installer and a slightly improved collision detection which only works on the walls. I only wish that I could have added the background music too like I did for the 3DS version....unfortunately the required libmikmod is not included by devkitpro for the PowerPC.

No hard feelings about the collision detection. I know it's bad and needs improvement and I keep saying it so everyone knows what to expect from it. To fix all the issues with it I need to rewrite about 80% or more and have actually already started but could not fix it on time for this release. The biggest thing missing is actually called "collision correction" and that is what should prevent the jump into a platform halfway though. The wall detection is already using the new system and actually works great....except that it is a single frame too late which is causing the shaking you noticed. The ceilings are indeed not working at all on purpose....I could not make them work without getting stuck in there during a jump.

You have already done so much extensive testing that I can not think about anything else right now for the Wii and Gamecube for you to test right now. Maybe you could test the overscan settings I have made configurable for CRT uses like you and @niuus which you can adjust in settings.xml which I included in the Wii ZIP file. It kind of sensitive to errors in XML syntax and the values are not checked at all and assumed to be integers. Another thing you might be interested in testing is the 3DS version which includes the background music, gameplay should be identical though except for the lower resolution.

You're welcome, and I like to thank you for taking the time to do these extensive tests on both the Wii and GameCube and giving me feedback on your findings!
 

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
It has taken a lot longer than I planned....but here it finally is: Batterycheck Wii - Preview v0.3

I have tested it on two Wii's so I do not expect many issues, when I have confirmed it also works on the GameCube that version will be attached to this post too.

Enjoy!:D



The controls have not changed much since last time but there are quite a few improvements:
- Multiple sound effects are working now!!
- Improved wall detection so you can't easily walk through them anymore
- Added collection of Batteries, Extra Lifes and Super Batteries (which has a bug that does not remove the object properly sometimes)
- Energy bar is working and slowly runs out
- Use the recharge gate to keep your battery charged (has animation and sound effects!!)
- Jumping and landing sound effects
- You can now stand on interactive elements like: Floats, belts, elevators and laser-beam-one-way-platforms


Please beware that even while it has been improved with new features this is still a prototype and just a preview. The are still bugs and debug features enabled and a lot of unfinished features that prevent you from completing the level.

The new installation instructions for both new and existing users:
1 - Go to http://www.ranjnet.nl/games/
2 - Click on "Batterycheck" and on the next screen click "download"
3 - This will download a file called "batterycheck.zip"
4 - Copy this file to "/batterycheck.zip" on your SD card without unpacking it!
5 - Download "batterycheck-wii-preview-v0.3.zip" from this post and unpack that into "/apps/batterycheck/*" just like many other homebrew channel apps onto the SD card.
6 - Put your SD card back into the wii and lauch the Homebrew Channel
7 - There should be a new entry "Batterycheck Installer". Run it to start the installation
8 - The text based installer will unpack the required files from the ZIP file and put them in the right place.
9 - When the installer is done click "Start" or "Home" to exit.
10 - You should now see the "Batterycheck Wii - Preview" entry in Homebrew Channel which is the now installed game. (boot.dol is replaced automatically)


Finally tested the GameCube version!
Since there is no homebrew channel for the GameCube and there are a few different ways to launch a DOL on the cube I have only included the DOL in the ZIp file attached here. Other than the instructions are mostly the same as the Wii and it will create the directory "/apps/batterycheck" and install the gamefiles there from "batterycheck.zip" and put "battery-gb-preview-3.dol" (yeah that's a typo, sorry). Use your launcher to navigate into the /apps/batterycheck directory and you should see the preview-3.dol with a little typing mistake in it name. :shy:


EDIT: Changed it to be more like the 3DS post I have just made using boxes. Looks much better I think.
YES! I was traveling these past weeks so i wasn't up to date with this. I'll be sure to test it tomorrow!
 

Archerite

Well-Known Member
OP
Member
GBAtemp Patron
Joined
Sep 16, 2018
Messages
209
Trophies
1
Age
41
XP
2,481
Country
Netherlands
YES! I was traveling these past weeks so i wasn't up to date with this. I'll be sure to test it tomorrow!
I can imagine you've been busy after you just got back...just curious if you got around to a quick test. ;) You made me aware of the support of the Wii U pro controller and with the latest release I have noticed it always connects as Controller 2 and I was wondering if you have this issue too. I was thinking about adding a way to reassign controller ID's or something or just combine the buttons for both controller 1 and controller 2 which is what I did to make sure it was actually still working. I did update devkitpro which might be the reason for it behaving differently.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night