← Back to gallery
Knowing poster

Project walkthrough

Knowing

Explore the concept, hints, and starter code for this Nic Cage inspired build.

Project Title: “Knowing the Console: Uncovering Data with the Console API”

Description:

In this project, we merge the suspenseful and mysterious elements of Knowing with the powerful capabilities of the Console API. Knowing follows Professor John Koestler as he deciphers a cryptic message predicting catastrophic events. Similarly, this project will guide users through an interactive journey of uncovering hidden data and debugging information using the Console API, providing insights and revelations.

Features:

  1. Data Exploration: Use the Console API to display and analyze hidden data and messages, emulating the process of deciphering cryptic messages.
  2. Interactive Debugging: Implement interactive debugging techniques to help users understand and interact with the data, mirroring the investigative approach of the film.
  3. Thematic Design: Create a dark and intriguing design that reflects the suspenseful atmosphere of Knowing.

Starting Code:

Beginner Hints:

  • Create a single index.html file.
  • Copy the full HTML code block into that file.
  • Open index.html in your browser. If something doesn’t work, try a local server like python -m http.server.
  • Open DevTools Console to spot errors and typos quickly.

Here’s a basic setup to get you started. This includes the initial HTML, CSS, and JavaScript to integrate the Console API and create an interactive data exploration experience.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Knowing the Console</title>
<style>
    body {
        font-family: Arial, sans-serif;
        background-color: #111;
        color: #fff;
        text-align: center;
        padding: 20px;
    }

    h1 {
        color: #ff4500;
    }

    button {
        background-color: #ff4500;
        color: white;
        border: none;
        padding: 10px 20px;
        font-size: 16px;
        cursor: pointer;
        margin: 5px;
    }

    #output {
        margin-top: 20px;
        font-size: 18px;
        white-space: pre-wrap;
        text-align: left;
    }
</style>
</head>
<body>
    <h1>Knowing the Console</h1>
    <p>Uncover hidden data and messages using the Console API!</p>
    <button id="revealBtn">Reveal Data</button>
    <div id="output"></div>
<script>
    document.getElementById('revealBtn').addEventListener('click', () => {
        const hiddenData = [
            "42", "The Answer to the Ultimate Question of Life, the Universe, and Everything",
            "19.99", "Price of the prophecy book at the old bookstore",
            "3.14", "Approximate value of Pi"
        ];

        console.group('Hidden Data Revealed');
        hiddenData.forEach((item, index) => {
            if (index % 2 === 0) {
                console.log(`Value: ${item}`);
            } else {
                console.log(`Description: ${item}`);
            }
        });
        console.groupEnd();

        document.getElementById('output').innerText = hiddenData.join('
');
    });
</script>
</body>
</html>

References:

Praise Cage! Embark on this coding adventure and create an interactive experience that uses the Console API to uncover hidden data and messages, inspired by the mysterious and suspenseful film Knowing.