Coder Social home page Coder Social logo

arkanoid_1's Introduction

打砖块小游戏

打完所有砖块后,你就得到“意想不到”的福利哟😍~

该项目主要是在预研『2D碰撞检测』后萌生的想法,《“等一下,我碰!”——常见的2D碰撞检测》

Designed by LV.

技术实现:

采用 Canvas 2D API 编写,音效处理则采用 howler 库。

玩法

该游戏有两种玩法:

  1. 第一种玩法采用轴对称包围盒(小球、砖块、挡板)的碰撞检测法。

  2. 第二种玩法采用轴对称包围盒(小球与砖块)和分离轴定理(小球与可旋转的挡板)两种碰撞检测法。

示例图

玩法一和玩法二主要区别是挡板不同。

启动页面:

启动页面

玩法一:

玩法一

玩法二:

玩法二

开发

采用 ELF 构建工具进行开发。开发时,主要关心 /src 目录即可。

# 安装依赖
npm install

# 开发模式
npm start

# 构建
npm run build

peace out!👋

arkanoid_1's People

Contributors

jchehe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.