text
stringlengths
1
372
investigate other resources that our community recommended.
package_2 flutter package
api API documentation
science codelab
book_5 cookbook recipe
handyman desktop application
photo_album game assets
quick_reference_all guide
book_5 special effects
handyman spriter pro
package_2 rive
package_2 spriteWidget
package_2 app_review
package_2 audioplayers
science user authentication using firebase
science add firebase to your flutter game
quick_reference_all firebase crashlytics overview
package_2 firebase_crashlytics
package_2 win32_gamepad
photo_album CraftPix
photo_album game developer studio
handyman GIMP
package_2 flame
package_2 bonfire
package_2 forge2d
book_5 add achievements and leaderboards to your game
book_5 add multiplayer support to your game
package_2 games_services
science use the foreign function interface in a flutter plugin
handyman tiled
book_5 add advertising to your flutter game
science add AdMob ads to a flutter app
science add in-app purchases to your flutter app
quick_reference_all gaming UX and revenue optimizations for apps (pdf)
package_2 shared_preferences
package_2 sqflite
package_2 cbl_flutter (couchbase lite)
api paint API
book_5 special effects
science build next generation UIs in flutter
<topic_end>
<topic_start>
add achievements and leaderboards to your mobile game
gamers have various motivations for playing games.
in broad strokes, there are four major motivations:
immersion, achievement, cooperation, and competition.
no matter the game you build, some players want to achieve in it.
this could be trophies won or secrets unlocked.
some players want to compete in it.
this could be hitting high scores or accomplishing speedruns.
these two ideas map to the concepts of achievements and leaderboards.
ecosystems such as the app store and google play provide
centralized services for achievements and leaderboards.
players can view achievements from all their games in one place and
developers don’t need to re-implement them for every game.
this recipe demonstrates how to use the games_services package
to add achievements and leaderboard functionality to your mobile game.
<topic_end>
<topic_start>
1. enable platform services
to enable games services, set up game center on iOS and
google play games services on android.
<topic_end>
<topic_start>
iOS
to enable game center (gamekit) on iOS:
open your flutter project in xcode.
open ios/Runner.xcworkspace
select the root runner project.
go to the signing & capabilities tab.
click the + button to add game center as a capability.
close xcode.
if you haven’t already,
register your game in app store connect
and from the my app section press the + icon.
still in app store connect, look for the game center section. you
can find it in services as of this writing. on the game
center page, you might want to set up a leaderboard and several
achievements, depending on your game. take note of the IDs of the
leaderboards and achievements you create.
<topic_end>
<topic_start>
android
to enable play games services on android:
if you haven’t already, go to google play console
and register your game there.
still in google play console, select play games services → setup
and management → configuration from the navigation menu and
follow their instructions.
this takes a significant amount of time and patience.
among other things, you’ll need to set up an
OAuth consent screen in google cloud console.
if at any point you feel lost, consult the
official play games services guide.
when done, you can start adding leaderboards and achievements in
play games services → setup and management. create the exact
same set as you did on the iOS side. make note of IDs.
go to play games services → setup and management → publishing.
click publish. don’t worry, this doesn’t actually publish your
game. it only publishes the achievements and leaderboard. once a