Friday, September 20, 2019

Branching Out: the Growth in Tree Quality

Ah, trees... Believe it or not, they've been in Mary's Magical Adventure since its development began, in World of Kirbycraft v0.75! There's some cool things to talk about that I've been developing just within the last couple days, but first, let me tell you a story about the history of these leafy things...
(This post has an AI-generated voice reading video available. To hear it, play this video and read along!)

Out of Place Cutouts

In the beginning, trees were pretty basic. In fact, they were just like the trees in Doom, a game from over 20 years ago at this point! Just like in that game, they were paper-thin images that rotated to face you. The only thing that made these trees unique was the code ran upon each tree spawning, which gave it a random tree image. I would say these trees were fine, but really, there were two problems with them...

Ripped from Reality

World of Kirbycraft, even back in those days when the game looked pretty bad, still had some form of a cartoony "art style" in it. These trees completely contradicted that, looking like pictures of real trees cut out and glued to the ground, like the game's world is just something a kid and their parent threw together by cutting out pages of magazines... I don't believe I was going for that style, but looking back, it's like looking at early 3D games that intended to look realistic. They were fine then, but now look like a joke compared to unrealistic games.

No Originality

You may think I was just experimenting, seeing what worked and what didn't, but no. I started development of World of Kirbycraft while I was still making Doom II: The Monster Invasion's last iteration (which in my opinion was the worst).

When I needed things like objects and code, I'd grab it from that mod and slap it into World of Kirbycraft, and that's exactly what happened with the trees and grass.

While the "realistic" trees worked mostly fine in Doom II: The Monster Invasion, they completely clashed with World of Kirbycraft's style. Unfortunately, I didn't know any better until years later...

The Crappy Image Legacy


In World of Kirbycraft v1.4, Hell City was introduced. As it was a complete ripoff of Kirby Air Ride's City Trial map, one area was a forest with many trees. Predictably, those were the same exact trees used in every previous version. There's not much to say other than just how out of place they still look.
Just when World of Kirbycraft got renamed to Mary's Magical Adventure in v1.6, the trees were thankfully changed to use better images. Mind you, they still didn't completely fit, but were more cartoony. The best one was the one on the right in the screenshot above, which came from a Terry WAD. It was just too pretty of a tree sprite for me to let it get wasted in a stupid waste of time like that!

Despite getting these new, better images, unfortunately these trees were only used in two places:
  • Hell City's island - In the park
  • City Street Run - Around road corners
Apologies for the short section, but I really thought I did more with these better trees. However, neither version can beat what I've done to the trees lately!

The Perfect Trim

Am I...seeing things? Are these really 3D? Nature finally looks right!
When Mary's Magical Adventure's next version is released, oh, are people in for a massive tree upgrade! For once, trees actually feel like they belong in the game's world, with more 3D, detailed designs that are actually interactive! Let's show what makes these new trees really cool, one point at a time!

"3D Graphics!"

Only a video could do this justice, so...just watch this video of both new trees and admire how 3D and believable they are now. Don't question the weird music, I like messing with Guitar Hero songs' individual channels.
Yes, you're not seeing things. Mary's Magical Adventure's trees are made like more modern games now; The tree itself is a 3D (voxel) model and 2D leaf cluster sprites are placed on top of parts of it, giving it a 3D look voxels alone couldn't give. This is seemingly the same thing a lot of games do for trees, like Oblivion and Sims 3(?), bringing Mary's Magical Adventure into a more modern time, unlike...some things.

I said these are interactive above, and you might not expect all that you can do with these trees. For one, you can knock leaves off of the trees with nearly any attack. If you hit leaves with a hammer, they will scatter and float through the air, but hitting them with a fireball will catch them on fire, making the leaves turn brown, drop to the ground, then turn into flames. It looks good in motion and is satisfying to do. In the future, there will be more of a reason to randomly become a pyro.
Only you can prevent wildfires...if you can resist the urge!
If burning leaves isn't good enough, how about the whole tree? Yes, if you damage the tree itself enough, it'll lose all of its leaves at the same time then collapse. Burn it enough and instead, every single leaf will start burning, then the tree dramatically falls down. If either of these events happen, the tree stays gone, even if you leave the area.

Now, don't worry if you like trees; You don't have to destroy fictional vegetation, but if you want to force all leaves off of a tree without permanently destroying it, just hit it with a cold attack like an Ice Ball and it'll start shaking then jump as it loses all leaves. When this happens, the tree survives and will re-grow its leaves back when you move far enough away from it.

This video shows all three tree deaths:
Now, all of this interaction comes with a cost, and that's a sprite render time increase of 0.02 per tree rendered in "high quality", which is what was seen in the videos. To counter this potential beauty turning into a lag source, all trees are drawn as a single image at far distances, just like the older trees. This results in the game rendering a single image instead of many leaf clusters plus a 3D model, and this is what saves the 0.02 sprite render time mentioned above.

