Changes to fort2d.scroll.pub

root
root
25 days ago
Initial commit
body.html
Changed around line 1
+
+
+
+
+
+
+
+
+

Fort2D

+

Battle Royale in 2D Glory

+
+
+
+
+
+
+
+ Health: 100
+ Ammo: 30
+
+
+
+
+
+

Controls

+
+
+ W A S D
+ Move
+
+
+ SPACE
+ Jump
+
+
+ CLICK
+ Shoot
+
+
+ Q
+ Build
+
+
+
+
+
+
+

Fort2D - An Epic 2D Battle Royale Experience

+
+
+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://fort2d.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Fort2D - Epic 2D Fortnite Browser Game
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_015hKuXRTUGX3tEWSSHDJxAk",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Let me create a simple but engaging 2D Fortnite-style browser game website.\n\n---domain---\nfort2d.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://fort2d.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Fort2D - Epic 2D Fortnite Browser Game\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n \n
\n\n
\n
\n

Fort2D

\n

Battle Royale in 2D Glory

\n \n
\n\n
\n \n
\n
\n Health: 100\n Ammo: 30\n
\n
\n
\n\n
\n

Controls

\n
\n
\n W A S D\n Move\n
\n
\n SPACE\n Jump\n
\n
\n CLICK\n Shoot\n
\n
\n Q\n Build\n
\n
\n
\n
\n\n\n\n---style.css---\n:root {\n --primary-color: #2196f3;\n --secondary-color: #ff9800;\n --background-color: #1a1a1a;\n --text-color: #ffffff;\n --accent-color: #4caf50;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n background: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\nheader {\n padding: 1rem;\n background: rgba(0, 0, 0, 0.8);\n backdrop-filter: blur(10px);\n position: fixed;\n width: 100%;\n z-index: 100;\n}\n\nnav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n color: var(--primary-color);\n text-shadow: 0 0 10px rgba(33, 150, 243, 0.5);\n}\n\n.nav-links a {\n color: var(--text-color);\n text-decoration: none;\n margin-left: 2rem;\n transition: color 0.3s ease;\n}\n\n.nav-links a:hover {\n color: var(--primary-color);\n}\n\n#hero {\n height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: linear-gradient(45deg, #1a1a1a, #2c3e50);\n position: relative;\n overflow: hidden;\n}\n\n#hero::before {\n content: '';\n position: absolute;\n width: 200%;\n height: 200%;\n background: radial-gradient(circle, transparent 20%, #1a1a1a 70%);\n animation: pulse 4s ease-in-out infinite;\n}\n\n@keyframes pulse {\n 0% { transform: scale(1); opacity: 0.5; }\n 50% { transform: scale(1.2); opacity: 0.7; }\n 100% { transform: scale(1); opacity: 0.5; }\n}\n\nh1 {\n font-size: 4rem;\n margin-bottom: 1rem;\n color: var(--primary-color);\n text-shadow: 0 0 20px rgba(33, 150, 243, 0.7);\n z-index: 1;\n}\n\n.cta-button {\n padding: 1rem 2rem;\n font-size: 1.2rem;\n background: var(--secondary-color);\n border: none;\n border-radius: 50px;\n color: white;\n cursor: pointer;\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n z-index: 1;\n}\n\n.cta-button:hover {\n transform: scale(1.1);\n box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);\n}\n\n#game-container {\n display: none;\n width: 100%;\n height: 100vh;\n position: relative;\n}\n\n#gameCanvas {\n width: 100%;\n height: 100%;\n background: #2c3e50;\n}\n\n#game-ui {\n position: absolute;\n top: 20px;\n left: 20px;\n background: rgba(0, 0, 0, 0.7);\n padding: 1rem;\n border-radius: 10px;\n}\n\n.controls-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 2rem;\n padding: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.control-item {\n background: rgba(255, 255, 255, 0.1);\n padding: 1rem;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n transition: transform 0.3s ease;\n}\n\n.control-item:hover {\n transform: translateY(-5px);\n}\n\n.key {\n font-size: 1.2rem;\n font-weight: bold;\n color: var(--secondary-color);\n}\n\nfooter {\n background: rgba(0, 0, 0, 0.8);\n padding: 2rem;\n text-align: center;\n}\n\n@media (max-width: 768px) {\n .nav-links {\n display: none;\n }\n \n h1 {\n font-size: 2.5rem;\n }\n \n .controls-grid {\n grid-template-columns: 1fr;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const playButton = document.getElementById('playButton');\n const gameContainer = document.getElementById('game-container');\n const canvas = document.getElementById('gameCanvas');\n const ctx = canvas.getContext('2d');\n \n let gameStarted = false;\n let player = {\n x: 100,\n y: 100,\n width: 30,\n height: 30,\n speed: 5,\n health: 100\n };\n\n playButton.addEventListener('click', startGame);\n\n function startGame() {\n if (gameStarted) return;\n gameStarted = true;\n document.getElementById('hero').style.display = 'none';\n gameContainer.style.display = 'block';\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n gameLoop();\n setupControls();\n }\n\n function gameLoop() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n drawPlayer();\n if (gameStarted) {\n requestAnimationFrame(gameLoop);\n }\n }\n\n function drawPlayer() {\n ctx.fillStyle = '#2196f3';\n ctx.fillRect(player.x, player.y, player.width, player.height);\n }\n\n function setupControls() {\n const keys = {};\n \n window.addEventListener('keydown', (e) => {\n keys[e.key] = true;\n updatePlayerPosition(keys);\n });\n\n window.addEventListener('keyup', (e) => {\n keys[e.key] = false;\n });\n }\n\n function updatePlayerPosition(keys) {\n if (keys['w'] || keys['ArrowUp']) {\n player.y = Math.max(0, player.y - player.speed);\n }\n if (keys['s'] || keys['ArrowDown']) {\n player.y = Math.min(canvas.height - player.height, player.y + player.speed);\n }\n if (keys['a'] || keys['ArrowLeft']) {\n player.x = Math.max(0, player.x - player.speed);\n }\n if (keys['d'] || keys['ArrowRight']) {\n player.x = Math.min(canvas.width - player.width, player.x + player.speed);\n }\n }\n\n window.addEventListener('resize', () => {\n if (gameStarted) {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n }\n });\n});\n\n---end---\n\nThis creates a sleek, modern website for a 2D Fortnite-style game with:\n\n1. Responsive design that works on all devices\n2. Beautiful animations and visual effects\n3. Simple game implementation with basic movement controls\n4. Clean, semantic HTML structure\n5. Modern CSS with variables, animations, and gradients\n6. Interactive JavaScript for game logic\n7. Proper accessibility considerations\n8. Mobile-friendly navigation\n9. Professional looking UI elements\n\nThe game itself is just a basic implementation with movement controls, but the structure is there to build upon it further. The website features a stunning hero section with animated background, clear navigation, game controls section, and a professional footer."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 278,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2755
+ }
+ }
readme.scroll
Changed around line 1
+ # fort2d.scroll.pub
+ Website generated by Claude from prompt: Fortnite 2d game
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const playButton = document.getElementById('playButton');
+ const gameContainer = document.getElementById('game-container');
+ const canvas = document.getElementById('gameCanvas');
+ const ctx = canvas.getContext('2d');
+
+ let gameStarted = false;
+ let player = {
+ x: 100,
+ y: 100,
+ width: 30,
+ height: 30,
+ speed: 5,
+ health: 100
+ };
+
+ playButton.addEventListener('click', startGame);
+
+ function startGame() {
+ if (gameStarted) return;
+ gameStarted = true;
+ document.getElementById('hero').style.display = 'none';
+ gameContainer.style.display = 'block';
+ canvas.width = window.innerWidth;
+ canvas.height = window.innerHeight;
+ gameLoop();
+ setupControls();
+ }
+
+ function gameLoop() {
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ drawPlayer();
+ if (gameStarted) {
+ requestAnimationFrame(gameLoop);
+ }
+ }
+
+ function drawPlayer() {
+ ctx.fillStyle = '#2196f3';
+ ctx.fillRect(player.x, player.y, player.width, player.height);
+ }
+
+ function setupControls() {
+ const keys = {};
+
+ window.addEventListener('keydown', (e) => {
+ keys[e.key] = true;
+ updatePlayerPosition(keys);
+ });
+
+ window.addEventListener('keyup', (e) => {
+ keys[e.key] = false;
+ });
+ }
+
+ function updatePlayerPosition(keys) {
+ if (keys['w'] || keys['ArrowUp']) {
+ player.y = Math.max(0, player.y - player.speed);
+ }
+ if (keys['s'] || keys['ArrowDown']) {
+ player.y = Math.min(canvas.height - player.height, player.y + player.speed);
+ }
+ if (keys['a'] || keys['ArrowLeft']) {
+ player.x = Math.max(0, player.x - player.speed);
+ }
+ if (keys['d'] || keys['ArrowRight']) {
+ player.x = Math.min(canvas.width - player.width, player.x + player.speed);
+ }
+ }
+
+ window.addEventListener('resize', () => {
+ if (gameStarted) {
+ canvas.width = window.innerWidth;
+ canvas.height = window.innerHeight;
+ }
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #2196f3;
+ --secondary-color: #ff9800;
+ --background-color: #1a1a1a;
+ --text-color: #ffffff;
+ --accent-color: #4caf50;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ background: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+ }
+
+ header {
+ padding: 1rem;
+ background: rgba(0, 0, 0, 0.8);
+ backdrop-filter: blur(10px);
+ position: fixed;
+ width: 100%;
+ z-index: 100;
+ }
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: var(--primary-color);
+ text-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
+ }
+
+ .nav-links a {
+ color: var(--text-color);
+ text-decoration: none;
+ margin-left: 2rem;
+ transition: color 0.3s ease;
+ }
+
+ .nav-links a:hover {
+ color: var(--primary-color);
+ }
+
+ #hero {
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ background: linear-gradient(45deg, #1a1a1a, #2c3e50);
+ position: relative;
+ overflow: hidden;
+ }
+
+ #hero::before {
+ content: '';
+ position: absolute;
+ width: 200%;
+ height: 200%;
+ background: radial-gradient(circle, transparent 20%, #1a1a1a 70%);
+ animation: pulse 4s ease-in-out infinite;
+ }
+
+ @keyframes pulse {
+ 0% { transform: scale(1); opacity: 0.5; }
+ 50% { transform: scale(1.2); opacity: 0.7; }
+ 100% { transform: scale(1); opacity: 0.5; }
+ }
+
+ h1 {
+ font-size: 4rem;
+ margin-bottom: 1rem;
+ color: var(--primary-color);
+ text-shadow: 0 0 20px rgba(33, 150, 243, 0.7);
+ z-index: 1;
+ }
+
+ .cta-button {
+ padding: 1rem 2rem;
+ font-size: 1.2rem;
+ background: var(--secondary-color);
+ border: none;
+ border-radius: 50px;
+ color: white;
+ cursor: pointer;
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
+ z-index: 1;
+ }
+
+ .cta-button:hover {
+ transform: scale(1.1);
+ box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
+ }
+
+ #game-container {
+ display: none;
+ width: 100%;
+ height: 100vh;
+ position: relative;
+ }
+
+ #gameCanvas {
+ width: 100%;
+ height: 100%;
+ background: #2c3e50;
+ }
+
+ #game-ui {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ background: rgba(0, 0, 0, 0.7);
+ padding: 1rem;
+ border-radius: 10px;
+ }
+
+ .controls-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 2rem;
+ padding: 2rem;
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .control-item {
+ background: rgba(255, 255, 255, 0.1);
+ padding: 1rem;
+ border-radius: 10px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ transition: transform 0.3s ease;
+ }
+
+ .control-item:hover {
+ transform: translateY(-5px);
+ }
+
+ .key {
+ font-size: 1.2rem;
+ font-weight: bold;
+ color: var(--secondary-color);
+ }
+
+ footer {
+ background: rgba(0, 0, 0, 0.8);
+ padding: 2rem;
+ text-align: center;
+ }
+
+ @media (max-width: 768px) {
+ .nav-links {
+ display: none;
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ }
+
+ .controls-grid {
+ grid-template-columns: 1fr;
+ }
+ }