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
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:
git clone https://github.com/applesthepi/unnamedblocks
cd unnamedblocks/
.\initialize.bat
.\win_configure_debug.bat
- copy the imgui_XX-XX-XXXX.ini file to
build/debug/ub_client/
and rename it toimgui.ini
(FIRST TIME ONLY) - open
UB.sln
insidebuild/debug/
directory - rebuild solution
- run
UB_CLIENT.exe
inbuild/debug/ub_client/
or run in Visual Studio
git clone https://github.com/applesthepi/unnamedblocks
cd unnamedblocks
./initialize.sh
./configure_debug.sh
- copy the imgui_XX-XX-XXXX.ini file to
build/debug/ub_client/
and rename it toimgui.ini
(FIRST TIME ONLY) cd build/debug/
make -j8
- run
./UB_CLIENT
inub_client/
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.
Debug and Release configuration scripts are provided in the repo root for both linux and windows (prefixed with win_
).
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.
snake_case_only_please.hpp
snake_case_only_please.cpp
hpp
/* 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 <cappuccino/utils.hpp>
/* external lib */ #include <cappuccino/mod_block_pass.hpp>
/* external lib */ #include <cappuccino/preprocessor_data.hpp>
/* external lib */ #include <cappuccino/registration.hpp>
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 <cappuccino/color.hpp>
- 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 dohandler::project
instead ofproject_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 thoughrender::object::text
.
hpp
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
rhr::some::space::example_class::also_use_snake_case(u8 use_snake_case)
{
}
rhr::some::space::example_class::another_one(u8 something_yes)
{
}
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.
/// 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);
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.