Skip to content

Commit acafb7e

Browse files
committed
initial zappy bird setup
1 parent 67215fa commit acafb7e

42 files changed

Lines changed: 2333 additions & 8 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66

77
## Description
88

9-
Sample backend code snippets to demonstrate how to integrate Bolt's SDK into your game server.
9+
Demo projects and sample code snippets to demonstrate how to integrate Bolt's SDK into your game server.
1010

1111
## What You Will Find
1212

13-
This project showcases an example backend with the following flows implemented
14-
15-
- **Payment Links:** Creating links that take user to checkout
16-
- **Validate Order:** Validating a transaction was successful for a specific user
17-
- **Transaction Webhooks:** Handling webhooks on transaction success as users make purchases in your game
13+
- **Zappy Bird JS** - Example SDK integration in JS for ads
14+
- **client** - Example typescript web game with complete SDK integration for payment links and ads
15+
- **server** - Example typescript backend server with the following flows implemented:
16+
- **Payment Links:** Creating links that take user to checkout
17+
- **Validate Order:** Validating a transaction was successful for a specific user
18+
- **Transaction Webhooks:** Handling webhooks on transaction success as users make purchases in your game
1819

1920
## API Keys
2021

@@ -31,10 +32,20 @@ When you are ready to implement Bolt into your gaming SDK make sure to follow al
3132

3233
### Development Environment
3334

34-
This project includes a Tilt configuration for easy local development. You have two options to start the development environment:
35+
This project includes a Tilt configuration for easy local development.
36+
37+
**Prerequisites:**
3538

36-
**Setup:**
39+
To let tilt handle node versions, ensure volta is installed on your system:
40+
41+
```bash
42+
curl https://get.volta.sh | bash
3743
```
44+
45+
46+
**Client and Server Setup:**
47+
48+
```bash
3849
cp client/.env.local.sample client/.env.local
3950
cp client/.env.staging.sample client/.env.staging
4051

@@ -56,6 +67,17 @@ The `start-dev.sh` script provides additional features:
5667

5768
Both options will start the backend server, frontend client, and ngrok tunnel for external access.
5869

70+
71+
72+
**Zappy Bird JS Setup:**
73+
74+
```bash
75+
./zappy_bird_js/start-dev.sh
76+
```
77+
78+
The game will be available at `http://localhost:8000`.
79+
80+
5981
## Onboarding
6082

6183
**Merchant Dashboard:** Make sure you have fully onboarded onto our Bolt Gaming sandbox. You can [sign up](https://merchant-sandbox.bolt.com/onboarding/get-started/gaming) or [sign in](https://merchant-sandbox.bolt.com/) depending if you have an existing merchant account or not.

zappy_bird_js/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
ZappyBird
2+
==========
3+
4+
Clone of Flappy Bird game in JavaScript and Canvas 2D
5+
Credit: https://github.com/varunpant/CrappyBird
6+
7+
8+
The MIT License
9+
----
10+
Copyright (c) 2014 Varun Pant
11+
12+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17+
18+
**Here are some screen shots**
19+
20+
![Heat map classic theme](https://github.com/varunpant/CrappyBird/blob/master/SS1.PNG?raw=true=50x20)
21+
![Heat map classic theme](https://github.com/varunpant/CrappyBird/blob/master/SS2.PNG?raw=true=50x20)
22+
23+
![Heat map classic theme](https://github.com/varunpant/CrappyBird/blob/master/SS3.PNG?raw=true=50x20)
24+
![Heat map classic theme](https://github.com/varunpant/CrappyBird/blob/master/SS4.PNG?raw=true=50x20)
25+
26+
27+
Play it [here](http://varunpant.com/resources/CrappyBird/index.html)

zappy_bird_js/Tiltfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- mode: Python -*-
2+
3+
# Install dependencies and run zappy_bird_js frontend
4+
# Use Volta to ensure correct Node version from package.json
5+
local_resource(
6+
"zappy_bird_js",
7+
serve_cmd="""
8+
export VOLTA_HOME="$HOME/.volta" &&
9+
export PATH="$VOLTA_HOME/bin:$PATH"
10+
npm install &&
11+
npm run dev
12+
""",
13+
deps=["./index.html", "./package.json", "./js/"],
14+
ignore=["./node_modules/", "./dist/"],
15+
links=["http://localhost:8000"]
16+
)
658 Bytes
Loading
4.16 KB
Loading
3.79 KB
Loading
4.96 KB
Loading
6.59 KB
Loading
99 Bytes
Loading
110 Bytes
Loading

0 commit comments

Comments
 (0)