A multiplayer block-based space exploration game, written in rust using the Bevy engine.
If you're interested, join our new discord server here:
Cosmos has ships that you can pilot through space. (And yes those are working laser cannons.)
Build your own ship block by block and walk inside while flying through space.
Once you reach your destination, make a hopefully safer than this landing.
To get started, install your OS dependencies here. The dependencies section is all you need to do.
This project requires the latest nightly rust to compile. To swap to nightly, run the command
rustup default nightly
.
To run the client, navigate to the cosmos_client directory and run
cargo run
For the server, navigate to the cosmos_server directory and run
cargo run
For release builds, append the --release
flag to the build/run commands.
To compile the workspace (not normally necessary), navigate to the root directory of the repo and run
cargo build
To view the cosmos documentation, run the following commands
cargo install mdbook
cargo install mdbook-mermaid
Then navigate to the docs folder and run mdbook-mermaid install
To view the documentation, navigate to the docs/
directory. To have it update as you modify it, run mdbook serve
and navigate to the URL it provides, or to just build it run mdbook build
.
See the issues page for the list of current features/bugs in development.
- Galaxy Generation
- Stars procedurally generated in spiral-like pattern based on seed
- Create star
- Light emits from star
- Load star within system
- Create star
- Planets generate around stars
- Biospheres depend on how close they are to the sun
- Dynamic biospheres based off temperature
- Only generate if planet is close enough to player
- Cube planets
- Planets will now be cubes instead of flat planes, and will be about the size of the sector
- Redo saving/loading of planets
- Dynamically generate chunks & unload them based on players' positions close to planet
- Make generation work on all faces of planet
- Block orientation for every block
- Biospheres
- Speed up terrain generation
- Make molten biosphere
- Enhance grass biosphere
- Create icy biosphere
- Asteroids
- For now just floating rocks in space
- Save generated universe
- Save planet locations
- Fix broken ship functionality
- Make entities no longer pass through loading structures.
- Stars procedurally generated in spiral-like pattern based on seed
- Align body with structure
- Switches to FPS Camera
- Aligns the player to that structure
- Fix child locations being not updated based on transform relative to parent
- Add button to align to structure facing
- De-align, switch back to free camera
- Create free camera
- Biosphere Improvements
- Ice biosphere glaciers
- Water block
- Lava block
- Structures
- Rocks spawning
- Undergrowth
- 1 More tree type
- Groundwork for biomes
- Plane,
- Redwood forest,
- 1 Additional forest
- Ocean
- On-planet skybox
- Sun-side skybox
- Perhaps done via a sphere surrounding the planet that always faces the nearest star
- Sun-set skybox
- Night-side skybox
- Sun-side skybox
- Caves
- Lit up underground blocks
- Animated textures
- Sounds
- Laser cannon fire
- Block take damage
- Thrusters moving
- Space ship idle
- Background space music
- Block break
- Place rotated blocks
- Multiblock machines (if enough time)
- Revamp power generation to use reactor multiblock structure
- Colored laser
- Colored glass placed in front of laser
- Inventory GUI
- Able to open inventory
- Abstract the 3d block GUI camera
- Fix the 3d block GUI camera to not render anything except GUI blocks
- Fix seeing through cracks in blocks
- Infinite universe
- (Client) Player can travel any distance from 0,0,0 with no noticable issues, and everything moves relaitve to player
- (Server)
- Objects move relative to player world they are a part of
- Player world moves relative to its player
- Players can be a part of the same world if they are close enough
- Requires rewrite of bevy_rapier to support multiple physics worlds
- Merge PR dimforge/bevy_rapier#328
- Update to bevy 0.10.0
- Performant ships
- Ability to have 50 small-sized ships loaded with minimal performance impact
- Dynamic object loading
- (Client)
- Unload objects that are too far away
- Request entities that server sends if they don't have the entity for them
- (Server)
- Unload objects that are too far from any player
- Load objects that are close to a player & send that info to client
- Only send information about objects to clients that are close enough to have them loaded
- (Client)
- Display coordinates in top left (sector, local)
- Revamp rendering to allow for more than cubes
- Display hotbar items
- 3d models for blocks
- Improved state management
- Client state management
- Server state management
- Core able to utilize both states
- Block resource loaded in PreLoading state
- Blocks loaded in Loading state
- Systems loaded in PostLoading state
- Ability to pilot Ship
- Mouse movements steer ship around ship core
- Standard movement controls mapped to ship acceleration
- Interact with ship core to enter piloting mode, press interact button again to exit
- Create max ship speed
- Ship core
- Interact with this block to pilot the ship
- Cannot be mined while other blocks are present on the ship
- Create block
- Localized planetary gravity
- All entities near planet's radius are subject to its gravity towards its relative downward vector
- The gravitational pull should scale inversely exponentially the farther the distance from a certain threshold (most likely the highest chunk) then remain constant past that point
- All entities near planet's radius are subject to its gravity towards its relative downward vector
- Ship systems
- Energy system
- Energy producer block
- Energy storage block
- Energy storage system
- Energy generation system
- Thruster system
- Thruster block
- Allows the ship to move + rotate
- Faster movement based on # of thrusters
- Faster rotation based on # of thrusters
- More energy consumption per thruster
- Laser cannon system
- Laser cannon block
- Can be placed in lines to create more powerful lasers
- Click lmb/hold to fire the laser
- The laser is on a cooldown
- Laser cannon block
- Ship hull block
- Energy system
- Ability to place more than one block
- Hotbar
- Rendering of hotbar
- Reads items from inventory
- Inventory
- Items
- Item stacks
- Way of select which item
- Hotbar
- Store block damage
- Ability to save ships to disk + load them
- Implement console commands
- Player Movement
- FPS Camera
- Dynamic Input system
- Structure
- Planet
- Ship
- Asset Loading
- Fix UV mapping floating point errors
- Planet Generation
- Grass planet generator
- Server/Client
- Server controls planet
- Each player controls its own movement (100% trusted)
- Ship creation
- Block registration
- Block registry with numeric + fixed string IDs
- Player entity
- Game State
- Network communication
- Sync bodies from server to client
- Ability to break/replace block
- Dynamic meshing
- Dynamic physics bodies
- Block break events sent to server, server sends back block changed event
- Selects nearest structure
- Integrate physics system
- Physics generator for structures
- Chunk-based physics
- Player collider
- Physics generator for structures
- Integrate bevy engine
- Rendering method for structures
- Chunk-based rendering
- Rendering method for structures
- Add Crosshair
- Support re-sizable window
- GUI to interact with inventory
- Easier way of adding 3d blocks to GUI
- Move items around in inventory via mouse
- Structure build mode
- Press B while piloting ship to enter build mode
- Build mode
- Camera becomes a noclip free cam and goes outside of player's body.
- Player no longer piloting ship, & is able to create + destroy blocks on the ship but ONLY the ship
- Mining beam system
- Mining beam block
- Can be placed in line to create more powerful miners
- Mines the first block hit by the beam after a given time
- Inserts the item into the ship's inventory
- Hold lmb to continually fire the laser
- Structure gets deleted when no more blocks are left
- Mining beam block
- Storage system
- An interface into all the storage devices on the ship
- A way of selecting which systems to use preventing use of systems that are not meant to be actively used
- You can fire a laser cannon, but not actively use the power storage blocks
- Dropped item entity
- Storage block
- A block that stores an amount of items
- Can be interacted with to view the items
- A GUI to view items
- Camera system
- Camera block
- Use left/right to switch between ship cameras
- Changes where your view is
- Planet Generation
- New planet types
- A bunch of new blocks
- Shops
- Sell blocks/items
- Buy blocks/items
- Generates randomly
- Implement random structure Generation
- Prices based on supply + rarity
- Keep supply relatively equal between nearby shops
- Each shop has its own supply of money that it cannot go below
- Implement currency system for player
- Money GUI
- Pay others
- Shop GUI