Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/overshifted/godottapsell
Tapsell ads implementation for the Godot game engine
https://github.com/overshifted/godottapsell
ads android gdscript godot godot-engine godotengine tapsell
Last synced: about 2 months ago
JSON representation
Tapsell ads implementation for the Godot game engine
- Host: GitHub
- URL: https://github.com/overshifted/godottapsell
- Owner: OverShifted
- License: mit
- Created: 2021-07-24T13:59:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-12T11:37:53.000Z (about 2 years ago)
- Last Synced: 2023-03-09T08:21:08.764Z (almost 2 years ago)
- Topics: ads, android, gdscript, godot, godot-engine, godotengine, tapsell
- Language: Java
- Homepage:
- Size: 296 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GodotTapsell
[Tapsell](https://tapsell.ir) ads implementation for the Godot game-engine.
Currently only supports rewarded video ads.Tested on Godot 3.3.2 and Android Q
## Installation
1. Download the zip file provided [here](https://github.com/OverShifted/GodotTapsell/releases)
.
2. Extract `.arr` and `.gdap` files in `res://android/plugins` of your Godot project
3. Extract the `.gd` file in `res://commons` of your Godot project
4. Install Godot's "Android Build Template" using the `Project > Install Android Build Template...` menu entry in the Godot editor
5. Open `Project > Project Settings...`; head over to the Autoload tab and add the extracted script as an autoload with node name of `Tapsell`
6. Open `Project > Export...`. In your Android preset; enable the "Use Custom Build" and "Godot Tapsell" options.![Export Menu](images/ExportMenu.png)
## Usage
Specify your appid in the `Tapsell.gd` file.### Video ad
Anywhere in your code:
```gd
Tapsell.request_video_ad("")
```
Finally, in a `video_ad_request_response` [signal handler](https://docs.godotengine.org/en/3.6/getting_started/step_by_step/signals.html#connecting-a-signal-via-code) you can:
```gd
func on_video_ad_request_response(zone: String, id: String):
Tapsell.show_video_ad(id)
```### Standard banner ad
Anywhere in your code:
```gd
Tapsell.create_banner_frame(width, height, gravity)
Tapsell.request_banner_ad("", banner_type)# Example:
Tapsell.create_banner_frame(320, 150, Tapsell.GRAVITY_TOP)
Tapsell.request_banner_ad("", Tapsell.BANNER_TYPE_320x50)
```
Then, in a `banner_ad_request_response` [signal handler](https://docs.godotengine.org/en/3.6/getting_started/step_by_step/signals.html#connecting-a-signal-via-code):
```gd
func on_banner_ad_request_response(zone: String, id: String):
Tapsell.show_banner_ad(id)
```Finally, to close the banner do this anywhere in your code:
```gd
Tapsell.destroy_banner_ad(id)
```