Git Product home page Git Product logo

data-driven-dave's Introduction

New Relic logo

Introduction

If you don't already know why you need a monitoring and observability solution, it can be challenging to find an example that is illustrative, compelling, and engaging. There are literally thousands of "monitor this fake take-out food website" examples and - while they certainly show a valid real-world example of something you might want to monitor - they are usually a real yawner.

What if - and hear us out - you could play around with a monitoring solution AND PLAY A VIDEO GAME at the same time?!? WE KNOW, RIGHT?!?

That's what this example is all about. Install a game, set it up in New Relic, and then play the game to see your stats.

Dangerous Dave was a classic 1980's side-scroller style game that many spent hours playing when we should have been doing productive work. Now we've turned the tables, making Dave help with our actual work.

The point of this project is two-fold:

  1. To give folks a fun way to kick the tires on New Relic monitoring;
  2. and to show how easy it is to instrument a custom application, capture and collect non-standard metrics, and display them in a meaningful way.

We hope you enjoy!

Prerequisites

  • You'll need a New Relic account. The good news is that you can create a free account here (no credit card required).

  • To compile the program, you must have Python 3 installed.

  • You will need to install the following packages using pip3 before starting the program. You may wish to install these packages in a virtual environment.

    • pygame
    • newrelic

    Run this command to install all the required packages:
    pip3 install -r requirements.txt

  • New Relic instrumentation

    • Update the newrelic.ini file by replacing INSERT_YOUR_INGEST_LICENSE_KEY_HERE with your account's ingest license key.
    • Edit the game_stats.json file by replacing "YOUR_ACCOUNT_ID" with your 7-digit account ID. THERE ARE EIGHT (8) PLACES TO MAKE THIS CHANGE, NOT JUST ONE.
    • Copy the modified JSON and import the dashboard into your New Relic account.
      • If this will be the first dashboard in your account, the Import dashboard button will not appear on the screen. You will first need to Create a new dashboard.

Refer to our detailed instructions for step by step info, pictures, troubleshooting, etc.

Running the program

  • You can run either of the main python scripts located at the root of the repository: python3 main_oo.py or python3 main_fun.py. This should start the game immediately.
  • Note: Only main_fun.py has been instrumented to send data to New Relic.

Playing the game

Here are some hints to play the game:

  • To start the game play, hit the spacebar.
  • To end a game in the middle, hit esc.
  • To be able to get through the door on each level, you need to collect the gold chalice / trophy.
  • Some statistics (like the Items Collected) will show on the New Relic dashboard immediately. Others (like the # of games played or top score) won't update until you completely
  • Movement:
    • left/right: walk/fly/jump left or right
    • up: jump
  • Detailed gameplay walkthroughs can be found on John Romero's page and GameSpot

Misc

  • The project is almost a identical replica - the only thing that wasn't implemented was the enemies, due to the project's deadline.
  • Yes, we plan on making updates in the future.

New Relic logo icon New Relic Data Driven Dave Challenge

If you've found this repo because of an in-booth contest at a conference, you have the chance to win a cool prize in 3 simple steps:

  1. Clone this repository, and complete the New Relic instrumentation prerequisites.
  2. Play the game, and stop by the New Relic booth to show off your game stats dashboard. (you will be rewarded for this effort)
  1. If you have the high score, you win the grand prize!

Dangerous Dave Replica

(this is the original description you can find over on https://github.com/mwolfart/dangerous-dave) We remain deeply endebted to them for their effort to bring this classic game to life on the python platform! - Rachel and Leon)

  • This project is a replica of the 1988 DOS game Dangerous Dave, made by John Romero. The project was built in Python along with a team of three students (Arthur Medeiros, Guilherme Cattani and me), as a course assignment.
  • The goal of the project was to study and practice the three types of programming paradigms: imperative, object-oriented and functional. To achieve this, we picked Python as a language since it can perform all three types of tasks in a fairly good way.

data-driven-dave's People

Contributors

mwolfart avatar devreldragon avatar harrykimpel avatar leonadato avatar guicattani avatar arthurmedeiros avatar petcompufrgs avatar zmrfzn 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.