3 hours ago, SlithyMatt said:
Also, the original FB was kind enough to make the first few gaps a little wider.
It definitely didn't do that. I've watched very much footage of original iOS Flappy Bird to replicate it as faithfully as possible.
3 hours ago, SlithyMatt said:
t's like gravity is about 50% too strong.
I know what you mean. The main problem is that if I reduce gravity then the opposite problem occurs: it's too hard not to smack your head on the top pipe. Ideally, the gap would be about 8px wider, but I'm using 16x16 tiles right now. I've told myself several times that I need to change that, but I just haven't felt like going through refactoring that much code and graphics assets. It'd be worth it in the end, but I've always had more pressing things like un-implemented features to contend with.
I'm facing certain challenges in tweaking the physics, stemming from some design choices.
My current "collision" check method breaks if I vary the horizontal spacing of the pipes - I should just check screen tiles, whereas instead I'm cycling a queue of the gaps' Ymin Ymax values and applying them at certain values of the scroll register. I need to just check screen tile values instead so that's not a problem anymore.
The tiles are 16x16 which severely limits how many vertical placements exist for a pipe gap (only 8 valid heights) and also limits the vertical sizing options for the gaps. I should probably re-do my tiles in 8x8 mode and double the vertical resolution for gap sizing / placement, and of course, update the drawing routines. The end result would be a screen that looks identical, but allows for more fine-tuned placement of the pipes.
My "subpixel" behaviors are chaotic - for instance, gravity / Vy act as a sort of "fixed point" value, but the bird Y position is a hard screen X Y value, where I should probably just switch to using subpixel screen locations as well - it would give me much more granular control over the affects of gravity and thrust. Yet the pipes' scroll value is "subpixel" (I use 2 bits of subpixel placement to give more granular scroll speed control).
The bird movement is updated every frame, and if I were to refactor the code a little to allow for gravity and movement to only happen on even frames, then the game could be slowed down considerably.
In the end, all of these factors intertwine with each other, and it's only going to be some messing around that lets me find the right mix. I think my next step on this front is probably going to be to make joystick controls that let me vary the parameters in real time, with the current values output in hex so I can just play with them live until it feels right. Then just write down the values I ended up with and set them in the #defines. If I can manage to slow the game down w/o having to overhaul these things, then that's going to be what I choose to do, because in the end, this project has been more about getting some experience with C projects - using makefiles, using multi-file projects, organizing everything in a way that makes sense, etc. Having said that, though, I -do- want to produce as well-polished of a game as I can, so now that things are roughly in their final states, flow-wise, I should be able to start focusing on the gameplay tweaking some more.
My ultimate "anchor point" in all of this is the cadence of the pipe gap clearings... i.e. the cadence of the "ding" sound as you successfully clear pipes. Whatever tweaks I make to the physics should result in roughly one pipe gap per second, as that's the rate the original game threw them at you.
p.s. - My record on this is something like 32.