Giter VIP home page Giter VIP logo

singularity-rs's Introduction

singularity-rs

Build Status codecov Docs Dependabot Status Bors enabled GPLv3 license

This will be a reimplementation of the game Singularity ( https://github.com/SoPra18-07/Singularity ) in Rust using amethyst. Also inspired from Achikaps.

Stage: implementing parts / planning.

How to run

To run the game, simply use cargo run. A recent rust installation is recommended. Make sure to have the amethyst dependencies installed.

On macOS: cargo run --no-default-features --features "metal".

Modules that are still needed (or things I need to think through)

(and are somewhat on their own, so they might result in their own crates if nothing applicable can be found)

  • Screen Manager -> use amethyst state machine
  • Input Manager -> amethyst has one
  • Sound Manager -> amethyst has one
  • Physics / Game mechanics -> keep looking
  • Map -> might need custom implementation
  • UI -> amethyst has considerable implementations already. There is little documentation though ...
  • Pathfinding (graph-paths, flow-paths, heatmap, A*, ...) -> probably custom implementation
  • Prioritized Task-based work distribution (DistributionManager) -> absolutely custom implementation
  • Platforms (with all their mechanics, PlatformActions) (will probably result in a combination of entities and systems and event channels) -> custom implementation
  • The Graphics themselves -> get them somewhere or create own?

Progress

A plan of things I intend to implement (which is one of my initial plans for this project) can be found in the PLAN.md.

Take a look at the issue tracker or the Project how the progress is in detail (it is likely to be more frequently updated than the plan). If something is not clear, feel free to ask for clarification.

People to thank

The awesome Logo was made by Yvan Satyawan yvan674 (Splash.jpeg and Splash2.jpg).

Amethyst Dependencies

If you are compiling on Linux, make sure to install the dependencies below.

Arch Linux

$ pacman -Sy grep gcc pkgconfig openssl alsa-lib cmake make python3 freetype2 awk libxcb

Debian/Ubuntu

# apt install gcc pkg-config openssl libasound2-dev cmake build-essential python3 libfreetype6-dev libexpat1-dev libxcb-composite0-dev libssl-dev libx11-dev

Fedora

# dnf install pkgconfig gcc openssl-devel alsa-lib-devel cmake make gcc-c++ freetype-devel expat-devel libxcb-devel libX11-devel

openSUSE

# zypper install gcc pkg-config libopenssl-devel alsa-devel cmake gcc-c++ python3 freetype2-devel libexpat-devel libxcb-devel

Other

See your distribution-specific installation process for the equivalent dependencies.

Please note that you need to have a functional graphics driver installed. If you get a panic about the renderer unable to create the context when trying to run an example, a faulty driver installation could be the issue.

Other

Network can be found here.

singularity-rs's People

Contributors

bors[bot] avatar dependabot-preview[bot] avatar fkarg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

singularity-rs's Issues

Tracking Issue - Overall Progress

This is just a split-up and updated copy of the plan. Here, sub-issues tracking progress of each sub-element is likely to be correctly referenced first.

Template

  • Entities
    • Component


    • Optional Component


    • Component (not MVP)



  • System
    • Required System
    • Associated Component
    • Needed Entity

General, Core Game functionality



  • Basic Entities and Components ( #2 )


  • FreeMovingUnit (not MVP)

    • Moving
      • Position
      • Velocity
      • Acceleration
    • A*-based pathfinding
    • Flocking / FlockingGroups
      • FlockingGroupNumber
      • GroupMiddle
      • GroupAverage
    • TeamNumber (own or enemy/other faction)
    • ReportState
    • Selectable
    • Drawable
    • LoseHealth


    • Shooting
    • TargetingAt
    • UserControl
    • AIControl


    • Settler (not MVP)
    • Transporter (not MVP)
    • Communicator (not MVP)



  • Platform
    • DefendWithRockets (not MVP)
    • Communicator (not MVP)
    • CreateEnergy (not MVP)
    • StoreResource (not MVP) (-> Logistics Hub)
    • CreateUnit (not MVP)
    • CreateFreeMovingUnit (not MVP)



Graphics and User Interface



  • General UI and Graphics stuff ( #3 )



  • MiniMap (not MVP)
    • Position
    • Size
    • ...



Screens



  • General Screens ( #4 )



  • LoadGameScreen (not MVP)
    • UI elements
      • Labels
      • Buttons



  • Options Screen (not MVP)
    • UI elements
      • Labels
      • Buttons
      • Hori

zontalSlider
- VerticalSlider
- RadioBoxes



  • TutorialScreen (not MVP)
    • UI elements
      • Labels
      • Buttons



Systems



  • Generally required Systems ( #5 )



  • Flocking (not MVP, because FMU not MVP)

    • Compute direction averages
    • Compute middle points
    • Compute distance between units
    • FreeMovingUnits
    • Map(s)
  • Planning Military maneuvers from AI (-> MilitaryManager; not MVP)

    • FreeMovingUnit
    • TeamNumber
    • Map(s)
  • More complex planning, building and resource acquiring from AI

    • SimpleAIPlanner
    • DistributionManager
    • MilitaryManager



Other stuff

See #6

Tracking Issue - Systems

Systems



  • Setting Blueprints
    • Platforms
    • Road (?)
    • Graph
    • DistributionManager -> notification: ready to build
    • Map
    • BuildMenu
  • Building Blueprints
    • Setting Blueprints
    • Units
    • Tasks
    • Resources
    • Paths / Roads
    • DistributionManager -> creating tasks for units to put resources there
  • Selecting Platforms
    • Platforms
    • Map/StructureMap
    • Camera
    • SelectionStats
    • Catching Input for specific Platform correctly
  • Update resource numbers on Platforms
    • Part 1:
      • Resources
      • Time
      • CreateResource
    • Part 2:
      • Resource
      • Units
      • Tasks
    • Actually necessary?
  • Making Sliders work for how many units should do what on which Graph
    • GraphUnitStats
    • DistributionManager
    • Probably only a channel, not a System
  • Updating all the UI elements
    • All the UI elements
    • ...
    • some other way in amethyst?
  • Moving & adjusting Camera
    • Input-catching stuff
    • GameScreen
    • Camera
  • Pause / Unpause Game
    • Input-catching stuff
    • PauseScreen
    • Buttons
  • Update on achieved goals/trigger next goals/trigger Enemies coming/ ....
    • Extensive logging all over the place
    • guess this needs to be split up more ...


  • Moving (Free-) Units and Resources
    • Map(s)
    • Units
    • FreeMovingUnits
    • Resources
    • Time-based Update-cycles
  • Do Path-finding for these needed
    • Map(s)
    • PathFinding Algorithms implemented
    • Units
    • FreeMovingUnits


  • Produce & Consume Resources
    • Resources
    • (producing) Platforms
    • ResourceMap
  • Transport Resources
    • Units
    • DistributionManager
    • Graph
    • GraphPathPlanning
    • Resources
    • Platforms
    • Roads
    • Tasks
    • System: Movement
  • Provide new Tasks for Units asking for them -> DistributionManager
    • JoinGraphs
    • SplitGraphs
    • AddToGraph
    • Calculate flowgraphs of resources (async? MVP?)
    • Units
    • Tasks
    • Resources
    • Platforms
    • Roads
    • Graph
    • GraphPathPlanning
    • Channels for communication


  • 'StoryManager' for advancing the story / levels upon reaching goals
    • Map(s)
    • Level(s)
    • Goals
    • Loading level descriptions
    • ReportState(s)
  • Simple planning, building and resource acquiring from AI
    • DistributionManager

Tracking Issue - Screens

Screens



  • MainMenuScreen
    • UI elements
      • Labels
      • Buttons
  • GameScreen
    • Camera
    • Map(s)
    • UI elements
      • GraphUnitStats
      • ResourceStats
      • SelectionStats
      • EventLog
      • NextGoals
      • BuildMenu
  • PauseScreen
    • UI elements
      • Labels
      • Buttons

Required:

  • UI elements
    • Labels
    • Buttons
    • ...

Tracking Issue - Graphics and UI

Graphics and User Interface



  • Camera
    • Position
    • Size (Viewport)
    • Zoomlevel
    • Received Input



  • GraphUnitStats
    • Position
    • Size
    • Label(s)
    • GraphSelector
    • UnitTypeField
      • Label
      • HorizontalSlider
      • Number



  • ResourceStats
    • Position
    • Size
    • ResourceDataCounter
    • ResourcePresenter
      • ResourceGraphic
      • NameLabel
      • NumberLabel
      • DeltaLabel
    • VerticalSlider



  • SelectionStats
    • Position
    • Size
    • Label
    • ResourcePresenter
      • ResourceGraphic
      • NameLabel
      • NumberLabel
    • ActionPresenter
      • ActionGraphic
      • ActionLabel
      • ResourceReqGraphics
    • UnitPresenter
      • UnitTaskGraphic
      • ...
    • FreeMovingUnitPresenter
      • UnitGraphic
      • ...



  • EventLog
    • Position
    • Size
    • ...



  • NextGoals
    • Position
    • Size
    • ...



  • BuildMenu
    • Position
    • Size
    • ...

Tracking Issue - Core Entities and Components

General, Core Game functionality



  • Unit
    • Moving
      • Position
      • Velocity
      • Acceleration
    • UnitType (Produce, Carry, Build, Defend)
    • Graph-Based Pathfinding module
    • Communication: Getting Tasks (finishing, failing, impossible to do, ...)
    • Drawable


    • ResourceCarrying
    • ActiveTask



  • Tasks
    • JobType
    • BeginPlatform
    • EndPlatform
    • DoWorkForPlatformAction
    • ResourceType



  • StoryManager
    • Level
      • Goals
      • Enemies
    • Map
      • Fog Of War
      • CollisionMap
        • Collidable objects on Map
      • ResourceMap
      • StructureMap
      • UnitMap
      • Camera (? -> put that somewhere else !!)



  • Graph
    • Nodes
    • Edges



  • Platform
    • PlatformType
    • Position
    • ResourcesOnPlatform
    • IsBluePrint
    • Selectable
    • ReportState
    • PauseActions
    • LoseHealth
    • Drawable
    • ConnectedPlatforms
    • RoutingTable


    • ProduceResource (Which)
    • RequestResources
    • RemoveResource
    • CreateResource
    • DefendWithBullets
    • DefendWithLaser
    • RequestUnits



  • Map
    • ResourceDepot
    • UnitMap
    • StructureMap
    • CollisionMap
    • FoW (for each TeamNR)

Tracking Issue - Other stuff

Other stuff





  • Plan it all out before writing code (in progress). Update as needed.
  • decouple graphics itself quite intensely from everything else
  • Actually, adhere to 'Model-View-Controller' schema
  • make it simple to make a 3D-version as well (plan that one)
  • Make fixed steps of 45° and lengths of [1, 2, 3] * fixed_length

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.