| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
- <meta name="theme-color" content="#1b1d22">
- <title>Blocky</title>
- <link rel="icon" href="img/module_icon.svg">
- <script src="../script/jquery.min.js"></script>
- <script src="../script/ao_module.js"></script>
- <link rel="stylesheet" href="css/style.css">
- <script type="importmap">
- {
- "imports": {
- "three": "./lib/three/three.module.min.js"
- }
- }
- </script>
- </head>
- <body>
- <canvas id="view"></canvas>
- <!-- ================= In-game HUD ================= -->
- <div id="hud" class="hidden">
- <div id="underwater"></div>
- <div id="hurt"></div>
- <div id="burning"></div>
- <div id="crosshair"></div>
- <pre id="debug" class="hidden"></pre>
- <div id="message"></div>
- <div id="saving" class="hidden">Saving...</div>
- <div id="bottom">
- <div id="itemName"></div>
- <div id="statusbars">
- <div class="barrow">
- <div id="hearts" class="iconrow"></div>
- <div class="barright">
- <div id="airbar" class="iconrow hidden"></div>
- <div id="foodbar" class="iconrow"></div>
- </div>
- </div>
- </div>
- <div id="hotbar"></div>
- </div>
- </div>
- <!-- ================= Chat / commands ================= -->
- <div id="chat">
- <div id="chatLog"></div>
- <input id="chatInput" class="hidden" type="text" maxlength="200" autocomplete="off" spellcheck="false" placeholder="Type a message or a /command (Tab completes)">
- </div>
- <!-- ================= Inventory / container screens ================= -->
- <div id="screen" class="hidden">
- <div id="screenPanel" class="panel"></div>
- <div class="screenhint">E or Esc to close</div>
- </div>
- <div id="cursorStack" class="hidden"></div>
- <div id="tooltip" class="hidden"></div>
- <!-- ================= Start screen ================= -->
- <div id="menu">
- <canvas id="logo" width="760" height="190"></canvas>
- <div class="tagline" id="tagline">Build anything. Survive the night.</div>
- <div class="page" id="pageMain">
- <button class="btn wide" id="btnPlay">Play</button>
- <button class="btn wide" id="btnSettings">Settings</button>
- <button class="btn wide" id="btnHelp">How to Play</button>
- <button class="btn wide" id="btnQuit">Quit</button>
- </div>
- <div class="page hidden" id="pageWorlds">
- <div class="box">
- <h2>Select World</h2>
- <div id="worldList" class="worldlist"></div>
- <div class="row">
- <button class="btn" id="btnPlayWorld" disabled>Play Selected World</button>
- <button class="btn" id="btnNewWorld">Create New World</button>
- </div>
- <div class="row">
- <button class="btn" id="btnDeleteWorld" disabled>Delete</button>
- <button class="btn" id="btnWorldsBack">Back</button>
- </div>
- </div>
- </div>
- <div class="page hidden" id="pageCreate">
- <div class="box">
- <h2>Create New World</h2>
- <label class="field">World name
- <input type="text" id="newName" maxlength="40" value="New World">
- </label>
- <label class="field">Seed <small>(leave empty for a random one)</small>
- <input type="text" id="newSeed" maxlength="40" placeholder="Random">
- </label>
- <div class="field">Game mode
- <div class="toggle" id="newMode">
- <button class="btn on" data-mode="survival">Survival</button>
- <button class="btn" data-mode="creative">Creative</button>
- </div>
- <small id="modeHint">Gather resources, craft tools and keep yourself fed.</small>
- </div>
- <div class="field">Difficulty
- <div class="toggle" id="newDiff">
- <button class="btn" data-diff="0">Peaceful</button>
- <button class="btn" data-diff="1">Easy</button>
- <button class="btn on" data-diff="2">Normal</button>
- <button class="btn" data-diff="3">Hard</button>
- </div>
- <small id="diffHint"></small>
- </div>
- <label class="check"><input type="checkbox" id="newCheats" checked> Allow cheats (commands such as /give and /tp, game mode, time and weather)</label>
- <div class="row">
- <button class="btn" id="btnCreate">Create World</button>
- <button class="btn" id="btnCreateCancel">Cancel</button>
- </div>
- </div>
- </div>
- <div class="footer"><span id="storageNote">Checking storage...</span></div>
- </div>
- <!-- ================= Overlays ================= -->
- <div id="loading" class="overlay hidden">
- <div class="box center">
- <h2 id="loadTitle">Generating terrain</h2>
- <div class="progress"><i id="loadBar"></i></div>
- <p id="loadText">Preparing the world...</p>
- </div>
- </div>
- <div id="sleep" class="hidden">
- <div class="sleepmsg">Sleeping...</div>
- <div class="sleephint">Press Shift to get up</div>
- <button class="btn" id="btnLeaveBed">Leave Bed</button>
- </div>
- <div id="pause" class="overlay dim hidden">
- <div class="menugrid">
- <h2 class="span2">Game Paused</h2>
- <button class="btn span2" id="btnResume">Back to Game</button>
- <button class="btn" id="btnDiff" title="How fast hunger drains">Difficulty: Normal</button>
- <button class="btn" id="btnCheats" title="Lets you use commands and the buttons below">Cheats: On</button>
- <button class="btn cheat" id="btnMode">Game Mode: Survival</button>
- <button class="btn cheat" id="btnTime">Time: Day</button>
- <button class="btn cheat" id="btnWeather">Weather: Clear</button>
- <button class="btn" id="btnCommands">Commands...</button>
- <button class="btn" id="btnPauseSettings">Settings...</button>
- <button class="btn" id="btnPauseHelp">How to Play...</button>
- <div class="gap span2"></div>
- <button class="btn span2" id="btnSaveQuit">Save and Quit to Title</button>
- </div>
- </div>
- <div id="cmdhelp" class="overlay hidden">
- <div class="box">
- <h2>Commands</h2>
- <p>Press <b>T</b> to open the chat line, or <b>/</b> to start a command right away. <b>Tab</b> completes
- command and item names, <b>Up</b> recalls earlier commands. Use <b>~</b> for your own position,
- e.g. <code>/tp ~ ~20 ~</code>. Commands other than /help and /seed need cheats turned on.</p>
- <div id="cmdlist" class="cmdlist"></div>
- <div class="row"><button class="btn" id="btnCmdDone">Done</button></div>
- </div>
- </div>
- <div id="death" class="overlay death hidden">
- <div class="box center">
- <h1>You Died</h1>
- <p id="deathText"></p>
- <button class="btn wide" id="btnRespawn">Respawn</button>
- <button class="btn wide" id="btnDeathTitle">Save and Quit to Title</button>
- </div>
- </div>
- <!-- Settings: the same two column button grid as the pause menu. Sliders
- are button shaped ranges with their value written on them. -->
- <div id="settings" class="overlay dim hidden">
- <div class="menugrid">
- <h2 class="span2">Settings</h2>
- <label class="slidebtn"><input type="range" id="setRender" min="2" max="12" step="1"><span id="valRender"></span></label>
- <label class="slidebtn"><input type="range" id="setFov" min="50" max="110" step="1"><span id="valFov"></span></label>
- <label class="slidebtn"><input type="range" id="setSens" min="0.2" max="3" step="0.05"><span id="valSens"></span></label>
- <label class="slidebtn"><input type="range" id="setBright" min="0" max="1" step="0.05"><span id="valBright"></span></label>
- <label class="slidebtn"><input type="range" id="setVolume" min="0" max="1" step="0.05"><span id="valVolume"></span></label>
- <label class="slidebtn"><input type="range" id="setAnimals" min="0" max="1" step="0.05"><span id="valAnimals"></span></label>
- <label class="slidebtn"><input type="range" id="setScale" min="0.5" max="1" step="0.25"><span id="valScale"></span></label>
- <button class="btn" id="setLeaves"></button>
- <button class="btn" id="setClouds"></button>
- <button class="btn" id="setBob"></button>
- <button class="btn" id="setInvert"></button>
- <button class="btn" id="setFps"></button>
- <button class="btn span2" id="setReal" title="Shadows, reflections, bloom and light shafts. Needs a fast graphics card."></button>
- <button class="btn span2" id="setWE" title="//set, //copy, //paste, //undo and the selection wand in creative mode. Type //help in chat."></button>
- <button class="btn span2" id="setShotDir" title="Where F2 saves screenshots"></button>
- <div class="gap span2"></div>
- <button class="btn span2" id="btnSettingsDone">Done</button>
- </div>
- </div>
- <div id="help" class="overlay hidden">
- <div class="box">
- <h2>How to Play</h2>
- <div class="helpgrid">
- <div><b>W A S D</b> move, <b>Space</b> jump, <b>Shift</b> sneak, <b>Ctrl</b> or double tap <b>W</b> to sprint</div>
- <div><b>Left mouse</b> mine a block, <b>Right mouse</b> place a block, use a workbench / furnace / chest, or eat</div>
- <div><b>1 - 9</b> or the <b>mouse wheel</b> pick a hotbar slot, <b>Middle click</b> a block to take it in hand</div>
- <div><b>E</b> inventory and 2 x 2 crafting, <b>Q</b> drop an item (Ctrl+Q the whole stack)</div>
- <div><b>T</b> chat, <b>/</b> type a command such as <b>/give</b> or <b>/tp</b></div>
- <div><b>Right click</b> a bed at night to sleep until morning, doors, gates and trapdoors to open them</div>
- <div><b>Left click</b> an animal to hit it; hold <b>Right click</b> with a bow to draw, let go to shoot</div>
- <div><b>Right click</b> levers and buttons, or step on a pressure plate, to power spark wire, lamps, pistons and doors</div>
- <div><b>Right click</b> a retimer to change its delay; it passes the signal on in the direction you placed it</div>
- <div>An <b>OpAmp</b> sends on the signal behind it, or how full the storage behind it is; a stronger signal at a side stops it. <b>Right click</b> to subtract the sides instead</div>
- <div><b>Right click</b> a sign to write on it (4 lines); Shift + right click to place a block against it</div>
- <div>Power a rail where three tracks meet (lever, button or spark wire) to switch it to the other track</div>
- <div><b>Right click</b> a cart to ride it (Shift to get out), a chest cart to open it, a furnace cart with fuel to drive it</div>
- <div><b>Creative:</b> double tap <b>Space</b> to fly, Space / Shift to rise and sink</div>
- <div><b>WorldEdit</b> (creative, turn it on in Settings): <b>//wand</b>, left / right click two corners, then <b>//set</b>, <b>//copy</b>, <b>//paste</b>, <b>//undo</b> - <b>//help</b> lists the rest. With a <b>compass</b> in hand, left click jumps to the block you look at, right click passes through the wall in reach</div>
- <div><b>F2</b> screenshot, <b>F3</b> debug info, <b>F1</b> hide the interface, <b>Esc</b> pause</div>
- </div>
- <p>Start by punching a tree for logs, turn them into planks on the 2 x 2 grid in your inventory (E), and
- build a workbench from four planks: it gives you a 3 x 3 grid. The recipe book next to the grid shows
- every pattern and lays it out for you. A wooden pickaxe
- mines stone; stone tools mine iron, iron tools mine gold and crystal. Smelt ores in a furnace.
- Keep your food bar up: apples drop from leaves, seeds from tall grass grow into wheat for bread,
- and two mushrooms with a bowl make stew. Harder difficulties make you hungry faster.
- Cows, sheep and chickens give food, wool and feathers. Wolves and bears come out in the dark and,
- on Normal and Hard, hunt you at night - fight back with a sword or a bow and arrows.
- Dye white wool with flowers, leaves or coal. Spark dust from deep spark ore makes wire, spark
- torches, rails and pistons. On a fast computer, try Realistic Graphics in the settings.</p>
- <div class="row"><button class="btn" id="btnHelpDone">Got it</button></div>
- </div>
- </div>
- <div id="confirm" class="overlay hidden">
- <div class="box center">
- <h2 id="confirmTitle">Are you sure?</h2>
- <p id="confirmText"></p>
- <div class="row">
- <button class="btn danger" id="btnConfirmYes">Delete</button>
- <button class="btn" id="btnConfirmNo">Cancel</button>
- </div>
- </div>
- </div>
- <!-- ================= Touch controls ================= -->
- <div id="touch" class="hidden">
- <div id="stick"><div id="stickKnob"></div></div>
- <div id="lookpad"></div>
- <div class="tbtns">
- <button id="tJump">Jump</button>
- <button id="tSneak">Sneak</button>
- <button id="tInv">Items</button>
- <button id="tPause">Pause</button>
- </div>
- </div>
- <div id="error" class="overlay hidden">
- <div class="box center">
- <h2>Blocky could not start</h2>
- <p id="errorText"></p>
- </div>
- </div>
- <script type="module" src="js/main.js"></script>
- </body>
- </html>
|