Skip to content

Commit

Permalink
- Reldens - v4.0.0-beta.38
Browse files Browse the repository at this point in the history
- Merge pull request #254 from damian-pastorini/v4.0.0-beta.38
  • Loading branch information
damian-pastorini authored Nov 19, 2024
2 parents d3a1973 + 06511eb commit f60bfbb
Show file tree
Hide file tree
Showing 252 changed files with 18,422 additions and 5,625 deletions.
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,30 @@ While the current stage of the platform is tailored for developers, ongoing impr
As for the latest version released the platform will provide you with the following features.

- Installation GUI: Easy to install through the web.
- Administration Panel: Manage every single aspect of your game through the panel (WIP, temporally disabled).
- Administration Panel: Manage every single aspect of your game through the panel.
- Automatic data generators and import commands for attributes, levels, maps, objects, etc.
- Trade System: Between Players (trade) and NPCs (buy and sell).
- Full In-game Chat: Global, by room, and private messages between users with chat types and split in tabs.
- Player Stats: Fully configurable stats! HP? MP? Magic? Stamina, you can set up as much as you need for your game logic.
- Items System: Based on @reldens/items-system, create all kinds of items (usable and equipment).
- Attacks, PVP, and PVE: Based on @reldens/skills, you will be able to create all kind of skills, attacks, bullets type (can be dodged), target type (can't be dodged), fight with other players or just with NPCs.
- Items System: create all kinds of items (usable and equipment).
- Attacks, PVP, and PVE: create all kind of skills, attacks, bullets type (can be dodged), target type (can't be dodged), fight with other players or just with NPCs.
- NPC's, Enemies, and Respawn Areas: Setup NPC's with different options to interact and create respawn areas.
- Teams and Clans System: Create, join, dismantle teams and clans, bonus based on clan level, and more.
- Drops and Rewards: NPCs can drop rewards, and it can be configured to be split among team members.
- Drops and Rewards: NPCs can drop any kind of items (rewards), and it can be configured to be split among team members.
- Game rewards: you can configure rewards based on game events like daily or weekly login, it's events managed.
- Game scores: configurable games scores, for example keep track on monsters kills and get a global scores table view.
- Physics Engine and Pathfinder: Authoritative server with a physics engine and pathfinder.
- Gravity World: Setup your rooms with or without gravity to get totally different kinds of gameplay.
- Sounds System: Configurable multiple sounds categories for any animation or scene.
- In-game Ads: Integrated with CrazyGames and GameMonetize to show ads in-game.
- Minimap: Optional configurable minimap.
- Configurable Visible Players Name and Life-bars.
- Configurable Players Name and Life-bars visibility.
- Terms and Conditions: Ready to be set up as you need.
- Guest Users.
- Users Registration: Continue playing later and double login invalidation.
- Multiple Players Creation.
- Registration and Login Integrated with Firebase.
- Multiple servers switch support, from room-A in server-A, to room-B in server-B without notice.
- Database Ready: With multiple drivers for different storage or using MySQL by default all you need will be saved.

---
Expand Down Expand Up @@ -103,6 +107,13 @@ If you like to contribute in any way or donate to support the project please als
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center">
<a href="https://github.com/damian-pastorini">
<img src="https://avatars.githubusercontent.com/u/1211779?v=4" width="100px;" alt="Damian Pastorini"/><br/>
<sub><b>Damian Pastorini</b></sub>
</a><br/>
<a href="https://github.com/damian-pastorini/reldens/commits?author=damian-pastorini" title="Owner">💻</a>
</td>
<td align="center">
<a href="https://github.com/luciovicentini">
<img src="https://avatars.githubusercontent.com/u/16654212?v=4" width="100px;" alt="Lucio Vicentini"/><br/>
Expand All @@ -111,11 +122,11 @@ If you like to contribute in any way or donate to support the project please als
<a href="#" title="Answering Questions">💬</a> <a href="https://github.com/damian-pastorini/reldens/commits?author=luciovicentini" title="Code">💻</a>
</td>
<td align="center">
<a href="https://github.com/damian-pastorini">
<img src="https://avatars.githubusercontent.com/u/1211779?v=4" width="100px;" alt="Damian Pastorini"/><br/>
<sub><b>Damian Pastorini</b></sub>
<a href="https://github.com/TheXerxi">
<img src="https://avatars.githubusercontent.com/u/146131154?v=4" width="100px;" alt="Joel P."/><br/>
<sub><b>Joel P.</b></sub>
</a><br/>
<a href="https://github.com/damian-pastorini/reldens/commits?author=damian-pastorini" title="Owner">💻</a>
<a href="#" title="Artist">🎨</a> <a href="https://github.com/damian-pastorini/reldens/pull/256" title="Code">💻</a>
</td>
</tr>
</table>
Expand Down
5 changes: 3 additions & 2 deletions bin/commander.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Commander
projectRoot = process.cwd();
reldensModulePath = path.join(this.projectRoot, 'node_modules', 'reldens');
projectThemeName = 'default';
jsSourceMaps = '1' === process.env.RELDENS_JS_SOURCEMAPS;
cssSourceMaps = '1' === process.env.RELDENS_CSS_SOURCEMAPS;

command = '';
ready = false;
Expand All @@ -39,7 +41,7 @@ class Commander
filename: __filename,
process: process.cwd(),
modulePath: this.reldensModulePath,
projectRoot: this.projectRoot,
projectRoot: this.projectRoot
}
);
}
Expand Down Expand Up @@ -105,7 +107,6 @@ class Commander
+"\n"+'copyIndex - Copy the index file sample into the project.'
+"\n"+'copyDefaultAssets - Copy the reldens module default assets into the "dist/assets" folder.'
+"\n"+'copyDefaultTheme - Copy the reldens module default theme into the project theme.'
+"\n"+'copyCustomAssets - Copy the project assets into the "dist/assets" folder.'
+"\n"+'copyPackage - Copy the reldens module packages into the project.'
+"\n"+'buildCss [theme-folder-name] - Builds the project theme styles.'
+"\n"+'buildClient [theme-folder-name] - Builds the project theme index.html.'
Expand Down
21 changes: 16 additions & 5 deletions bin/import.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /usr/bin/env node

