How to Play
Introduction
Welcome to Stellar Bit, a sandbox game that combines strategy, coding, and space exploration. In Stellar Bit, you can:
- Host your own servers or join others.
- Write scripts to control spacecraft and automate tasks.
- Mine asteroids for materials to build more spacecraft.
- Engage in multiplayer battles with objectives set by the server host.
This tutorial will guide you through the basics of playing Stellar Bit, from understanding game concepts to running the client and creating your own control scripts (called "computers").
Understanding the Game
Stellar Bit is a multiplayer environment where creativity and coding skills enhance your gameplay. You have the freedom to:
- Create or join custom servers.
- Use or develop scripts to control your in-game assets.
- Mine, build, and battle using resources you collect.
- Set or follow objectives defined by the server host.
Key Concepts
Game Objects
Game Objects are entities in space with physical properties like position, mass, and velocity. They consist of materials and are the fundamental units of interaction in Stellar Bit.
Types of Game Objects:
-
Spacecraft
- Description: Customizable vessels built from components.
- Function: Serve various purposes like mining, combat, or transportation.
- Components:
- Blocks
- Role: Main building units of a spacecraft.
- Attributes: Vary in weight and toughness.
- Weapons
- Role: Spawn projectiles for mining or attacking.
- Attributes: Different weapons produce different projectiles.
- Engines
- Role: Change the spacecraft's velocity.
- Attributes: Use 'fuel' and have limited capacity.
-
Projectiles
- Description: Uncontrollable objects spawned by weapons.
- Function: Used for mining asteroids or attacking other spacecraft.
-
Star Bases
- Description: Stations where spacecraft are built and deployed.
- Function: Serve as hubs for construction and launching operations.
-
Asteroids
- Description: Space objects rich in materials.
- Function: Can be mined for resources used in building and upgrading.
Player
As a player, you:
- Own Game Objects: Directly control spacecraft, star bases, etc.
- Accumulate Materials: Use resources for building and upgrading.
- Script Control: Write or use scripts (computers) to automate and enhance gameplay.
Running the Client
Installation
-
Download the Client
-
Install the Client
- Follow the installation instructions provided in the repository's README file.
Starting the Client
-
Offline Mode
- Run the client without connecting to a server to explore and test features.
-
Connecting to a Server
- Open the Network Connection window.
- Enter the server details to join a multiplayer game.
-
Connecting to the Central Hub
- If you have an official Stellar Bit account:
- Open the Central Hub window.
- Connect to see a list of officially hosted public servers.
-
Loading a Computer
- Open the Controller window.
- Load a computer (script) to control your gameplay.
- Continue to the next section to create your own computer.
Creating a Computer
What is a Computer?
A computer in Stellar Bit is a user-created script that executes game commands based on custom logic. It can automate tasks, respond to in-game events, and provide interactive interfaces.
Supported Programming Languages
- Rust is the primary language for writing computers.
- Interoperability: Rust can interface with other languages, allowing flexibility.
- User Interface: Uses egui, a simple GUI framework in Rust, for user interactions.
Getting Started with the Computer Template
Steps to Create and Load Your Computer:
-
Download the Computer Template
-
Set Up Your Development Environment
- Install Rust: If not already installed, download from rust-lang.org.
- Code Editor: Use any editor like VSCode, Atom, or IntelliJ IDEA.
-
Open the Template in Your Editor
- Navigate to the downloaded folder.
- Open the project in your code editor.
-
Compile the Computer
-
Load the Computer in the Client
- Open the Stellar Bit client.
- Go to the Controller window.
- Load the compiled computer from the
dist/
directory.
-
Test the Computer
- Upon loading, new egui windows should appear.
- Interact with the UI to ensure it's working correctly.
-
Modify and Recompile
- Make changes to the code in your editor.
- Re-run
./build.sh
to compile.
- Reload the computer in the client to see your changes.
Tips for Developing Your Computer
-
Understand the API
- Explore the game commands and data structures provided.
- Check any available documentation or examples.
-
Start Small
- Begin with simple tasks like moving a spacecraft.
- Gradually add complexity, such as mining automation or combat strategies.
-
Use egui for UI
- Create buttons, sliders, and other controls for interaction.
- Enhance the user experience with intuitive interfaces.
-
Debugging
- Use logging or console outputs to troubleshoot issues.
- Test frequently to catch and fix errors early.
-
Community Resources
- Join Stellar Bit forums or chat groups.
- Share your computers and learn from others.
Conclusion
You've now set up the Stellar Bit client and created your first computer script. With these tools, you're ready to explore the vast universe of Stellar Bit, mine resources, build spacecraft, and engage with other players.
Remember:
- Experiment: Try different strategies and scripts.
- Collaborate: Engage with the community for tips and ideas.
- Have Fun: Enjoy the blend of coding and gaming in Stellar Bit!
Happy coding and safe travels among the stars!