Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

lemueldls/Kaetram-Next

 
 

Repository files navigation

Kaetram (Next)

Codacy Grade Travis Build Status AppVeyor Build Status Codecov Coverage Status Version MPL-2.0 License Website Open Issues Watch This Repo Star This Repo Fork This Repo Discord Subreddit subscribers

This repo is a very experimental fork of https://github.com/Veradictus/Kaetram-Open to add modern tools to aims to shorten the systems development life cycle and provide continuous delivery with high software quality (hence the next). If you really want to know the difference between the two, go to https://github.com/lemueldls/Kaetram-Next/wiki/Upstream-Difference.

Kaetram is an open-source game-engine created to aid those interested in entering the game development realm. The codebase is simple, clean, and intuitive. This project is intended to be used as a learning tool. The original idea is based on Little Workshop's demo game – BrowserQuest (BQ). This game uses original BQ assets as well as custom-made ones. The entire code-base has been written from scratch, using more modern approaches.

Live Versionhttps://kaetram.com

Discordhttps://discord.gg/MmbGAaw

Demo1 Demo2 Demo3

Table of Contents

Features

BQ was intended as an experiment to showcase HTML5 capabilities, since then, technology has only served to advance. Kaetram contains a lot of ideas and features that build on top of its predecessor, a couple is:

  • 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)

  • And much more

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 instance, 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 Tiled Map Editor. Using our map parsing tool located in tools/map/exportmap.js you can easily export your creation to both the client and the server.

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.

Get Started

Prerequisites

You must first install Node.js to run the server, and install MongoDB database to store user data.

NOTE: Node.js

Node.js version must be greater than or equal to 10.0.0 as anything under this version would interpret something like catch {} instead of the usual catch (err) {} as a Syntax Error. This error is not in this codebase, it's in one of the necessary node modules currently installed

NOTE: MongoDB

MongoDB is a requirement for Kaetram to run with all the features enabled, but you can still run your own limited version if you do not want to install MongoDB. To do this, set Config.offlineMode = true in the server configuration. If you do choose to install MongoDB, a user is not necessary, but you can enable authentication with the Config.mongoAuth variable in the server configuration.

After installing Node.js, install all packages by running

npm install

Installing and Running

Before starting Kaetram, there is some pre-configuration that must be done. Run

npm run setup

this renames the client configurations(config.ts-dist to config.ts), and the server configurations(config.dev.ts to config.json). Make sure the settings in the client match those in the server. Modify the file accordingly to fit your needs.

npm install
npm run build
npm start

Running Tests

TODO: Tests are unfinished, yet alone barley even started.

Tests and coverage are ran with Jest To run the tests, simply run

npm test

Deployment

You want to run this on your network or server? Well first, set the hostname and port of the server in the server configuration and client configuration to match.

Map Parsing

Once you finish modifying your map in tools/map/data you can parse the map data by executing exportmap.ts in tools/map directory. Example command:

npx ts-node ./exportmap.ts ./data/map.json

To build the current game map you can run

npm run map

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 minigames

Codebase Development

  • Write documentation outlining the entirety of the source code.

Miscellaneous

  • Add (continue) to NPC talking — spacebar when talking

License

This project is licensed under the MPL-2.0 License - see the LICENSE file for details