This is actually something games do, more common on games with a continuous open world like Oblivion. I came up with the idea to do this before watching that video, so I had no clue it handled things the same way as my game. Oh well, I guess I can say I did something like Bethesda now. Whether that's good or bad's up to you, because...oh no, does this mean now I'll leave many game-breaking bugs in the final release? I hope not!

Anyways, if you don't like the trees abruptly changing between images and 3D models, you can adjust the distance by changing the r_objdrawdistance CVAR, which is a multiplier that defaults at 1.0. Increasing this will change the distances at which many decorative objects switch to lower quality, though it changes everything, not just trees. If on a lower-end system, it's recommended to decrease this to 0.5 or similar, given you can tolerate more obvious object pop-in.

Anyways, that's the latest update! There's more changes, but the new trees deserved their own blog post.

Thursday, September 5, 2019

Magical Mary History #2 - v0.75 Part 2 (Early Monsters and Unused Oddities)

World of Kirbycraft's original monster lineup. Some may look familiar from Mary's Magical Adventure...
Welcome back! Last time, we looked at the intended but very flawed gameplay that I thought was fine back when I developed this version, plus the "test levels" in the game. This time, we're going to look at list of monsters that are in this version. Yes, I said there were none in normal gameplay, but oh, there's a small list fully programmed into the game at this point in development.

The Bestiary

Though not a single monster appears in this version, there are some programmed in /Decorate/kmonsters.txt, Some are from the Kirby series for obvious reasons, but others aren't. Here's the full list, in order of when they appear in the text file, from top to bottom:
"Mouse!" Silence this noisy thing and it'll become worse...

Scarfy (KDog1/KDog2)

Just like in the Kirby games, this innocent creature happily shows its true "dog" form when you hit it once. The only way to avoid seeing the "dog" is by dealing a lot of damage at the same time. This isn't considered a monster to the game until it transforms, so if you can resist the urge to shut it up, you have one less to worry about.


Gordo

Another common Kirby enemy, a spikeball with eyes. If you get near it, it will start flashing. Touch it, and it will yell "Mouse!" at you and send you flying away! This enemy is indestructible, so your best bet is to avoid it.







Wheelie (KWheel)

A wheel with an eye at its center that somehow maintains orientation while it rolls around. Wheelie is a dangerous and unpredictable enemy, slowly moving until it gets into the perfect position to run over you! Its speed (and really bad weapons in this version) make it pretty dangerous, taking three hits from Arthas's hammer to make this wheel's rubber explode!







Cyclops Troll (Troll)

This big, blue cyclops may look intimidating, but he's only a threat up-close, conveniently the only distance your weapons work at! When approached, the troll raises his arms then slams the ground below him, which causes damage to everything in the area. Compared to his appearance in Mary's Magical Adventure, he isn't as powerful here, plus doesn't have random arm-brace colors.

Huge Troll (HugeTroll)

This larger, red-colored variant of the Troll may look like he should be able to hurt you from longer distances, but in reality, he's nearly the same as his normal-sized counterpart, only 3¼× bigger! Unless you cheat or team up with a friendly monster, you will be here all day with this big pain.








Tiger

This aggressive animal is more complex than any other enemy in this version. Once it sees you, it changes its behavior based on your distance. Get up close and it'll prefer to try pouncing on you, but run away and it'll really speed up to catch you! Your best bet fighting this beast is to stand near it, wait for it to pounce, then strike it while it's down!

(Interestingly if you look at its back foot, it looks like I erased some pixels of the sprite without noticing all this time... This is probably still in the latest version.)


For those that want to see fights against all of these enemies, here's a video I recorded.

Strange Unused Content

All right, time for the really technical things that literally can't be gotten to in-game. These are mainly just sounds, but these sounds alone give a big impression that I really didn't know what I wanted from World of Kirbycraft back then, as if the whole game didn't give that away with its generic grassland level...

