New game uploaded: Flappy X16

All aspects of programming on the Commander X16.
ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

New game uploaded: Flappy X16

Post by ZeroByte »




Flappy X16




View File






FlappyX16 is a complete port of the original 2013 iOS Flappy Bird game by .GEARS Studios, using my own assets from scratch.

While the main reason I made this game was to get experience in C programming for X16 using a real multi-file Makefile project, I also wanted to produce a completely finished, polished game for the X16 community to enjoy. I've learned a lot about using the various subsystems of the Commander X16.

Features:


  • Four selectible difficulty levels of play


  • Fun, addictive gameplay - Always "just one more" point to earn


  • Keyboard and joystick support


  • FM sound effects


  • Bright 4bpp graphics


  • Secret "Dark Souls" difficulty level


I have not yet tested the final version using SD card images, and will update the download file if I need to patch the game. Also, my project support R39 but I have not built that against the latest versions of the master repo on Github. I will upload an R39-compatible version once I update my copy of R39 and test the build.

I've really enjoyed making this game, and I hope the community enjoys playing it. It's a VERY addictive game. Trust me, I've spent HOURS just playing it when I should be adding features / fixing up my code






 
ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

New game uploaded: Flappy X16

Post by ZeroByte »


This is odd - when I run my program on the emulator, Keyboard input works correctly. On Try It Now, it registers the first keypress to start the game, but then won't register any further keypresses.

I'm sure it's my program and not the web emulator - anyone got any thoughts? I just call kbhit() once per frame and set the controller state based on that...

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

New game uploaded: Flappy X16

Post by SlithyMatt »


Why don't you just use the joystick API? It will automatically map to the keyboard if no controller is connected

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

New game uploaded: Flappy X16

Post by ZeroByte »



7 hours ago, SlithyMatt said:




Why don't you just use the joystick API? It will automatically map to the keyboard if no controller is connected



Well, I was having some trouble figuring out the cc65 joystick routines, and they didn't have a built-in fastcall to GETJOY so I decided to roll my own by reading the memory locations where GETJOY puts the results anyway. I've got #define for R38 and R39 and both work just fine. Strangely enough, I did try to load the location where it stores the "fallback" pseudo-joystick keyboard functionality, but for some reason, it is coming up as "detected" even when i don't attach a joystick.

Oh well - The kbd does work for me in tandem with joysticks, and I've got bigger fish to fry, like implementing the sound engine and a couple of SFX.

(See next post for YouTube link)

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

New game uploaded: Flappy X16

Post by ZeroByte »






I decided to narrate this one with voice for a change. It was spur-of-the-moment, so don't expect some high production value, but maybe with some preparation, I'll do an episode discussing the code a little... Anyway, here it is with a couple of SFX implemented. There will be PCM sfx as well when all is said and done.

User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

New game uploaded: Flappy X16

Post by Cyber »


Looks nice! )

I think parallax scroll for background is asking itself here. )

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

New game uploaded: Flappy X16

Post by ZeroByte »


I’ve thought the same many times. The original didn’t scroll the BG so I decided to go with a bitmap BG too.

id need to re-draw the edges of the clouds and bushes because they don’t tessellate as drawn.

 

But I do love me some parallax scrollin’ 

I think the best thing to do would be to make the image as a 32x32 tile map (narrower than the bitmap) and just use Aseprite to smooth the transition. That way I wouldn’t need to update the BG tiles as it scrolls.

Hmmmmmmmm 

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

New game uploaded: Flappy X16

Post by ZeroByte »


I wonder why the webemu only accepts the first keypress event.... It runs slow in the webemu anyway, but it would at least be nice to have it truly previewable. Works just fine in the PC-based emulator.

Hmph.

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

New game uploaded: Flappy X16

Post by ZeroByte »


Eureka! Fixed the kbd bug on the TRY IT NOW webemu.

As expected, it wasn't the emu, it was me. My build environment always puts -joy1 SNES on the command line. When the web emulator launches, it doesn't attach any joystic, and a branch of my input code was being hit that was never actually hit on my own system. I've debugged it, and now the game is finally PLAYABLE on the TRY IT NOW screen.

 

User avatar
kliepatsch
Posts: 247
Joined: Thu Oct 08, 2020 9:54 pm

New game uploaded: Flappy X16

Post by kliepatsch »


Good job on this game! Plays well, and nice graphics!

I'm a complete newbie to flappy bird. So it's a very steep learning curve for a game that requires presses of a single button ? After like 20-25mins of trying, I can say I'd call it "Exponential Decay Simulator". 1/3 of the tries get past the first obstacle, 1/9 past the second, 1/27 past the third, well, and then the sampling gets pretty inaccurate ?

Post Reply