Giter VIP home page Giter VIP logo

unnamedblocks's Introduction

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

/* 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>

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

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)
{

}

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.

/// 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.

unnamedblocks's People

Contributors

applesthepi avatar crvajacksonoliver avatar the-emperor10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

unnamedblocks's Issues

intermediate code style

I will not implement an intermediate code style until I can settle on a specific set of rules that I believe should be part of the standard. Its also possible that I will never implement this into the code style for this repository. If I later think that these rules should be in the style then I will attempt to create rules for scopes and chunking code together.

registry improvements

block registry

Modularize blocks into categories into mods in addition to having all the blocks and categories registered by themselves.

shader registry

Make a shader registry to make it easier to write and use shaders. Check out #29

debugging

on break variables

Be able to hover over wires and arguments to see the value and type. Have a list of all variables that the next block has access to (includes imports and exports).

thread breaking

  • fix input of message so user can specify which thread
  • call to ub_appuccino with thread idx
  • pause all threads
  • break on error

thread stepping

  • ub_cappuccino call with thread idx and in/over/out options
  • steeping editor ui

Stack Splitting Randomly

Describe the bug
Stack splits unintentionaly. No idea when or why it happens. This is unnoticeable and runtime doesn't work as expected because the stack is split without you knowing (unless you move it yourself).

Likley started after a major change to how MouseButton is handled

debug view

Create a debug view inside RHR to toggle out the main layers with debug ones. You should be able to view RHR and Cappuccino detailed statistics.

New description:

Debug view to show stats for everything possible in multiple pages showing different information in ways relevant to the context.

F1 - main view
F2 - workshop
F3 - debug view 1
F4 - debug view 2

Debug ideas:

  • i_ui::ui_transform_update, i_ui::ui_chain_update_buffers, and i_ui::ui_update_buffers calls.

stack synchronization

A bar linking stacks will synchronize execution between threads. When block flags are implemented, then it will have flags to release all execution or hold all execution based on the flag that is set. When a thread hits the synchro bar, it waits until another thread has hit the synchro bar. It doesn't matter if its on the same stack or multiple stacks, once more then one thread (maybe flag configurable) has been stopped, they all get locked, then released.

concept:

full build process

preprocessor::developer

preprocess

Using string lookups, the mod preprocessor stage will capture the debug and release functions expecting them to be named execution_release. This will be stored and later passed over to the substitute stage.

substitute

The substitution stage expects the parameter name of the cap::mod::block::pass* to be "pass". Using this, it then locates and adds the appropriate information to a list along with the surrounding text.

developer

The developer creates the R values and R value references. The R values have the format r_<idx> and has the idx that just gets incremented for every R value. Common values of the same type will be checked and used with the same R value. Because L values exist only on a single stack, but each stack has its own function, they are created using the format l_<n> where n is the variable name. Each stacked L value Is allocated at the beginning of the function, but if in the variable its later, its just set to its default setting at that moment. Heaped L values will be allocated at the block location as intended.

Stacks are individual functions separated into multiple cpp files depending on how many files should be targeted based on thread count (x2).

Once everything is ready, it generates the files and overhead text ready to build.

compiling

Use a compiler to compile it and run it.

snake case

make ALL names snake_case. The only exception is to make the enum values COMPLETE_UPPER_CASE. The enum's name will still be snake_case.

Because of the high chance of collisions, putting everything in proper namespaces needs to be done. With that, putting classes in more accurate directories also needs to be done.

c++ performance features

functional

change all c function pointers to functionals. If possible, change static c functions to funcationals as well.

unique_ptr

use unique_ptr from shared_ptr if possible and replace all new calls with smart pointer allocations.

parallel

standardize parallel tasks using std::async. Maybe use or make a dependency task system.

build settings

Find a way to centralize build settings (info like version) in an external file ideally toml. Avoid having a file like that for runtime because it can be changed.

input and field handler

input handler

Redesign the input handler's public interface and go through how events are processed.

field handler

The field handler doesnt work well and as such the zone really big to bypass most of the optimization that is broken.

field depth

make field calls work with the bullish event layer.

data type overhaul

Make custom variable system based on std::shared_ptr instead of raw C. Find a way to save anonymous std::shared_ptrs so ub_cappuccino can manage it.

Possibly use a common class with a virtual function to delete the memory. That way memory can be managed and remain anonymous.

Another option in one of the later answers of the stackoverflow is to just use malloc and free.

https://stackoverflow.com/a/941953/10469297

Secondary Menu Not Working

Describe the bug
It stopped working after changing input system. Issue is most likely within one of the stacking/ classes inside the MouseUpdate function.

Expected behavior

To Reproduce

Screenshots

Additional Information

polish pass

  • add documentation from place holders in all classes
  • go through all TODOs
  • finish #10
  • go through warnings (primary all casting)

panels and planes

Instead of adding separate primary plane and toolbar planes, keep the plane very generic and make the primary plane, toolbar plane, and categories panel be part of some ub essentials mod. The toolbar plane and categories panel's functionality should all be define in that essentials mod. By default the ub standard library and the ub essentials mod will be sub modules in the repo.

block output options

If you toggle an arrow (right), you can select a datatype to convert the output argument to (any datatype registered by the new system #11). In addition, with booleans you can toggle (left) to invert the output. This can also be stacked with the conversion so you can invert a boolean, then convert to whatever.

All of these operations are only valid on arguments that are assigned output. More graphical identifiers will be used to show that an argument is assigned output. There should also be an id type in ub_essentials that acts similar to a string that can be assigned an index for build.

block_output_options

renderer changes

dynamic resizing

recreate swapchain during resizing instead of end.

pipeline objects

have the objects belong to a pipeline instead of the objects switching pipelines on the fly. This change will increase performance a lot.

batch render objects

create a static system to batch "render object"s into another "render object".

editor ui improvements

typing blocks

Type out blocks and then type out arguments and press tab to go to the next one. Dropdowns you will use arrow keys then press tab to compete and move on.

comments

attach to blocks or free floating

copy + paste

figure out how to add it to win and unix

var/raw rendering

when an argument is in variable mode, have an angled strip pattern. When the argument is connected via a wire, then it should have some other vanity to identify its context.

license

update license thought out other resources. Just a todo for myself.

restructure renderer

Restructure renderer so that render passes are the foundation abstraction for storing what i_ui objects to use per frame.

ub_renderer_restructure

More multiplatform support

I see you only support operating systems that support the c standard library. THIS IS NOT GOOD FOR MULTIPLATFORMING. Solution: create your own standard library that works on any os and cpu (even one's that don't follow ISO), next make your own PC to test it.

Make sure you build a new planet in isolation in case anything goes wrong; so code a space shutter, exit the milky way, and build your remote planet there; next you need to simulate life and gravity there...

If you are not satisfied with your testing site, you could try inventing your own universe just in case. When you finish that, make sure that you support EVERY UNIVERSE IN THE MULTIVERSE, when you get that finished, I think you might have a half-decent multiplatform support...After you connect all parallel multiverses and support those too.

IsTopical

blocks flagged true with bool IsTopical() can not be connected underneath other blocks/stacks. They can only have blocks connected under it.

wrapping blocks

  • primary block summons secondary block
  • graphicly link both blocks and indent inside blocks (vanity offset parameter)
  • mod method gets called to identify where the secondary block should be relative to other blocks in a stack during a drag
  • indented blocks are given the indentor (blocks have a list of affecting indentors), they can also be told to remove an indentor

block flags

This concept is very new so this may change.

Block flags are flags that any block can have. These flags can be connected by a "wire" to other flags or other block arguments. If flags are interconnected then during a block's execution, then the block can either read from the wire or write to it depending on the flag type (maybe both). The wire can connect multiple flags together with multiple read and write configurations in between. There can me many flags and the location of the wire that intersections the flags will be divided by the total count. That way many flags can be connected with wires to other flags or arguments. Block arguments must be connected to atleast one write enabled flag before it regardless of any other connections.

If any wire (connecting any number of flags) connects to an argument of a block, the visual will be terminated into the side of the block (similar to the flag). The argument then gets coded visually with the color of the wire and some vanity to show that the argument of the block is connected to the flag wire.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.