Untitled

 avatar
unknown
plain_text
2 months ago
1.4 kB
6
Indexable
import React, { useState } from "react";
import VoxelWorld from "../components/game/VoxelWorld";

export default function Game() {
  const [started, setStarted] = useState(false);

  const handleStart = () => {
    setStarted(true);
  };

  return (
    <div className="relative w-screen h-screen overflow-hidden bg-black font-body">
      {/* Game World */}
      <VoxelWorld started={started} />

      {/* Start Screen */}
      {!started && (
        <div className="absolute inset-0 flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm z-20">
          
          <h1 className="font-display text-5xl md:text-7xl font-black text-white mb-3 tracking-tight">
            VOXEL
          </h1>

          <p className="font-display text-lg tracking-[0.3em] text-primary mb-10">
            WORLD
          </p>

          <button
            onClick={handleStart}
            className="px-10 py-4 bg-primary text-white font-display text-sm tracking-widest uppercase rounded-lg hover:opacity-80 transition-all duration-200"
          >
            Enter World
          </button>

          <div className="text-xs text-white/40 font-body space-y-1 text-center mt-4">
            <p>WASD — Move · Mouse — Look</p>
            <p>Left Click — Break · Right Click — Place</p>
            <p>Scroll / 1-9 — Select · Space — Jump</p>
          </div>

        </div>
      )}
    </div>
  );
}
Editor is loading...
Leave a Comment