-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgames.html
111 lines (94 loc) · 5.15 KB
/
games.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Playtomic: Setting up your games</title>
<meta name="description" content="Leaderboards and more for iOS, Android, Unity3d, html5, actionscript and more.">
<link href='css/bootstrap/bootstrap.min.css' rel='stylesheet' type='text/css'>
<link href='css/custom.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800' rel='stylesheet' type='text/css'>
<link rel="icon" href="assets/favicon.ico" type="image/icon" />
</head>
<body>
<div id="sponsor">
<div class="container">
Need support you can't find on Stackoverflow or programming communities you use? I'm busy but you can <a href="mailto:benlowry@outlook.com">contact me</a>!
</div>
</div>
<header>
<div class="container">
<a href="http://playtomic.org/" class="logo"><img src="assets/playtomic.png" alt="Playtomic" title="Playtomic" /></a>
<ul>
<li><a href="/server.html">Server setup</a></li>
<li><a href="/games.html">Game setup</a></li>
<li><a href="/apis.html">API documentation</a></li>
<li class="follow">
<a href="https://github.com/playtomic" target="_blank" class="github-follow-button">
<img src="/assets/github.png" alt=""/>
Github
</a>
</li>
<li class="follow">
<a href="https://twitter.com/playtomic" target="_blank" class="github-follow-button">
<img src="/assets/twitter.png" alt=""/>
Twitter
</a>
</li>
</ul>
</div>
</header>
<div id="content2">
<div class="container">
<div class="row">
<div class="span12">
<div class="section">
<h2>Creating game credentials</h2>
<p>You can add game credentials in your MongoDB database in the 'games' collection. The collection will be
created for you automatically the first time you upload to Heroku or when your app starts.</p>
<p>If you have used Heroku then you can access the <a href="http://compose.io/">Compose.io</a> dashboard through the <a href='http://heroku.com/'>Heroku dashboard</a>.<p>
<pre>{
publickey: "mypublickey",
privatekey: "myprivatekey",
leaderboards: true,
playerlevels: true,
gamevars: true,
geoip: true
}</pre>
<p>To limit access to the API server you can set the above properties to false.</p>
<h2>Newsletters</h2>
<p>If you want to use the in-game newsletter subscriptions you'll have to do a few things to set up. We're using <a href="http://mailchimp.com/">MailChimp</a>
in our API server so:</p>
<ol>
<li>Create your account, it's free for up to 2,000 subscribers and 12,000 emails per month after which
you can either pay monthly or only when you want to send newsletters</li>
<li>Create a List and take note of the List ID, you can access it in the list's settings</li>
<li>Define any custom fields, called MERGE TAGS, that you want to collect such as the
api, the game version, the date the player first played in the "List fields and |MERGE| tags" section</li>
<li>Create an API key in your account settings</li>
</ol>
<p>Once you've done all of that you need to configure the server with your data:</p>
<pre>heroku config:set mailchimp=your_api_key mailchimp_listid=your_list_id</pre>
<p>You can also disable the default double opt-in requirement that emails players a confirmation before subscribing them by:</p>
<pre>heroku config:set mailchimp_doubleoptin=false</pre>
<p>By default if a player subscribes 2x their information will update but if you would like to prevent that:</p>
<pre>heroku config:set mailchimp_allowupdates=false</pre>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="container">
© 2013 Ben Lowry. Server and client software are released under the <a href="http://opensource.org/licenses/MIT">MIT license</a>.
</div>
</footer>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40077834-4', 'playtomic.org');
ga('send', 'pageview');
</script>
</body>
</html>