All Projects → ganlvtech → Phaser Catch The Cat

ganlvtech / Phaser Catch The Cat

An HTML5 game 'Catch The Cat' powered by Phaser 3

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Phaser Catch The Cat

Phaser3 Docs
Phaser 3 Documentation and TypeScript Defs
Stars: ✭ 339 (+20.21%)
Mutual labels:  game, phaser
Opensc2k
OpenSC2K - An Open Source remake of Sim City 2000 by Maxis
Stars: ✭ 4,753 (+1585.46%)
Mutual labels:  game, phaser
Phaserquest
Reproduction of Mozilla's BrowserQuest using Phaser, socket.io and Node.js
Stars: ✭ 313 (+10.99%)
Mutual labels:  game, phaser
Weixin Minigame Tutorial
Flappy Bird adaptation on Wechat Minigame using PhaserJS + English Wechat Minigames Tutorial
Stars: ✭ 56 (-80.14%)
Mutual labels:  game, phaser
Isocitysim
🌇 A simulation of a city using isometric tiles
Stars: ✭ 100 (-64.54%)
Mutual labels:  game, phaser
Phaser3 Particle Editor
A flexible editor for building phaser particles.
Stars: ✭ 131 (-53.55%)
Mutual labels:  game, phaser
Phaser Ce Npm Webpack Typescript Starter Project
Project to get you started with your Phaser-CE (using the npm module) game using Typescript and Webpack for building! No hassle asset management, Google Web Font loader, live server, development vs distribution build pipeline, Electron packaging for desktop builds, and more...
Stars: ✭ 414 (+46.81%)
Mutual labels:  game, phaser
Gowog
Gowog, Golang based Web multiplayer Online Game
Stars: ✭ 75 (-73.4%)
Mutual labels:  game, phaser
Phaser Es6 Webpack
A bootstrap project for create games with Phaser + ES6 + Webpack.
Stars: ✭ 1,266 (+348.94%)
Mutual labels:  game, phaser
Reldens
Reldens - You can make it - Open Source MMORPG Platform
Stars: ✭ 130 (-53.9%)
Mutual labels:  game, phaser
Expo Phaser
Build awesome 2D games with Phaser.js and Expo
Stars: ✭ 182 (-35.46%)
Mutual labels:  game, phaser
Games
Create interesting games by pure python.
Stars: ✭ 3,431 (+1116.67%)
Mutual labels:  game
Base
Base environment for Red Eclipse and associated source files.
Stars: ✭ 273 (-3.19%)
Mutual labels:  game
Noahgameframe
A fast, scalable, distributed game server engine/framework for C++, include the actor library, network library, can be used as a real time multiplayer game engine ( MMO RPG/MOBA ), which support C#/Lua script/ Unity3d, Cocos2dx and plan to support Unreal.
Stars: ✭ 3,258 (+1055.32%)
Mutual labels:  game
Wizardwarz
WebGL Multiplayer game with NodeJS backend
Stars: ✭ 270 (-4.26%)
Mutual labels:  game
Cute headers
Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
Stars: ✭ 3,274 (+1060.99%)
Mutual labels:  game
Openttd
OpenTTD is an open source simulation game based upon Transport Tycoon Deluxe
Stars: ✭ 3,765 (+1235.11%)
Mutual labels:  game
Triplea
TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
Stars: ✭ 268 (-4.96%)
Mutual labels:  game
Rewtro
Papercraft videogame cartridges you can print and pirate with a copy machine.
Stars: ✭ 267 (-5.32%)
Mutual labels:  game
Quadtree Js
A lightweight quadtree implementation for javascript
Stars: ✭ 265 (-6.03%)
Mutual labels:  game

捉住小猫

开始游戏 Build Status

游戏玩法

  • 点击小圆点,围住小猫。
  • 你点击一次,小猫走一次。
  • 直到你把小猫围住(赢),或者小猫走到边界并逃跑(输)。

部署

首先引入游戏框架 phaser.min.js

<script src="phaser.min.js"></script>

然后引入游戏代码 catch-the-cat.js

<script src="catch-the-cat.js"></script>

然后在指定的 div 中新建一个游戏的 canvas,并开始游戏

<div id="catch-the-cat"></div>
<script>
    window.game = new CatchTheCatGame({
        w: 11,
        h: 11,
        r: 20,
        backgroundColor: 0xeeeeee,
        parent: 'catch-the-cat',
        statusBarAlign: 'center',
        credit: 'github.com/ganlvtech'
    });
</script>

参数列表:

参数 说明
w 11 横向格子数
h 11 竖向格子数
r 20 圆半径像素

非必选参数:

参数 说明
backgroundColor 0xeeeeee 背景颜色
parent catch-the-cat 父元素的 id 或 DOM 对象
statusBarAlign center 状态栏左对齐 left 或居中 center
credit github.com/ganlvtech 右下角的备注信息

自己编写算法

参考 src/solvers/ 中提供的例子编写算法,并使用下列代码替换。

window.game.solver = yourSolver;

这个 solver 的返回值即为猫要往哪个方向走一步,如果撞墙则算玩家获胜

说明
-1 猫主动弃权
0
1 左上
2 右上
3
4 右下
5 左下

猫站在星号的位置,数字代表每个方向的编号

 1 2
0 * 3
 5 4

例如

window.game.solver = function (blocksIsWall, i, j) {
    return 0;
};

即:一直向左走,直到撞墙。

说明

  • 游戏的思路和小猫的图片来源于 www.gamedesign.jp,原来的游戏名叫 Chat Noir,我只是尝试用 javascript 重写一遍。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].