Coder Social home page Coder Social logo

edgefortress / oss-13 Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 7.0 63.89 MB

Open Space Station 13 - an open and free Space Station 13 Remake, written in C++ and Python

License: MIT License

CMake 0.21% C++ 96.18% Python 3.48% Shell 0.06% Batchfile 0.06% CSS 0.01%
cpp game imgui pybind11 python sfml space-station-13 ss13

oss-13's Issues

DMM parser

Dream Maker Map format parser.

Server can load, parse Dream Maker Map file and generate map according it. If there is no object, which exists in DMM, Server skips it.

UI Design Layout

Original game's interface looks a bit outdated:

image

We need new UI Design Layout with next prerequisites:

  1. Optimum TileGrid size is 960 x 960 pixels (64 pixels one tile * 15 tiles);
  2. The chat should be large enough to accommodate about as much text as the original one.
  3. Least possible number of elements should placed on the TileGrid.
  4. Mostly all GUI elements above chat can be moved to hotkeys and sub-windows.
  5. RMB menu can be implemented as pop-up bubbles with objects/actions around clicked point.
  6. You can use as much subwindows and hotkeys as you needed.
  7. Console at the bottom of window is obsolete and will not be implemented.

Key gameplay UI elements need to be designed:

  • Chat
  • Inventory
  • Right Mouse Button menu (now it's simple Desktop-like drop-down menu).
  • Health, Body Temperature, Gas indicators.

Health system ❤️ (Health component)

Add special Health Component for Creatures (maybe it will be used for cyborgs and robots too, so it should be abstract enough).

Health Component should work with so-called Health Agents (you can rename it) and Resources. Health Agent is any Creature's organ or part, which is influence to overall creature's health. Resources are blood, oxygen, nutrients, adrenalin, toxins, biological energy, electrical energy (for human with active prostheses) and e.t.c.

On Update, creature's Health Agents update Health Component with some logic. Each agent can consume and produce any resources, cause different effects and provide skills like talking or walking.

For example, let's see base Human organs protype:

Human contains:
Head, torso, Blood and Nervous systems, 2 legs and 2 hands.

Head contains:
1 bone, brain, 2 eyes, tongue, nose, 2 ears.

Torso contains:
Some bones, lungs, hearth, stomach, kidneys and go on.

Leg/Hand contains:
2-3 bones, active part (for example, wrist).

Each part is organ and Health Agent and these parts can be organised as tree with nested nodes.

Bones are inactive and do nothing with resources, but if one of organ's bones is broken, some other organs can be disactivated or be damaged too. For example, if head's bone is broken, brain gets damage, but if one bone of hand is broken, this hand is fully inactive and cant take items with wrist.

Brain and Nervous system consume biological energy and defines character conscious. Nervous system also handles pain.

Lungs consume energy and oxygen. If it receives bad gases mix then it takes damage and consumes more energy.

Stomach is biological energy producer. It takes food, when character eats or drinks.

Eyes and ears consume energy. While they are active, character can see and hear.

Wrist consumes energy too. Character can hold objects with hand if it's wrist is active.

Leg has only bones, but while it's unbroken, character can walk. With unbroken hand character can crawl.

Blood system consumes energy and responsible for metabolism. If it's working bad, resources can be freezed before being placed to shared resources pool.

All these organs are human-specific, but they are should be inherited from general Health Agent.

Human implementation doesn't know anything about how it's organs work. Human implementation knows only about skills which Health Component provides (walk, see, speak, hold items and so on). And these availabilities Health Component gives based on organs composition and state.

Character customization

Add character customization window, that can be opened any time for change player mob appearance options.

There should be:

  1. Image of player character
  2. Options to change:
  • Name
  • Sex and Body type (Default or Slim)
  • Skin color
  • Hairstyle and hair color
  • Eyes color

Z-levels: first stage

The first stage of Z-levels implementation. Player still view just one level at the time.

  • Map can consist of few Z-levels.
  • Ghosts can move between them with shift+W/S or shift + arrows up/down.
  • When player moves to another z-level he should get all necessary Tiles Information for new Z-level.

Add file logs to Server and Client

Both server and client have loggers to console. Also it's should be possible to write some info into file logs.

Write useful for user information and errors to the console, when all other messages should be placed to log-files only.

Set directory for log files as WorkDir/Logs and name them with date and time of creation.

Note: Console messages can be written to log file without any overhead with help of "Chained loggers" (see plog readme).

Spawn projectiles with mob's shift

For now projectiles are spawned at the current mob tile with {0, 0} shift and this looks pretty ugly.

Make them to spawn with mob's shift.

Remove ClientConfig from git

  • Replace ClientConfig.json with ClientConfig.default.json in git. There should be listed all default options.
  • Make it possible to run client without config with default options. For case when user didn't create config file.
  • Describe how to create config file in readme (copy ClientConfig.default.json as ClientConfig.json)

Lag imitation

Add to client optional simulated delays for sending/receiving packets. It will be useful for local testing of client work with bad network connection.

Object can't be clicked when it shifted from its tile

Object is always contained in one tile. So when it's moving between to tiles, it's can't be clicked at one of them.

Now this issue is only about moving, but there will be more problems in future:

  • Objects which sprites are larger then tile size (so these objects stick out to other tiles)
  • Objects that will stick out due rotating or other animations.

Set icon for active hand

Now both hands drawn with same sprite. Active hand should be highlighted with specific sprite (it's already exists in resources).

Chat migration to ImGui

Reimplement chat with ImGui

  1. Main chat window
  2. Chat Entry
  3. Scrolling
  4. Coping text
  5. Any language

Z-levels: second stage

The second stage of Z-levels implementation. Player still views just one level at the time.

  • Client knows about +-2 z-levels, relative to current level.
  • Server sends all data for 5 z-levels.
  • Player can look up/down to other z-level with mouse wheel.

Dynamic Hotkeys

Make it possible to define hotkeys in scripts. Hotkeys should be attached to control component.

Client dynamically receives hotkeys changes. When hotkey is pressed, client send command to server, which call specific callback from scripts side.

Runtime checks and UB handling

Add some convenient ways to check runtime results at runtime.

Example:

Object::Object() {
    static unit32_t nextID = 1;
    id = nextID++;
    EXPECT(id != 0); // check for overflow
}

When runtime error occurs, user should get a clear output.

P.S.
After impelementation, consider to replace all "throw std::exception()".

View Fog

Tiles which are hidden from a mob with walls, airlocks, or other opaque objects shouldn't be visible. The same logic should work for Z-levels where a mob can only see tiles that are physically visible through holes in the floor.

Optional prediction disabling

Add optional disabling of movement prediction.

As it turned out, there is no predictions in BYOND. So we need check, that our movements without prediction is being felt as original SS13 movements.

Atmospheric overlay

Add console command for admins to turn on map overlay with atmospheric info. There should be small window to switch overlay mode between values: "Locale number", "Total Pressure", "Specific Gas Pressure", "Temperature" and so on.

When overlay is turned on, chosen mode values should be drawn over each visible tile.

Base fights

When one creature interact with other with hand (or with object in hand), there should be a hit. When hit is occured, blood drips should be spawned. Add special functions to Creature for damage handling. There is no heath system yet, so these functions can be empty for now.

GameProcessUI expectation failed

Expectation can be failed at this line.

There is the race between:

  1. UIModule change from AuthUI to GameProcessUI in UI::Update()
  2. Network GraphicsUpdateCommand processing.

Command GraphicsUpdateCommand can be received before UIModule change.

Gas canister

New Gas Holder component for object (implemented on C++-side, i guess). And canister object with this component.

Dynamic server listening port

Server listening port shouldn't be hardcoded, because OS doesn't free port after server exit sometimes (especially on Linux!).

For now, we can hardcode a range of ports or synchronize port between Server and Client with local text file.

Gravity

Add a bool property "gravity" to a tile (In the future, tiles will be combined into Locations and gravity will be the property of location).

  • If there is "gravity" and there is no floor, then objects should fall to Z-level below, if it exists.
  • If there is no "gravity" then mobs can move by Z-levels upward/downward with shift+W/S buttons if there is no floor/ceiling accordingly.

Dynamic FOV adjusting

Make it possible to dynamically change FOV for specific camera.

It will be used for admins at least.

Endless map

Make it possible to create maps without borders.

All objects exists independ of tiles, tiles just point to exist objects, but tiles are persistent and stored in fixed matrix. So we should be able to create tiles "on-demand", when players discover them. Excess tiles should be removed when players go away from them.

All objects should be persistent still. We can destroy excess tiles, but not objects.

Сontinuous actions

Add actions with delay. When you try to do such action, it will be done only after specific time. While action is in progress, progressbar should be drawn.

Add closet

Add closet object. It's should open and close when clicked. Not passable when closed.

frame
frame

Projectiles fly through thin window

Bump method is called only when projectile is above object with CENTRAL density. Need to check directional density depending on the vector of projectile.

Light Authorization System

Simple Light Authorization System without Client ID logic.

  • Client starts with Connection window, where there are fields IP and Nickname.
  • Player is free to choose any Nickname, and change it whenever he wants.
  • On Connect, Client sends choosen Nickname.
  • Server identificates Player by Nickname.

Right Mouse Button context menu

Add Right Mouse Menu button which provide access to object's verbs via context menu.

This is mostly admin/debug menu. More convenient radial RMB menu will be added later.

Map Loader

Map Loader can load and save current map to JSON formatted file.

Map format:

{
	version: version id string,
	size: [x, y, z],
	about: { map-wide information },
	tiles: [
		{ tile information, content: [objects] } // x = 1, y = 1, z = 1
		...
		{ tile information, content: [objects] } // x = max_x, y = 1, z = 1
		{ tile information, content: [objects] } // x = 1, y = 2, z =1
		...
	]
}

object format:
{
	type: "type id",
	fields: {
		field1: field1content,
		field2: field2content,
		...
	}
}

Resources sending subsystem

Subsystem for sending resources files from server to client. These files can be a quite large, so new subsystem should work in the parallel with main network system and shouldn't lock gameplay data channel.

Some resources can be sended before player connected to the round.

Add table

Add not-passable table. When table is clicked, object from activeHand should be placed on it.

Icon:
frame

Spawn window

Add console command which open Spawn-window when entered.

On ScriptEngine start, all Python objects should be added to global list of types. All these types should be available to spawn with spawn-window.

Spawn-window should contain objects sprites and some additional information what the object is (name at least).

Define multiple objects in one script file

Issue description:
For now, ScriptEngine finds out about object types only on CreateObject calls. To create object, ScriptEngine needs script file name and object type name. Since in most cases script file name and object type name are same, file name also is used as object type name to avoid dublication:
CreateObject("Objects.Items.Clothes.Uniform")
creates object Uniform from file Objects/Items/Clothes/Uniform.py

Because of that, there is a limitation: one object per script file. We need to get rid of this limitation.

Proposed solution:
Make ScriptEngine to load all files on the start and detect all existing objects types. For each object type provide unique id which will be used for instances creating.

For example, ID can be looked like:
File: Objects/Items/Clothes/Uniform.py
Object Type: Uniform
Proposed ID: Objects.Items.Clothes.Uniform (path + type name, file name isn't used)

Z-levels: open space

If tile is empty (doesn't have any solid buildings like a floor or wall), Player is looking through it and see grayed objects of level below.

If under open space is open space too, then player can see significantly grayed objects 2 levels below.

If 2 level has open space in this tile too, so tile is grayed.

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.