1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
//! 
//!
//! An approachable cross-platform framework for creating 2D games in either Rust, Lua, or both.
//!
//! โ ๏ธ **KERO IS CURRENTLY IN UNSTABLE ALPHA TESTING PHASE AND NOT FOR GENERAL USE**
//!
//! - [โ
Features](#-features)
//! - [๐ก Getting started](#-getting-started)
//! - [๐ฌ Alpha Testers](#-alpha-testers)
//!
//! ## โ
Features
//!
//! Kero is a pure-code framework that programmers can use to code their games or even to build their
//! own game engines. It provides:
//!
//! - ๐ฅ๏ธ a window, game loop, and rendering context out of the box and ready to go
//! - ๐ฎ mouse, keyboard, and gamepad input as well as virtual input mapping
//! - ๐ผ๏ธ shaders, surfaces, textures, and other graphics resources
//! - ๐๏ธ a straightforward but powerful canvas-style drawing API
//! - ๐งฎ various math types for vectors, matrices, rotations, etc.
//! - ๐ geometry types for various shapes, overlap testing, extraction, raycasting, etc.
//! - ๐จ tools for working with colors, image encoding, decoding, and manipulation
//! - ๐งณ texture packing and other techniques for rendering optimization
//! - ๐ฆ full access to Rust's speed, power, ecosystem, and pleasure of use
//! - ๐ full Lua bindings if desired, with LuaLS type annotations
//!
//! ## ๐ก Getting started
//!
//! There's no fancy setup required, Kero is just a normal crate. To create a new empty game project,
//! first create it and add `kero` as a dependency:
//!
//! ```console
//! cargo new --bin my_game
//! cd my_game
//! cargo add kero
//! ```
//!
//! Then, replace `src/main.rs` with the following:
//!
//! ```no_run
//! use kero::prelude::*;
//!
//! fn main() -> Result<(), GameError> {
//! // create a game, set some options, and then run it
//! kero::new_game()
//! .with_default_logger()
//! .with_title("My Game")
//! .with_size(1280, 720)
//! .run::<MyGame>(())
//! }
//!
//! // store your game state and graphics resources here
//! pub struct MyGame {}
//!
//! impl Game for MyGame {
//! type Config = ();
//!
//! // initialize your game state here, such as creating graphics resources, etc.
//! fn new(ctx: &Context, cfg: Self::Config) -> Result<Self, GameError>
//! where
//! Self: Sized,
//! {
//! Ok(Self {})
//! }
//!
//! // perform your game logic here
//! fn update(&mut self, ctx: &Context) -> Result<(), GameError> {
//! Ok(())
//! }
//!
//! // perform your drawing code here
//! fn render(&mut self, ctx: &Context, draw: &mut Draw) -> Result<(), GameError> {
//! Ok(())
//! }
//! }
//! ```
//!
//! The [examples](https://github.com/feyworks/feyworks/tree/main/crates/kero/examples) folder has a
//! bunch of examples you can check out to see how different things are done.
//!
//! ## ๐ฌ Alpha Testers
//!
//! Thank you for helping test Kero! ๐ Please join our [**Discord**](https://discord.gg/AYjNw9WHJa)
//! where we are currently looking for feedback:
//! - from both casual, pro, and brand new Rust users
//! - first impressions, if what you expected it to do matched what it does
//! - naming conventions, API or organizational feedback
//! - features that are missing or you cannot find
//! - pics of anything you made! even if itโs basic rendering or movement etc.
//! - sharing your code so I can see how youโre using it/Rust
//!
//! And if you think this is the kind of project you'd like to help out on, we're definitely interested
//! in having more contributors. It would be great if this could be polished up, stabilized, and turned
//! into a reliable game development tool for the Rust ecosystem.
pub use fey_lua as lua;
pub use fey_color as color;
pub use fey_grid as grid;
pub use fey_guid as guid;
pub use fey_img as img;
pub use fey_math as math;
pub use fey_rand as rand;
pub use new_game;
///! Include all types and traits.