• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

adngdb/fightly-game-engine: Fightly Web Game Engine - Strategic, turn-based game ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

adngdb/fightly-game-engine

开源软件地址:

https://github.com/adngdb/fightly-game-engine

开源编程语言:

JavaScript 99.9%

开源软件介绍:

Fightly Game Engine

A game engine for strategic, turn-based, web games. The goal is to be heavily modular, to allow a wide variety of turn-based games to be developed.

Features

  • simple client-side interface in JavaScript
  • complete server stack using node.js and socket.io
  • based on modules

All you should have to do is find the right modules, and develop the front-end of your game.

Current state

Fightly is still in early development, most of the features are not ready. If you're interested, feel free to help! You can look at the open issues, read and comment the source code, send pull requests, or test the current version on your environment -- any help is appreciated!

Development

Modules

At the moment, modules use the amdefine library to run on the server. You will need to install that dependency first:

$ cd fightly/modules/
$ npm install

Server

You will need node.js and npm installed on your host first. See for example the download page of node.js or this guide to installing node and npm.

Install the dependencies:

$ cd fightly/server/
$ npm install

Run the unit tests:

$ ./runtests

Run the server:

$ node server.js

Client

Create a link to fightly/ in your Web directory (or configure your Web server to point to fightly/) and browse to the corresponding URL. Then in your HTML document, you can chose to use either the compiled version or the development version of fightly.

There is currently nothing to see in the client, except in the logs. Open your browser's console!

Compiled

Run the following command to compile fightly:

$ cd fightly/client/
$ make

That will create fightly/client/fightly.js which is a compiled version of the client source code, including require.js. You then just need to link that file from your HTML document and start using fightly like that:

<script src="fightly/client/fightly.js" data-main="main.js"></script>

In main.js:

require(['fightly'], function (Fightly) {
    var config = {};
    var F = new Fightly(config);
    F.init();
});

Development

To use the development version of fightly, simply link to fightly/client/lib/require.js and configure require.js to have the rights paths. For example:

requirejs.config({
    baseUrl: 'fightly/client/src',
    paths: {
        'lib': '../lib',
        'config': '../config',
        'vendor': '../../vendor'
    },
});



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap