• bstix@feddit.dk
    link
    fedilink
    English
    arrow-up
    13
    ·
    3 months ago

    What’s the size of the music/graphics/game code/stuff that is needed for any app to run on Android?

    I believe (without knowing for sure) that you could make a similar game much smaller by “rendering” the music and some of the graphics.

    • pirat@lemmy.world
      link
      fedilink
      English
      arrow-up
      15
      ·
      3 months ago

      “rendering” the music and some of the graphics.

      I think that’s what’s called procedural audio/graphics. For audio, it’s like building synthesizers into the game, to then be able to play the music/fx as a program (sort of like sheet music) instead of an audio file.

      • bstix@feddit.dk
        link
        fedilink
        English
        arrow-up
        12
        arrow-down
        1
        ·
        edit-2
        3 months ago

        The music doesn’t have to be completely synthesized… Most early computers would simply reuse the audio snippets as “samples”, and program the pitch and timing in a “tracker”

        Listening to the Flappy Birds music, which I admit that I did, then all of the music could be done in a tracker, even if it might not have been originally. It’s a bit of a lost art form, but there are several kilobytes to save!

        Personally, I have been considering making a HTML5 game, including the sunvox DLL, to make it really easy to put tiny yet advanced music files into a cross platform browsable game. Haven’t gotten around to it though…

        • pirat@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          3 months ago

          Right, I forgot to mention that’s possible too!

          Thanks for mentioning SunVox, which sent me down a rabbithole of a multitude of interesting software from the same developer. I have even played with the one called PhonoPaper maybe 8 years ago, without knowing of all the other projects! There are many music-related apps, and also PixiVisor that transmits video over audio, which I find fascinating for visual DSP. Seems like next-level SSTV, and would be fun to try over radio - like a LoFi TV signal!

          Unfortunately, it seems that the Android versions of most/all(?) of the projects are outdated, and not supported on my phone’s newer version of Android, but other versions probably still work on different OSs.

          The SunVox library for developers (rather than just the JS-based player) seems very interesting to me. If I’m not misunderstanding, it could be used to build some interesting custom browser-based synth GUIs, or behind the scenes for playing live adaptive and/or generative game music+FX. I’ll definitely be looking into that sometime, though so far I’ve only been scratching the surface of software development, but with the help of LLMs I have recently been able to prototype some interesting ideas (music-based games too!) that seemed totally out of my reach before that.

          Feel free to let me know if you ever get around to doing something along the lines of what you were describing. Sounds like a (more) straightforward way of using SunVox to reduce the game size.

  • addie@feddit.uk
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    10
    ·
    3 months ago

    Super Mario Bros on the NES came in at 31 kB, and it was a bit more of a game. 100 kB for Flappy Bird isn’t all that impressive.

    • mlg@lemmy.world
      link
      fedilink
      English
      arrow-up
      18
      arrow-down
      1
      ·
      3 months ago

      Buddy super mario bros was coded in 6502 assembly and required the devs to use every data saving trick in the book like metasprites, sprite flicker, tilesets, color pallets, etc.

      Android apps can be notoriously overhead bloat from Java, so for the modern age this is decently impressive.

    • tiddy
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      1
      ·
      3 months ago

      Having to support one type of device allows for a lot more optimisation than supporting thousands

      • addie@feddit.uk
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        3 months ago

        Android has a massive built-in library of supporting functions that abstracts away most of the differences between devices, including support libraries for older versions of Android, and Flappy Bird is almost the “hello world” of gamws writing.