const { ServerManager } = require('../server');
const { ObjectsImporter } = require('../lib/import/server/objects-importer');
const { PlayersExperiencePerLevelImporter } = require('../lib/import/server/players-experience-per-level-importer');
const { AttributesPerLevelImporter } = require('../lib/import/server/attributes-per-level-importer');
const { ClassPathsImporter } = require('../lib/import/server/class-paths-importer');
Expand All @@ -12,6 +13,8 @@ const { FileHandler } = require('../lib/game/server/file-handler');
*
* Commands:
*
* $ npx reldens-import objects custom-game-theme-test generate-data/objects-generate-data.json
*
* - Players experience per level import is not required if class-paths importer is going to be used.
* $ npx reldens-import players-experience-per-level custom-game-theme-test generate-data/players-experience-per-level.json
*
Expand All @@ -27,41 +30,49 @@ const { FileHandler } = require('../lib/game/server/file-handler');
*/

let validCommands = {
'objects': async (data, projectThemeName) => {
let serverManager = await initializeServer(data, projectThemeName);
if(!serverManager){
return false;
}
let importer = new ObjectsImporter(serverManager);
await importer.import(data);
},
'players-experience-per-level': async (data, projectThemeName) => {
let serverManager = await initializeServer(data, projectThemeName);
if (!serverManager) {
if(!serverManager){
return false;
}
let importer = new PlayersExperiencePerLevelImporter(serverManager);
await importer.import(data);
},
'attributes-per-level': async (data, projectThemeName) => {
let serverManager = await initializeServer(data, projectThemeName);
if (!serverManager) {
if(!serverManager){
return false;
}
let importer = new AttributesPerLevelImporter(serverManager);
await importer.import(data);
},
'class-paths': async (data, projectThemeName) => {
let serverManager = await initializeServer(data, projectThemeName);
if (!serverManager) {
if(!serverManager){
return false;
}
let importer = new ClassPathsImporter(serverManager);
await importer.import(data);
},
'maps': async (data, projectThemeName) => {
let serverManager = await initializeServer(data, projectThemeName);
if (!serverManager) {
if(!serverManager){
return false;
}
let importer = new MapsImporter(serverManager);
await importer.import(data);
},
'skills': async (data, projectThemeName) => {
let serverManager = await initializeServer(data, projectThemeName);
if (!serverManager) {
if(!serverManager){
return false;
}
let importer = new SkillsImporter(serverManager);
Expand Down
12 changes: 12 additions & 0 deletions install/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,16 @@ form {
font-weight: bold;
color: $cRed;
}
}

.install-loading {
max-width: 50px;

&.hidden {
display: none;
}
}

#install-submit-button.disabled {
background-color: $boxBackground;
}
7 changes: 6 additions & 1 deletion install/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ <h3 class="form-title">- App -</h3>
<label for="app-port">Port</label>
<input type="text" name="app-port" id="app-port" value="{{app-port}}" class="required" required/>
</div>
<div class="input-box app-trusted-proxy">
<label for="app-trusted-proxy">Trusted Proxy (or reverse proxy)</label>
<input type="text" name="app-trusted-proxy" id="app-trusted-proxy" value="{{app-trusted-proxy}}"/>
</div>
<div class="input-box app-public-url">
<label for="app-public-url">Public URL (useful if you have a reverse proxy)</label>
<input type="text" name="app-public-url" id="app-public-url" value="{{app-public-url}}" class="required" required/>
Expand Down Expand Up @@ -244,7 +248,8 @@ <h3 class="form-title">- Firebase (for login) -</h3>

<!-- SUBMIT -->
<div class="input-box submit-container">
<input type="submit" value="Install"/>
<img class="install-loading hidden" src="./assets/web/loading.gif"/>
<input id="install-submit-button" type="submit" value="Install"/>
</div>
<div class="input-box response-error"></div>
</form>
Expand Down
12 changes: 12 additions & 0 deletions install/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,16 @@ window.addEventListener('load', () => {
document.querySelector('.'+errorCode).style.display = 'block';
}

document.getElementById('install-form').addEventListener('submit', (event) => {
let loadingImage = document.querySelector('.install-loading');
if(loadingImage){
loadingImage.classList.remove('hidden');
}
let installButton = document.getElementById('install-submit-button');
if(installButton){
installButton.classList.add('disabled');
installButton.disabled = true;
}
});

});
9 changes: 3 additions & 6 deletions lib/actions/client/player-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
* - appendAvatarOnSelector: appends the avatar of the selected class to the selector and handles the avatar change
* when the user selects a different class.
*
* Fields:
* - gameManager: an instance of the GameManager class.
* - events: an instance of the EventsManager class.
* - gameDom: an instance of the GameDom class.
*
*/

const { ActionsConst } = require('../constants');
Expand All @@ -28,15 +23,17 @@ class PlayerSelector

constructor(props)
{
// @TODO - BETA - Refactor use DI or something to avoid all props assigned and validations.
/** @type {GameManager} **/
this.gameManager = sc.get(props, 'gameManager', false);
if(!this.gameManager){
Logger.error('Game Manager undefined in ActionsPlugin PlayerSelector.');
}
/** @type EventsManager **/
this.events = sc.get(props, 'events', false);
if(!this.events){
Logger.error('EventsManager undefined in ActionsPlugin PlayerSelector.');
}
/** @type {GameDom} **/
this.gameDom = this.gameManager.gameDom;
}

Expand Down
18 changes: 9 additions & 9 deletions lib/actions/factories/skill-data-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ class SkillDataFactory
{
let animations = sc.get(data, 'animations', {});
let animationKeys = Object.keys(animations);
if (0 === animationKeys.length) {
if(0 === animationKeys.length){
return;
}
let animationsDefaults = sc.get(defaults, 'animations', {});
let animationDefaultData = animationsDefaults.defaults;
for (let i of animationKeys) {
for(let i of animationKeys){
let animationData = Object.assign({}, animationDefaultData, animationsDefaults[i], animations[i]);
if (animationsDefaults.appendSkillKeyOnAnimationImage || animations[i].appendSkillKeyOnAnimationImage){
if(animationsDefaults.appendSkillKeyOnAnimationImage || animations[i].appendSkillKeyOnAnimationImage){
animationData.img = key + animationData.img;
}
this.animations.push({key: i, animationData});
Expand All @@ -129,10 +129,10 @@ class SkillDataFactory
mapOwnerConditions(data, defaults)
{
let ownerConditions = sc.get(data, 'ownerConditions', []);
if (0 === ownerConditions.length) {
if(0 === ownerConditions.length){
return;
}
for (let ownerCondition of ownerConditions) {
for(let ownerCondition of ownerConditions){
this.ownerConditions.push(
Object.assign(
{},
Expand All @@ -147,10 +147,10 @@ class SkillDataFactory
mapOwnerEffects(data, defaults)
{
let ownerEffects = sc.get(data, 'ownerEffects', []);
if (0 === ownerEffects.length) {
if(0 === ownerEffects.length){
return;
}
for (let ownerEffect of ownerEffects) {
for(let ownerEffect of ownerEffects){
this.ownerEffects.push(
Object.assign(
{},
Expand All @@ -165,10 +165,10 @@ class SkillDataFactory
mapTargetEffects(data, defaults)
{
let targetEffects = sc.get(data, 'targetEffects', []);
if (0 === targetEffects.length) {
if(0 === targetEffects.length){
return;
}
for (let targetEffect of targetEffects) {
for(let targetEffect of targetEffects){
this.targetEffects.push(
Object.assign(
{},
Expand Down
Loading

0 comments on commit f60bfbb

Please sign in to comment.