Giter VIP home page Giter VIP logo

anomalousspace's Introduction

Anomalous Space

The next evolution of Discord/Slack/Web/Mobile game. Procedurally generated universe with an emphasis on survival and story.

Built with NodeJS, JS, and DiscordJS.

The game is still in development and testing phase. Want to contribute, help and test, join the Discord server and read the How to contribute below.

Website | Official Discord

How to contribute

Requirements

Getting Started

It's possible to run on Replit with the steps below.

Server

  • Install all necessary packages using "npm --prefix ./server/api/ install"
  • Copy the config.example.json to config.dev.json, which can be found under ./server/api/src/settings/
  • Change the secretKey (line 4) to a string of your choice
  • Setup a MongoDb database
  • Make database access available from every IP address, which can be done by pressing "ALLOW ACCESS FROM ANYWHERE" when adding any IP address
  • Add a new database user using the password method
  • Locate your Database URL, usually found under "Database" -> "Connect" -> "Connect your application" (Remember to choose the password method!)
  • Change the MongoDb host (line 8) to the MongoDb URL you found in the step above (Example: "mongodb+srv://:@cluster0.fhlbn.mongodb.net/?retryWrites=true&w=majority")

Client

  • Install all necessary packages using "npm --prefix ./client/discord/ install"
  • Copy the config.example.js to config.dev.js, which can be found under ./client/discord/
  • Change the API secret (line 5) to the same value as the secretKey on the server
  • Change the token (line 20) to the Discord Bot token. A discord bot can be made on the official [Discord Developer]https://discord.com/developers/applications) page.
  • Change the webhook (line 15) to a webhook on a Discord Channel (used for error display)
  • Change the logwebhook (line 16) to a webhook on a Discord Channel (used for logging diplay)
  • Make sure your bot is added to a server, before starting the Discord Client

Starting the Client and Server

  • Run the server "npm run sdev" and the client "npm run cdev"
  • (Alternatively, just press Start on Replit, the package should behave.)

anomalousspace's People

Contributors

dependabot[bot] avatar elemperor1 avatar quadrum1 avatar the-crazyball avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

quadrum1

anomalousspace's Issues

Prefix case sensitive

The prefix when using just a letter is case sensitive, should be case in-sensitive.

Add notifications in settings

Add ability for player to turn off notification (DM) in settings. Currently only have the Mining notification, but need to make it expandable to others in the future.

Artifacts

Add artifact finding on random worlds. The artifacts will be used to unlock portals to travel between sectors/galaxies.

Ideally when you start the game for the first time, you will have an artifact found through a mission from the tutorial.

When colonizing add colony

When colonizing, currently only adds the owner, need to increase the colony size on the planet, currently stays at 0.

The plan is when first colonization is done, increase colony size to 1. Later this will will increase when supplying the planet with resources from asteroids, minerals etc... the more colonies, the more efficient it is at refining raw material for later upgrades.

Colonization

Ba able to colonize planets, sets ownership to the player.

  • Colonization costs, in this case credits maybe some other resources.
  • When a planet is colonized with a colony, it will need to grow, perhaps by giving it mined resources.

Colonization costs

It should costs resources/credits to colonize. Specifics to be discussed determined.

Cargo changes

Change the models and mining function to use/have quantity instead of amount and add name of cargo item.

Add better logging

All logging is at the command line level. Need to get the logging somewhere else online where it is accessible. Papertrail and Winston? Open to other free/low cost alternatives.

Past bots I would use a specific channel on a Discord Server or MongoDB. Perhaps this might still be the solution long term.

Planet resources adjustments

At the moment all discovered planets have Torsium, Plutonium, Uranium, Rock with a randomized amount per planet. Need to change this to depending on the planet type some resources are more abundant than others and some resources may not exist. This will add a better experience to exploration and planet conquering.

Map and Jump sector error

When using the jump and map commands, some sectors (Worm Holes, Black Holes) don't show as an anomaly on the map.

Default prefix active at all times

At the moment the default prefix "!s" is disabled when someone changes to a custom one for their own profile. This should not happen, need to make sure the default "!s" is always accessible even when a custom one is set.

Cargo Pagination

Add paging to the cargo command, similar to the scan command. Cargo could be quite long.

Might be worth adding a max cargo quantity...

Power module not used

When unequipping the power module, you can still use other modules that need power. Need to fix.

Mining changes

Make use of mining lasers and randomize mined quantity based on laser level.

Asteroids Replenishment

Have a routine server side that replenishes the asteroids fields discovered and mined.

  • Need to make sure the sector has been scanned and discovered
  • Determine a maximum replenishment number, could be the number that was generated when scanned
  • Cronjob?

Map Boundaries

Now that galaxy boundaries are added with warp/jump we need to implement that in the map and jump commands

Only show sectors in the commands that you can reach, example when you are at the boundary of the galaxy and open map, you can still see the sectors outside the boundary this will cause confusion.

It's either we don't show them at all or make the fade and still show the hex. To be tested.

