Skip to content

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Book #391

wants to merge 13 commits into from

Conversation

Defman
Copy link
Member

@Defman Defman commented Mar 8, 2021

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.

@Defman Defman added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Mar 8, 2021
@Defman Defman changed the title Started work on the book Book Mar 8, 2021
Copy link
Member

@caelunshun caelunshun left a 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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feather plugin add?

Copy link
Member Author

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]
Copy link
Member

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.

Copy link
Member Author

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?


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.
Copy link
Member

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() {
Copy link
Member

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)

Copy link
Member Author

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]
Copy link
Member

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

Copy link
Member Author

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
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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`.
Copy link
Contributor

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
Copy link
Contributor

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,
Copy link
Contributor

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`
Copy link
Contributor

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.
Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux is not unix.

Copy link
Contributor

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.


## Commands
### Init
To create a server in an exisiting directory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "existing"

Copy link
Member Author

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 😂

Give a path as an argument to create in the given directory.

### Start
To start a server in an exisiting directory
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "existing"

```

## Creating a new plugin
To create a new plugin in an exisiting directory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one more "existing"

@Defman
Copy link
Member Author

Defman commented Mar 9, 2021

Feel free to submit pull request against my repo 😊

oxkitsune and others added 3 commits March 13, 2021 11:30
* Add particle page to docs

* Fix typo
@ambeeeeee
Copy link
Contributor

What's our plan for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants