SNES-like engine in JavaScript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.6 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Super Tea Witch</title>
  6. <style>
  7. * { padding: 0; margin: 0; }
  8. body { background: black; color: white; font-family: monospace; }
  9. div { text-align: center; }
  10. canvas {
  11. background: magenta;
  12. display: block;
  13. margin: 0 auto;
  14. margin-top: 8px;
  15. margin-bottom: 8px;
  16. padding: 1px;
  17. image-rendering: pixelated;
  18. image-rendering: crisp-edges;
  19. image-rendering: -moz-crisp-edges;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <!-- The canvas drawing resolution is the SNES resolution: 256x224.
  25. JavaScript upscales the canvas (hopefully in a way that the browser
  26. doesn't antialias it.) -->
  27. <canvas id="canvas" width="256" height="224" style="display: none"></canvas>
  28. <div id="fps"></div>
  29. <div id="debug"></div>
  30. <button id="1x">1x</button>
  31. <button id="2x">2x</button>
  32. <button id="3x">3x</button>
  33. <button id="4x">4x</button>
  34. <button id="5x">5x</button>
  35. <button id="6x">6x</button>
  36. <button id="7x">7x</button>
  37. <button id="8x">8x</button>
  38. <img src="bundle/terrain.png" id="terrain" style="display: none">
  39. <img src="bundle/inside.png" id="inside" style="display: none">
  40. <img src="bundle/outside.png" id="outside" style="display: none">
  41. <img src="bundle/water.png" id="water" style="display: none">
  42. <img src="bundle/witchtiles_1.png" id="witch" style="display: none">
  43. <img src="bundle/spritesheet.png" id="spritesheet" style="display: none">
  44. <script src="bundle/spritesheet.js"></script>
  45. <script src="main.js"></script>
  46. </body>
  47. </html>