Dance Of Irradiance

High-Level Project Summary

Dance of Irradiance is an HTML5 and JavaScript game in which you help our astronaut friend on a perilous mission near the surface of the sun! Your objective is to clean up space debris orbiting the sun while avoiding solar hazards. The game creatively displays solar irradiance and magnetic field strength data from the SDO Spacecraft and the Parker Solar Probe, respectively, by altering the number of solar flares and the frequency of coronal mass ejections based on this data. In essence, you are playing in an environment dictated by solar data. This provides an engaging experience with the sun, allowing people to experience the variation of its irradiance and magnetic field strength.

Detailed Project Description

Description and Tools Used:

Dance of Irradiance is an HTML5 and JavaScript game designed to creatively display solar irradiance and magnetic field data from the SDO Spacecraft and Parker Solar Probe, respectively. It uses the Phaser open source framework to make a Canvas and WebGL powered game that will run in a browser.

What Does It Do:

In this game you will be helping our astronaut friend on a perilous mission near the surface of the sun! Your objective is to clean up as much space debris orbiting the sun as possible. Collecting space debris in the danger zone will award 30 points per piece of debris, while collecting space debris elsewhere will award 10 points per piece of debris. However:

  • You must avoid the routine solar flares (influenced by solar irradiance data from the SDO Spacecraft) while attempting to collect the space debris
  • You must avoid the coronal mass ejections (influenced by magnetic field data from the Parker Solar Probe) by hiding in the space station
  • If you get too close to the sun you will enter the danger zone and lose health points

How Does it Work:

The game uses various mechanics to work including:

  • Astronaut Movement: The astronaut can move in any of the 4 keyboard directions (up, down, left, right). Each movement direction has a unique corresponding animation utilizing the astronaut's jetpack. Boosting the jetpack with spacebar makes your astronaut move even faster.
  • Danger Zone: The danger zone represents the area where the astronaut's heat shielding is overwhelmed by the sun and your health points (HP) start depleting. The danger zone occupies roughly the top 1/3 of the scene. The incentive for staying close to the sun and suffering the HP loss is the increased point value obtained from collecting space debris.
  • Astronaut Health: The astronaut starts with 100 HP. The astronaut will lose HP if they spend time too close to the sun (in the danger zone). The only way to restore HP is through Health Boosters.
  • Health Boosters: Health boosters restore 10 HP when the astronaut collects them. They are randomly spawned.
  • Astronaut Death: The astronaut can die in one of 3 ways: (1) running out of HP, (2) colliding with a solar flare, and (3) being caught by a coronal mass ejection. Death results in game over.
  • Space Debris: Space debris is generated 1 at a time at a random x-coordinate at the top of the screen. The space debris then falls towards the bottom of the screen. If you catch the debris within the danger zone, you get 30 points. If you catch the debris anywhere else, you get 10 points. Once you catch a piece of space debris, the position of the space debris resets at a random x-coordinate at the top of the screen. If you don't catch the space debris, it hurtles into the void of space! Don't worry though, the space debris reset for you to try and capture again. There is no penalty for not catching a piece of space debris...aside from your guilty conscience for letting space continue to be polluted.
  • Solar Flares and Coronal Mass Ejections: See below in the Space Agency Data section for a description of how these influence the gameplay.
  • Space Station: The only way for the astronaut to survive a coronal mass ejection is to hide in the shelter of their space station. The space station appears at a random location at a safe distance from the sun when a coronal mass ejection occurs.

What Benefits Does It Bring:

The game provides a quick, fun, and easy way for people to visually interact with solar data. The fact that the hazards you face in the game correspond to solar irradiance and magnetic field strength from actual solar data allow people to experience the variability within that solar data in an easy to understand format.

Space Agency Data

Space agency data used in this project includes:

  1. SDO Space Craft Irradiance Data: https://lasp.colorado.edu/eve/data_access/eve-one-minute-averages/index.html
  2. Parker Solar Probe Magnetic Field Data: http://research.ssl.berkeley.edu/data/psp/data/sci/fields/l2/mag_RTN/2020/03/

This data was integrated into game mechanics including solar flares and coronal mass ejections in the manner described below.

Solar Flares: Solar flares are one of the data display mechanisms used in the game. Solar flares represent irradiance, the power per unit area (mW/m^2) received from the sun in the form of electromagnetic radiation. In Dance of Irradiance, irradiance data was obtained from the SDO Spacecraft (see link below) and scaled to a number between 1 and 8. Solar flares are generated every 2 seconds, and the current scaled irradiance value determines the number of solar flares that appear on the screen at once. The more solar flares on the screen at once, the harder it is for the astronaut to dodge all of them. Hence, the perilousness of the astronaut's mission varies in real time with solar irradiance data. Getting hit by a solar flare will result in instant death for our poor astronaut.

Coronal Mass Ejections: Coronal mass ejections are the other data display mechanism used in the game. Coronal mass ejections represent magnetic field strength (measured in gauss), which controls the movement of heated plasma at the surface of the sun. In Dance of Irradiance, magnetic field strength data is obtained from the Parker Solar Probe (see link below) and normalized to a value between 1 and 100 (which corresponds to the chance of a large 'coronal loop' being generated in-game). A coronal mass ejection is generated whenever the scaled magnetic field strength value exceeds 100. Coronal mass ejections are so large that the astronaut cannot possibly dodge between the ejection particles. Getting caught in the coronal mass ejection will result in instant death for our poor astronaut.

Hackathon Journey

In one word, this hackathon journey was rewarding.

From a scientific standpoint, we learned lots about solar data - both how it is measured and what it represents. From a technical standpoint, we learned lots regarding version control and how to collaboratively use GitHub. Our troubleshooting skills were also thoroughly tested and developed.

Our team was inspired to choose this challenge because the sun is often just regarded as a constant. It rises, it shines, and it sets. It is difficult for most people to visualize just how dynamic the sun actually is.

Our approach to developing this project was collaborative, with constant goals established and then clear individual tasks assigned These individual areas/functions of the project were then collaboratively integrated into a whole functioning program. Once the functioning goal was achieved, we then brainstormed additional features we could add to the project (i.e., representing two data sources instead of just one). This process was repeated throughout the two-day period.

The fast paced nature of developing a program meant we made lots of mistakes and had to resolve these setbacks and challenges. Teamwork was the biggest solution to overcoming these challenges - getting different insights on a particular problem was essential to overcoming it. Proper documentation of our code also greatly aided this process - being able to revert to previous versions when something would break allowed us to quickly continue making progress.

References

Portions of code were obtained from:

Images were obtained from:

Tags

#game #solardata #parkersolarprobe #SDOspacecraft