~Homebrew~ Bat Trip

Developer

Joined Apr 25, 2016

OP

January 1 2023, 11:11pm, edited August 30 2024, 10:42am

Official Topic Post for discussion about ~Homebrew~ Bat Trip (Pokemon Mini) Bat Trip (Pokemon Mini) Homebrew
Created 1 Jan, 2023 23:11 by MGNS8M

Currently using:
Pokemon-Mini.net Download

Alternate-Mirror Direct-Links just-in-case:
Link <-- Main File
Link <-- Color File

....unless I want to change something later.. honestly probably will not, it was intended to be/stay a basic game as my first Homebrew.

Resources:

Things I wish I could have added or changed:

---No Sound. =( I don't understand music to begin with, but the means to add sound is very complex for me.

---I put the score exactly where Trigger-icons appear. I really should have considered it, but I didn't think I would HAVE achievements that needed trigger.

---This was supposed to be an entirely different game, maybe I'll make that some other day.

---I put Rumble on object-collision, but I forgot and didn't put Rumble on "fall death". It kind of makes sense, since you are gradually floating down to the bottom of the screen, but it's a little weird when you expect a rumble and it doesn't happen.

---Some kind of extra object manipulation, like actual-Balloon-Trip things, rotating star-spikes, move them up and down .... I'm honestly hitting the limit on what the code/compiler/CPU can handle without MAJOR SLOWDOWN so it's kind of at the max of where I want it to be just shoving them to the left of the screen.

Vague Dev-history thing:

Spoiler (Click to show)
August 2022: I knew I needed a Pokemon Mini game, so I downloaded the SDK and managed to barely be able to compile the "Hello World" example. Tried to look for image-formats, found an image-converter that worked for Python, tried to install Python+Pillow ... but guess what, Pillow won't install, got stuck, gave up. Another project included bmp2bin but I thought it was for ASM-projects and not C and I'm not ready for ASM so didn't bother checking it.

I then created all the art-assets I needed for the first game.... and didn't make that game. Realized it was probably too ambitious at the time, now, might be possible.

December 13th 2022: Finally brute-forced my way to understanding how the hello-world tiles are made, and ... realized that the included "bmp2bin.exe" did make what I need automatically, but for sprite's it's different, also I didn't realize the RAW it created wasn't ASM-related like I thought, it was just the image in BINARY so the auto-converter for images finally worked/was-understood and I added most of the images I needed. I just needed a Hex-Editor to copy-paste the image-code and it was done. Really wish I knew that back in August.

(view of Hello World with Bat stitched in once I realized what the format for drawing was)


December 14th 2022: Looked through other projects, FINALLY saw code that fits Pokemon-Mini and wasn't just for Epson CPU like the included manual in the SDK was for. Like I had no idea how to load sprites at all, but apparently it's OAM[0] and a bunch of other attributes and it was actually kind of simple and understandable for me somehow.

December 15th onward:

...and then finally after a lot of google searching for the last main things I needed(basic score, basic rando, basic collision) it was done-ish, and then I kept refining different parts until it did what I wanted.

A large part of it was understanding how to get graphics on-screen. After that I know basic things like 'move x-- and move x++', but at first it was just a free-flying bat that didn't flip, but could D-pad around the screen. Added gravity and changed the D-Pad-Up to A-button, disabled flying down, and put in boundaries for screen edges.

Later I had this idea of making 'flapping' work so I could have animation, and then came up with an idea to make it so that Bat only went up on certain frames to simulate 'flapping' rather than just smoothly going up or falling down. Then after failing to get OAM_HFLIP to work correctly I just used the extra room for sprites by adding in hard-flipped graphics and making a method to detect which ones to use or not use.

Star-Spikes got added later, tested animating them, tested animating 16 at once and it was fine, then started work on the final things like random-callouts, score, and collision. Then added Warning/Title Screen/Game Over screens and connected them to each activity.


All around took only 2 weeks not counting the downtime from August to December 13th, but it IS just a simple game as it was meant to be.

Screenshots from the Color Version(but RALib won't load them, sadly)





I didn't even remember there was a color thing, but just-today I realized that EXE was in the bin-windows directory of the SDK, so I fiddled with it and made all this ... annnd now I can't really use it. It will be available when it's ready, though.

Developer

Joined Apr 25, 2016

OP

January 4 2023, 12:29am, edited March 17 2024, 9:34pm

I suppose I'm done with this ... until I can find a better host, it's going to have to be linked to my Discord-upload I guess(never mind, Discord doesn't want to be used as a host, even for something as small as this, so it's just going to keep breaking here):

Pokemon-Mini.net Download

Alternate-Mirror Direct-Links just-in-case:
Link <-- Main File
Link <-- Color File

As far as I know the Color file won't work in the RetroArch core, only on the PokeMini.exe emulator(unless it works in RetroArch but it doesn't in RALib). But it's there if you want to try it anyway.

Set/Game Notes:

The score caps out at 9999, it might appear to flip over to 0000 but IF it does, it's actually 10000, and stops there.

The game starts with a headwind that pushes you back, but at 200 points it becomes a tailwind that pushes you forward for the rest of the game.
---This is mostly because I was bored, but it has the added benefit of making idlers move when they otherwise wouldn't. It's easy to just hang out on the left side and never move, so changing to a tailwind forces you to move!

How the Rando works:

Spoiler (Click to show)
I have 16 dedicated star-spike sprites. They all exist at X = 128 off-screen when inactive.

I have an array(spriteArray[]) of 17 numbers(0-16), the first is the player-character Bat as OAM[0], and OAM[1]-OAM[16] are star-spikes.

There are 8 Y-positions where each star-spike exists; there are ONLY 2 per Y-coordinate.

Rando is called once every frame, but the actual manager only procs when the timer is "3"; it runs at 36fps, and it starts out with a max-count of (80 - (diff)). Diff starts at 1.

When a random-number from 1-16 is called(0 is skipped because I don't want OAM[0] Bat being moved! So its Array value is set to "3" so it never does anything), if that star-spike is inactive, it's corresponding Array is turned on from 0 to 1.

Any star-spike with the Array of 1 is sent to the left once per frame until it hits X = 0(offscreen). If a star-spike is found at X = 0 and has an Array of 1, its corresponding array gets turned off to 0 and is sent back to X = 128, where it sits and waits to be called again.

What this means: At first it takes almost 2 seconds before a random-number is called; if that star-spike number is already moving out, nothing happens. It adds "1" to (diff) and (score). 2 seconds later(80 - diff(2) at 36fps) it checks again. Each time diff increases, it calls for a new star-spike at an earlier max-wait-time until it reaches diff/score 72, at which point it's checking Frame-3 out of a max-8-frames, so star-spikes fly out faster every time.

....also you might notice I'm not using the usual i in my FOR-loops. That's because I started getting 'code jamming' or whatever it is .... probably "The Stack(tm)" is getting jobs thrown onto it in different orders ... basically things in OTHER For-Loops were being affected by a DIFFERENT For-Loop whenever the CPU started to get bogged down. All of a sudden Bat would disappear and get sent to X = 128, star-spikes would disappear too early, and the thing just sent massive walls of spikes constantly that disappeared before getting past the right-quarter of the screen.



What I'm trying to say -- I've had issues several times where I messed up and called an ENTIRE WALL of star-spikes that were impassable, but it should be working better now. I also relaxed the bounding-box for the spikes so it's a bit easier really. But I can't guarantee that there will NEVER be a wall... but with only 2 star-spikes on a line at once, it should be less likely to happen. Basically if you see two star-spikes in a row you know that line is kinda-safe to be behind it.

Also there will be times of dead-space, that's just the luck of the draw. If the rando calls out a number and it's already flying out then nothing will happen, so if it flips the same number several calls in a row it's just not going to appear.

Actual achievement notes:

Fly Forward, Young Bat Fly Forward, Young Bat (4) - I really like how this starts you out hanging on the left side of the screen, and then gradually pushes you forward with no allowance to press left or right, so it's like being tied to a log and gradually being pushed towards cutting-saws. Once the tailwind kicks in you realize what this is about.

East Side Batsody East Side Batsody (5) - The Bat-sprite has a highlight border around it, that's part of the sprite's size, so it might be easy to fall behind the building's right-side and not know it because the white-space isn't visible on a white-background. It would be more visible in the color version! This achievement is made to force you into the danger-zone with less time to react than always hanging out in the background.

Bat Flap On Track Bat Flap On Track (3) - This uses a reverse-Measured that should NOT be filled. This achievement is mostly here to stop the usual habit of flying in the upper-left corner during the start. A "flap" only happens when Bat's wings are up and then flap down, so it's not as bad as it sounds. Because score-rapidly-increases once it gets to 72 it also goes a bit faster.

Still kinda testing around since I'm new with this kinda thing, but should probably be done soon. Mess around with it a bit before that happens if you want.

You must log in before you can join this conversation.