Page 1 of 3

Flap Happy and Fancy Free

Posted: Fri Dec 22, 2017 4:38 am
by rychan
Right, so, after Floofy Sheepie sort of fell over and things, I've begun work on this lil game based on the awesome Flapadiddle game by Jayenkai of aGameaWeek fame

So far I've got procedurally generated levels, obstacles the player character and some other bits working.

Image

Here's the title screen it it's current state also.

Image


I'm planning on adding different worlds with different obstacles, methods of level generation, varying gravity and a 2 player vs mode, (maybe a set adventure quest.. I dunno).

All the levels are procedurally generated and based of set seeds so there's good scope for this to be accomplished inside a 32kb nROM cartridge I reckon. So far the games code is at 4kb and the basics are almost all in place.

I'm hoping to set aside around 8kb for music and sound effect data, is that enough for a few minutes of music in general?

Re: Flap Happy and Fancy Free

Posted: Fri Dec 22, 2017 5:30 am
by FrankenGraphics
Cool! :beer:
I'm hoping to set aside around 8kb for music and sound effect data, is that enough for a few minutes of music in general?
I think you're safe with 8kBs as long as you don't use samples or just one short sample or so.

Though there's no straight relationship between minutes and kilobytes. It is heavily dependent on what driver you're using, and how you compose your songs.

Re: Flap Happy and Fancy Free

Posted: Fri Dec 22, 2017 5:37 am
by rychan
Thanks FrankenGraphics, It's handy to know roughly where the limits will be when coding stuff up :)

Re: Flap Happy and Fancy Free

Posted: Fri Dec 22, 2017 9:49 am
by Gilbert
For some reasons that in-game shot reminds me heavily of stage 1 of Salamander. :D

Re: Flap Happy and Fancy Free

Posted: Fri Dec 22, 2017 10:04 am
by rychan
Ha! Didn't see that until now :D

Re: Flap Happy and Fancy Free

Posted: Fri Dec 22, 2017 10:07 am
by tepples
FrankenGraphics wrote:Though there's no straight relationship between minutes and kilobytes. It is heavily dependent on what driver you're using, and how you compose your songs.
For the Pently driver, you can count on 1.3 to 1.9 kB of code and static data (depending on effects enabled at build time) and about 1 byte per note or rest or 2 bytes per effect change, with savings possible if you repeat patterns or use short loops. This means you can fit a lot of music into 8K.

OP: How many tracks were you thinking? And were you thinking Balloon Fight or Silver Surfer complexity?

Re: Flap Happy and Fancy Free

Posted: Sun Dec 24, 2017 4:52 pm
by rychan
Lewts see....

1 track for the intro screen
1 per world, those'll be the longer looping ones, probably 5 or 6 different worlds
1 ending
1 vs ending
1 level select
1 level complete
1 game over

So, potentially 12 tracks then, 6 aiming for around a minute with the rest being shorter. Will look into the pently driver as well as gradual games' one, I'm sticking with NES ASM3 despite it's limitations as it seems to make the most sense to me so I'll keep that into consideration.

Thanks again and, merry XMAS!

Finally gave it a test on the NES tonight also, t'works!

Image

Re: Flap Happy and Fancy Free

Posted: Sun Dec 24, 2017 5:32 pm
by team_disposable
Nice christmas themed tv set you've got there - your nes also seems aboutas yellow as mine!

I'd love to hear how you're procedurelly generating levels - what kind of techniques you've decided to use, etc.

Just to say I highly enjoyed your gameboy blog, as well. Thanks for taking the time to publish that.

Re: Flap Happy and Fancy Free

Posted: Mon Dec 25, 2017 12:02 pm
by na_th_an
FrankenGraphics wrote:Cool! :beer:
I'm hoping to set aside around 8kb for music and sound effect data, is that enough for a few minutes of music in general?
I think you're safe with 8kBs as long as you don't use samples or just one short sample or so.

Though there's no straight relationship between minutes and kilobytes. It is heavily dependent on what driver you're using, and how you compose your songs.
Generally, faster music is prone to be more dense, and take more space per second that slow paced music.

Re: Flap Happy and Fancy Free

Posted: Mon Dec 25, 2017 2:10 pm
by rychan
Hopefully I'll finish this game off then I'll write a post up on what does what online somewhere, also, wow,yeah, I haven't published anything on my blog in a while! I should probably make sure to update more often next year!

GBDK is what has led me down towards ASM, sooo, yeah, let's see how it goes.

Regarding the random generator, I'm just taking a value, multiplying by 13, adding 1 then sotring that as the next rand.

But I'm only updating that random generator when I need to. So, it's not per frame or anything, has a pattern of sorts, yet seems to be pretty random for the genreated levels at least so far. There's some obvious elements inside each level but I'll be making each world with a different stlye of generation, all using the same PRNG though.

Re: Flap Happy and Fancy Free

Posted: Mon Dec 25, 2017 2:15 pm
by lidnariq
rychan wrote:I'm just taking a value, multiplying by 13, adding 1 then [storing] that as the next rand.
That's a kind of Linear congruential generator.

If you ever need a "better" source of randomness, you might find the linked article above useful.

Re: Flap Happy and Fancy Free

Posted: Mon Dec 25, 2017 4:34 pm
by rychan
Thanks for the link, will check it out if I find this one proves not great for the level generation.

Re: Flap Happy and Fancy Free

Posted: Tue Jan 09, 2018 4:39 pm
by rychan
Had a lil break away from the code but, planned out some bits to sort out each day this week.

Tonight was level name generation, as every level needs a quirky / memorable name right?

https://twitter.com/refreshgamesuk/stat ... 1121117185

I'm posting more detail on my blog again this year, if you fancy a gander it's over at https://refreshgames.co.uk/

Re: Flap Happy and Fancy Free

Posted: Tue Jan 23, 2018 3:55 pm
by rychan
So, I've got a bit further in some aspects since my last post, there's a background generated (after the rest of the level is)

and the platforms are now in much better postiions.

Image

All 256 variants are beatable levels (yes, I tested them, of course I did)

Just need to figure out the best way to make it that each platform is generated one at a time next, then it's much closer to completion. Still, a long way off but a big step.

Re: Flap Happy and Fancy Free

Posted: Thu Jan 25, 2018 3:42 pm
by rychan
Orraaaaa! The platforms are now memory mapped in zero page as pointers! (YESSSSSS)

Image

Also, for NROM 256, surely my filesize should be 40kb, not 49kb?

Orr have I missed something?

Code: Select all

 PRG ROM:    2 x 16KiB
 CHR ROM:    1 x  8KiB
 ROM CRC32:  0x5ddeb4ae
 ROM MD5:  0xf67bcc4f6cf62b95cb3fde08520e7a41
 Mapper #:  0
 Mapper name: NROM
 Mirroring: Vertical
 Battery-backed: No
 Trained: No
[edit]
Fixed it, just removed the last 8192 characters from the file and resaved, apparently windows 7 always rounds up
[/edit]