42 lines
2.5 KiB
Markdown
42 lines
2.5 KiB
Markdown
# SpaceTrader
|
|
(working title)
|
|
|
|
## Tasks
|
|
I don't feel comfortable using an issue tracker for this project right now,
|
|
because of the possibility of losing that data or it not being kept *with* the
|
|
code, so issues are being tracked *in* the repo - here.
|
|
|
|
- [ ] Priority: Write documentation for what currently exists and how it is organized.
|
|
|
|
- [ ] Add a test moon to verify nested orbits work.
|
|
- [ ] Figure out how to integrate player movement with orbits instead of being separate modes of movement.
|
|
- [ ] Figure out a concept of spheres of influence based on body mass.
|
|
- [ ] Make finding a closest object BY sphere of influence so that orbits are a bit better instead of JUST distance. (Basically, it's higher mass reduces "distance" when sorting. Maybe just do `distance - mass` because that's a quick and dirty way to have something working. Except my mass values I think are very large, so maybe `radar_size` or something between is a better scaler. Although I want mass and size not directly related so it SHOULD be based on mass.)
|
|
|
|
---
|
|
|
|
- [ ] Need to rewrite with very basic generation - 2/3 planets in random orbits that don't conflict.
|
|
|
|
- [ ] I added libraries with the intent of adding saving/loading, but haven't done anything with them yet.
|
|
|
|
### Ideas
|
|
- [ ] Instead of only displaying a single most recent message, having an actual console could be useful.
|
|
- [ ] Double check all functions can handle edge cases - mostly by aborting.
|
|
|
|
### Stages
|
|
1. ✅ A ship that moves.
|
|
2. ✅ Resource points. The player can hold a button to collect those resources and store them on their ship.
|
|
3. ✅ The resources collected by the player can be spent on something, like improving the ship. Speed, capacity, collection speed, etc.
|
|
4. Imagine why you are out there collecting resources. Is someone directing you? Are you a freelancer? Is the universe dead? Are you preparing for something? Etc.
|
|
|
|
## Documentation
|
|
|
|
### Cargo Handling
|
|
- `transfer_cargo(source_object, destination_object, cargo_type, cargo_amount)`: Returns actual amount transferred. Source/Destination can be nil to create/destroy resources.
|
|
- `check_cargo_amount(source_object, cargo_type, cargo_amount)`: true/false Does that object have that amount of that cargo?
|
|
|
|
### Finding Objects
|
|
- `get_closest_object(object_list, current_object)`: Requires `position_x` and `position_y` on objects. Returns an object and distance squared to it.
|
|
- `get_closest_orbit(object_list, current_object)`: Deprecated.
|
|
- `get_closest_orbit2(current_object)`: Uses `parent_object` and `orbital_radius` to find the closest orbit to `current_object`'s orbit.
|