Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/applesthepi/unnamedblocks
A modern, moddable, block based visual language.
https://github.com/applesthepi/unnamedblocks
bindings cpp gpl language modding visual-language
Last synced: 4 months ago
JSON representation
A modern, moddable, block based visual language.
- Host: GitHub
- URL: https://github.com/applesthepi/unnamedblocks
- Owner: applesthepi
- License: gpl-3.0
- Created: 2019-11-18T01:31:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-15T20:00:43.000Z (over 1 year ago)
- Last Synced: 2024-05-02T00:04:56.873Z (9 months ago)
- Topics: bindings, cpp, gpl, language, modding, visual-language
- Language: C++
- Homepage: https://unnamedblocks.com
- Size: 38.7 MB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# ATTENTION
Please note that this project isn't setup properly for public use. There are probably issues with the setup and usage. There also isn't any help for when things go wrong. In the future there will be more downloads. For now, the only demo available is from 2 years ago on the stable and nightly branches. You can download the prebuilt zip/7z for windows here https://unnamedblocks.com/downloads# Installation
**master** - active development branch
**stable** - stable releases (major and minor)
**nightly** - bleeding edge releases (beta and alpha)You're expected to have cmake, git, vulkan, and clang installed and in your path. Follow these steps for repo setup:
### Windows / Visual Studio
1. `git clone https://github.com/applesthepi/unnamedblocks`
2. `cd unnamedblocks/`
3. `.\initialize.bat`
4. `.\win_configure_debug.bat`
5. copy the imgui_XX-XX-XXXX.ini file to `build/debug/ub_client/` and rename it to `imgui.ini` (**FIRST TIME ONLY**)
6. open `UB.sln` inside `build/debug/` directory
7. rebuild solution
8. run `UB_CLIENT.exe` in `build/debug/ub_client/` or run in Visual Studio### Linux Shell
1. `git clone https://github.com/applesthepi/unnamedblocks`
2. `cd unnamedblocks`
3. `./initialize.sh`
4. `./configure_debug.sh`
5. copy the imgui_XX-XX-XXXX.ini file to `build/debug/ub_client/` and rename it to `imgui.ini` (**FIRST TIME ONLY**)
6. `cd build/debug/`
7. `make -j8`
8. run `./UB_CLIENT` in `ub_client/`# Tools
### Formating
There is a formatting shell script that will format the repo files based on the clang format provided in the repo root. If you want the script to format cmake as well, you need to install `cmake-format` package on linux.### Configuring
Debug and Release configuration scripts are provided in the repo root for both linux and windows (prefixed with `win_`).# Code Style
This describes the code style that should be used throughout the Unnamed Blocks repository. External additions like mods absolutely do not have to follow this strict standard. I plan to add bindings using different case styles for c++ in the future.### Filename
`snake_case_only_please.hpp`
`snake_case_only_please.cpp`### Includes
hpp
```cpp
/* required */ #pragma once
/* required */ #include "config.h"/* current lib */ #include "rhr/stacking/block.hpp"
/* current lib */ #include "rhr/stacking/arguments/argument_text.hpp"
/* current lib */ #include "rhr/registries/char_texture.hpp"/* required */ #include
/* external lib */ #include
/* external lib */ #include
/* external lib */ #include
```
cpp
```cpp
/* req if class */ #include "example_class.hpp"/* current lib */ #include "rhr/stacking/block.hpp"
/* current lib */ #include "rhr/stacking/arguments/argument_text.hpp"
/* current lib */ #include "rhr/registries/char_texture.hpp"/* external lib */ #include
```### File Structure
- If inside the class, you can reference objects without using the absolute namespace.
- You may use `using namespace` in a cpp file for namespaces that you don't want to type out, though it is still recommended you type it out so its clear. That way you can easily do `handler::project` instead of `project_handler`.
- Use the absolute paths for including files unless your including the hpp file of a class from the class's cpp file.
- namespaces should follow the path. Have the path be plural/verb and the namespace be singular/noun. For example, you might have a path of `rendering/objects/text.hpp` and you would reference it though `render::object::text`.hpp
```cpp
namespace rhr::some::space
{
///
class example_class : public rhr::some::thing
{
public:
///
struct data_snake_case
{
///
u64 use_these_types;
///
i8 use_snake_case;
};
///
enum class some_enum_thing
{
LIGHT_NORMAL,
BOLD_NORMAL,
LIGHT_ITALIC,
BOLD_ITALIC
};
///
void also_use_snake_case(u8 use_snake_case = 5);
///
void another_one(u8 something_yes);
void overrided_function_init_1() override;
void overrided_function_init_2() override;protected:
///
void some_protected_function();
void overrided_function_1() override;
void overrided_function_2() override;
void overrided_function_3() override;
private:
///
void some_private_function();///
f32 m_use_this_convention;
};
}
```
cpp
```cpp
rhr::some::space::example_class::also_use_snake_case(u8 use_snake_case)
{}
rhr::some::space::example_class::another_one(u8 something_yes)
{}
```
### Documentation
Unnamed Blocks currently uses doxygen documentation generation. In the example above, notice how overrided functions dont even have a space for documentation, this is because doxygen uses the most super class's documentation. Heres a big example from the i_ui class. Also notice how any phrase or sentence begins with a capital letter and ends with a period.
```cpp
/// Possible buffer update, use flags to make sure you need to call this.
/// \param offset This object's physical position (render space). See (TODO: link) for more clarification.
/// \param update_child Notifies this of a transform update using i_ui::transform_update_spec_position
void set_position_local_physical(const glm::vec<2, i32>& offset, bool update_child);
```
### Version Standard
This is the version standard Unnamed Blocks will be following.Major . Minor . Beta
All Major and Minor updates should be user tested extensively while beta updates will have tests ran on it and briefly user tested with some projects. Major and Minor updates will both use the stable branch while beta releases will be merged to nightly. Master will just be the development branch that isnt ready for public use and may have issues.