A small arcade game for Android and iOS, written in Flutter.
Invader-style monsters in seven colours fall from the top of the screen. Use the Red, Green and Blue buttons to fire a circle that grows out from the bottom of the screen:
Sound effects play through flutter_soloud,
the same engine as rigobert. The clips in assets/sounds/ are generated by a
script; edit tool/make_sounds.py and run python3 tool/make_sounds.py
(needs numpy) to change them. Each colour’s firing sound uses the same note as
that colour combination in rigobert. The speaker button in the top-right corner
mutes the game, and the setting is remembered.
The icon is the game’s invader in rainbow rows of the six colours. Every size
is generated by tool/make_icons.py; edit it and run
python3 tool/make_icons.py (needs Pillow) to regenerate:
store_assets/ holds the 512×512 Google Play icon and a
1024×1024 copy for listings, plus the 1024×500 Google Play feature graphic
and the App Store product page header (3840×1646) and search results
(3840×2560) images (all drawn by python3 tool/make_feature_graphic.py).Set up the same way as rigobert:
kAdMinGames) and 180 seconds (kAdMinGap) have passed since the last
ad break, so quick losses don’t bring up an ad every minute. On a fresh
install the time counts from first launch. A break counts even if no ad
was loaded.kTipJarEveryNthBreak).
The tip jar can also be opened any time from the start and game-over screens.Before a release:
android/app/src/main/AndroidManifest.xml and ios/Runner/Info.plist,
which currently hold Google’s test IDs. Put the unit IDs in
lib/services/ad_service.dart. Release builds show no ads until this is done.com.mermik.rgbinvaders.tip_small, …tip_medium,
…tip_largetip_small, tip_medium, tip_largeOne global leaderboard, using Game Center on iOS and Play Games on Android:
kLeaderboardMinScore).
“No thanks” stops the prompt until the player signs in via the link.Before a release (the leaderboard is hidden until this is done):
com.mermik.rgbinvaders.highscores, sorted high to low.
The Game Center entitlement is already in ios/Runner/Runner.entitlements.android/app/src/main/res/values/games-ids.xml.lib/services/leaderboard_service.dart.Android: release builds are signed with the upload key named in
android/key.properties (git-ignored; the keystore itself lives outside the
repo). Play App Signing holds the final app signing key. Without
key.properties, release builds fall back to the debug key.
storeFile=/Users/mermik/.android/rgbinvaders.jks
storePassword=…
keyAlias=rgbinvaders
keyPassword=…
flutter run # on a connected device or simulator
flutter test # game-logic tests
lib/game/game.dart: game state and rules, with no Flutter widgets (easy to test)lib/game/game_painter.dart: draws the game on a canvaslib/game/chord_detector.dart: groups near-simultaneous presses into one colour (same approach as rigobert)lib/game/color_pad.dart: the glossy colour buttons and the colour-mix legendlib/game/share_card.dart: the “Share score” image, with the score and a QR code to get.htmllib/game/game_screen.dart: game loop (Ticker), multi-touch buttons, overlayslib/services/: ads (ad_service.dart), tips / ad-free time (purchase_service.dart), sound effects (sound_service.dart) and the leaderboard (leaderboard_service.dart)lib/widgets/tip_jar.dart: the tip jar dialog