ad208三国

 找回密码
 加入
搜索
热搜: 活动 交友 discuz
查看: 614|回复: 2

Kaetram-Open:基于BrowserQuest(BQ)的开源2D HTML5冒险游戏

[复制链接]
发表于 2022-10-7 13:46:08 | 显示全部楼层 |阅读模式

pc2g,电脑好游戏 凯特拉姆
Kaetram是一个开放源代码的游戏引擎,旨在帮助有兴趣进入游戏开发领域的人们。 该代码库简单,简洁,直观。 该项目旨在用作学习工具。 最初的想法是基于Little Workshop的演示游戏BrowserQuest(BQ)。 此游戏使用原始BQ资产以及定制资产。 整个代码库是使用更现代的方法从头开始编写的。

开源地址https://github.com/Kaetram/Kaetram-Open

Kaetram is an open-source game engine created to aid those interested in entering the gamedevelopment realm, and intended to be used as a learning tool. The codebase is simple, clean, andintuitive. The original idea is based on Little Workshop's demo game—BrowserQuest (BQ), anduses original BQ assets as well as custom-made ones. The entire codebase has been rewritten fromscratch using more modern approaches.
Live Version – https://kaetram.com
Join us on Discord – https://discord.gg/MmbGAaw
Technologies
BQ was intended as an experiment to showcase HTML5 capabilities, since then, technology has onlyserved to advance. Kaetram contains a lot of ideas and features that build on top ofits predecessor, a couple being:
  • Multiplayer using Socket.IO.
  • Enhanced rendering engine (includes dynamic lighting, overlays, animated tiles).
  • Region system (client receives only necessary data and saves it).
  • Questing and achievements system.
  • Plugin-based combat system (for bosses/special enemies).
  • Supports RESTful API.
  • Discord server integration.
  • Cross-server private messaging and interactions.
  • Yarn v3 with workspaces for monorepo packaging.
  • And much more!

 楼主| 发表于 2022-10-7 13:48:16 | 显示全部楼层
Get Started
Prerequisites

You must first install Node.js to run the project, and optionally install MongoDB to store user data on the server.
NOTE: Node.js

    You need to use a Node.js version greater than or equal to 14.19.0, following the Long Term Support (LTS) schedule, to have the most stable experience when developing/experimenting with Kaetram. Older versions would not work with our current dependencies and package manager.

NOTE: MongoDB

    MongoDB is not a requirement for Kaetram to run, but you can store and save user data if you install it and run an online environment with all the features enabled. To do this, see Configuration, and set SKIP_DATABASE=false. If you do choose to install MongoDB, a user is not necessary, but you can enable authentication with the MONGODB_AUTH setting.

Yarn

You will also need to enable Yarn to manage your dependencies.

    The preferred way to manage Yarn is through Corepack

    https://yarnpkg.com/getting-started/install

Starting from Node.js 14.19.0, Corepack is included by default with, but is currently opt-in.

To enable it, run

corepack enable

Installing

Install the dependencies by simply running

yarn

Running

To run live development builds, use

yarn dev

To create production builds, run

yarn build

Then, to run each production build, use

yarn start

Add --host at the end to make the game visible on your network.
Configuration

Optionally, if you want some additional configuration, There is a file named .env.defaults, and it's values will be used unless overridden by a new .env file, or by setting environmental variables.

Copy and rename .env.defaults to .env, and modify the contents to fit your needs.

Keep in mind, you have to rebuild the client and restart the server every time you change your configuration.
Testing
End to End

As a prerequisite to run the E2E tests, you need a MongoDB server running as well.

Configuration for test-only environments can be configured on .env.e2e. All it's values will fallback to .env, then to .env.defaults, if present.

To run test on your console, use

yarn test:run

Alternatively, if you want to have the test environment open interactively, so you can select the test you want to run in a UI, use

yarn testpen

Features
Regions

The region system sends data to the client according to the map data of the server. The collisions are checked both server-side and client-side to avoid cheating. The region system makes use of dynamic tiles, which are unlocked according to a player's progress. Furthermore, there is integrated support for instancing, where we can use a section of the map (or clone it), and reuse it for certain groups of players. The instancing is perfect for activities such as minigames, where we will want to run multiple instances in parallel.
Tilemap

Kaetram is built with modularity in mind, as such, the client supports multiple tileset parsing. The tilemap can easily be constructed using the Tiled Map Editor. Using our map parsing tool, you can easily export your creation to both the client and the server.
Map Parsing

Once finished modifying your map in packages/tools/map/data/, you can parse the map data by executing yarn exportmap inside the packages/tools/ directory.

Example command:

yarn exportmap ./data/map.json

To build the current game map, you can run

yarn map

Kaetram Hub

There is also support for a hub server. This can help connect servers across one another, allowing players to interact with their friends across them in a variety of ways (private messaging and guilds). Furthermore, the hub serves as a gateway for determining what server to place players in. If a server is full, it simply returns another server that has room for the player.

To enable using the hub server, see Configuration, and set these values to true.

API_ENABLED=true
HUB_ENABLED=true

Roadmap

Here we have The Roadmap Project Board. This is the main board of the Kaetram-Open project. A kind of Kanban tasks board for tracking and presenting the progress to the community. Here we plan, prioritize and track our work.

See also the open issues for a list of proposed features (and known issues).
TODO
Gameplay

    Finalize the new map.
    Polish mob attributes.
    Have a consistent storyline that goes with the game.
    Implement special abilities and weapon perks.
    Improve anti-cheating detections.
    Add PvP
    Add minigames (PvP, Capture the Flag, Hold the Base)
    Improve client/server synchronization for all players
    Add player trading abilities
    Transition to a more suitable WebGL framework
    Add friends list
    Improve the enchanting system
    Make bosses more responsive
    All trees in the world must be cuttable

Codebase Development

    Write documentation outlining the entirety of the source code.
    Improvements and optimizations to the lighting system.

Miscellaneous

    Add (continue) to NPC talking—spacebar when talking

Donations
Sponsor

Patreon – https://www.patreon.com/kaetram

Open Collective – https://opencollective.com/kaetram
Crypto

BTC – bc1qeh0tdlkuc5q82j2qk9h3sqmwe6uy75qpjtc0dv

LTC – MMRo7dfAi2T8rJrx7m3DmzhsgHRC7XJ83f

ETH – 0x4c6de7175f789DAf0f531477753B07402EEfedaC

BCH – bitcoincash:qzx6uqunqj4mtv74jng97pea0mfcl4nmyqsew92enu
License & Commission

For all inquiries about purchasing a different license or commission work, please contact @Keros on Discord.

This project is distributed under the Mozilla Public License Version 2.0. See LICENSE for more information.

Archiver|手机版|小黑屋|ad208三国

GMT+8, 2024-4-19 17:11

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表