How to create a GotCHA Game

Are you a game developer? This page is for you!

GotCHA is all about having new games in the platform. If you'd like to develop a game for us, this is what you should keep in mind.

We have two requirements from your end:

  1. A public URL containing the web app running the game

  2. The game should use our pre-established interface

Essentially, our CAPTCHA imports a URL that has a game, and will show that game to the end users. The game must execute according to our interface, to allow us to check whether the game was solved correctly or not.

The games will be embedded in an iframe as a CAPTCHA. The iframe default dimensions are [360; 500] but the challenge window size is customizable so you need to support dynamic sizing.

Installation

You should add the following dependency in your package.json

"dependencies": {
  "@gotcha-widget/lib": "github:gotcha-labs/gotcha-widget-lib#master"
}
// Some code

Supported Programming Languages

You can use any SDK and any language of your choice. You can code in Javascript, Rust, pure HTML5, it's up to you! You have to make sure that the game runs on a browser and has an exposed URL. Moreover, keep in mind that the games should be lightweight and use our predefined interface.

GotCHA Interface

There are three possible outcomes in our interface:

  1. Game finished

    • Puzzle was correctly finished

    • Puzzle was not properly solved

  2. Game has a timeout

  3. Game has an error

Usage

The library exposes several functions and types to handle captcha challenge responses and events.

Basic Usage

The challenge implementation can be hosted anywhere. The challenge is defined as a URL, default width, and default height. The Gotcha implementation will render your challenge inside an iframe by your given URL. The src attribute of the iframe will look something like this

https://your-challenge.com/tik-tak-toe.html?k=website_api_key&hl=en-US&theme=dark&size=normal&badge=bottomright&sv=https%3A%2F%2Fapi.gotcha.land

For testing purposes, you can simply use "k=api_test_key", but please read it from the URL. Concretely,

IMPORTANT NOTE: You do not need the secret to complete these steps.

Last updated