47. External APIs
47 / 113
•Integrated three of the major social platforms: Facebook, Twitter and Google+
•During the development process, both Facebook and Google+ changed their APIs…
•… effectively turning some of our code into useless rubbish
•Took about a day or two to get everything up and running again
49. External APIs
49 / 113
•Talking to other web developers, we learned that social platform providers tend to change their APIs regularly
•They won’t notify you about that.
•Neither before, nor after.
•Never.
51. Don’t Reinvent The Wheel
51 / 113
•Got a problem that is not exactly related to just your application?
•Maybe someone else has already solved it.
•There’s lots of smart people having spent tens of hundreds of hours on your problem.
•Use that knowledge!
54. Make testing easy!
54 / 113
Atthebeginningoftheproject,Christianhadtheideaofcreatingadebugwebpagecontaininglinksforseveraldebugfunctions
•creating and logging in a test user
•adding points for the current user
•unlocking achievements
•and many, many more
56. Make testing easy!
56 / 113
This was arguably the best idea we had throughout the project.
57. Make testing easy!
57 / 113
•Debugging can be a pain in the ass
•especially when network communication is involved
•Our debug page saved us lots of blood, sweat and tears
•The earlier you set up your debugging tools, the more you’ll benefit from them
58. Hint
LESSON 4:
Makedeploymentaseasy aspossible!
58 / 113
59. Deploy often!
59 / 113
Creating a new version can involve a step or two:
•Accessing source control
•Syncing working copy
•Creating tags
•Writing version numbers
•Performing the actual build
•Packaging the build result
•Publishing the game on a build page
•Running unit tests
•Sending email notifications
63. Hint
LESSON 5:
Mock networkinteractionfortesting!
63 / 113
64. Mocking
•Everything that involves network communication is annoying to test.
•Wemockedparts of the remote interaction of our application
•sending e-mails
•verifying leads
•Whenever a mail was sent, it was written to the console instead, for instance.
64 / 113
69. Consistent Code Style
•If you aren’t alone (and I sincerely hope you’re not), you’ll want to standardize your code styles.
•Be clear about tiny details such as tabs vs. spaces
•greatly increases maintainability
•reduces the number of merge conflicts
69 / 113
80. FreudBot Features
•46 levels, 17 animated characters, 10 screens, 137 cards, 4 comics, 10 000 words, 45 sounds
•Dedicated website and social media channels
•Multiple ad providers and in-app purchases
•Fully localized to five different languages
•Full analytics integration
•Cloud savegames
•Native mobile features (loading screen, snap mode, suspend, charms, toasts)
•Marketing (fan art, card contest, trailer, contests)
•Multi-platform release on iOS, Android, Windows Store, Windows Phone (Windows and Mac to come)
80 / 113
92. FreudBotLessons Learned
Let everyone work with the tools they’re most experienced with, and provide a tool chain for data conversion as soon as possible.
92 / 113
100. Tutorials
•Have players test your game early on
•Don’t talk, just watch and listen.
•Don’t underestimate the time required for implementing your tutorial. It introduces many special cases, such as
•Prohibiting player actions (e.g. use ability, end turn)
•Triggering unusual events (e.g. let turn timers expire)
•TweeningUI in step by step
•Providing fixed outcomes (e.g. always same card hand)
100 / 113
110. Localization Best Practice
•Use unique, immutable localization keys
•Changing any localization keys will invalidate any sheets handed out to your localization team
•Highlight new texts, changed texts
•These additional texts will have to be localized later
•Provide a playable version of your game, as well as rich background information (e.g. characters, places)
•People need to know the game before they can localize it.
•Allow instant integration of the localized texts, if possible
•Localization team can check for encoding issues, overlapping labels, missing texts immediately
110 / 113
111. And there is more…
•Learn from others!
•Stick to your plan!
•Build prototypes!
•Use automatic testing!
•Setup proper version control workflows!
111 / 113
112. And there is more…
•Learn from others!
•Stick to your plan!
•Build prototypes!
•Use automatic testing!
•Setup proper version control workflows!
See Game Programminghttp://www.npruehs.de/teaching/game-programming/
Monday, 8.30 am, E 45
112 / 113