commit 435f026f4e09ffcdfd86d6b60f3548bd3327af74
Author: root <root@hub.scroll.pub>
Date: 2024-12-28 05:09:50 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..76211fe
--- /dev/null
+++ b/body.html
@@ -0,0 +1,16 @@
+<header>
+ <h1>Mario Jump</h1>
+ <p>Help Mario jump over obstacles and collect coins!</p>
+</header>
+<main>
+ <div id="game-container">
+ <div id="mario"></div>
+ <div id="obstacle"></div>
+ <div id="coin"></div>
+ </div>
+ <div id="score">Score: 0</div>
+ <button id="start-btn">Start Game</button>
+</main>
+<footer>
+ <p>Use the spacebar to jump. Good luck!</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..a672529
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://mariojump.scroll.pub
+metaTags
+editButton /edit.html
+title Mario Jump - A Simple Platformer Game
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..91408e1
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "cca49baf-f44d-47f9-b237-43f5809ffb02",
+ "object": "chat.completion",
+ "created": 1735362577,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nmariojump.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://mariojump.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Mario Jump - A Simple Platformer Game\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Mario Jump</h1>\n <p>Help Mario jump over obstacles and collect coins!</p>\n</header>\n<main>\n <div id=\"game-container\">\n <div id=\"mario\"></div>\n <div id=\"obstacle\"></div>\n <div id=\"coin\"></div>\n </div>\n <div id=\"score\">Score: 0</div>\n <button id=\"start-btn\">Start Game</button>\n</main>\n<footer>\n <p>Use the spacebar to jump. Good luck!</p>\n</footer>\n---style.css---\nbody {\n font-family: 'Arial', sans-serif;\n margin: 0;\n padding: 0;\n background-color: #87CEEB;\n color: #333;\n text-align: center;\n}\n\nheader {\n background-color: #FF4500;\n padding: 20px;\n color: white;\n}\n\nmain {\n padding: 20px;\n}\n\n#game-container {\n position: relative;\n width: 100%;\n height: 300px;\n background-color: #32CD32;\n border: 5px solid #8B4513;\n overflow: hidden;\n margin: 20px auto;\n}\n\n#mario {\n position: absolute;\n bottom: 0;\n left: 50px;\n width: 50px;\n height: 50px;\n background-color: #FF0000;\n border-radius: 50%;\n}\n\n#obstacle {\n position: absolute;\n bottom: 0;\n right: -50px;\n width: 50px;\n height: 50px;\n background-color: #8B4513;\n}\n\n#coin {\n position: absolute;\n top: 50px;\n right: -50px;\n width: 30px;\n height: 30px;\n background-color: #FFD700;\n border-radius: 50%;\n}\n\n#score {\n font-size: 24px;\n margin: 20px 0;\n}\n\nbutton {\n padding: 10px 20px;\n font-size: 18px;\n background-color: #FF4500;\n color: white;\n border: none;\n cursor: pointer;\n border-radius: 5px;\n}\n\nbutton:hover {\n background-color: #FF6347;\n}\n\nfooter {\n background-color: #333;\n color: white;\n padding: 10px;\n position: fixed;\n bottom: 0;\n width: 100%;\n}\n---script.js---\nlet mario = document.getElementById('mario');\nlet obstacle = document.getElementById('obstacle');\nlet coin = document.getElementById('coin');\nlet startBtn = document.getElementById('start-btn');\nlet score = 0;\nlet gameInterval;\n\nfunction jump() {\n if (mario.classList != 'jump') {\n mario.classList.add('jump');\n setTimeout(() => {\n mario.classList.remove('jump');\n }, 500);\n }\n}\n\nfunction startGame() {\n score = 0;\n document.getElementById('score').innerText = 'Score: ' + score;\n obstacle.style.right = '-50px';\n coin.style.right = '-50px';\n gameInterval = setInterval(() => {\n let obstaclePosition = obstacle.offsetRight;\n let coinPosition = coin.offsetRight;\n let marioPosition = mario.offsetBottom;\n\n if (obstaclePosition < 100 && obstaclePosition > 50 && marioPosition <= 50) {\n clearInterval(gameInterval);\n alert('Game Over! Your score: ' + score);\n }\n\n if (coinPosition < 100 && coinPosition > 50 && marioPosition <= 50) {\n score++;\n document.getElementById('score').innerText = 'Score: ' + score;\n coin.style.right = '-50px';\n }\n\n obstacle.style.right = (obstaclePosition + 5) + 'px';\n coin.style.right = (coinPosition + 5) + 'px';\n }, 20);\n}\n\ndocument.addEventListener('keydown', (event) => {\n if (event.code === 'Space') {\n jump();\n }\n});\n\nstartBtn.addEventListener('click', startGame);\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 245,
+ "completion_tokens": 982,
+ "total_tokens": 1227,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 245
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..73015b5
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# mariojump.scroll.pub
+Website generated by DeepSeek from prompt: create a website of a simple game like super mario
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..e85ae87
--- /dev/null
+++ b/script.js
@@ -0,0 +1,49 @@
+let mario = document.getElementById('mario');
+let obstacle = document.getElementById('obstacle');
+let coin = document.getElementById('coin');
+let startBtn = document.getElementById('start-btn');
+let score = 0;
+let gameInterval;
+
+function jump() {
+ if (mario.classList != 'jump') {
+ mario.classList.add('jump');
+ setTimeout(() => {
+ mario.classList.remove('jump');
+ }, 500);
+ }
+}
+
+function startGame() {
+ score = 0;
+ document.getElementById('score').innerText = 'Score: ' + score;
+ obstacle.style.right = '-50px';
+ coin.style.right = '-50px';
+ gameInterval = setInterval(() => {
+ let obstaclePosition = obstacle.offsetRight;
+ let coinPosition = coin.offsetRight;
+ let marioPosition = mario.offsetBottom;
+
+ if (obstaclePosition < 100 && obstaclePosition > 50 && marioPosition <= 50) {
+ clearInterval(gameInterval);
+ alert('Game Over! Your score: ' + score);
+ }
+
+ if (coinPosition < 100 && coinPosition > 50 && marioPosition <= 50) {
+ score++;
+ document.getElementById('score').innerText = 'Score: ' + score;
+ coin.style.right = '-50px';
+ }
+
+ obstacle.style.right = (obstaclePosition + 5) + 'px';
+ coin.style.right = (coinPosition + 5) + 'px';
+ }, 20);
+}
+
+document.addEventListener('keydown', (event) => {
+ if (event.code === 'Space') {
+ jump();
+ }
+});
+
+startBtn.addEventListener('click', startGame);
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..52fd73d
--- /dev/null
+++ b/style.css
@@ -0,0 +1,85 @@
+body {
+ font-family: 'Arial', sans-serif;
+ margin: 0;
+ padding: 0;
+ background-color: #87CEEB;
+ color: #333;
+ text-align: center;
+}
+
+header {
+ background-color: #FF4500;
+ padding: 20px;
+ color: white;
+}
+
+main {
+ padding: 20px;
+}
+
+#game-container {
+ position: relative;
+ width: 100%;
+ height: 300px;
+ background-color: #32CD32;
+ border: 5px solid #8B4513;
+ overflow: hidden;
+ margin: 20px auto;
+}
+
+#mario {
+ position: absolute;
+ bottom: 0;
+ left: 50px;
+ width: 50px;
+ height: 50px;
+ background-color: #FF0000;
+ border-radius: 50%;
+}
+
+#obstacle {
+ position: absolute;
+ bottom: 0;
+ right: -50px;
+ width: 50px;
+ height: 50px;
+ background-color: #8B4513;
+}
+
+#coin {
+ position: absolute;
+ top: 50px;
+ right: -50px;
+ width: 30px;
+ height: 30px;
+ background-color: #FFD700;
+ border-radius: 50%;
+}
+
+#score {
+ font-size: 24px;
+ margin: 20px 0;
+}
+
+button {
+ padding: 10px 20px;
+ font-size: 18px;
+ background-color: #FF4500;
+ color: white;
+ border: none;
+ cursor: pointer;
+ border-radius: 5px;
+}
+
+button:hover {
+ background-color: #FF6347;
+}
+
+footer {
+ background-color: #333;
+ color: white;
+ padding: 10px;
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+}
\ No newline at end of file