GithubHelp home page GithubHelp logo

anthrax3 / android-nearby-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlearchive/android-nearby-cpp

0.0 0.0 0.0 240 KB

Nearby Connections sample using the Play Games C++ SDK

Home Page: https://developers.google.com/games/services/android/nearby

License: Apache License 2.0

CMake 2.10% C++ 70.48% C 13.28% Java 14.15%

android-nearby-cpp's Introduction

Google Nearby Connections C++ Samples

Copyright (C) 2015 Google LLC

Contents

NearbyConnectionsNative: The sample demonstrates real time multiplayer game on C++ Nearby Connection interface SDK.

  • Create nearby_connection interface gpg::NearbyConnections::Builder
  • Connect to other peers via StartAdvertising(), StartDiscovery()
  • Send messages with SendReliableMessage() and SendUnreliableMessage()
  • Clean up Google Nearby Connection with Stop()
  • Other in-game communication like relaying connections/messages

How to run a sample

For generic play game related instruction, please follow steps described in Getting Started for C++

The build is gradle based. To build from the command line run:

gradlew assembleDebug

In Android Studio, sometimes the first sync of the project cannot find the Android.mk for gpg-sdk. To fix this open the terminal window in Android Studio and run

gradlew gpg-sdk:download_and_stage_gpg_sdk

Specific Steps for This App

  1. Build App
  2. Install on phone
  3. Set ONE and ONLY ONE phone/device to be advertising
  4. All other devices to be discovering after advertising is ready (indicator is "stop" button is enabled)
  5. Monitor bottom of the UI for "Connected Clients"; once anyone connected, it should be bigger than 0, "Play Game" should be enabled; from here, you could play it at any time
  6. While playing, your own score and other player's scores should be visible to you at the bottom of the screen note: play time is 30 second by default, and was hard coded as GAME_DURATION in header file

Support

First of all, take a look at our troubleshooting guide. Most setup issues can be solved by following this guide.

If your question is not answered by the troubleshooting guide, we encourage you to post your question to stackoverflow.com. Our team answers questions there reguarly.

android-nearby-cpp's People

Contributors

claywilkinson avatar ggfan avatar hak avatar naokigoogle avatar samtstern avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.