Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #3 from WatchBeam/init
Browse files Browse the repository at this point in the history
Final cleanup and adding additional sample support
  • Loading branch information
edjamesmsft authored May 3, 2017
2 parents 8c1b94c + 2cca8a4 commit a25243b
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 13 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Beam Interactivity C++ SDK

The C++ Interactivity SDK supports client-side development with Beam Interactivity.
If you'd like to checkout the [API documentation](https://dev.beam.pro/reference/interactive/cplusplus/index.html), feel free to
take a look around. You can also take a peek at the [Xbox console sample](https://github.com/WatchBeam/interactive-sdk-cpp/Samples/Xbox) for a
simple example of an end-to-end integration.

## Release Notes

Expand Down Expand Up @@ -36,7 +39,7 @@ support the Xbox platform.
Is there a feature missing that you'd like to see, or have you found a bug that you
have a fix for? Do you have an idea or just interest in helping out in building the
library? Let us know and we'd love to work with you. For a good starting point on where
we are headed and feature ideas, take a look at our [requested features and bugs](https://github.com/WatchBeam/interactive-sdk-cpp/issues) or [backlog](https://github.com/WatchBeam/interactive-sdk-cpp/projects/1).
we are headed and feature ideas, take a look at our [requested features and bugs](https://github.com/WatchBeam/interactive-sdk-cpp/issues) or [backlog](https://github.com/WatchBeam/interactive-sdk-cpp/backlog.md).

Big or small we'd like to take your contributions to help improve the Beam Interactivity
API for everyone.
Expand All @@ -52,10 +55,9 @@ to do that is to open an issue in our [issue tracker](https://github.com/WatchBe

* [Beam](https://beam.pro/)
* [Developer Site](https://dev.beam.pro/)
* [Getting Started Guide](https://dev.beam.pro/reference/interactive/index.html#cpp_getting-started)
* [Interactivity SDK C# Repo](https://github.com/WatchBeam/interactive-sdk-cpp)
* [C++ API Documentation](https://dev.beam.pro/reference/interactive/cplusplus/index.html)
* [Issue Tracker](https://github.com/WatchBeam/interactive-sdk-cpp/issues)
* [Backlog](https://github.com/WatchBeam/interactive-sdk-cpp/projects/1)
* [Backlog](https://github.com/WatchBeam/interactive-sdk-cpp/backlog.md)

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Samples/Xbox/ExampleScenes/blue_lasers.json
Binary file not shown.
Binary file added Samples/Xbox/ExampleScenes/blue_mines.json
Binary file not shown.
Binary file added Samples/Xbox/ExampleScenes/default.json
Binary file not shown.
Binary file added Samples/Xbox/ExampleScenes/red_lasers.json
Binary file not shown.
Binary file added Samples/Xbox/ExampleScenes/red_mines.json
Binary file not shown.
5 changes: 3 additions & 2 deletions Samples/Xbox/Interactivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace
const int c_voteYesCountLabel = 1004;
const int c_voteNoCountLabel = 1006;

const string_t s_interactiveVersion = L"19005";

const string_t s_defaultGroup = L"default";
const string_t s_redGroup = L"redGroup";
const string_t s_blueGroup = L"blueGroup";
Expand Down Expand Up @@ -271,9 +273,8 @@ void Sample::ToggleInteractivity()
if (nullptr != user)
{
m_beamManager->add_local_user(user);
string_t interactiveVersion = L"19005";

bool bProcessed = m_beamManager->initialize(interactiveVersion, false /*goInteractive*/);
m_beamManager->initialize(s_interactiveVersion, false /*goInteractive*/);
}
else
{
Expand Down
Binary file removed Samples/Xbox/Readme.docx
Binary file not shown.
54 changes: 54 additions & 0 deletions Samples/Xbox/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Xbox Sample

## Interactive Project

We don't have generic project import support in the [Interactive Studio](https://beam.pro/i/studio), so you'll have to
create your own project and incorporate it into the sample.

These json documents and screenshots represent the example interactive project used
in the Xbox sample. Please create a project similar in structure, or edit the sample
to reflect the interactive project you author.

Once you have a project created, replace the value of the the global variable

```
s_interactiveVersion
```

with your own interactive project version id in Interactivity.cpp. You can get
your project id in the Interactive Studio ([see example screenshot here](https://github.com/WatchBeam/interactive-sdk-cpp/blob/cleanup/Samples/Xbox/ExampleScenes/Screenshots/interactive_project_id.png)).

## Building and Running

Make sure you've run

```
$ git submodule update --init --recursive
```

from the root of the repo before building the project. Once you've initialized the submodules,
open Interactivity.sln, set your target platform to Durango, then hit build! You should be good to go.

When you're ready to run the sample, make sure you have a signed-in Xbox LIVE account that has
a linked Beam account, with permissions to the interactive project (we recommend using a
dedicated account for development, whether that's your personal account or a test account). When
you run the sample, have a browser pulled up viewing the Beam channel associated with that Xbox
LIVE account.

When you've hit "initialize interactivity" and then "go interactive" in the sample, your channel
should now have interactive buttons displayed and ready for participant input.


## Questions, Concerns, Issues

If you run into any issues, feel free to reach out via our [issues tracker](https://github.com/WatchBeam/interactive-sdk-cpp/issues), or check out our
[C++ API Documentation](https://dev.beam.pro/reference/interactive/cplusplus/index.html).


### Quick Links

* [Beam](https://beam.pro/)
* [Developer Site](https://dev.beam.pro/)
* [C++ API Documentation](https://dev.beam.pro/reference/interactive/cplusplus/index.html)
* [Issue Tracker](https://github.com/WatchBeam/interactive-sdk-cpp/issues)
* [Backlog](https://github.com/WatchBeam/interactive-sdk-cpp/backlog.md)
2 changes: 1 addition & 1 deletion Source/Services/Beam/beam_manager_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ beam_manager_impl::beam_manager_impl() :
m_serverTimeOffset(std::chrono::milliseconds(0))
{
logger::create_logger();
logger::get_logger()->set_log_level(log_level::debug);
logger::get_logger()->set_log_level(log_level::error);
logger::get_logger()->add_log_output(std::make_shared<debug_output>());
}

Expand Down
4 changes: 0 additions & 4 deletions Source/Services/Beam/beam_participant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@ beam_participant_impl::update(web::json::value json, bool overwrite)
{
if (json.has_field(RPC_ETAG))
{
if (0 == m_etag.compare(json[RPC_ETAG].as_string()))
{
LOGS_ERROR << L"New etag same as old (" << m_etag << L")";
}
m_etag = json[RPC_ETAG].as_string();
}
else if (overwrite)
Expand Down
7 changes: 5 additions & 2 deletions backlog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Backlog for the C++ Interactivity SDK

This document lists the current work being tracked for the C++ interactivity SDK. We're constantly investigating, listening to feedback and making improvements, so check back in as we develop!
This document lists the current work being tracked for the C++ interactivity SDK. We're always
investigating, listening to feedback and making improvements, so check back in as we develop!

These tasks are not listed in priority order - take a peek at our release notes for updates as we work through these work items.
The tasks below are not listed in priority order - take a peek at our release notes for updates
as we work through these work items.


## Features
Expand All @@ -24,5 +26,6 @@ These tasks are not listed in priority order - take a peek at our release notes
* More robust retry logic
* Improved performance of json message parsing
* Re-incorporate Unit Tests on a platform-agnostic framework
* Improved thread safety, multi-threading and parallelization - refactor already underway!

### Bugs

0 comments on commit a25243b

Please sign in to comment.