Giter Site home page Giter Site logo

icewolfz / jimud Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 23.33 MB

MUD client for ShadowMUD.com using electron

Home Page: http://www.shadowmud.com

HTML 28.89% JavaScript 5.58% CSS 0.05% TypeScript 57.13% C 0.77% Roff 3.10% SCSS 4.49%
mud-client mud text-adventure-game electron game telnet telnet-client

jimud's Introduction

jiMUD

A mud client using electron for ShadowMUD based on it's web client.

Installation

  • Window
    • Download the msi or exe of your choice to install, follow any on screen prompts
    • Portable: down load jiMUD._VERSION_windows_portable-ARCH.exe to a folder and run, all files will be contained in that folder
  • Linux
    • Deb: sudo app install ./jimud_VERSION.amd64.deb
    • Snap: sudo snap install ./jimud_VERSION.amd64.snap --dangerous
    • Snap classic: sudo snap install ./jimud_VERSION.amd64_classic.snap --dangerous --classic
    • Flatpak: sudo flatpak install ./jiMUD-VERSION.-x86_64.flatpak
    • Rmp: rpm -i ./jimud0VERSION.x86_64.rpm
    • AppImage: set to executable and run

Build

To build jiMUD you must have node, npm, typescript 2.3+, cPython installed Steps to build:

Prerequisites

Install or download Node: https://nodejs.org/en/download/

Electron builder:

Required modules or packages to build different installer types: https://www.electron.build/multi-platform-build.html

Flatpak Prerequisites

  1. Ensure flatpak and flatpak-builder are installed on build system
  2. Ensure the platform and sdk runtimes are installed: flatpak install flathub org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08 org.electronjs.Electron2.BaseApp//23.08

Clone repository or use archive zip

  1. git clone https://github.com/icewolfz/jiMUD.git or git pull if already ready cloned, or you can download and unzip the source archive

Windows

  1. npm install - install all the node modules, Note you will need to rerun this only if modules have been updated in the package.json
  2. npm run release:win - build installer and portable exe

Linux

  1. npm install - install all the node modules, Note you will need to rerun this only if modules have been updated in the package.json
  2. npm run release:linux - build tar, deb, appImage, rpm, and flatpak packages

Linux Slim - Build without flatpak

  1. npm install - install all the node modules, Note you will need to rerun this only if modules have been updated in the package.json
  2. npm run release:linux-slim - build tar, deb, appImage, and rpm packages

Mac

  1. npm install - install node modules, Note you will need to rerun this only if modules have been updated in the package.json
  2. npm run release:mac - build Mac packages

Build and package files are all saved to dist folder

Run

  1. npm install - install node modules
  2. npm run rebuild - this rebuilds modules to work with electron if needed
  3. npm run compile - compile typescript into javascript files
  4. npm run start - start jiMUD

This will allow you to run jiMUD directly from this folder with out the need to package into a self contained folder or building an installer.

Note you only need to run the install, rebuild, and compile steps the first time or any time you update the packages.

Standalone application

  1. npm install - install node modules
  2. npm run build:debug-compile

This will compile typescript into javascript, rebuild native node modules and create a runnable package that can be ran from dist/ARCH-unpacked folder. This can be used for debugging or running it as full app with out the need to install, just run the jiMUD executable in dist/ARCH-unpacked folder.

FAQ

Basic questions answered about jiMUD

Command line arguments

