Git Product home page Git Product logo

wechatsmallgame's Introduction

仿微信小游戏官方实现的像素鸟游戏

仿照微信小游戏官方demo开发,其中libs中的Symbol和适配器全部用的官方的demo

下载

git clone https://github.com/hushenao/wechatSmallGame.git

预览

1、下载微信开发者工具,必须使用官方指定版本链接
2、然后在项目文件夹下创建一个小游戏的项目(如果这个文件是空的,会自动生成一个官方的demo,就是打飞机的)

效果图



源码目录介绍

./js
├── base                                   // 定义游戏开发基础类
│   ├── animatoin.js                       // 帧动画的简易实现
│   ├── pool.js                            // 对象池的简易实现
│   └── sprite.js                          // 游戏基本元素精灵类
├── libs
│   ├── symbol.js                          // ES6 Symbol简易兼容
│   └── weapp-adapter.js                   // 小游戏适配器
├── npc
│   └── enemy.js                           // 阻挡类(墙)
├── player
│   └── index.js                           // 玩家类(小鸟)
├── runtime
│   ├── background.js                      // 背景类
│   ├── gameinfo.js                        // 用于展示分数和结算界面
│   ├── music.js                           // 全局音效管理器,暂时没音效
│   └── startGame.js                       // 游戏开始之前的倒计时
├── databus.js                             // 管控游戏状态
└── main.js                                // 游戏入口主函数

后续还会继续更新

目前碰撞检测不是特别完善,有什么好的方案可以提出来

关于图片不要吐槽我哈,毕竟我只是个小前端

wechatsmallgame's People

Contributors

hushenao avatar

Stargazers

 avatar  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.