hexadecimalmantis
hexadecimalmantis
Hacking Purgatory
8 posts
Don't wanna be here? Send us removal request.
hexadecimalmantis · 2 years ago
Text
Bionicle: The Game playable Onua Mata mod(s) released!
Recently I released a long awaited mod for BTG that replaces Onua Nuva with Onua Mata! While advancements in model swapping techniques made this mod possible, it still took a significant amount of time to complete. It’s up on the BTG Mod DB page as a standalone addon, and some additional skins for it were made by fellow Bionicle modder, Kralich. Check it out!
Tumblr media
Playable Onua Mata model swap by me
Tumblr media
Pre-release and set-accurate skins by Kralich
YouTube demo: https://youtu.be/_Z_7g6Yv7V4
Mod DB page: https://www.moddb.com/games/bionicle-the-game 
My BTG server: https://discord.gg/DyWpTjC
35 notes · View notes
hexadecimalmantis · 2 years ago
Text
Bionicle: The Game Mod DB Page
In case you didn’t know, Bionicle: The Game has its own decked out page on Mod DB! Some tutorials, multiple addons, and even my main mod project are all up there now. Anyone with a bit of modding knowledge can make and upload their own mods/addons to the page, and I’m always down to help. Mod DB page: https://www.moddb.com/games/bionicle-the-game My BTG server: https://discord.gg/DyWpTjC
2 notes · View notes
hexadecimalmantis · 5 years ago
Text
Fixing a broken unused level in Bionicle: The Game
Out of boredom, I managed to figure out why some of the early unused levels left over in Bionicle: The Game were crashing and loading incorrectly. For context, the final game has an internal WAD version of 0x74 (116), and the majority of the unused levels have a WAD version lower than that. The reason for this is fairly straightforward, the unused levels were compiled some time before the game was finished, and thus have internal differences due to the engine being less refined. The WAD version itself was most likely incremented by the developers whenever there was a significant upgrade to the engine. The game purposely prevents loading a file with a mismatched WAD version, but this can easily be bypassed by changing the WAD version byte in a given file to match the internal WAD version. However, this technique does not always work, since a file with a lower WAD version could have enough internal differences that it breaks when attempting to load it in the game. The unused level of interest here is an early unused version of the final segment in Onua Nuva’s level with a WAD version of 0x70 (112):
Tumblr media
As you can see, after changing the WAD version from 0x70 to 0x74 and loading the level, the large models did not load at all. The level would also crash randomly. I started my research by comparing the data from this unused level with the data from the finished level used in the final game. Specifically, I compared the main level files (.psm files), since the other files appeared to be working correctly. The main level files consist of only two blocks of data, both of which are individually compressed using a combination of Run-length encoding, back references, and literals. After comparing the first block from the unused level, and the first block from the finished level, I found that most of the data was similar, but a portion of the data appeared to be too different to ignore. The main level files with a WAD version of 0x74 have an index-like structure in the first block with pointers to each model stored in that file. Here is what that structure should look like:
Tumblr media
Each entry in the index should be 0x20 bytes long, and include a pointer to its respective model. A single entry has been highlighted here, with the model pointer highlighted in red. However, the model index in the unused level looked very different:
Tumblr media
As you can see, the unused level has a completely different model index structure. Each entry in the index is 0x24 bytes long, instead of 0x20, and all appear to have some sort of 0x04 byte header, similar to the texture headers the game uses. There is also an unsigned integer with the number of entries present near the index not shown in this image. Since the index format is different in this file, whatever function(s) the game uses to parse this section of the first block will not read the data correctly, thus causing the invisible models shown earlier. I copied the index data from the unused level into a separate file, and wrote a simple program that converted the version 0x70 index to the version 0x74 format:
Tumblr media
Here is a portion of the new index constructed by the program, and inserted into the first block of the unused main level file. As you can see, it now matches the format found in version 0x74 files:
Tumblr media
Of course, there was still more to adjust.The second block of the main level file contains pointers to almost everything in the first block, so those pointers also needed to be corrected in order for them to point to the correct places in the newly created model index. Here is a portion of the pointer clusters found in the second block that needed to be altered:
Tumblr media
Each entry in the model index in the first block has at least two pointers, and an identifier in the second block. The identifier is highlighted in blue, the pointer to the start of the entry is highlighted in green, and the pointer to the model pointer is highlighted in red. I copied the relevant pointers into a separate file, and I wrote another simple program that adjusted all of these pointers accordingly:
Tumblr media
And here is a portion of the new pointers created by the program inserted into the second block:
Tumblr media
After this, I corrected a few more pointers in the first block so that they would point to the newly created model index instead of the old locations. When I finished making alterations, I re-compressed both the first block and the second block, and repacked everything.
Success!
Tumblr media
After making the aforementioned alterations, the models now load correctly, and the level no longer crashes! Here is a quick comparison:
Tumblr media
I also have a video showcasing this fix on my YouTube channel: https://youtu.be/y7MM1D3WSBg
If you made it this far, thanks for reading.
24 notes · View notes
hexadecimalmantis · 5 years ago
Text
Pitch document and yet another PS2 build of Bionicle 2: City of Legends!
If you’re following this blog for whatever reason, you are probably familiar with the PS2 build of Bionicle 2: City of Legends that I received in 2019. However, in 2020, I received a slightly newer PS2 build of the game, and an authentic pitch document! Both items were recently made public on BioMedia Project: https://twitter.com/BioMediaProject/status/1256008989629919233  I also have two supplemental YouTube videos of this new build (Which I probably should have included in the initial news post) https://youtu.be/-DWz5KKDdeI https://youtu.be/GHuW6Y057HY
0 notes
hexadecimalmantis · 6 years ago
Text
Argonaut Games Research
This post was originally going to be an absurdly long documentary video, but I realized it would have been a bit boring, so I ultimately decided on making a glorified blog post. 
When I joined BioMedia Project last year, I was tasked with researching Bionicle: The Game and its sequel Bionicle 2: City of Legends. I have talked about both games in great detail many times before, and I think we all know about the issues that plague both of them by now. Bionicle: The Game is seemingly incomplete, and filled with content that was cut early on, and Bionicle 2: City of Legends never made it past a private movement demo. For context about Bionicle 2: BioMedia Project managed to obtain an Xbox build of the movement demo a few years ago. It has a few issues, such as broken audio and some missing graphical effects. I began reaching out to former developers in an effort to piece together the entire story of Argonaut Games, and uncover more secrets about both games. (Initially) With the assistance of Liam Robertson of DidYouKnowGaming?, I began contacting some of the developers. For those of you that are unfamiliar, Argonaut Games was split into two different facilities during the development of Bionicle: The Game. The first being Argonaut London, and the second was Argonaut Sheffield. I decided to reach out to the former developers from the London branch first. I initially didn’t get any replies, but I remained persistent. After waiting a few weeks, I eventually I got a reply from a former artist. Keep in mind that personal details about the former developers I contacted will be expunged in order to protect their identities and to prevent harassment and spam.
This is the first message I received after I inquired about Bionicle: The Game:
“Hi, yes I was lead artist on Bionicle. I'd say that it was a game that we cared a lot about, and to be honest we had high hopes for, at least initially. As always with game dev there wasn't just one cause of the games problems, but probably the biggest was we fell in love with the games setting and bit off far more than we could chew. We should have started with far more cautious goals, but we wanted to tell the whole story. I'm surprised if there was that much unused content on the disc TBH but the original scope of the game is definitely visible in naming conventions etc. we had intended each character to have toa levels and toa nuva (if thats the right term?) their powered up versions - before adding the 7th. Given that they have different abilities that was a huge ask of the team.
(Redacted)”
This message was about what I expected, the devs were a bit too ambitious and were unable to complete their ideas during the given development time. I later asked about the developer signatures stored within the BIGB archives, and asked them if they had worked on any of the Kopaka areas, since I found their signature within a subset of those files:
“the 'signatures' probably just refer to the designers - which is a relatively small subset of the team as a whole. I oversaw the project from an art perspective, so characters env, frontend etc then I ended up doing some animation work on the bull, onua, the weird door thing. I didn't work on Kopaka - that work was done up in Sheffield, I used to visit their studio to review stuff & sign it off.”
I’m sure the Bull was probably the Kane-Ra seen in Onua Nuva’s level. There are some pre-release trailers that show a Kane-Ra attacking the player with unique animations too. After that, I asked him about Argonaut Sheffield and their work on Bionicle 2: City of Legends. To my surprise, I got this:
“No, I didn't I thought they were disbanded alongside Argo”
This essentially meant that nobody from Argonaut London was aware of the development of Bionicle 2: City of Legends. With this information, it was easy to conclude that Bionicle 2 was created solely by Argonaut Sheffield as speculated. After failing to get more replies from former developers from Argonaut London, I shifted my focus to Argonaut Sheffield, intrigued by the messages I received from the former artist.
After a bit of waiting, I got a reply from another former artist.
“Hi,
Yes, I worked on Bionicle as a character artist along side artist (redacted). He was my mentor back then as it was my first industry job. I think we modelled about 130 odd characters/modular models back then between us. The character concepts we're drawn up by (redacted).
Argonaut Sheffield was previously Particle Systems who made I-War, the PC Sci Fi game and some other iterations. It was a technically adept small team and great to work with. I didn't have much to do with the London branch. We went on to try and make some failed movie tie-ins alongside them at a later date. Catwoman, Zorro, Star Wars, Charlie And The Chocolate Factory and also Bionicle 2.. which was going to be a fluid parkour type platformer. Which never materialised as after being there just shy of two years, London shut us down.
I'm actually working back in the offices where it all happened now. Which seems strange. I did work at Sumo Digital as a lead Char artist for ten years in between. I know there's a basement full of hard drives still here as one of the old directors still rents some space here.
(redacted)
(redacted)
Hope this helps.
Cheers,
(redacted)”
I received concept art for both Bionicle: The Game and Bionicle 2: City of Legends in this message. The art was later posted on my Twitter: https://twitter.com/HexMantis/status/1099883979942084608
Aside from the plethora of art, this message provided some insight about how Argonaut Sheffield came to be. It was previously known as Particle Systems before it assimilated into Argonaut Games. After this exchange, I reached out to a former programmer from Argonaut Sheffield. This time I provided a set of questions for the developer to answer in an effort to obtain specific information. After waiting for nearly a month, I got a reply:
The questions I asked will be enclosed within [ ] to avoid confusion.
“Hey!
There's some incomplete credits here (redacted)
but you could try contacting (redacted) as he was the lead programmer there. He used to work at PKR too, also owned by (redacted).
(redacted)
[Asked about the main development platform for the games]
1) Yep it was PS2. The PS2 version was handled by Argonaut Edgeware and programmers in Sheffield did ports for the other platforms
[Asked about the cut content from Bionicle: The Game]
2) Sorry, I wasn't involved with that bit. I was responsible for adding the hyper threading features on the PC (redacted)
[Asked about interactions with the London branch]
3) Yep, we worked together on it. Designers and Artists in Sheffield were working on assets for the main game.
[Asked about I-Ninja’s compatibility with Bionicle: The Game]
4) I think they should be compatible with each other. I-ninja came out a bit later though.
[Asked about Bionicle 2: City of Legends]
5) Maybe, not sure as it was a long time ago and I then moved to the Edgeware studio. If they did I guess it was just a prototype for a pitch
Good luck with your fact finding!“
I later asked if they knew of any early builds of either game, and I got this reply:
“Hey!
Sorry for the late reply. I believe everything was archived by Argonaut and EA. I'm not sure if anyone archived it personally at Argonaut or not but there were a lot of people working on it. They created archive PCs with everything you need to make the game from the source assets.
Thanks,
(redacted)”
The concept of the supposed “archive PCs” was interesting, but I doubt any of them are still around after all this time. After this, I contacted another former programmer from Argonaut Sheffield. This time with a focus on Bionicle 2: City of Legends:
“Hi William, I must admit, I'm curious where you found my name in the demo. Do you have a source code drop to go with it, or did I leave my name in an error message in the binary package itself?
Either way, yes I did work on the demo, albeit briefly. The engine the demo is built on is largely the same engine used in Bionicle (the original PS2/Xbox/PC game), Catwoman, and I-Ninja. It has an older pedigree than that too, but those were the games it was used on while Argonaut Sheffield was part of the Argonaut group. I was one of the programmers who ported the engine over to PC & Xbox for the original Bionicle, which is why I was involved in the demo in some capacity.
I'm still in touch with a lot of the designers who worked on the movement demo; the lead designer, (redacted), has said that I can pass on his contact details if you'd like to get in touch with him. You can contact him at (redacted).
Cheers,
(redacted)”
I was not surprised to get confirmation that Bionicle 2 used the same engine as Bionicle: The Game, since most of my existing programs I wrote for Bionicle: The Game were compatible with the Xbox demo. I asked if a PS2 port of Bionicle 2: City of Legends ever existed, since the Xbox demo we have has DualShock button mappings present in the game:
“Ah, I'll bet that's because I'll have compiled and built the disc image, so it's embedded my PC's name into the image. The level select would have just been for test levels where I was looking at specific bugs, performance problems or new features.
I really can't remember if we did PS2 or PC builds of the demo, other than the development binaries the design team would have been using. It's unlikely we'll have done a full ISO for the PS2, because the spiders caused real performance problems and we'd have wanted to show it to the publishers on the fastest available hardware.
By the way, the Xbox version will have reference to PS2 hardware because the original engine was PS2 only. The easiest way to port the engine was to, as far as possible, just get the Xbox and PC versions to pretend they were doing exactly the same thing as the PS2. For example, the game scripts don't need to know that when they get a button press from Cross or Circle, they're actually getting button presses from A or B. So although the names are going to be PS2-centric, they're still doing Xbox specific stuff.”
I was surprised to find out that the Morbuzakh Spiders were the primary reason for shifting Bionicle 2 to the original Xbox. I guess it makes sense, given how little time Argonaut Sheffield had to optimize the game. Switching to the original Xbox appeared to be a quick and easy way to avoid the hassle of optimization.
I later asked about the audio issues present in the Xbox demo, and for some general information about Bionicle: The Game.
“Hi William,
I'm afraid I've got no idea why the demo would be silent - it's been far too many years for me to remember the exact details, and I have no idea which version of the demo is the one which has been circulated. The full code for the audio system will have been present, because it was just a continuation of the engine used on Bionicle, and I'm sure the designers would have had at least some placeholder audio to hook up.
Audio is habitually the last thing to get hooked up in any game development, and since most developers prefer to have a silent build and listen to their own music while they work, it's not unusual for it either to be neglected in early internal builds, or for it to have been hacked to be silent (assuming the demo was one built locally rather than for showing to a publisher).
In terms of the development situation on Bionicle, although we weren't directly in the body of main developers, I think most of us were aware that the game wasn't progressing as well as it should. As well as the code team doing the porting work, our design and art teams were making the 'adrenaline levels' - which were the short lava/ice/tree surfing levels. They were only supposed to be short breaks between much larger levels, but it became increasingly obvious towards the end that these relatively small levels were still a large percentage of the actual content, and the other larger levels weren't coming online as fast as they should. QA in particular do full play-throughs on a regular basis, so they have a very good view of how fast the game as a whole is coming together.
I'm not 100% sure on all of the reasons for the delays in development, having been a relatively junior developer in a satellite studio at the time, but the reasons discussed at the time with leads and producers are fairly common ones that I've seen and heard about on other projects since. Inexperienced publishers or IP holders who haven't worked with game developers before often don't understand the lead times involved in producing content.
It's very hard to explain to customers who are used to working with companies like advertising agencies, who can turn around a complete change of direction in a matter of days, that you need to make and lock down decisions months or even years in advance. I think the penny finally dropped for Lego about three months out from submission that if they kept holding up approvals and kept requesting changes, they weren't going to get any game at all on the shelves - which of course meant we all had to crunch like hell to get the content in good enough shape to ship!
Cheers,”
An example of the aforementioned “Adrenaline sections” is the Tahu Nuva level from Bionicle: The Game. This level is actually internally named “Ta Adrenaline” as well. It’s obvious at this point that Tahu Nuva was originally going to have more than just surfing sections in his level, given the evidence in this message and the fact that he has a full set of unused walking animations.
I eventually contacted the designer mentioned by the former programmer, and got a reply after a month. (This designer was kind enough to restate my questions in his message):
“Hey,
I'm so sorry it's taken so long to get back to you. I was launching a game and I completely forgot about this.
1. What was your role as a designer like when working on both games? What kind of work did you do?
I was lead designer at Argonaut Sheffield, and we were brought in to help out on Bionicle the Game. We were responsible for what was known internally as "the adrenaline sections". The game was split into third person. exploration and combat levels (which were developed by the main Argonaut office in London), and the fast moving on rails sections that we created. As well as leading the team on these sections I was directly involved in the Tahu Nuva Boss Race near the end of the game.
2. Were you aware of content being cut or removed when working on Bionicle: The Game? Did you work on anything that didn't make the cut?
Like with any game there's work that involved that never sees the light of day. There were a lot of changes to the design over time, sometimes for practical reasons, other times because Lego wanted them.  I seem to recall that in the original design you would play as each Toa normally and each one again in their Nuva form in large open levels - with the platform adventure and the adrenaline sections seamlessly blending into each other. Quite soon after we were brought into the project a much clearer separation was made between the two, but I'm sure there was lots of the preparatory work for that ended up on the disc.
3. Do you know if any other character models aside from Matau (The green character) were created for Bionicle 2?
No other characters were made for that demo. I think we had a matter of weeks and everything had to be done very quickly.  That build represents a build that we sent to Lego (And Giant who eventually became TT Games) for approval and hopefully for more funding for the company. And we spent a lot of time agreeing the visual look of the character, as it was very different from what we'd done in the first game.
The work done on Bionicle 2 was entirely done up in Sheffield so we had a lot more control over the content. We knew that the Bionicle audience was getting older, and their gaming needs were becoming more sophisticated and we wanted to do something that would appeal both to that audience and be an interesting game in its own right. We felt that the first game had been so compromised by production issues that it ended up being very disappointing. We wanted to make something fluid and interesting that was a joy to play as a platformer, and had the dynamism and the sense of scale that the Bionicle world deserved.
4. Do you know if any other builds of the Bionicle 2 movement demo exist? Like a build that has working audio?
I don't remember for sure if we ever ended up with a build with audio. But it feels a bit unlikely that we would have got to the stage that we did without their being something in there, especially if the audio assets were on the disk. Somewhere in the depths of my home I think I have a PS2 version of the demo, so I may see if I can get that up and running and find out. As I think - so far - the only people who have had access to the game have played on Xbox, right?
Thanks”
Of course LEGO was being difficult during Bionicle: The Game’s development. They did something similar with Bionicle: The Legend of Mata Nui, and that certainly did not end well. This message was a big deal for us at the time, not only did we get a lot of information about both games, but we also got confirmation that a PS2 build of Bionicle 2: City of Legends actually exists! Unfortunately, this developer never replied again, and I was beginning to lose motivation.
I decided I had enough of Argonaut Sheffield at that point, and shifted my focus to Argonaut London once more. After waiting a bit, I got another reply from a former AI programmer.
“Hi William, sure thing, although it was a long time back so may not remember too much :)
probably easier to use my email (redacted) though as I rarely login to Linkedin.”
We later communicated via email:
“Hi William,
on the unused level front, it’s entirely likely that a bunch of the designers and strat coders ’play areas’ would have ended up in the build. Not sure if you’ve had any background info on how a lot of the Argonaut games were built, but here’s a brief rundown :)
So, when I started at Argonaut in 1997 , I joined the Croc 2 team, who were using the first updated iteration of the engine they built for Croc that had its own scripting language written (originally for the level designers to use) to write all the gameplay elements, while the engine coders focused entirely on the main engine for the PS1 (and a separate small team handled porting the engine to GameCube/Dreamcast, PC etc.). The idea being that ASL (Argonaut Strategy Language) Strats would be cross platform as they were just interpreted by the engine.
As it turned out, ASL strats were a bit too complex for the level designers to write themselves without coder assistance, so Argonaut let them focus on the actual level design itself (using the editor that just became known as the Croc Editor) and got gameplay specialist coders (like myself) to work on the strats. This worked out great as we could focus on individual items or groups of them independent of what was happening with the engine and we could quickly tweak a strat and run it on the devkit without doing a full build of the game (which took *AGES* back then ;) ) as well as some basic debugging capability.
This meant that most of the level designers and strat coders usually had a level slapped together with all the bits they were trying out. I don’t know if my one with all the Matorans following you in a chain still exists, but there were some pretty strange ones. In theory these wouldn’t end up on the disk but the build system was pretty clunky, so it’s entirely likely that some ended up there.
So by the time I got drafted onto the Bionicle PS2 project, I’d worked on Croc 2, Aladdin Nazira’s Revenge, Harry Potter and the Sorcerer’s Stone and Bionicle Matoran Adventures on GBA. All but the last one using revisions of the Croc Editor and ASL.  (The Emperor’s New Groove, Harry Potter 2, Malice, Catwoman & iNinja also got written with the engine). I say revisions as not a lot was actually added to either over time. Also, by Bionicle PS2 I was kind of an emergency response coder for strats, as I got parachuted in after the project started to help fix a lot of problems with how ASL was being used and design issues with the levels.
There were a lot of issues with Bionicle (not as many as Aladdin or Catwoman started with and my 4 days on Malice were certainly interesting, but they’re entirely different stories ;) ). Mostly from inexperience as the team working on it had a lot of new hires or ones that had been drafted from other teams that didn’t use ASL or the Croc Engine, so they weren’t familiar with its limitations. There were some HR issues going on too, but I’m not going to get into those. The team were mostly all professional and good at what they did, but struggling with a relatively clunky engine. By this point Argonaut had split off most of the engine coders to the “Tools” team and we had to officially request any engine or editor changes we wanted through their chain of command (and they weren’t interested in working on the ‘old’ engine).
There were also some issues with inexperience in games from the Lego UK side too. So a lot of the overall design rules were a bit flaky and lead to a lot of levels and gameplay getting changed. The “No Weapons” rule was one we thought was pretty odd, considering the swords, pikes etc. in use. Apparently they’re tools, not weapons. So we weren’t allowed to use them as direct combat weapons for gameplay, only for magical ranged effects. There was also a lot of issues of really big levels being designed without consideration for what could actually be rendered on screen at the required frame rate on PS2 with the old Croc engine. Even updated to PS2 and with everything the engine coders could do to optimise it, the engine and ASL were struggling to do what the designers wanted.
I don’t think it’s a case of biting off a bit more than they could chew (we successfully wrote Harry Potter from scratch in 9 months in time to release with the film using the engine but that was very much a dream team of all the right people with the right skills and a publisher working well in sync). More a case of it being a new team of people not so experienced with the system and a publisher that wasn’t entirely sure what it wanted. So things were that bit harder to get done in the time available.
In theory, some older gold disks are likely still around. (redacted) was one of our engine guys on the project and “Master of the Build” (he was the only one who had enough tasteless Hawaiian shirts for the numerous submission build days). I’ll have a dig through my CD collection, but it’s unlikely I’ve got any Bionicle builds surviving. I *might* still have some strat code floating about on an old hard disk. I do seem to have some of the Catwoman build code that used mostly the same (although slightly updated) engine though.
One thing that I think got axed was my chain of Matorans. The idea was a level where you’d be picking them up from around the level and they’d follow you to a rescue point. Normally this wouldn’t actually be that difficult to code, but ASL never actually had any arrays! I’d been asking for them for a couple of projects by that point but they never got added, so my Matorans were each working as their own array elements and frantically messaging one another in a chain, which never quite worked reliably enough with ASL, so we shelved the idea.
(redacted) was one of the strat coders working with me on Bionicle. I think he’d just joined Argonaut then, but luckily, knew his stuff.
(redacted)”
I guess a few of the unused levels I found in the PS2 port of Bionicle: The Game are examples of “play areas” given how small some of them are. This message also provided some insight about ASL, the proprietary language both games were created with. This gave me a good idea about how difficult ASL was to use as well. The fact that Arognaut also had many new hires that couldn’t handle ASL’s idiosyncrasies certainly didn’t help Bionicle: The Game at all.
I later reached out to another former AI programmer affiliated with the previous one. They had some interesting things to say:
“Wow, I'm really surprised that anyone is that interested in Bionicle, because I didn't think it was a very good game, but I'm happy that you felt strongly enough to do this, I guess. That's quite an impressive bit of digging.
[Asked about ASL]
Q1) ASL wasn't a great language to use, it was being developed at the same time as the engine so it was constantly changing and was occasionally broken as well. The turnaround from making a change in code to testing it on the target device was quite slow. And coming from C++ the lack of modularity was frustrating. There was some talk in the team about wanting it to be object oriented, but anything that made it cleaner and less prone to repetition would have been good. My memory of it isn't that good since it was 20 years ago. I remember the collision and animation systems being awkward and crude as well though. Do you know about the other games that the system was used for? Catwoman took the animation engine a bit further, but it was really horrible trying to program the animation blending for finite state machines with a language that was so hard to debug.
[Asked about scrapped content in Bionicle: The Game]
Q2) I don't remember much about what was scrapped. There were different teams working on different levels and playable characters, I mainly worked on the Tahu levels and the final boss. I think there might have been some stuff scrapped from the other characters. One or two of them were developed by the team who were doing the cross platform conversion for us, and we didn't see much of what they were doing and only saw it quite late.
[Asked if any early builds of Bionicle: The Game still exist]
Q3) I have no idea - perhaps Sony or EA have archives of the earlier builds. Someone on the engine team might do, I can't think how or why a strat coder would have one.”
The issues with the collision system they mentioned are definitely present in Bionicle: The Game. It’s quite easy to glitch out of bounds, as speedrunners have demonstrated many times. We later talked about general programming concepts and discussed ASL further:
“Reassuring to know that I'm not imagining Bionicle being pretty bad! I think object oriented was just flavour of the month in 2003, Java was a highly respected language at the time and we thought it was the future. It would have been nice to work in a language that was used in other places, because having ASL on your CV was a pretty crappy prospect for seeking other work. At least if you used Fortran or Pascal it was recognised by employers as a mainstream language. WTF is ASL? I worked in two other organisations that had proprietary languages and it was annoying. The good thing about starting work at Argonaut at least was that ASL was a proven language that you could make games with, and it did let you get down to the relevant bits of gameplay you wanted to take control of. Before that I worked at Phase 3 studios where they had never made an action game before, and we spent a lot of time programming systems that had hardly any effect on gameplay. So I was grateful for ASL and the toolchain for making it easy to do some limited things. I was very impressed by someone on the iNinja team for getting ropes to work with a vertlet algorithm, we stole that later for the green Bionicle to use. I think the High Voltage Software studio might be using a different language with the same initials? I can't see how it could possibly be Argonaut's language. I'm pretty sure there was some talk about opening it up as middleware to sell other studios but I don't think we ever got there. Many of the staff from Catwoman went on to work at Rocksteady, Sony and Ninja Theory, but I think they just started using whatever engine was in place there. You could find hundreds of people who had brushes with the language.”
I asked about other studios using ASL for their games:
“What release date were the games? Argonaut folded in 2004 I think, so the creditors might have managed to sell off the technology as cheap middleware of last-gen consoles
or perhaps they were licensing the tech while we were using it, and I just hadn't been aware of it”
I sent him some notable examples of games using ASL from other studios, such as The Conduit and Ben 10: Protector of Earth:
“That fits the picture then - liquidation in 2004, sell the technology in 2005, two years of learning the systems and developing content, release in 2007
The PS3 would be the current gen console by then, but the PS2 had a large enough user base to make it a viable market, especially for movie tie-ins and children’s games”
I later asked if there was any possibility that Argonaut received parts of ASL from other sources:
“That's an interesting question... I don't know but I think Argonaut were using strats since 1993 and the language gradually evolved from Starfox to Croc and so on. I think it was around before High Voltage existed. It does seem like a massive coincidence that the header is VOLT but there aren't many words that sound cool to programmers so I still suspect it is just a coincidence. Programming was Argonaut's strongest suit, it doesn't make sense that they would buy tech in like that. I was only at the company for two years or so, ask someone who was there longer.”
Then out of the blue, another former designer from Argonaut Sheffield reached out to me about Bionicle 2. After that, I asked them a few questions:
“Hi William,
Great to hear from you. Let me see what I can do to answer your questions!
[Asked about the development process of Bionicle 2]
1. Designing the demo was a bit of a break from the usual licensed Dev. We had creative control so got to decide what direction we'd like to take things in (hence a departure from the 'standard' platforming fare of the time!) My role was predominantly as a technical designer - that was, creating ideas and prototyping/building in the tools. For the demo I was responsible for populating and scripting some of the functionalities in the level.
[Asked about the broken audio in the Xbox port of Bionicle 2]
2. Not sure on the silence in the build tbh... I seem to remember doing some work on creating and implementing some spot FX and seem to remember we put some audio track on the front end screen. With this being a closed pitch demo, I honestly can't remember if we'd created the track or sourced it from elsewhere!
[Asked if they knew about any other builds of Bionicle 2]
3. I believe a have a variety of unreleased games and demos on various formats somewhere. Most of them will be PS2 from that period.
Thanks”
When they mentioned owning a variety of unreleased games and demos, I was immediately intrigued. I later asked if they had a PS2 build of Bionicle 2 and offered to send him a copy of our Xbox build of the game in exchange for it, and to my surprise I got this:
“Hey William,
Cool, I'll have a search when I get some time and attempt to extract it for you!
Thanks”
I was ecstatic. Finally, after months of searching, I was about to get something tangible! But the days passed, and those days turned into weeks. I was beginning to lose hope until I got this message:
“Hey William,
Quick note on my progress - I've not forgotten! I delved into my garage over the weekend and came away with 3 CDs labeled bionicle 2 with various dates on!
I'll attempt to create an ISO of the latest date and share with you when I get a mo (most likely the weekend again!)
Thanks”
Not only did he have a build of the game for the PS2, but THREE of them! After seeing this, I decided to wait for the weekend to arrive. Unfortunately I would be very busy on this particular weekend, but Bionicle was still my top priority! So I proceeded to bail on my friends to wait for an obscure as hell prototype game from a discontinued children’s toy line to show up in my inbox. However, on Sunday, the weekend was coming to a close, and I had heard nothing from the former designer. My waiting and persistence later paid off after I got this message:
“Hi William,
Give this a go - no idea if it works - let me know!
(redacted)”
At last! I finally got it! The latest known PS2 build of Bionicle 2: City of Legends! But there was a problem. The game didn’t boot. Just my luck. But I wasn’t ready to give up. I ended up rebuilding the entire iso with some proprietary tools, and by some miracle, it booted up in my emulator. It’s about what you would expect: It’s similar to Xbox build in many ways, but it is also different. Unlike the Xbox port, the audio works, and there are some extra graphical effects and animations. I was also able to get the game to boot up on a real PS2 without issue.
Tumblr media Tumblr media
I can’t say exactly when BioMedia Project will release this build to the public, but I'm sure it will happen soon. Until then, feel free to watch some gameplay footage of the demo on my Youtube channel: https://youtu.be/Dvmzz92F3oo
These past couple of years have been pretty crazy for Bionicle. The Legend of Mata Nui was found TWICE, and there has been so much more activity within the community as a result. I’m glad I was able to make my mark and get this unreleased build of Bionicle 2: City of Legends into the hands of the Bionicle community where it belongs. If you made it this far, Thanks for reading. If you liked this post, don’t forget to share it. I spent a lot of time researching this, and I would really appreciate it. Special Thanks:
BioMedia Project
Liam Robertson
Fraug L. Coolman
26 notes · View notes
hexadecimalmantis · 6 years ago
Text
Custom textures in Bionicle 2: City of Legends
Bionicle 2: City of Legends was a proposed sequel to Bionicle: The Game created by Argonaut Sheffield after the closing of Argonaut London. BioMedia Project obtained an Xbox movement demo for the game a few years ago, and it is playable on modded original Xbox consoles. It uses the same engine as Bionicle: The Game, so I was able to apply some of my existing knowledge of some of the formats during the process of getting custom textures working. The first thing to note is that the individual archives are stored within respective .vol archives instead of a .WAD like the PS2 port of Bionicle: The Game. The .vol archives are fairly straightforward: they are little endian, have a header that is 0x04 bytes long; “VOLT”, the amount of files stored in the archive at 0x08, and an index starting at 0x10. The index contains pointers to data for the files in the file list, which is stored directly after the index. The file list itself also has a simple structure. It begins with the address of the file itself in the .vol archive, then 0x04 bytes after that, the size of the file is stored, and after another 0x04 bytes, the name of the file is stored. It's also worth noting that each each data set in the file list is separated by one byte.
Tumblr media
For this particular project we really only need to focus on the file list, since we aren’t adding any new files. We are also going to be focusing on 10.vol, since I aimed to replace Matau’s textures. Unpacking .vol archives was easy thanks to a script written by one of my colleagues, JrMasterModelBuilder. (He’s incredibly talented, and I highly recommended you check out some of his work.) After getting 10.vol unpacked, I was greeted with a few .XBS and .XBM archives. These archives are similar to the .pss and .psm archives from the PS2 port of Bionicle: The Game: They are little endian, have a header that is 0x04 bytes in length; “BIGB”, a WAD version at 0x08, a description, a developer signature, chunks and chunk sizes, and build arguments.
Tumblr media
However two important details are very different. The first detail being the amount of the chunks in the file, the .XBS and .XBM archives have an extra chunk dedicated to texture storage. The second detail is that both the .XBS and .XBM archives have no Run Length Encoding of any form. This makes modifying the files significantly more straightforward when compared to the PS2 port of Bionicle: The Game, since you don’t need to deal with compression when making changes to the files. I wrote a program for breaking .XBS and .XBM archives into their respective chunks last year, so I was able to avoid the hassle of doing it manually. After the RIFF headers in the first chunk, there is a list of what appear to be texture headers.
Tumblr media
The “header” is 0x04 bytes long, and approximately 0x40 bytes from there is the pointer to the texture in the texture chunk. The texture data falls between the pointers. For example, you can determine the size of the texture by subtracting the smaller pointer from the larger pointer in the next block. 
0x75400 - 0x35400 = 0x40000
This means that the texture at 0x35400 is 0x40000 bytes long. From the length of the file, or a program that can open raw images, you can determine the dimensions of the texture. In this case, the dimensions of the texture are 256x256.
Tumblr media
For the next portion of this project, I utilized a program called Noesis to facilitate easy texture loading. Looking at the texture data shows that the format is b8g8r8a8. The order is also important. If you were to decode the texture as r8g8b8a8, the red and blue channels would be swapped. Loading the texture straight from the file obviously doesn’t look quite right.
Tumblr media
This is because the texture is swizzled. Specifically Morton order. For an in-depth explanation see: https://en.wikipedia.org/wiki/Z-order_curve
After doing some research, I was able to put together a small script to unswizzle the textures. Here is a snippet so you can get the general idea.
Tumblr media Tumblr media
Now the texture looks correct, but I decided to go even further by creating custom textures. I was able to apply my knowledge of Morton order to construct a script that swizzles images the same way as Bionicle 2: City of Legends. See the following test image.
Tumblr media
Now, this wouldn’t work in the game as-is right now. If you tried to unswizzle it with my first script, it wouldn’t look right. This is because the image needs to be in the b8g8r8a8 format. See the example below.
Tumblr media
After I got swizzling and unswizzling working consistently, I created some custom textures for Matau as planned.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
These textures were created to resemble Onewa, another Toa from the same line. I chose to do a simple recolor because it would involve no repointing. If I decided to use textures with larger or smaller dimensions, I would need to repoint multiple pointers in many different files. I swizzled each image, formatted them, and manually replaced the original images in the texture chunk from the 10-00.XBS archive. After that, I replaced the 10-00.XBS in the 10.vol archive with my custom one. When I finally launched my game with the mod, the custom textures loaded up correctly.
Tumblr media
(Forgive the awful image. I had no means of properly recording anything on my Xbox)
If you made it this far, thanks for reading. I’ve provided a link to the texture hack I made if you want to try it yourself. Just replace the 10.vol in the game directory with the one from the link.
https://mega.nz/#!NnpBySoC!kC32FvD8QBLQBRxkmTa2UExy2qPBnINuCRM9sfin0-s
1 note · View note
hexadecimalmantis · 6 years ago
Text
All unused Bionicle: The Game HUD images
Posting these here in case anyone wanted to see all of them. All of these are completely unused in the final game, but they are present in every character archive alongside other bits of the old HUD. You can actually see the old HUD in some of the early trailers for the game too.
Tumblr media
Here is what the old HUD looks like in-game:
Tumblr media
1 note · View note
hexadecimalmantis · 7 years ago
Text
How I revived the scrapped Lewa Mata level in Bionicle: The Game
If you are reading this you are probably aware of the vast amount of unused content present in the PS2 port of Bionicle: The Game. The majority of the unused archives were relatively easy to get working, but they were mostly just small test areas. However, as many of you know, there is a copy of the scrapped Lewa Mata level in the game’s files. Compared to the rest of the unused content in the game, this level although created early in development, is by far the most complete. I took it upon myself to get this level working, regardless of how long it would take to do so.
Understanding how Bionicle: The Game worked was critical for this scenario. Luckily the game has a relatively simple structure. The root directory consists of three essential files: GAME.DIR, GAME.WAD, and the main .ELF. The GAME.WAD is an archive that stores all of the individual archives used in the game one after the other, and the GAME.DIR contains the pointers and sizes of the archives within the GAME.WAD. Both of these files are loaded by the main .ELF during startup. While the overall structure of the game may be simple, the individual BIGB archives are far more complicated. There are two different extensions used for BIGB archives: .pss, and . psm. The .pss archives can contain characters, small geometry, music, and sound effects. The .psm archives contain large geometry, but no audio whatsoever. The internal structure of the archives is largely the same, regardless of the extension. Here is some very basic information about them: They are all compressed with some variant of Run-length encoding, have a magic number that is 0x04 bytes long (BIGB or BGIB depending on endianness) a WAD version at 0x08, and can contain up to four different chunks.The first chunk contains things like audio headers, textures, and models. The second chunk contains structs and pointers. The last two chunks, which are uncompressed, contain the actual audio data that the first chunk references. Luckily the upper half of the file contains most of the information about each chunk.
Tumblr media
The first issue I faced when trying to get this level to boot was the different WAD versions. The WAD version is essentially the engine version that the file was built with, and it increments every time the engine is updated. In BIGB and BGIB files, the WAD version is always stored at 0x08 as a single byte. The WAD version stored in the file is also verified by the main .ELF to check if it matches the internal WAD version. This check was most likely implemented to prevent errors during development, since a file built with an older engine build would have issues running on an updated build. Although I am not too familiar with MIPS assembly, the check itself is still fairly straightforward.
Tumblr media
Through fixing some of the newer unused levels, I was able to use a simple trick to bypass this check; change the WAD version of the archive so it matches the internal WAD version. However, from my testing I found that the archive’s WAD version must be within the interval 0x70 ≤ x ≤ 0x74 in order for it to load in the final game at all. The main problem with the Lewa Mata level is that the WAD version (0x6F: 111 in base 10) is too different to load successfully with the final internal WAD version (0x74: 116 in base 10), so this trick will not work with the Lewa Mata level archives.
Tumblr media
After trying a bunch of different modifications in a futile attempt to get this level to load over the span of a few months, I discovered something strange. When datamining the unreleased Bionicle 2: City of Legends demo (which uses the same engine as Bionicle: The Game), I found that its internal name was “ININJA”.
Tumblr media
After a quick Google search, I learned that I-NINJA was another game for the PS2 produced by the same developers and released around the same time as Bionicle: The Game. I was already speculating that certain games used same engine as Bionicle: The Game, such as The Conduit, and Ben 10 - Protector of Earth, but they were all released sometime after. After doing a little more digging, I found that the directory of the symbol file referenced in the executable of the PC port of Bionicle: The Game contained a folder titled “LegoNinja”. The evidence I found strongly suggested that Bionicle: The Game was nothing more than a modified version of I-NINJA at its core. With this newfound knowledge, I decided to check the WAD version of I-NINJA, which actually turned out to be greater than the one used in Bionicle: The Game. However, the development of I-NINJA must have started before or at the same time as Bionicle: The Game given the evidence I found. Eventually, it was brought to my attention that a demo for I-NINJA existed. The demo was part of a demo disc produced by Namco, and was named “Namco Transmission v1.03”. These “Transmission” discs were bundled with certain games and contained demos of upcoming titles. This particular demo was bundled with Soulcalibur II. It turns out the WAD version used in the I-NINJA demo was 0x6F, an exact match to the Lewa Mata level’s WAD version. The next step was actually getting the files to load up in the demo. To do that, the demo of I-NINJA would need to have a hidden level select present in the files, like Bionicle: The Game. Luckily, unlike the final game, the demo version of I-NINJA had a level select archive, which happened to have the same name as the level select archive in Bionicle: The Game (9-97). 
Tumblr media
After getting the level select to load up on boot, I started working on porting the Lewa Mata level archives over. First I needed to figure out which archive was the character archive. The process of doing so was fairly easy, since I already had the texture format reverse engineered. After replacing the character archive, I replaced the two level archives. In this scenario, the level that needed to be replaced was arbitrary. Finally, I repacked the whole demo and tried to load up the level. The final issue I faced was a black screen. Although the level would load, bad post-processing layers made it impossible to see anything. I’m speculating that this is because the level itself was never intended to be played on retail hardware, and was built for use with a development kit or development device. After researching PS2 graphics processing, I discovered that a hardware hack existed that could potentially remove the post-processing effects causing the black screen. After a few attempts, the level was finally visible.
Tumblr media
Of course during this process I learned that Lewa Mata did not exist within the character archive for his level, despite his picture being present in the hud. My theory is that at one point during development, you would seek out Lewa as Gali, and switch to controlling Lewa once you found him, similar to their meetup in the final game.
Tumblr media
Unfortunately, given that a hardware hack is needed to see anything, this will NOT work on a retail PS2 console. Hopefully a little more reverse engineering will fix that soon :) 
Anyways, if you made it this far, thanks for reading this post.
21 notes · View notes