Inside wok_x.pk3's sound folder, a bunch of unused voice samples and "music" can be found. In the voices/Monsters subdirectory, enemy and player sounds are stored, but take a look at that directory's contents. See those WOKGUY sounds? Those were intended for common enemies that didn't deserve custom sets of voice samples. The tiger uses the last set, but every sample above that isn't used!
  • STOCKAHH - Interestingly, this is the stock scream heard in games like Twisted Metal 3 and 4! I'm not sure why it's here, as no enemy ever used it. The Wilhelm and Howie screams were used in Doom II: The Monster Invasion's second version for zombies to use at random, so perhaps a similar thing was planned for World of Kirbycraft...
  • WOKGUY set 0 - I love reversing songs with lyrics because they usually break down into hilarious nonsense, such as the notable "Can't Help Mice!" and "No No Heat". However, in this case, I think I used my laptop's microphone to record something, possibly an iPod or something, playing a Red Hot Chili Peppers song, which I then spliced and reversed for these samples. Most of them suck, but I like sample #4, where he sounds like he's saying "Stop that...!", which is assigned as a pain sound.
  • WOKGUY set 1 - For this set, I think I recorded myself talking, then reversed and slowed down the recording over an unknown song. Parts of this overall larger sound were used as the samples here. I think this set was meant for strong, mysterious enemies like flying enemies firing magic projectiles at the player. In the end, it was never used, though it fails to sound threatening with lines like "NOM NOOOOOM~!" and "Pandora... PANDORA...!" (Yes, I listened to Pandora, that's why that's randomly here.
  • WOKGUY set 2 - This, like set 2, is just my voice reversed, but with no speed adjustment. In this set, it sounds like a man who thinks the player is a mouse (like the Kirby enemies) and even yells "A MOOOOUSE!" sometimes upon seeing you. This was briefly used for the Fighter enemies in Mary's Magical Adventure until I recorded their proper samples.
The other subdirectories are arguably stranger, so here's another list:
  • weird - This is, contains, fittingly, the weirdest two samples in the game, which sound like very slowed-down beeps with their bass increased a lot. I think these were supposed to be used in scary areas to mess with the player's head, like those "beats" I can't think of the word for that make you get certain feelings.
  • dynamic_music - Hey, all of the cool games do it, but it's a a shame ZDoom isn't capable of dynamic music, which picks different parts of a song based on in-game activity. It didn't stop me from trying using ACS in a test level that I haven't found in any version of World of Kirbycraft yet.

    This folder contains four WAV sounds that play different sections of a basic song, which would be chosen based on where the player was located in the test level. It would've been cool to keep this, but due to ACS being limited to the tic-rate of ZDoom, I could only use tempos that were synced up well enough with it, which would've limited how varied my music sounded.
  • ambient - "Wait, the ambient sounds were planned from the very beginning, Xane?" Sorta. The sounds in this folder are weird ModPlug Tracker recordings that used a strange, "organ-like" instrument. The first three are the raw recordings while the latter three have a reverb effect on it.

    I think these sounds would've come from an organ in a castle level, but clearly that never came to be as the sounds were removed after this version, and my plans changed by the time Mary's Magical Adventure became the game's new name...
This video plays most of these unused sounds, minus the "weird" ones, since those are barely audible without editing. Since I forgot to include it in the first post, Mary's voice acting is included here as well, specifically the lines that never got used or were removed in later versions due to the removal of beams and cup-based weapons. Apologies for how long it took to finish this post, which was supposed to be done months ago!

Tuesday, April 30, 2019

Magical Mary History #1 - v0.75 Part 1 (A Terrible Start)

Yuck! What's this visual throwup? Magical Mary 1's past was a visual mess!
Magical Mary 1 has been in development for years, possibly dating back to 2010-2014, when it was just called "World of Kirbycraft", after the movie series I was making. As with any game, things weren't always as they are today, so it'll be fun to look back at each version and see how the game improved with time, and today we're starting with the earliest build I've found, one dating back to 2015, which was only seen in my third development video on YouTube! Let's dive into it, after the cut!

Intended Gameplay

Bad initial impressions

Since this is the start of a blog post series, let's establish the general layout. First, I'll talk about gameplay and the player's overall experience, then follow up with info about unused content and interesting miscellaneous stuff. As this is the first post, everything is new, so it'll be giant. Later versions will naturally have smaller posts written for them if they reuse things from a previous version.

With that said, let's start with the first thing the player sees upon starting the game, which at this point was just GZDoom with Freedoom as an IWAD, the title screen:
MY EYES! They're bleeding! This isn't Freedoom, game!
...wow. This title screen doesn't give the best initial impression, with a messy, incorrect-looking Freedoom title screen and an overall Doom-esque menu. That skull used for the selection cursor isn't helping, either! Anyways, on this menu, the iffy logo used for the World of Kirbycraft series is visible, so let's take a look at that...
You saw this coming, didn't you? This is so low-effort and...why did I distort the Kirby logo?
Yes, I bet you're face palming right now; The logo is just World of Warcraft's logo with Kirby's logo slapped over it. It gets worse the more you look at it, as a weird rectangle is around the Kirby logo, and even that fails to cover up the word. Back then, I used CoreFX rather than Adobe Photoshop, which didn't have a healing tool I could use to get rid of the text cleaner.

This very logo also appears in the movies, but only during its very brief, strange-looking intro. However, the logo is constantly changing position/size, so it's hard to get a close look at it. Anyways, let's select a difficulty and start the game.
How? This build doesn't even have a single enemy in it!
Like Doom, difficulty levels can display messages, usually used to warn the player about how unfair a difficulty is. Here, hard difficulty shows the message above. Insane difficulty says this:
This is the highest skill level. Not recommended unless you're experienced.
It doesn't matter what difficulty is chosen in this very early build, as there are no monsters in the one area you can visit, a place I've come to refer to as "Stupid Hills", a level I scrapped for being just...too boring!

"Early Installment Weirdness"

This is the whole playable area, shown on the automap and in-game!
In this version, it's very incomplete, with only the first area and cutoff paths off to the sides. The only thing here that makes this build interesting (and recognizable) is the random grey beam with animated pink light inside it, which is a Sonic Boom: Rise of Lyric reference. This was a character-specific gimmick, which only allowed Mary to stand on it. If Arthas would land on it, he'd get forcibly thrown to the side.

I voice acted unique lines that played any time Mary would land on the beam. Though some are just random noises, two include some of Mary's longest voice lines as of then. One of them mentions school, which hasn't appeared in the game at all! I'll include all samples of Mary talking in this version at the end of this post, but here's transcriptions of the more important lines:
  • Oh...OH, I made it...and it's a beam! Let's balance! Weee~!
  • Oh...oh...OH, I've been waiting for this day! In school, I went to gym class and...I practiced this. Now it's time to put that practice to the test! Yay!
There's one more thing that makes this build unique from later ones I publicly released: Mary uses restaurant cups as weapons! When Mary drinks the liquid from them, she temporarily powers up and performs attacks based on the color of the stripes on the straw. If the player uses the weapon enough, Mary will revert to holding the cup and will talk about losing her powers.

Now, this might sound cool and unique, but overall it wasn't that exciting to fight enemies like this. Mary had to stop and drink from the cup multiple times a minute, plus the attacks pretty much ironically only hurt yourself unless the projectiles don't touch the monsters directly! Here, look at this video and judge for yourself if combat looked fun in this very early build:
With how tedious the combat in that video was to record, I have to question how back in 2015 (or possibly earlier) I thought anyone would enjoy that combat. The attacks behaved uniquely, but sometimes it isn't best to reinvent the wheel; Projectiles exploding when hitting enemies is nothing special, but it is more of what the player expects than fireballs sticking to enemies, waiting until they hit the ground to bounce into the air...

Clunky Gameplay

This is common to all of the versions of Magical Mary 1 that have the "World of Kirbycraft" name, but I'll say right now that the gameplay doesn't feel as polished as it does now. Mary's Air Dash practically requires mashing the jump button, and it can arbitrarily not work in some situations. As for Arthas... His Kirby Puffs are also inconsistent but on top of that common problem also requires you to wait between jumps (a'la Kirby Air Ride) and doesn't give you any control once you're in the air. I fixed both of those when Xane replaced Arthas, but...just look at how iffy Arthas moves here:

