← Back to gallery
Willys Wonderland poster

Project walkthrough

Willys Wonderland

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

Title: Animatronic Battle Logs with Willy’s Wonderland and Console API

Description:

Inspired by Nicolas Cage’s intense and action-packed role in Willy’s Wonderland, this project uses the Console API to create a web application that logs battles with animatronics. The application captures the themes of survival, relentless action, and eerie atmosphere, enabling users to interactively log events and view them in the console. This project demonstrates the practical use of the Console API to enhance debugging, logging, and user interaction.

Features:

  • Interactive Logging: Use the Console API to log battles and events interactively.
  • Dynamic Feedback: Provide visual feedback for logged events.
  • Thematic Design: Reflect the intense and eerie atmosphere of Willy’s Wonderland through the application’s design and interactions.

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.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Animatronic Battle Logs with Willy's Wonderland and Console API</title>
<style>
    body {
        font-family: Arial, sans-serif;
        background-color: #1c1c1c;
        color: #f0f0f0;
        text-align: center;
        padding: 50px;
    }
    .container {
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
        background-color: #2e2e2e;
        border: 1px solid #444;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }
    h1 {
        margin-bottom: 20px;
        color: #ff6347;
    }
    .controls {
        margin-top: 20px;
    }
    button {
        padding: 10px 20px;
        margin: 10px;
        border-radius: 5px;
        border: none;
        font-size: 16px;
        background-color: #007bff;
        color: white;
        cursor: pointer;
    }
    button:hover {
        background-color: #0056b3;
    }
</style>
</head>
<body>
    <div class="container">
        <h1>Animatronic Battle Logs</h1>
        <p>Log your battles with animatronics inspired by Willy's Wonderland.</p>

        <div class="controls">
            <button onclick="logEvent('Battle started')">Start Battle</button>
            <button onclick="logEvent('Animatronic defeated')">Defeat Animatronic</button>
            <button onclick="logEvent('Battle ended')">End Battle</button>
            <button onclick="viewLogs()">View Logs</button>
        </div>
    </div>
<script>
    const events = [];

    function logEvent(message) {
        const timestamp = new Date().toLocaleTimeString();
        const logMessage = `${timestamp}: ${message}`;
        events.push(logMessage);
        console.log(logMessage);
        alert(`Logged: ${message}`);
    }

    function viewLogs() {
        console.clear();
        console.log('Battle Logs:');
        events.forEach(event => console.log(event));
    }
</script>
</body>
</html>

References:

Project Overview:

This project captures the intense and eerie atmosphere of Willy’s Wonderland using the Console API to log and view battle events interactively. Users can log battles with animatronics and view the logs in the console, providing an engaging and interactive experience. The application demonstrates the practical use of the Console API for enhancing debugging, logging, and user interaction, reflecting the film’s themes of survival and relentless action. Embrace the intensity and determination of Nicolas Cage’s character to master the use of the Console API in web development. Praise Cage!