From 0ddafff3c87ca18bb3f9b0374f9a11b0424f2e39 Mon Sep 17 00:00:00 2001 From: Dima Marhitych Date: Wed, 30 Aug 2023 15:01:00 +0200 Subject: [PATCH] Update docs Added changelog and added docs how to use codon --- README.md | 44 +---------------------------------------- docs/changelog/3_0_0.md | 26 ++++++++++++++++++++++++ docs/changelog/4_0_0.md | 14 +++++++++++++ docs/index.md | 4 ++++ docs/wiki/external.md | 19 ++++++++++++++++++ docs/wiki/index.md | 1 + docs/wiki/wiki.md | 6 ------ tests/codon_test.py | 10 ++++++++++ 8 files changed, 75 insertions(+), 49 deletions(-) create mode 100644 docs/changelog/3_0_0.md create mode 100644 docs/changelog/4_0_0.md create mode 100644 docs/wiki/external.md create mode 100644 tests/codon_test.py diff --git a/README.md b/README.md index 8bc7f1d..1f07f82 100644 --- a/README.md +++ b/README.md @@ -118,49 +118,7 @@ See at [our websites docs/wiki section](https://docs.fusion-engine.tech/) ### 🛠️ Features we are working on -We are working hard to implement very basic and complex stuff so our engine becomes more rigid. These features are worked on or will be worked on: - -#### 3.0.0 and later - -- [x] Engine - - [x] Window - - [x] Create window - - [x] Get data from window - - [x] Draw shapes - - [x] Draw images - - [x] Input - - [x] Storage system - - [x] Rendering options - - [x] Delta-Time - - [x] Pip package and SetupTools - - [x] Cython - - [x] Implement cython for extra speed - - [x] Dev version without cython - - [x] Vectors (stores x and y coordinates) - - [x] Create vector - - [x] GUI library - - [x] Text - - [x] Drawing (Build in draw function) - - [x] Buttons - - [x] Sound system - - [x] Sound player - - [x] File support - - [x] And more... - -### 4.0.0 and later - -- [ ] UI (Using TKinter) - - [ ] Menu - - [ ] Create project - - [ ] Editor - - [ ] Code editor build in - - [ ] Run game - -- [ ] Physics system using PyMunk - - [ ] Gravity - - [ ] Rendering - - [ ] Collision system - - [ ] Physics shapes +We are working hard to implement very basic and complex stuff so our engine becomes more rigid. To see our changelog and todo list, please go [to our docs](https://docs.fusion-engine.tech/) 💡 - If you have more ideas, please tell us them in our [discord group](https://discord.gg/Smg3CK4ZMc) or create an issue! diff --git a/docs/changelog/3_0_0.md b/docs/changelog/3_0_0.md new file mode 100644 index 0000000..869ff91 --- /dev/null +++ b/docs/changelog/3_0_0.md @@ -0,0 +1,26 @@ +# 3.0.0 Todo/Changelog + +- [x] Engine + - [x] Window + - [x] Create window + - [x] Get data from window + - [x] Draw shapes + - [x] Draw images + - [x] Input + - [x] Storage system + - [x] Rendering options + - [x] Delta-Time + - [x] Pip package and SetupTools + - [x] Cython + - [x] Implement cython for extra speed + - [x] Dev version without cython + - [x] Vectors (stores x and y coordinates) + - [x] Create vector + - [x] GUI library + - [x] Text + - [x] Drawing (Build in draw function) + - [x] Buttons + - [x] Sound system + - [x] Sound player + - [x] File support + - [x] And more... \ No newline at end of file diff --git a/docs/changelog/4_0_0.md b/docs/changelog/4_0_0.md new file mode 100644 index 0000000..528cd23 --- /dev/null +++ b/docs/changelog/4_0_0.md @@ -0,0 +1,14 @@ +# 4.0.0 Todo/Changelog + +- [ ] UI (Using TKinter) + - [ ] Menu + - [ ] Create project + - [ ] Editor + - [ ] Code editor build in + - [ ] Run game + +- [ ] Physics system using PyMunk + - [ ] Gravity + - [ ] Rendering + - [ ] Collision system + - [ ] Physics shapes \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index c3c5b85..2cbd7cc 100644 --- a/docs/index.md +++ b/docs/index.md @@ -23,6 +23,10 @@ And in tutorials we made some tutorials for you to better understand fusion! ### Tutorials - [Tutorials](tutorials/index.md) + +### Todo list and changelog + - [3.0.0](changelog/3_0_0.md) + - [4.0.0](changelog/4_0_0.md) ## 💻 Setting up diff --git a/docs/wiki/external.md b/docs/wiki/external.md new file mode 100644 index 0000000..7ca52ff --- /dev/null +++ b/docs/wiki/external.md @@ -0,0 +1,19 @@ +# External tools + +## Using pygame +If you cant find some function you need in this engine, the you could use pygame as the engine is build on pygame. You dont need to import pygame, as that can make so issues, you just use: +```python +fusion.pg +``` +Make sure your not using main (the initialized class) but the module itself. + +## Using Codon Compiler +So you heard of [codon](https://docs.exaloop.io/codon/), a python compiler with can compile your python code to machine code, which makes your code a lot faster But how do you use it? Well, its easy! You just install it and then modify these things in your code: + +Loop: +You need to modify our loop to support codon, so you need to change it to this: +```python +while main.window.running(window): + ... # Your own loop thing +``` +You may reconise this type of while loop from the main wiki as your second option. \ No newline at end of file diff --git a/docs/wiki/index.md b/docs/wiki/index.md index 14528a3..d4516c5 100644 --- a/docs/wiki/index.md +++ b/docs/wiki/index.md @@ -8,6 +8,7 @@ So have luck! ### Table of contents - [Main Wiki](wiki.md) + - [External tools Wiki](external.md) - [Color Wiki](color.md) - [Font Wiki](fonts.md) - [Key Wiki](keys.md) diff --git a/docs/wiki/wiki.md b/docs/wiki/wiki.md index a238ce1..fda24fa 100644 --- a/docs/wiki/wiki.md +++ b/docs/wiki/wiki.md @@ -317,12 +317,6 @@ Its the same option 1, but you change the font to name of the font, like this: ```python main.ui.text.print_text(window, "Your text", 10, 10, "Arial", 20, main.color.WHITE) ``` -## Using pygame -If you cant find some function you need in this engine, the you could use pygame as the engine is build on pygame. You dont need to import pygame, as that can make so issues, you just use: -```python -fusion.pg -``` -Make sure your not using main (the initialized class) but the module itself. ## Quit diff --git a/tests/codon_test.py b/tests/codon_test.py new file mode 100644 index 0000000..9601b9b --- /dev/null +++ b/tests/codon_test.py @@ -0,0 +1,10 @@ +from python import fusionengine as fusion + + +main = fusion.Main() + +window = main.window.new_window("Example: 1", 600, 600) +image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) + +while main.window.running(window): + main.image.draw_image(image)