Hiding the Secrets

Uther's Lab

Ah, this lil' building had much potential, but alas, it wasn't to be...
Well, now it's time to go beyond what I intended the player to experience in this version. No, I didn't look over anything above or I would've written about it. If you followed the water down either generic corridor, you'd be greeted with a wall in your face. With any in-development level I make, this is a common sight, but usually levels I make don't cut off less than a minute after they load!
This is what you get if you think running into a cave will save you from the ugly graphics, a dirt wall!
Despite this level's stupidly small size, there is an area out of bounds meant only for Arthas's intro cutscene, Uther's Lab. If you turn around when starting the level, you'll see the lab in the distance in a field, but trying to fly out there will kill you! To make matters worse, that building out there is just a really flat imposter, not the real interior.

To go inside the lab, bring down your console using ~ (tilde) and type noclip2. Fly up a bit so you don't touch the insta-kill ground, then move towards the fake building. As you enter the open field, turn right and go through the glitchy black wall. Welcome to Uther's Lab.
Yes, this is the really basic room where the first part of Arthas's intro would take place. Though it looks grey and empty here, it became more detailed with blue lighting in later versions...though still wasn't ever used! In fact, it's normally worse than this, because the Arthas and Uther cutscene objects aren't normally here. (They only move around and talk, so I can't recreate the cutscene, or I probably would.) I'll explain Arthas' intro here, since it was never made:

Arthas and Uther are in Uther's Lab, standing around. Uther recommends Arthas goes out the back door (left side in screenshot above). Arthas initially refuses, but Uther forces him out. Arthas trains outside (which is just a glorified tutorial), then walks back in to check on Uther, not approving of the tutorial he had to go through. Uther sees an odd blip on the radar, pointing straight ahead. Arthas, knowing what he has to do, starts running out the front door. He runs down the path then jumps down to the starting point. No, I don't remember what enemy Arthas was off to fight, but I know it wasn't the Origin Master. I don't know how far I went with it, but Xane might've been planned to help Arthas, though over time, only Uther was heard talking to Arthas during gameplay.

Unused Levels

Now, Uther's Lab was within the level, but there are two levels the player never visits within MAPS.wad, named TEST and SND_TEST.
This is a foreshadowing of my obsession with cups expanding in later versions...
At first glance, TEST is just strange. The initial area is a narrow corridor with grass textures on the walls that has no gravity. Going through the wall to the left, you will end up in an area with a giant fruit punch "juice box" from Sims 3 Seasons. This area also contains character-specific areas and a broken end-of-level area that takes you to the normal level, since this area was used to test those mechanics before later making their ACS scripts global.
The more interesting part is on the other side. It's a big, open grassy area with paths and houses. It's better than the normal level in this build! What's going on? Well, this area was made to be used as the background of a Touhou-esque shooter section. Yes, I'm not joking, this was to be used as the background behind a boss battle where you'd fight Reimu, but due to technical problems (and now obvious legal issues that would arise), the whole idea was scrapped.

Y'know the weird first room the player starts in? Well, bring down the console and type in puke 102 to enable "Touhou mode", as the script calls it. When in this mode, you teleport to that room, and get locked into an area visible on the left side of the screen. The controls are the same as normal, except for your "run" button, which instead puts you in focus mode and reveals your hitbox, just as it would in the Touhou series.



SND_TEST is a more logical level...or rather, would be if any of its music played! I assume this map was created before the three soundtracks that are already present in v.0.75. Well, this gives a good idea of the random songs World of Kirbycraft would've used in my original vision, minus Famous by Puddle of Mudd, which would've played during the final boss, and probably would still be, if the legal system was wiped from existence...

It seems I originally intended for the game to use music from various sources, mostly Mega Man games. Here's the song list in the sound test, each linked to YouTube so they can actually be heard, unlike in the game proper:
  1. Rockman & Forte - Museum
  2. Rockman & Forte - Tengu Man
  3. Rockman & Forte - Pirate Man
  4. Rockman & Forte - Cold Man
  5. Rockman & Forte - Ground Man
  6. Rockman & Forte - King Castle
  7. Mega Man 7 - Slash Man
  8. Mega Man 7 - Spring Man
  9. Mega Man 7 - Freeze Man
  10. Mega Man 7 - Dr. Wily Castle 1
  11. Mega Man 7 - Dr. Wily Castle 3
  12. Mega Man 8 - Tengu Man (PlayStation)
  13. Mega Man 8 - Tengu Man (Saturn)
  14. Super Mario RPG - Going Shopping in Ripple Town
  15. The Flintstones - Unused 2
  16. Earthbound - The Metropolis of Fourside
  17. Lucky Star - Lucky Star Mush ~DustFunk Lozik~
  18. Fandango - Autos, Moda, Y Rock and Roll
  19. Sixpence None the Richer - Breathe Your Name
Based on that list, I can only guess I threw in every song I liked at the time, like the overused "Lucky Star Mush" song that I played in the background of some of my older YouTube videos. The SNES songs had static in place of their cymbals, which rarely made any of the songs sound better. This can be heard in one of my development videos, where I make fun of the noises.

Well, this is giant as-is, so I'm going to split this post in two. Hopefully later versions I look at don't have so much stuff to talk about!

Saturday, March 23, 2019

Fiction in Reality #2 - Hug-tan's Baby Mug

Welcome back to Fiction in Reality, the series of blog posts where I look at something from another universe and show how it was brought into reality! In this post, we'll look at a strange cup that I found when looking at Hugtto! Pretty Cure!

Friday, March 22, 2019

Fiction in Reality #1 - Kaori's Melodica

I'll admit, I'm a strange man. Based on things you may have seen me write in the past on websites, you may think I'm just seemingly obsessed with anything that goes in a person's mouth such as straws or musical instruments, but really, it goes further than that. If I see a fictional character hold or use an item and said thing is cute, I'll probably buy it so I can own it...then rarely use it.

Whether that's the intention of the show (like Pretty Cure) or not, I have a strange desire to bring those items from fictional universes to reality, to own (and use) them myself. In this new series, we'll look at items from anime and sometimes video games, show my real version, and in some cases show what the items were based on but not mentioned due to unfortunate legal brand restrictions.

To start this series off, let's talk about a neat instrument that never fully got my attention until my aforementioned obsessions took over. Get ready, this is a long one!

Fiction

Many years ago, I got WarioWare DIY, which I consider one of the best games in the series because of how it allows you to create your own microgames, music, and comics (though I only use the first two). I started remaking commercial music (badly) and video game songs in it, and at one point, I was looking through the instrument list. Said list has five tabs with eight instruments each, which have small icons to represent them.
See that blue thing? The upper-right icon? Yep, this was my first encounter with it!
One of those was a light-blue, rectangle-shaped object with piano keys on it, named the Melodica. It sounded like a harmonica (and the real instrument I own does have a similar sound), but its scratchy sound discouraged me from wanting to use it in any of my music. I don't know if there's a single song I used it in, though I think Atmospheric Glide's WWDIY version would use it now due to the recent instrument change.

No other melodica appearances were sighted after that game, until around 2018. I don't know what I was doing, but somehow I stumbled upon screenshots of the first episode of an anime named Your Lie in April, which showed a blonde girl playing that instrument again!
At last, the melodica isn't just 16x16 pixels! It's clearer now! Thanks, anime girl!
Of course, by now, I had forgotten the name of that instrument, so I read on a wiki and found out that the blonde girl was named Kaori and she was playing the melodica, even though that isn't her main instrument.

After I found out what it was, I searched on Google Images for melodicas meant for Kaori cosplays. Some looked pretty close at this point, but the thing is, I don't stop at "close enough"; I kept searching, looking at every screenshot I could find of her playing her melodica so I would have more references before continuing my search for the melodica. In two screenshots I found, a black handle could be seen on the back of the instrument, which is where she held it with her left hand, shown below.
Ignore the subtitle, please.
At this point, I knew they had to use a specific melodica for reference when drawing it, as it was seemingly drawn very precisely, with a consistent 32 keys visible, the aforementioned handle, and the random circle at the end of the instrument. With all of this, I went back to searching, and stumbled upon the Yamaha Pianica series of melodicas. I looked at various pictures of a blue-colored Pianica and it strangely had all of the details they drew on Kaori's melodica! The black handle, the circle cleaning button, the 32 keys...all of it was there!

Reality

Finally, this is the part everyone's been waiting for, the part where I show its real counterpart. However, I believe I chose the wrong Pianica. It's definitely the same series they used for reference (and are the same ones used in Japanese schools), but I went with the newer P-32E rather than the P-32D, which has indented parts on its backside that match Kaori's perfectly, which were moved on the P-32E to around the middle. For those wondering, yes, the blue Yamaha Pianica P-32D is what Kaori's melodica was based on, and is what they use in real Japanese schools as part of music class, where kids have to learn to play it. This is probably why Kaori is randomly not playing a violin here.

With that said, let's get to the comparison! Ignore the slightly brighter blue they use; For whatever reason, they overuse bloom or something non-stop, causing colors to look overly soft. If that effect wasn't in the anime, it would probably be the exact same shade of blue.
I know hands are a nightmare to draw, but whose fingers look that weird...?
First, can we stop and look at Kaori's weird hands? When she's playing the melodica, her fingers are always flying around the keyboard at insane speeds, usually hovering over unrelated keys that she never plays! All of this is done while she can't see what keys she's pressing, either! Trust me, in honor of Kaori, I play my melodica using the same orientation, and I literally can't see any of the keys from where my eyes are. She must be this good because she isn't real.

Who can dance and move their hands around a keyboard while controlling their breath? Fake girls.
Seriously, who can play this fast while being basically blind?

Anyways, with that aside, take a look at that picture. I couldn't see what my camera was pointing at because I had to hold the melodica with both hands to mimic Kaori's weird finger positions, but trust me, what you can't see is basically as spot-on as the rest of this fake melodica!
  • Both ends are rounded, but suddenly change angles where the lines are drawn in the anime version.
  • The mouthpiece is nearly identical, but the real version tapers off slightly vertically at the end that goes in your mouth. Light reflects off it just like in the anime, though.
  • As shown to the left, the round cleaning button at the right end of the melodica is the same. On the real melodica, holding this while blowing into the instrument forces spit out of the back.
What are these random indents? Seriously, what's their purpose? A strap...?
Now, moving to the back... Whoever drew this scene didn't care about putting much detail here (unlike "it too hard..." picture above, which has the holes), but they did include the black handle and two dots. Why did they not draw the holes but drew these random indented parts? I'll never know, but this picture shows that this matches the P-32D.  You can even see the four "legs" it sits flat on! It's like the animators hated how Yamaha wouldn't let them legally use their name so they left clues like this behind for only someone as obsessed as me to follow.

Weirdness

Now, I don't know where else to put this in this blog post, but I feel I want to talk about this instrument here so I don't create a redundant second one in the future about it. What's up with the lighting on this instrument's piano keys? The sharp keys don't leave any shadows, but yet when a white key is pressed, a shadow is drawn that doesn't cover the whole key!

Also, Kaori's fingers don't have shadows, but one does when she is pressing the A# key. Strangely, the animator wasn't even consistent as her other middle finger doesn't have a shadow despite it doing the same thing, only on the C# key. I guess they were too lazy to draw the black key pressed down, so they just drew a shadow instead... I know, I'm no artist, but if I were in their shoes, I'd be questioning what I was doing as I drew this cute instrument and illogically-drawn finger twisting...but I digress, back to the main point.

Assistance

Now, I didn't get this melodica just so I could have something like the cute instrument Kaori plays. I also got it for Mary's Magical Adventure. During Mary's story, Mary will meet Princess Peppermint, which I brought up in a previous blog post. I wanted her to have an instrument she plays, and that her instrument-playing would be recordings of me playing the real instrument. The then-recent discovery of this melodica led to me making her instrument be it rather than the recorder, since the melodica is easier to play for a...pianist like myself.

The melodica can also be heard in Atmospheric Glide, though I added effects to my recordings there so it sounds more pleasant. I wouldn't call myself anywhere as good as Kaori when it comes to playing the instrument, but here's all of the recordings that will be used in the game for Peppermint:
Not too bad, right? I guess I'm good enough at playing this cute, comfortable instrument. I'm paranoid it will fall out of tune and no one may be able to get it back into tune, seeing how it's an instrument foreign to the United States where I am...

Anyways, that ends the first post in this series! Sorry if it seemed roughly written; I seem to feel tired or something and that causes me to write and even play Minecraft worse in my let's play!

Thursday, February 21, 2019

The History of Mobile Mary's Magical Adventure

Has it really been months since my last blog post? Apologies, but I suppose I haven't felt like writing out detailed posts about things like my game, though two posts are planned for the future, once I get the item to show.

Anyways, if you've been reading this blog's previous posts about Mary's Magical Adventure, you've only been hearing about the main version of the game for computers running operating systems like Windows. However, in the past, I had plans to bring Mary's Magical Adventure to Android. It just sounds great on paper, to be able to take the game on the go and play the very same game you could play on your computer, or to even play with or against computer players using your mobile device!

In this blog post, I'll look back at the times I attempted to bring my game to mobile devices, and what I learned that I may put to use in the future...

World of Kirbycraft (D-Touch)

Yep, time to return back to those crappy old versions where I had no idea
where I was going with the game again...
(picture from World of Kirbycraft Development #3)
Back in 2015, I found out that Beloko Games ported Doom to Android. This was done before, but what made Beloko's port different was that it included GZDoom, the very same version of Doom's engine I used for my in-development game, World of Kirbycraft. Due to how awesome this was, I bought D-Touch and, with a bit of tweaking, managed to get my Doom mods running on my old tablet.

As shown in the screenshot above, it was successful; For the first time, I could see attacks from another player's perspective, and experience deathmatch in my game! The tablet's battery was running low at the time, so this experience was quickly cut short, but everything seemed fine, the usual flaws of touch screen controls aside.
After that video, I started adding CVARs (console variables, or settings) to the game that would, I believe, tweak how running works (xane_dtouch_controls) and reduce effects (xane_dtouch_lag). Even back then, I knew Android could not handle much before it started dropping frames like crazy. After this, however, I don't remember bothering too much to get the game running on mobile, as ensuring it ran and looked good on Windows took priority.

First Real Steps

A couple years passed, and by then, D-Touch's version of GZDoom was way too behind the official engine build used on computers, so there was literally no point to bother making my game compatible with D-Touch. However, in 2018, Beloko Games released a closed beta of Delta Touch, the successor to D-Touch, which came with an up-to-date build of GZDoom! When I saw this, I signed up for the beta, and Beloko Games gave me Delta Touch for free due to my previous purchase of D-Touch on Amazon.

After everything was set up, I ran Mary's Magical Adventure on Android for the first time, and seeing my newly-renamed game running on my phone gave me the inspiration to start bothering with mobile optimization again. Yes, just seeing what I recorded in this video made me excited for a mobile version of MMA:

Mobile Performance Troubles

Yes, it might not look like much, but that was the island Hell City level running on Android, which was "amazing" at the time. Though it looks really close to its computer counterpart, something might bother you, and that's the inconsistent framerate that is first encountered when Mary enters the "park" area with the big fountain. Of course, no one should be surprised that lag is there, given this is Android running essentially a PC game, but...well, would you be surprised if I told you it could've been worse than what that video contained?

Faux-Draw Distance

Basically, look at the beginning of the video and you'll probably see that things in the distance seemingly don't exist until Mary gets near them, like early 3D games did. I implemented this for similar reasons to what those games would've done, for better performance. If I disabled that, the game would try to render nearly the whole map, and the framerate would plummet to sub-one frame per second.
This is how that level appears with "render culling on (top) and off (bottom).
So, how did I pull off this weird effect, since I doubt any other GZDoom mod is going to (ab)use it? Well, basically GZDoom supports polyobjects, or moving walls that go from floor to ceiling. These are meant to be used for swinging doors or objects that can "crush" the player, but I discovered that the game doesn't render anything beyond these when I didn't put a texture on one of them.

Now, I couldn't draw a single diamond-shaped polyobject around the player, as that would create a solid object around the player, trapping them. However, by using two chevron-shaped polyobjects, I could place the player between them, then make them follow the player around the map. Back then, polyobjects were always solid, so a single solid object or enemy would stop them permanently until I removed the object, but later on, I modified GZDoom's source code to make "hurt on touch" polyobjects ignore collisions, creating the desired effect.
If you've ever looked out of bounds and wondered about the weird blue
squares with white diamonds inside, now you know what they are.

Why does this work? Well, you see, Doom's renderer was clearly optimized for the corridor-based, mostly-indoor levels in Doom, which had a lot of walls that went from floor to ceiling. When the renderer encounters a wall like this, everything behind it is not rendered. Polyobjects are also this type of wall, so they stop rendering, which is convenient for my game, which has wide open areas that Doom was never meant to render. Yes, if you stand behind a building on that island level, the game's still rendering everything behind it you can't see because unlike the Source Engine, Doom treats all sector heights equally, so if you can see through even the tiniest gap, the game will happily render everything.

Yes, all of that was just for one optimization; There are more of them, but they seem to be more effective on computers. However, there are other things that will cause Android to slow to a crawl than just rendering a open area without hackish invisible things blocking the renderer's view...

What Makes This Renderer Tick...in a Bad Way?

This is basically not an issue for computers and their high-quality NVidia GPUs and Intel(R) CPUs, but on Android's little ARM processors, the smallest things can cause frame drops. One of these things is slopes. Take a look at this video and notice how the framerate drops every time Mary looks to the left. Why is it dropping? Notice the island and volcano in the background? Yeah, the game's rendering all of those slopes and is lagging as a result.
That may seem understandable, but I've also seen that Android can't handle additive-rendered mid-textures, such as the fake lighting effects seen in City Street Run in the HCPD HQ's bathroom or the windows in Xane Corp.'s light testing room. If the game ever renders a single one of those, the framerate is basically guaranteed to be cut in half.

Overall, pretty much the only levels that work well in Delta Touch on even the high-end Google Pixel 2 are indoor corridor levels that don't use additive-rendered textures and don't have too many slopes. Man, that sounds boring. That sounds like...the original Doom, which Mary's Magical Adventure aims to be nothing like... What to do?

MMA: A New Hope

Well, an idea came to mind yesterday while I was sitting in bed, about to go use the bathroom. What if the mobile version was its own standalone game, separate from the computer game, with its own short storyline and simplified gameplay? Hear me out, this sounds like the best way this could be handled.

Think about it; If I used Mary's Magical Adventure's levels in the mobile version, they would be too open and would probably use too many of the lag-inducing things I mentioned above. This would require me to butcher the levels, adding render-blocking sectors and turning the levels way more linear. That would work better for mobile, but at the same time would probably feel like a bad imitation of a good game instead of an official mobile port.

Therefore, making mobile its own game would allow me to start fresh, with new, more linear levels and simplified gameplay. It would still feel like the computer game, but would be (nearly) made from the ground up to work better on mobile without compromising and possibly ruining anything from the computer version.

The story of the game would take place during Mary's Magical Adventure's two stories, beginning at the end of Xane's story. You would play as Princess Peppermint, the dark-skinned princess of Cumulus Peaks, who is tasked with killing the remaining monsters from the first invasion. However, as she finishes "cleaning up", the Origin Master accidentally releases more monsters, some of which land right near where Peppermint is. One of these monsters catches her off-guard, knocking her off the clouds down to whatever's below at that point in time. Now, Princess Peppermint needs to make it back to Cumulus Peaks to get rid of the new wave of monsters and save the place she rules over!

Yep, no Mary or Xane, just Princess Peppermint. I believe the inventory system would be simplified and any items Peppermint would walk over would be auto-activated, closer to Doom. Also, no upgrades or Jane's Hut, as Peppermint doesn't have the item to warp there. Now, if you've read the previous post, you might be wondering about her magical instrument. Yes, that will be one of her weapons, where pushing buttons would cause her to play different notes from her melodica, which would hurt enemies.

I wanted to add this to the computer version of the game as a mini-story, but with how big and overly-ambitious as my game's become, I think using this story for its own smaller game would work well for mobile! It would be smaller with less content, so perhaps it'd have a chance to actually get finished!

Anyways, with that said, that's the current plans for the mobile version of Mary's Magical Adventure. What do you think? Let me know in the comments below!