Paging for the colonies command

The colonies will error out exceeding character limit when hitting roughly 50 colonies. Need to add paging just like the scan command. Thanks to AdotHam#3465 for the report.

Asteroid Mining Functionality

Proper storage in database of the asteroids mined. Store asteroid rocks and dust, with a random chance of some other mineral.

Upgrades QoL change

Have the ability to upgrade modules when they are equipped. This will solve the cargo hold upgrade issue. Will also be easier to upgrade modules with less steps.

Jump error with certain users

Elemperor got this error when using the jump command.

Cannot read properties of undefined (reading 'class')
Stack Trace:
TypeError: Cannot read properties of undefined (reading 'class')
at Object.exports.run (/home/cabox/workspace/starx/client/discord/commands/jump.js:20:48)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async module.exports (/home/cabox/workspace/starx/client/discord/events/messageCreate.js:110:9)

Jumping - add button to scan

After doing a jump, add a button to the resulting message to scan sector if the sector wasn't scanned before. This will facilitate the scanning of a sector much faster and easier.

Leaderboard command

Finish the leaderboard command, add:

  • Top credits
  • Top mined
  • Top battles
  • Top scanned sectors
  • Top sector jumps
  • Top colonies
  • Top sectors discovered
  • Top systems discovered

There should be paging and filters added to the embed.

Filter should select the stats you'd like to see with paging.

Warp outside of galaxy

Prevent warp command from warping outside the boundaries of the galaxy. It doesn't check the max sectors of the galaxy at the moment.

Ship - Dark Matter collector

Add dark matter collector to ship and add dark matter when jump around in sectors.

  • add a X amount with leveled ship dark matter collectors, the higher the level the more it collects
  • when warp is engaged, it used the dark matter reserve, also replenishes but very little

Dark matter is used for the warp drives to travel longer distances.

Colonize with parameters

Add the ability to enter parameters for the colonize command instead of the interaction way.

example: .colonize {planet name}

Refactor client/server requests

Simplify the client requester to be more generic instead of writing a function for every new command. This should be also done on the server side routes.

Document code

Proper documentation for all the code. At the moment it's not really easy to follow what each function, object, types, modules, classes, etc... does. Use JSDoc formatting. Example:

/**
 * [someFunction description]
 * @param  {[type]} arg1 [description]
 * @param  {[type]} arg2 [description]
 * @return {[type]}      [description]
 */
const someFunction = function (arg1, arg2) {
	// Do something...
};

Additional useful tags like @todo, @deprecated, @license, and so on can be used.

[Hub Sectors] links and stations

  • Add orbiting station around the Garden planet in the hub sector.
  • Add warp links in hub sectors to other sectors and galaxies.

New command to change prefix

Have the user be able to change the prefix to their own prefix, independent global server prefix. This is partly done, just need a command to change it and store.

First start (new player)

When a new player starts, after they start with the start command, it's not clear what to do, until we have the first tutorial missions in place which will guide players and show them how the game plays, we need to add buttons on the last message, to scan, map, jump to get them started.

Map colors

Show on the map your colonized sectors/planets with a color spanning a the sector region.
Also have the ability to change the color in settings.

The color will only be visible to the owner of the sectors/planets, other will see a standard perhaps grey color that it's colonized by someone else.

Factions

Ability to create factions. Specifics to be determined. ie: what will be the advantages/benefits of being in a faction.

Remove overly nested code

Multiple files, especially on the client side, feature overly nested code, like sector.js

Modularizing this should be a priority, as it makes further development easier

Ship Modules

Change the ships to use modules for better ship customization. Example: Starter ship 'Explorer'

Modules Max: 6
Modules: Shields, Sensors, Lasers (Mining), Jump Drive, Warp Drive, AMC (Anti Matter Collector)

These will be interchangeable.

Settings for server admins

Add and admin button in help for server admins to set server specific settings.

  • Set channels that the bot will run commands.
  • Set a category that channels will be created. Channels can be created for missions, trading etc...

Asteroid belts in a system

Add asteroid belts in a system. Add as a planetaryObject type. There should be a random 1-3 asteroid belts in a system for the moment.

Change the scan, system commands accordingly to show the total asteroids from the belts.

Mining would just randomly pick from the asteroid belts that have asteroids.

Prefix Features

  • Add in a way for people to see their prefix; maybe by mentioning the bot.

  • Under every command panel it says "!s play", "!s start"; make it so their prefix is shown instead.

Screen Shot 2022-07-14 at 8 48 22 PM

  • Allow people to still use the "!s" prefix even when their own prefix is different.

Missions

Add missions functionality. Random event missions and tutorial missions.

  • First mission find an artifact.
  • Colonize a planet
  • Mine an asteroid field
  • Build a refinery to process Asteroid chunks
  • Collect x amount of credits
  • Upgrade your ship
  • Build your first warp gate
  • Collect x amount of dark matter

Colonies command

Command to view all colonies that span different sectors/galaxies.

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.