鱼C论坛

 找回密码
 立即注册
查看: 2133|回复: 10

[作品展示] 小游戏 梦魇版

[复制链接]
发表于 2021-12-12 15:09:03 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>game</title>

  6. <style>
  7. body {
  8.   background: #222;
  9. }

  10. h2 {
  11.   color: #666;
  12.   font-family: monospace;
  13.   text-align: center;
  14. }

  15. .background {
  16.   table-layout: fixed;
  17.   border-spacing: 0;
  18. }

  19. .background td {
  20.   padding: 0;
  21. }

  22. .lava, .actor {
  23.   background: #e55;
  24. }
  25. .lava{
  26. border: solid 3px #e70;
  27. box-sizing: content-box;
  28. }
  29. .wall {
  30.   background: #444;
  31.   border: solid 3px #333;
  32.   box-sizing: content-box;
  33. }

  34. .actor {
  35.   position: absolute;
  36. }

  37. .coin {
  38.   background: #e2e838;
  39.   border-radius: 50%;
  40. }

  41. .player {
  42.   background-color: rgba(255, 255, 255, 0.2);
  43.   box-sizing: content-box;
  44.   box-shadow: none;
  45. }

  46. .lost .player {
  47.   background: #a04040;
  48. }

  49. .won .player {
  50.   background: green;
  51. }

  52. .game {
  53.   position: relative;
  54.   overflow: hidden;
  55. }
  56. </style>
  57. </head>
  58. <body>

  59. <script>
  60. var LEVELS = [
  61.         ["                                                                                ",
  62.                 "                                                                                ",
  63.                 "                                                                                ",
  64.                 "                                  !                                             ",
  65.                 "                                  !                                             ",
  66.                 "                                  !                                             ",
  67.                 "                                  !                                             ",
  68.                 "                                  !                xx      xx    x ! x          ",
  69.                 "                                  ! o o      xx                  x!!!x          ",
  70.                 "                                  !                              xx!xx          ",
  71.                 "                                  !xxxxx!    !!!!!!!!!!!!!!!!!!!!!x x           ",
  72.                 "                                                          x                 xx  ",
  73.                 "  xx                                      o o             x                  x  ",
  74.                 "  x!                    o                                 x                  x  ",
  75.                 "  x!        !!!!!                        x!!!x            x                o x  ",
  76.                 "  x!        !xxxx       o                                 x                  x  ",
  77.                 "  x! @  !!!!!x                                            x      xxxxx       x  ",
  78.                 "  xx  xxxxxxxx     xxxx!!!!xxxx   xxxxxxxxxxxxxxxxxxxx     xxxxxxx   xxxxxxxxx  ",
  79.                 "                  x           x   x                  x     x                    ",
  80.                 "                              x!!!x                  x!!!!!x                    ",
  81.                 "      x   x  x                x!!!x                  x!!!!!x                    ",
  82.                 "                              xxxxx                  xxxxxxx                    ",
  83.                 "                                                                                ",
  84.                 "                                                                                "
  85.         ],
  86.         ["                                      x!!x                        xxxxxxx                                    x!x  ",
  87.                 "                                      x!!x                     xxxx!!!!!xxxx                                 x!x  ",
  88.                 "                                      x!!xxxxxxxxxx           xx           xx                                x!x  ",
  89.                 "                                      xx!!!!!!!!!!xx         xx             xx                               x!x  ",
  90.                 "                                       xxxxxxxxxx!!x         x                                    o   o   o  x!x  ",
  91.                 "                                                xx!x         x     o   o                                    xx!x  ",
  92.                 "                                                 x!x         x                                !!!xx!!!xx!!xxx!!x  ",
  93.                 "                                                 xvx         x     x   x                        !!!!!!!!!!!!!!xx  ",
  94.                 "                                                             xx             xx            xxxxxxxxxxxxxxxxxxxxx   ",
  95.                 "                                                              xx!!!!!!!!!!!xx            v                        ",
  96.                 "                                                               xxxx!!!!!xxxx                                      ",
  97.                 "                                               x     x            xxxxxxx        xxx         xxx                  ",
  98.                 "                                               x     x               x           x x         x x                  ",
  99.                 "                                               x     x               x             x         x                    ",
  100.                 "                                               x     x               x             xx        x                    ",
  101.                 "                                               xx    x               x             x         x                    ",
  102.                 "                                               x     x      o  o     x   x         x         x                    ",
  103.                 "               xx   xx        xxx   xxx        x     x               x   x         x         x                    ",
  104.                 "              xx     xx         x   x          x     x     xxxxxx    x   x   xxxxxxxxx       x                    ",
  105.                 "             xx       xx        x o x          x    xx               x   x   x               x                    ",
  106.                 "     @       x         x        x   x          x     x               x!!!!   x               x                    ",
  107.                 "    x x      x         x        x   x          x     x                   xxxxx   xxxxxx      x                    ",
  108.                 "    x x      x         x      !xx o xx         x     x                     o     x x         x                    ",
  109.                 "!!!!x x!!!!!!x         x!!!!!!xx     xx!!!!!!!!xx    x!!!!!!!!!!                 x x         x                    ",
  110.                 "!!!!x x!!!!!!x         x!!!!!xx       xxxxxxxxxx     x!!!!!!!xx!     xxxxxx!xxxxxx xx  o o  xx                    ",
  111.                 "!!!!x x!!!!!!x         x!!!!!x    o                 xx!!!!!!xx !                    xx     xx                     ",
  112.                 "!!!!x x!!!!!!x         x!!!!!x                     xx!!!!!!xx  !                     xx   xx                      ",
  113.                 "!!!!x x!!!!!!x         x!!!!!xx       xxxxxxxxxxxxxx!!!!!!xx   !                                                  ",
  114.                 "!!!!x x!!!!!!x         x!!!!!!xx    xxx!!!!!!!!!!!!!!!!!!xx    !                                                  ",
  115.                 "!!!!x x!!!!!!x         x!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!xx     !                                                  "
  116.         ],
  117.         ["                                                                                                              ",
  118.                 "                                                                                                              ",
  119.                 "                                                                                                              ",
  120.                 "                                                                                                              ",
  121.                 "                                                                                                              ",
  122.                 "                                        o                                                                     ",
  123.                 "                                                                                                              ",
  124.                 "                                        x                                                                     ",
  125.                 "                                        x     !!                                                              ",
  126.                 "                                        x           !!                                                        ",
  127.                 "                                        x                                                                     ",
  128.                 "                                       xx!      !                                                             ",
  129.                 "                                       x x                 !!!        !!!  xxx                                ",
  130.                 "                                       x x                 !x!        !x!                                     ",
  131.                 "                                     xxx x!!                x          x                                      ",
  132.                 "                                      x   x                 x   oooo   x       xxx                            ",
  133.                 "                                      x   x                 x          x      x!!!x                           ",
  134.                 "                                      x   x                 xxxxxxxxxxxx       xxx                            ",
  135.                 "                                     xx   x!      x   x      x                                                ",
  136.                 "                                      x   xx!!!!xxx   xxxxxxxx              x x                               ",
  137.                 "                                      x   x           x                    x!!!x                              ",
  138.                 "                                      x   x          !x                     xxx                               ",
  139.                 "                                     xx   xx    !!    x                                                       ",
  140.                 "                                      x   x!!         x            xxx                                        ",
  141.                 "                                      x   x           x           x!!!x                                       ",
  142.                 "                                      x   x       !!  x     o      xxx       xxx                              ",
  143.                 "                                     xx   xx          x                     x!!!x                             ",
  144.                 "                              o   o   x   x           x     x                xxv        xxx                   ",
  145.                 "                                      x   x           x              x                 x!!!x                  ",
  146.                 "                            xxxx xx!!xxx xxx     o o  x!!!!!!!!!!!!!!x                   vx                   ",
  147.                 "                       x     x xxx   x xxx x          x!!!!!!!!!!!!!!x                                        ",
  148.                 "                             x       !     x   xxxxxxxxxxxxxxxxxxxxxxx                                        ",
  149.                 "                  x          xx     x!    xx                                         xxx                      ",
  150.                 "  xxx                         x     !     x                                         x!!!x                xxx  ",
  151.                 "  x x                         x    xxx    x                                          xxx                 x x  ",
  152.                 "  x@           x              x    xxx    xxxxxxx                        xxxxx                             x  ",
  153.                 "  x                           x           x                              x   x                             x  ",
  154.                 "  x!                          !!          x                              x x x                             x  ",
  155.                 "  x      x                                x        x!!x      x!!x      xxx xxx                             x  ",
  156.                 "  x   xx           xxx             o o    x                              x         xxx                     x  ",
  157.                 "  x               xxxxx       xx          x                             xxx       x!!!x          x         x  ",
  158.                 "  x               oxxxo       x    xxx    x                             x x        xxx          xxx        x  ",
  159.                 "  x                xxx        xx   xxxx   x  x oo x    x oo x    x oo  xx xx                    xxx        x  ",
  160.                 "  x                 x         x           x!!x    x!!!!x    x!!!!x    xx   xx                    x         x  ",
  161.                 "  x  xx xx xxxxxx  xxx  xxxxxxx           xxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  ",
  162.                 "                                                                                                              ",
  163.                 "                                                                                                              "
  164.         ],
  165.         ["                                                                                                  xxx x       ",
  166.                 "                                                                                                      x       ",
  167.                 "                                                                                                  xxxxx       ",
  168.                 "                                                                                                  x           ",
  169.                 "                                                                                                  x xxx       ",
  170.                 "                          o                                                                       x x x       ",
  171.                 "                                                                                !            o o oxxx x       ",
  172.                 "                   xxx                                                        !                       x       ",
  173.                 "       !  o  !                                                x!!!x x!!!x x!!!x x!!!x x!!!x x   x!xxxxx       ",
  174.                 "       x     x                                                x   x!x   x!x   x!x   x!x   x!x!!!x x           ",
  175.                 "       x  o  x            x                                   xxx x xxx x xxx x xxx x xxx x xxx x xxxxx       ",
  176.                 "       x     x                                                  x x   x x   x x   x x   x x   x x     x       ",
  177.                 "       !  o  !            o                                  xxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxxxx       ",
  178.                 "                                                                                                              ",
  179.                 "          o              x!x                              xx                                                  ",
  180.                 "                                                                                                              ",
  181.                 "             !!                                                                                               ",
  182.                 "       !!                                             xx                                                      ",
  183.                 "                   x!x         x!x                                                                            ",
  184.                 "                                                                                                              ",
  185.                 "          !!              o                                                     x      x                      ",
  186.                 "                                                          xx     xx                                           ",
  187.                 "             x!x         x!x         x!x                                 x                  x                 ",
  188.                 "                                                                                                              ",
  189.                 "                                                                 ||                          !!!!!            ",
  190.                 "  xxx      xx                                                                                                 ",
  191.                 "  x         x o xxxxxxxxx o xxxxxxxxx o xx!!!!                                            x                   ",
  192.                 "  x         x   x       x   x       x   x    !            ||                  x     x                         ",
  193.                 "  x  @      xxxxx   o   xxxxx   o   xxxxx    !                                                                ",
  194.                 "  xx   xx                                    !xxxxx       xx     xx     xxx                               o   ",
  195.                 "        x=                  =                =x   x                     xxx                                   ",
  196.                 "        xxxxx   xx!!!!!xx   xx!!!!!xx   xxxxxxx   x!!!!!!!!!!!!!!!!!!!!!xxx!!!!!x!!!!!!x!!!!!x!!!!!!!x!!!!!!!!",
  197.                 "                                                  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  198.                 "                                                                                                              "
  199.         ]
  200. ];

  201. function Vector(x, y) {
  202.         this.x = x;
  203.         this.y = y;
  204. }

  205. Vector.prototype.plus = function(other) {
  206.         return new Vector(this.x + other.x, this.y + other.y);
  207. };

  208. Vector.prototype.times = function(scale) {
  209.         return new Vector(this.x * scale, this.y * scale);
  210. };

  211. // Note: uppercase words are used that means constructor are values
  212. var actorchars = {
  213.         "@": Player,
  214.         "o": Coin,
  215.         "=": Lava,
  216.         "|": Lava,
  217.         "v": Lava
  218. };

  219. function Player(pos) {
  220.         this.pos = pos.plus(new Vector(0, -.5));
  221.         this.size = new Vector(.9, .9);
  222.         this.speed = new Vector(0, 0);
  223. }
  224. Player.prototype.type = "player";

  225. function Lava(pos, ch) {
  226.         this.pos = pos;
  227.         this.size = new Vector(1, 1);
  228.         if (ch === "=")
  229.                 this.speed = new Vector(2, 0);
  230.         else if (ch === '|')
  231.                 this.speed = new Vector(0, 2);
  232.         else if (ch === 'v') {
  233.                 this.speed = new Vector(0, 3);
  234.                 this.repeatPos = pos;
  235.         }
  236. }
  237. Lava.prototype.type = "Lava";

  238. function Coin(pos) {
  239.         this.basePos = this.pos = pos;
  240.         this.size = new Vector(.6, .6);
  241.         // take a look back
  242.         this.wobble = Math.random() * Math.PI * 2;
  243. }
  244. Coin.prototype.type = "coin";

  245. Level.prototype.isFinished = function() {
  246.         return this.status != null && this.finishDelay < 0;
  247. };

  248. function Level(plan) {
  249.         this.width = plan[0].length;
  250.         this.height = plan.length;
  251.         this.grid = [];
  252.         this.actors = [];

  253.         for (var y = 0; y < this.height; y++) {
  254.                 var line = plan[y],
  255.                         gridLine = [];
  256.                 for (var x = 0; x < this.width; x++) {
  257.                         var ch = line[x],
  258.                                 fieldType = null;
  259.                         var Actor = actorchars[ch];
  260.                         if (Actor)
  261.                                 this.actors.push(new Actor(new Vector(x, y), ch));
  262.                         else if (ch === "x")
  263.                                 fieldType = "wall";
  264.                         else if (ch === "!")
  265.                                 fieldType = "lava";
  266.                         else if (ch === "|")
  267.                                 fieldType = "lava";
  268.                         else if (ch === "=")
  269.                                 fieldType = "lava";
  270.                         else if (ch === "v") {
  271.                                 fieldType = "lava";
  272.                                 console.log(fieldType);
  273.                         }
  274.                         gridLine.push(fieldType)
  275.                 }
  276.                 this.grid.push(gridLine);
  277.         }
  278.         this.player = this.actors.filter(function(actor) {
  279.                 return actor.type === "player"
  280.         })[0];
  281.         this.status = this.finishDelay = null;
  282. }

  283. function element(name, className) {
  284.         var elem = document.createElement(name);
  285.         if (className) elem.className = className;
  286.         return elem;
  287. }

  288. function DOMDisplay(parent, level) {
  289.         this.wrap = parent.appendChild(element("div", "game"));
  290.         this.level = level;

  291.         this.wrap.appendChild(this.drawBackground());
  292.         this.actorLayer = null;
  293.         this.drawFrame();
  294. }

  295. var scale = 15;

  296. DOMDisplay.prototype.drawBackground = function() {
  297.         var table = element("table", "background");
  298.         table.style.width = this.level.width * scale + "px";
  299.         table.style.height = this.level.height * scale + "px";
  300.         this.level.grid.forEach(function(row) {
  301.                 var rowElement = table.appendChild(element("tr"));
  302.                 rowElement.style.height = scale + "px";
  303.                 row.forEach(function(type) {
  304.                         rowElement.appendChild(element("td", type));
  305.                 });
  306.         });
  307.         return table;
  308. };

  309. DOMDisplay.prototype.drawActors = function() {
  310.         var wrap = element("div");
  311.         this.level.actors.forEach(function(actor) {
  312.                 var rect = wrap.appendChild(element("div", "actor " + actor.type));
  313.                 rect.style.width = actor.size.x * scale + "px";
  314.                 rect.style.height = actor.size.y * scale + "px";
  315.                 rect.style.left = actor.pos.x * scale + "px";
  316.                 rect.style.top = actor.pos.y * scale + "px";
  317.         });
  318.         return wrap;
  319. }

  320. DOMDisplay.prototype.drawFrame = function() {
  321.         if (this.actorLayer)
  322.                 this.wrap.removeChild(this.actorLayer);
  323.         this.actorLayer = this.wrap.appendChild(this.drawActors());
  324.         this.wrap.className = "game " + (this.level.status || "");
  325.         this.scrollPlayerIntoView();
  326. };

  327. // clear it later
  328. DOMDisplay.prototype.scrollPlayerIntoView = function() {
  329.         var width = this.wrap.clientWidth;
  330.         var height = this.wrap.clientHeight;
  331.         var margin = width / 3;

  332.         // The viewport
  333.         var left = this.wrap.scrollLeft,
  334.                 right = left + width;
  335.         var top = this.wrap.scrollTop,
  336.                 bottom = top + height;

  337.         var player = this.level.player;
  338.         var center = player.pos.plus(player.size.times(0.5))
  339.                 .times(scale);

  340.         if (center.x < left + margin)
  341.                 this.wrap.scrollLeft = center.x - margin;
  342.         else if (center.x > right - margin)
  343.                 this.wrap.scrollLeft = center.x + margin - width;
  344.         if (center.y < top + margin)
  345.                 this.wrap.scrollTop = center.y - margin;
  346.         else if (center.y > bottom - margin)
  347.                 this.wrap.scrollTop = center.y + margin - height;
  348. };

  349. DOMDisplay.prototype.clear = function() {
  350.         this.wrap.parentNode.removeChild(this.wrap);
  351. };

  352. Level.prototype.obstacleAt = function(pos, size) {
  353.         var xStart = Math.floor(pos.x);
  354.         var xEnd = Math.ceil(pos.x + size.x);
  355.         var yStart = Math.floor(pos.y);
  356.         var yEnd = Math.ceil(pos.y + size.y);

  357.         if (xStart < 0 || xEnd > this.width || yStart < 0)
  358.                 return "wall";
  359.         if (yEnd > this.height)
  360.                 return "lava";
  361.         for (var y = yStart; y < yEnd; y++) {
  362.                 for (var x = xStart; x < xEnd; x++) {
  363.                         var fieldType = this.grid[y][x];
  364.                         if (fieldType) return fieldType;
  365.                 }
  366.         }
  367. };

  368. Level.prototype.actorAt = function(actor) {
  369.         for (var i = 0; i < this.actors.length; i++) {
  370.                 var other = this.actors[i];
  371.                 if (other != actor &&
  372.                         actor.pos.x + actor.size.x > other.pos.x &&
  373.                         actor.pos.x < other.pos.x + other.size.x &&
  374.                         actor.pos.y + actor.size.y > other.pos.y &&
  375.                         actor.pos.y < other.pos.y + other.size.y)
  376.                         return other;
  377.         }
  378. };

  379. var maxStep = 0.05;

  380. Level.prototype.animate = function(step, keys) {
  381.         if (this.status != null)
  382.                 this.finishDelay -= step;

  383.         while (step > 0) {
  384.                 var thisStep = Math.min(step, maxStep);
  385.                 this.actors.forEach(function(actor) {
  386.                         actor.act(thisStep, this, keys);
  387.                 }, this);
  388.                 step -= thisStep;
  389.         }
  390. };

  391. Lava.prototype.act = function(step, level) {
  392.         var newPos = this.pos.plus(this.speed.times(step));
  393.         if (!level.obstacleAt(newPos, this.size))
  394.                 this.pos = newPos;
  395.         else if (this.repeatPos)
  396.                 this.pos = this.repeatPos;
  397.         else
  398.                 this.speed = this.speed.times(-1);
  399. };

  400. var wobbleSpeed = 8,
  401.         wobbleDist = 0.07;

  402. Coin.prototype.act = function(step) {
  403.         this.wobble += step * wobbleSpeed;
  404.         var wobblePos = Math.sin(this.wobble) * wobbleDist;
  405.         this.pos = this.basePos.plus(new Vector(0, wobblePos));
  406. };

  407. var playerXSpeed = 10;

  408. Player.prototype.moveX = function(step, level, keys) {
  409.         this.speed.x = 0;
  410.         if (keys.left) this.speed.x -= playerXSpeed;
  411.         if (keys.right) this.speed.x += playerXSpeed;

  412.         var motion = new Vector(this.speed.x * step, 0);
  413.         var newPos = this.pos.plus(motion);
  414.         var obstacle = level.obstacleAt(newPos, this.size);
  415.         if (obstacle)
  416.                 level.playerTouched(obstacle);
  417.         else
  418.                 this.pos = newPos;
  419. };

  420. var gravity = 30;
  421. var jumpSpeed = 17;

  422. Player.prototype.moveY = function(step, level, keys) {
  423.         this.speed.y += step * gravity;
  424.         var motion = new Vector(0, this.speed.y * step);
  425.         var newPos = this.pos.plus(motion);
  426.         var obstacle = level.obstacleAt(newPos, this.size);
  427.         if (obstacle) {
  428.                 level.playerTouched(obstacle);
  429.                 if (keys.up && this.speed.y > 0)
  430.                         this.speed.y = -jumpSpeed;
  431.                 else
  432.                         this.speed.y = 0;
  433.         } else {
  434.                 this.pos = newPos;
  435.         }
  436. };

  437. Player.prototype.act = function(step, level, keys) {
  438.         this.moveX(step, level, keys);
  439.         this.moveY(step, level, keys);

  440.         var otherActor = level.actorAt(this);
  441.         if (otherActor)
  442.                 level.playerTouched(otherActor.type, otherActor);

  443.         // Losing animation
  444.         if (level.status == "lost") {
  445.                 this.pos.y += step;
  446.                 this.size.y -= step;
  447.         }
  448. };

  449. Level.prototype.playerTouched = function(type, actor) {
  450.         if (type == "lava" && this.status == null) {
  451.                 this.status = "lost";
  452.                 this.finishDelay = 1;
  453.         } else if (type == "coin") {
  454.                 this.actors = this.actors.filter(function(other) {
  455.                         return other != actor;
  456.                 });
  457.                 if (!this.actors.some(function(actor) {
  458.                                 return actor.type == "coin";
  459.                         })) {
  460.                         this.status = "won";
  461.                         this.finishDelay = 1;
  462.                 }
  463.         }
  464. };

  465. var arrowCodes = {
  466.         37: "left",
  467.         38: "up",
  468.         39: "right"
  469. };

  470. function trackKeys(codes) {
  471.         var pressed = Object.create(null);

  472.         function handler(event) {
  473.                 if (codes.hasOwnProperty(event.keyCode)) {
  474.                         var down = event.type == "keydown";
  475.                         pressed[codes[event.keyCode]] = down;
  476.                         event.preventDefault();
  477.                 }
  478.         }
  479.         addEventListener("keydown", handler);
  480.         addEventListener("keyup", handler);
  481.         return pressed;
  482. }

  483. function runAnimation(frameFunc) {
  484.         var lastTime = null;

  485.         function frame(time) {
  486.                 var stop = false;
  487.                 if (lastTime != null) {
  488.                         var timeStep = Math.min(time - lastTime, 100) / 1000;
  489.                         stop = frameFunc(timeStep) === false;
  490.                 }
  491.                 lastTime = time;
  492.                 if (!stop)
  493.                         requestAnimationFrame(frame);
  494.         }
  495.         requestAnimationFrame(frame);
  496. }

  497. var arrows = trackKeys(arrowCodes);

  498. function runLevel(level, Display, andThen) {
  499.         var display = new Display(document.body, level);
  500.         runAnimation(function(step) {
  501.                 level.animate(step, arrows);
  502.                 display.drawFrame(step);
  503.                 if (level.isFinished()) {
  504.                         display.clear();
  505.                         if (andThen)
  506.                                 andThen(level.status);
  507.                         return false;
  508.                 }
  509.         });
  510. }

  511. function runGame(plans, Display) {
  512.         function startLevel(n) {
  513.                 runLevel(new Level(plans[n]), Display, function(status) {
  514.                         if (status == "lost")
  515.                                 startLevel(n);
  516.                         else if (n < plans.length - 1)
  517.                                 startLevel(n + 1);
  518.                         else
  519.                                 alert("You win!");
  520.                 });
  521.         }
  522.         startLevel(0);
  523. }

  524. runGame(LEVELS, DOMDisplay);
  525. </script>

  526. <div style="text-align:center;clear:both">
  527. </div>
  528. </body>
  529. </html>
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-12-12 15:23:56 | 显示全部楼层
太难了根本走不过去
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-12-13 01:06:33 From FishC Mobile | 显示全部楼层
写这一个需要用到哪些知识呀
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-12-16 15:42:10 | 显示全部楼层
本帖最后由 Angelina_Jolie 于 2021-12-17 10:16 编辑

太难了  通关
11.png
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-12-18 17:31:08 | 显示全部楼层
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-12-27 14:23:29 | 显示全部楼层
javascript+html+css
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-1-25 15:26:00 | 显示全部楼层
小游戏挺难的……
话说是不是把所有豆子都吃光才算通关?
不过还是佩服!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-2-16 13:35:04 | 显示全部楼层
真不错!实在走不过去,然后自己修改了地图才过的!吃完所有金币方块变绿过关!自己稍微修改后能给小孩玩!作者这个属于地狱级难度!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-2-16 22:07:56 | 显示全部楼层
seniorz 发表于 2022-2-16 13:35
真不错!实在走不过去,然后自己修改了地图才过的!吃完所有金币方块变绿过关!自己稍微修改后能给小孩玩! ...

这个第二关的滴下来的岩浆,没有伤害,代码中哪里错了!不会修改!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-2-19 11:31:13 | 显示全部楼层
主要是自己不会写......有大佬会写的可以帮帮忙吗?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-3-1 14:13:34 | 显示全部楼层
写的好啊。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-27 01:45

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表