-
Notifications
You must be signed in to change notification settings - Fork 145
Book #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Book #391
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far. We should wait to merge this until all the CLI tools and API features described here are implemented, though, or else people will get confused :)
|
||
### Add plugin | ||
```sh | ||
feather add <plugin-identifier> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feather plugin add
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about it, but what are you going to add which are not plugins?
Maybe add feather add
as shortcut for feather plugin add <plugin-identifier>
?
### Init | ||
To create a server in an exisiting directory | ||
```sh | ||
feather init [path] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to rename the CLI tool to feather server
, since in the long term we may implement a feather-client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm should a feather-client maybe have its own name, like quill has its own name?
docs/src/quill/ecs.md
Outdated
|
||
A `Component` is either a marker or a small amount of data. | ||
An `Entity` is a set of components. | ||
The `World` is a set of entities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ecs
, not World
(World
contains blocks)
let world = game.world; | ||
let entity = world.spawn((Player, Health { value: 10, max: 20})); | ||
let query = world.query::<(&Player, &mut Health)>(); | ||
for (entity, (&player, &mut health) in query.iter() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't bind by reference here (it'll create copies)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the iterator is going to return Ref<T>
and Mut<T>
or?
## Creating a new plugin | ||
To create a new plugin in an exisiting directory | ||
```sh | ||
cargo quill init [path] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe change to cargo quill new
to mirror Cargo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I did describe the functionality of cargo init [path]
, init can create the project in the current directory, cargo new <path>
cannot be used in the current directory (maybe cargo new .
works?). Should I maybe not just add both?
|
||
## Recomendations | ||
We also recomend that you install the following | ||
### Rust analyzer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also suggest IntelliJ Rust as an alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not used IntelliJ Rust before, maybe you or someone else who have used it could write that part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used it before, but in my experience the CLion version is better (still made by Jetbrains tho) since it has debugger support. I switched to vscode because the IntelliJ version was slower in my opinion.
# Bundles | ||
|
||
Bundles are a convenient way of adding the required components for a given entity. | ||
For instance, the Minecraft entity `Piglin` requires the marker `Piglin`, `Uuid`, `Position`, `Physics` and `Health`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires the marker
Piglin
, ...
The way this is written almost implies that all of those components are "markers." An easy way to fix this could be
For instance, the Minecraft entity
Piglin
requires these components:Uuid
,Position
,Physics
, and the marker component,Piglin
@@ -0,0 +1,17 @@ | |||
# Components | |||
This page lists all components and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird stop at and
# Plugins | ||
|
||
## Install | ||
### To install Feather, if you are running Unix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux is not Unix! Typically people use *nix
or just Linux
- `common` | ||
- `datapacks` should be moved to `libcraft` | ||
- `ecs` | ||
- `generated` is deprecated in favour of `libcraft` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently pulling this out of feather it might as well be removed from here
# ECS | ||
ECS stands for Entity Component System and is an integral part of feather and quill. | ||
|
||
ECS is an alternative to Object Oriented Programming where you usally stores data in a object and then arrays of the object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe link to a more detailed and thorough explanation of ECS.
|
||
First you should install Rust, you can follow the guide below or visit [rustup.rs](https://rustup.rs/) directly. | ||
|
||
### To install Rust, if you are running Unix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux is not unix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
He meant a Unix-like operating system.
docs/src/feather/getting-started.md
Outdated
|
||
## Commands | ||
### Init | ||
To create a server in an exisiting directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "existing"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny, it's from the man page of cargo 😂
docs/src/feather/getting-started.md
Outdated
Give a path as an argument to create in the given directory. | ||
|
||
### Start | ||
To start a server in an exisiting directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "existing"
``` | ||
|
||
### Upgrade | ||
To upgrade plugins in an exsisting directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "existing"
docs/src/quill/getting-started.md
Outdated
``` | ||
|
||
## Creating a new plugin | ||
To create a new plugin in an exisiting directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more "existing"
Feel free to submit pull request against my repo 😊 |
What's our plan for this? |
I have started some work on the book, I'm not sure what chapters we should have or in which order they should occur.
This PR will serve a way of commenting, writing, and discussing the layout and content of the book.