Usage: jiMUD [arguments...]

  • -h, --help Print console help
  • -v, --version Print current version
  • -d, --debug Enable dev tools for all windows
  • -s=[file], --settings=[file] Override default setting file
  • -m=[file], --map=[file] Override default map file
  • -c=[name or id], --character=[name or id] Load a character from character database, may be used multiple times to supply multiple characters to load
  • -c=[id:#], --character=[id:#] Load a character from character database by id only, may be used multiple times to supply multiple characters to load
  • -e, --editor, -e=[file], --editor=[file] Open code editor with current/new client, may be used multiple times to supply multiple files to load
  • -eo, --eo, -eo=[file], --eo=[file] Open only the code editor, may be used multiple times to supply multiple files to load
  • -no-pd, -no-portable-dir When using portable exe use default local data directory
  • -data-dir=[file] Set a custom directory to store saved data
  • -l=[file], -layout=[file] Load window layout file
  • -il, --ignore-layout Ignore layout and do not save window states
  • -nci, --no-character-import Do not import old character.json
  • -fci, --force-character-import Force import old characters.json
  • -f, --force Force load of instance even if single only instance enable
  • -nls, --no-layout-save Do not save any layout changes when application is closed
  • -nw, --new-window Open a new window
  • -nw=[id], --new-window=[id] Open a new window with and load a character
  • -nt, --new-tab Open a new tab
  • -nt=[id], --new-tab=[id] Open a new tab and load a character, similar to --character but will not replace current active tab if it exist
  • -el=[file], --error-log=[file] Set a custom error log path
  • -cr, --crash-reporting Enable crash reporting to local folder
  • -crp=[path], --crash-reporting-path=[path] Path where crash reporting data is saved

References

Known Issues

  • Linux:
    • Tray icon: When app indicator is used on Linux, the click event is ignored, see Electron docs for more limits
    • Auto updating is only supported by Appimage
    • Show in task bar is no longer supported because Electron removed support due to wayland
    • Immortal tools: may get permission denied errors when using snap when trying to build path navigation drop down, can be gotten around by rebuilding using classic confinement for more system access and using the --classic argument when installing
  • Display:
    • Unicode RTL text selection display is not correct
    • MXP Image height is limited to line height
    • MXP Image selection/copy not supported
  • Backup:
    • Loading data that is related to operating system may revert to default or be ignored as paths could not exist or may be in wrong format
  • Command input
    • Text selection may be lost when other controls are given focus
  • Immortal tools
    • Dragging multiple files and dropping outside to other applications will only drop the first file, all others ignored. This is a limitation of electron drag and drop support, until it is added it can not be supported outside of application
  • Advanced editor
    • Paste may lose some colors/background colors on pasted, this is a bug in TinyMCE editor
    • When applying styles to all text some styles may get stuck
    • Some styles will not flash when flashing is enabled depending on order of styles applied
    • Reverse style has weird results with heavy nesting of reverse tags and colors, suggest to just use normal background colors.
    • Correction from context menu may remove applied styles depending on if they are just that word
    • Complex color codes may be returned due to nesting and other complex style choices
  • Mail composer
    • All issues from Advanced editor
    • Does not work if in an editor on mud or at a prompt accepting input
  • General slow performance, do not use --disable-gpu it can impact overall performance
  • Mapper
  • Code editor

jimud's People

Contributors

dependabot[bot] avatar icewolfz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jimud's Issues

Command delay system

Create a system to allow commands to be delayed before sending.

Best way to handle this would be to create a command queue system and push the latest command on to the stack and track last sent time, if time >= delay period send next command and just repeat until no commands are sent.

Error rebuilding with fsevents

Due to bugs in npm5 fsevents fails to rebuild on windows and linux.

work around is just delete fsevents from the local node_module path unless you use it.
as none of the default settings use fsevents it should be safe to remove an rebuild as needed

Build problems

Builds crash (blank screen) when pressing space in command input.

This is caused by the spell checker/sqlite3 being wrong platform, fix is to build each version stand alone. Rebuild node modules for 32bit, build package, rebuild 64bit then build package, and repeat for arm that way everything should have correct versions of node modules.

This will slow build times but only real fix when using native modules for sqlite3 and the spell check.

Another options is to try and see if any native modules can be left unpacked in free folders to allow them to be replaced if wrong build happens.

Mapper Temp fix

If mapper causing issues try to disable mapper in settings, other related featuers that will not work
are backup systems

Spell check temp fix

Run from dev tools:
webFrame.setSpellCheckProvider("en-us", true, { spellCheck (text) { return true; } });

This may also run from an alias of script type webFrame, should be a global variable, but due to a bug in aliases and script see #9 for details on how to work round the bug until a new release is ready

Chat captures non chat lines

Chat capture system captures store list and locker inventories due o the update of allowing any charcter sin the [] blocks due to party line support, a way around it is to match maybe the ----------- lines or the column header line and turn on an "ignore" flag and then turn it back off at the footer

Profile manager menu bar

Add menu bar to profile manager to match standard gui and allow navigation other then by buttons

gamepad support

Add support for gamepads using chrome gamepad API, best bet is to link it to the macro system somehow using custom key code in a gamepad #+buttons+axis format. will have to figure out some format as not to effect current macro system. Another way is expand macro code object to have new gamepad fields that sets the pad # and the buttons/axis data using a custom enum system for 12 buttons and 3 axis with 5 axis directions -x, -y, x, y, none

Bug in aliases / macros with script type

There is a bug with aliases and macros when using script type.

Work around is to return an empty string, return ""; at the end of the alias/macro
this will add a blank line/possible send a new line to mud

Fixed in c31f57f but posting an issue since it will be a while before 0.3.2 can be build due to a crashed pc

Autologin

Autologin doesnt always seem to load correctly and login using the correct username

Profile loading

See about speeding up profile loading as if a large amt of profiles it will load all into memory,
maybe limit to only enabled ones for memory and speed while leaving disabled ones unloaded and load on demand as needed. This should make a client load faster as it will not have to load every profile but only those required.

This is more possible now with the enabled list moved to settings file instead of per profile. where before the only way to know if a profile was enabled was by loading that profile.

#wait function

saddly this can not be added with out a lot of work, it would require a custom system to handle timing.

But there exist an alternative method already, you can use javascript to simluat this by using script type for macro, alias, trigger, or buttons just use setTimeout(()=> { your code after wait is over}, milliseconds);

for example to simulate <#wait 2000;get all> you would do setTimeout(()=> { client.sendCommand("get all"); }, 2000);

Mapper docks/zones

When docking some times the docks are using the mainlock dock room instead of creating a new zone/room possible overlapping maybe

MCP (Mud Client Protocol)

Maybe add MCP protocol support, unneeded with GMCP custom protocol for immortal tools. But may be useful for non immortal as it supports a simple editor system for any editor which may be a nice feature to add. An alterivtve way would be to create a GMCP user editor protocol as GMCP uses telnet while MCP does not and older MUDs can not add it with out updating server code or ways to interrupt data if a user is in an editor.

MCP home page
MCP protocol specs 2.1

Split screen scroll

The screen will continue to scroll in split screen mode instead of staying locked, the position needs to be adjusted as new text comes in

Delete profile

Deleting a profile does not cause the client ot unload it from memory causing it to be saved when using client load systems

Aliases, macros, context, buttons, triggers priority sorting

when accessing it does not correctly sort the priority, in theory sorting should be done by priority of each item based on profile's priority.

Right now only buttons and triggers do any type of sorting by priority and its a global sort and ignores profile.

Best way to handle this is change how the client stores each type, what needs to happen is each type should be cached, profile keys are sorted by profile priority, so client just needs to loop the loaded profile keys, and build an array of each type, and sorting the array before contacting it to cache, thus it will first be sorted by profile, then by each item priority

Expand color perferance editor

Expand the editor to allow changing of not just the basic ANSI regular, bold and faint but all xterm 216 colors and grey scale colors.

The main issue with this is dialog space, native color picker takes up some space and having over 200 of them would be cramped, a possible solution is to use a custom list control and let users click edit or double click and open a popup window to pick a color

Extension system

  • Create an extension system extending the client easier
  • Min info for a plugin is unique id/name
  • Location of plugins allow {data}/plugins and {documents}/plugins
  • convert mapper, backup, status, chat capture into plugins
  • plugins are a sub folder with a package.json and maybe allow a theme.css for plugins as well?
    • Examples:
      • chat - {data}/plugins/chat/package.json
      • mapper - {data}/plugins/mapper/package.json
      • backup - {data}/plugins/backup/package.json
      • status - {data}/plugins/status/package.json
      • immortal - {data}/plugins/immortal/package.json
  • package.json min requires: { "name":"short name", "productName":"Long name", "description":"describe", "main":"path to main js"}
  • basic extension:
    • import { Client } from "./client"; export function create(client: Client) { }
    • export function menu { return [] }; return an array of menu items to be set for plugins > extension name > menu items, this is limited as electron does not support dynamic menus so it will require a rebuild everytime the menu changes
    • add an event to context menu that is emitted by client so extensions can hook and modify context menu
    • add execute evens to allow extensions to execute custom commands?
    • client.on('function', (event)=> {}), for custom functions
    • add IPC communication system to allow custom windows to communicate back with extension
      • good examples are mapper requires a separate window but the extension has to be created and started in main

Re-code the inline variables and functions

Re-code the inline variables and functions for parse in the parsing system instead of simple js replace function calls, should improve speed as will not have to call all functions all the time

At the current time they use a java-script replace call for each function, performance should improve if built into the parser directly as it will then only run the code if a match has been found instead of running the replace every time commands are sent from the mud.

MSP mal-formed url

MSP module has forced url settings set to override server set ones.

Fixed with: 8814476

for those with older version you can fix it by running:
client.MSP.forcedDefaultSoundURL = ""; client.MSP.forcedDefaultMusicURL = "";
from the dev tools or a script trigger or alias

[Linux] desktop file is lacking a Categories= entry

The desktop file is lacking a Categories= entry in the *.desktop file.

According to the menu spec,

By including one of the Main Categories in an application's desktop entry file, the application will be ensured that it will show up in a section of the application menu dedicated to this category. If multiple Main Categories are included in a single desktop entry file, the entry may appear more than once in the menu.

Hence, please add at least one of the following in the Categories= key.

Main Category Description Notes
AudioVideo Application for presenting, creating, or processing multimedia (audio/video)
Audio An audio application Desktop entry must include AudioVideo as well
Video A video application Desktop entry must include AudioVideo as well
Development An application for development
Education Educational software
Game A game
Graphics Application for viewing, creating, or processing graphics
Network Network application such as a web browser
Office An office type application
Science Scientific software
Settings Settings applications Entries may appear in a separate menu or as part of a "Control Center"
System System application, "System Tools" such as say a log viewer or network monitor
Utility Small utility application, "Accessories"

In addition, you could specify one or more from the longer list of Additional Categories.

Please test the result with desktop-file-validate and make sure it passes.

electron-builder offers native support for this since v19.22.1.

Reference: AppImage/appimage.github.io#2

Advanced editor flashing formated text

When test is formatted as flashing the editor does not correctly insert the pinkfish code (%^FLASH%^) into the formatted output text sent to the main client

Paste special

Allow custom pasting of clipboard test, to allow prepending, appending text to each line, making immortal development easier.

Requires a custom dialogm should use ctrl+shift+v

Custom Display font size

When picking a size in pref dialog it can some times mess up current display and only way to fix is clear.
Also when changing font size NAWS window size doesn't always seem to be set correctly until you force a resize

Event triggers

Add event trigger support where you can have triggers executed when a client event happens

Possible event ideas

  • Open, fired when client opened
  • Closed, fired when client closed
  • Connected, fired after connected to host
  • Disconnected, fired when disconnected
  • Error, fired when an error happens

Combat/Party icons

CSS for monster icons and party icons needs to be completed

Basic icons for common monsters, the css class names exist just need to assign icons from spirtes in assets if exists or find a new one

Basic race icons for player party icons, simple silhouette should be good generic ones as most races have distinct features like ears/ head sizes with only minor expects like faeries, but those exceptions can be gotten around with some creative solutions, for example faeries just add the tops of the wings poking up near shoulders

Map data being lost randomly

Some people have reported mapper data disappearing randomly, i have been unable to recreate the issue reliable, reports are it happens on installing updates, changing profiles, and any thing that changes data causes the mapper to be lost

Immortal tools feature / wish list

  • Upload/Download of files
    • Allow use OS temporary files
  • Reset sever and local data
  • Custom editor open
    • Open files after download in editor
  • Queue progress tracking
    • Allow stop, pause, restart of items in list
  • List resizing, allow resize of local/remote and the queue/file browsing areas
  • Add context menus
    • queue
    • log
    • local list
    • remote list
  • Remote features, include any proper warnings
    • Directory browsing
    • Select all
    • Goto - add goto object
    • Backup - allow users to run backup command
    • Delete - allow deleting of file
    • Clone - clone files
    • Renew - renew files
    • Update - update object
    • Dest
    • Change to dir - change to current remote directory
    • Copy full path - copy full local or remote path
    • Rename - rename a file
    • Make directory
  • Local features, include any proper warnings
    • Directory browsing
    • Select all
    • Delete
    • Make directory
    • Create new file
    • Copy full path
    • Rename
    • Maybe copy/paste/cut support
    • Upload changed files of current folder, ignoring just downloaded
    • Allow watching of folder/s to upload files outside of current open local folder
  • Drag and drop support
  • Folder support: allow support for selected folders for all operations allowed on files
  • Status bar with basic status total local files/folders, remote files/folders, current selected local/remote
  • Accelerators: add custom key down tracking for custom accelerators based on current focused list
  • Add notifications for errors and important messages
  • View: allow opening remote file locally in basic viewer built into jiMUD using a temporary file
  • Edit: allow opening remote file locally in basic editor built into jiMUD using temporary file
  • optimizing and improving speed and other areas

Log viewer

Add a basic log viewer, and try and determine log format based on file extension of html, raw.txt or .txt

#setsetting/#getsetting

update to include new setting fields, and update the related doc table of supported settings for these commands

Help files

Create and bundle basic help files built form docs to allow access from help menu. A basic window with a simple breadcrumb or similar should be enough.

also finish building help docs, mostly assets.md

Document code

Update all code to have proper JSDoc, including all classes, functions, enums, and any public variable for typescript and javascript files

Button bar edit context item

Add an edit to button context menu that will open the button directly in the profile manager for editing.

This requires either re-coding the button bar build system and instead of using the global button array to use custom code to build the button bar. The custom code will to loop each loaded profile and then sort each button array by priory then build the button bar adding a custom data-profile to link a button to profile for gathering in to to load profile manager.

Timers like zmud?

add alarms, timers and tick timer like zmud, at the current time jiMUD can create timers using javascript setTimeout and aliases/triggers but maybe can add functions and a simple interface i nthe profile manager for easy adding/disabling/management like zmud maybe using things like #alarm, #timer, #tick

Mac support

It requires a mac to build proper support, so unless there is some open source mac builder mac version will never be supported or able to be tested.

Those that want to build mac versions and submit fixes are free to

Chat capture not firing triggers

When chat capture system is enabled text from chat capture do not fire triggers when gag is enabled. Will have add code to fire triggers when gag enabled

new profile instead of trigger

When creating a new trigger after clicking apply for trigger it will instead create a new profile.

Steps:
create new trigger, apply, click add new trigger

Mapper random directions

on slower systems it seems the mapper command queue can be mixed up and multiple blocks can be sent out of order preventing auto walk from working correctly, at time there is no real solution to fix it in code as its a slow processing issue, for now the only fix is to increase the mapper send delay above the default 500 milliseconds until it process slow enough for the target system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.