I am a full-stack engineer and independent developer living in beautiful Hangzhou.
- 🐦 Twitter - @oldj
- 📝 Blog - https://oldj.net
- ✉️ Email - [email protected]
HTML5 tower defense
Home Page: https://oldj.net/static/html5-tower-defense/td.html
License: MIT License
I am a full-stack engineer and independent developer living in beautiful Hangzhou.
When you start a new game the previous quicksand count has been retained and it tells you that you can only have 3, when you don't have any.
有时候,拆除建筑后,虽然建筑已经不可见了,但貌似建筑原来占用的格子仍然不能通过,建造别的建筑时,在检查是否 block 时那个格子仍然会造成影响。
不是每次都会发生,较难重现。
怪物可以被围起来,围起来后,怪物会因为找不着路而呆掉,直到被打死或出现新的路。
两种可行的解决方案:
如题。
观察到好几次,暂时不清楚如何重现以及原因。
如题。
应该尝试将射程放到另一个更高的层里面绘制,以免被其它建筑遮挡。
枪口竖直时,有时会突然画出一条很长的竖线,但不是每次都发生。
比如每抗过一波,生命值 +5 ?
这样一来,高手就可以玩更长的时间了,甚至可以无限地玩下去。
春节无事,玩了半天这个小游戏,终于能在不作弊的情况下玩到了 50 波(打的认真点的话还能很多提升空间,但是打到后面实在打不动了,可能打了快一小时了,就有意无意放水了)。发个 issue 让作者知道一下 2024 了还有人在玩这游戏哈哈哈,也顺便贴一下我的思路讨论一下(主要作者博客评论区里貌似不能贴图片)。
思路其实就是把地图划分成两半,每一半都是一条通往终点的路(于是一共有两条路)。两半各自都尽量绕一点。然后每波在终点前堵上一条路,于是敌人只能走另一条路。当有敌人马上要从另一条路到达终点时,挖掉第一条路上的路障、并堵上第二条路,让所有敌人反向再走一圈。
应该还有不少地方可以探讨,比如
我目前是两半路线一样+斜着挖的,主要是起点终点在斜对角,斜着挖路线+轴对称比较满足强迫症。
作者考虑得还是相当完善的啊,路堵上敌人之后不会立即折返,而是有概率继续往前挪一段路,然后再折返。这样一方面是不是为了避免瞬时计算量太高;另一方面增加随机性,敌人有可能同时从两路走向终点,让游戏更难一点、对挖路障修路障的操作要求更高。
For example, if you add a line of text before <div id="wrapper">:
<body id="tower-defense">
a line of text
<div id="wrapper">
then within the canvas, mouse detection would be off by the height of text. I assume the same problem exists in x-direction too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.