-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed RFC Feature: No-Code Projects #58
Comments
A lot of the complexity with No-Code projects can be reduced if we focused on only supporting them with an SDK layout. For a source engine, a lot of the operations gets complicated, because all the still engine applications need to built such as Editor, AP and "Generic" GameLauncher. If we focused on supporting No-Code project with an SDK layout, then we wouldn't have to make changes to many of the existing O3DE build helper functions like Then if the user desires to add code to their project later, they only need to use the Because the SDK layout generates ly_add_target calls for the Engine TARGETS, but as IMPORTED, those are essentially no-ops time wise. Well on the topic of Open Questions
We have added scripts for project export to the project templates, but currently it is only focused on creating a monolithic layout. We would need to add a script that can gather the binary artifacts for a non-monolithic permutation and copy them over to the exported layout folder. The existing monolithic script is a start for a non-monolithic script because it already as options for optionally building source code and assets, so it can technically be used to run the Asset Processor and Asset Bundler without any building.
+1 on this suggestion. We generate this file when build the source code engine into an SDK layout for each gem just toss it into the same All we would have to do then is have code that iterates each active gem(this can be as simple as taking each "gem_names" from the project.json file) and then using the Settings Registry Specialization tags with the MergeSettingsFolder function to load each Gem specific modulemap.
|
I'm not sure I 100% understand. The main problem I encountered, and thus the need flag that we have a no code project here, is we want to avoid a few things. One is, we cannot actually call add_library or add_executable ever, as those will start touching compiler and link stuff. second, we MUST call project(.... NONE), or it will do a compiler check and search, which we need to avoid. Now , of course, we could somehow shortcut it, and avoid adding any of the subdirectories from the engine, but that also shortcuts the ability of those subdirectories to run any no-code specific pathways, such as still making sure various python/pip modules are installed, any other setup or linkage they'd want, or later interactions with either the gem system, asset system, or even the project build system... I also found that I had to fake certain subset of projects (Unified launcher, editor, launcher, server, and a few others, which could change over time) since build tools expect them... changing ly_add_target to do a add_custom_target auto created all of those as a POC. |
Oh, as for whether no code projects work with the code version, no, I wasn't expecting it to work with the code version, its installer layout only feature, right? |
It would have to be an installer layout only feature. |
Agreed there. The only place I'm not clear on is what you meant by
As I asked above. In my prototypes, it was necessary to do this for extensability |
What I meant that, is trying to support a No-code project in a source engine workflow, would require CMake functions like This post contains some information about skipping the compiler checks in CMake https://stackoverflow.com/questions/10599038/can-i-skip-cmake-compiler-tests-or-avoid-error-unrecognized-option-rdynamic set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(<projectname> NONE) Other ideas involve using toolchain file that "cross-compiles" the current platform For example a # Explicitly setting CMAKE_SYSTEM_NAME forces CMake to use cross compiling mode
# Even if it is set to the current platform. See the CMAKE_CROSSCOMPILING var documentation
# https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html#cmake-crosscompiling
set(CMAKE_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_NAME})
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(CMAKE_C_COMPILER "${CMAKE_CURRENT_LIST_DIR}/no-op.cmd")
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_LIST_DIR}/no-op.cmd")
set(CMAKE_AR "${CMAKE_CURRENT_LIST_DIR}/no-op.cmd")
set(CMAKE_RANLIB "${CMAKE_CURRENT_LIST_DIR}/no-op.cmd")
# Make sure that the try compile step doesn't try to run the application it builds
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
list(APPEND CMAKE_C_COMPILE_FEATURES
c_std_90
c_std_99
c_std_11
c_std_17
c_function_prototypes
c_restrict
c_static_assert
c_variadic_macros
)
list(APPEND CMAKE_CXX_COMPILE_FEATURES
cxx_std_98
cxx_std_11
cxx_std_14
cxx_std_17
#C++ 98: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-98
cxx_template_template_parameters
#C++ 11: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-11
cxx_alias_templates
cxx_alignas
cxx_alignof
cxx_attributes
cxx_auto_type
cxx_constexpr
cxx_decltype_incomplete_return_types
cxx_decltype
cxx_default_function_template_args
cxx_defaulted_functions
cxx_defaulted_move_initializers
cxx_delegating_constructors
cxx_deleted_functions
cxx_enum_forward_declarations
cxx_explicit_conversions
cxx_extended_friend_declarations
cxx_extern_templates
cxx_final
cxx_func_identifier
cxx_generalized_initializers
cxx_inheriting_constructors
cxx_inline_namespaces
cxx_lambdas
cxx_local_type_template_args
cxx_long_long_type
cxx_noexcept
cxx_nonstatic_member_init
cxx_nullptr
cxx_override
cxx_range_for
cxx_raw_string_literals
cxx_reference_qualified_functions
cxx_right_angle_brackets
cxx_rvalue_references
cxx_sizeof_member
cxx_static_assert
cxx_strong_enums
cxx_thread_local
cxx_trailing_return_types
cxx_unicode_literals
cxx_uniform_initialization
cxx_unrestricted_unions
cxx_user_literals
cxx_variadic_macros
cxx_variadic_templates
# C++ 14: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-14
cxx_aggregate_default_initializers
cxx_attribute_deprecated
cxx_binary_literals
cxx_contextual_conversions
cxx_decltype_auto
cxx_digit_separators
cxx_generic_lambdas
cxx_lambda_init_captures
cxx_relaxed_constexpr
cxx_return_type_deduction
cxx_variable_templates
) I prototyped the toolchain approach on Windows and was able to configure and generate a project successfully as well as build the Editor target. It took about 2 minutes 20 seconds to configure and build the Editor application with a no-op "compiler". no-op-build.mp4That prototype is located in the aws-lumberyard-dev fork cmake-no-code-project-prototype branch at https://github.com/aws-lumberyard-dev/o3de/tree/cmake-no-code-project-prototype Configure and building can be tested using the windows-no-code prototype
|
Now that's a pretty interesting approach. I notice a lot of the 'time spent' was spent in linking, is it still invoking a linker? The other goal of the no-code project is to skip all 3p dependencies, though, so I'm not sure still going thru all the compilation is worth it in that case... even if its a no-op. Although, as long as we're not linking, we could monkey patch the 3p download code to just... not. |
It is not going through the linker. The CMake linker defaults to the CMAKE_C_COMPILER/CMAKE_CXX_COMPILER. |
Also we can put the skipping of running the O3DE 3rdParty download code packages behind a CMake variable. Afterwards we can add support to project manager to just configure using the No-code preset, which would generate and copy all the necessary dependencies needed to run a no-code project. |
Sorry for the slow responses here ,was out of commision for a week-ish . To follow up on the current steps for the RFC, based on discussion in SIG-Core meeting, I'm going to do the following
|
The plan of attack for Quick Start-up Project sounds good. It shouldn't be a problem if Project Manager attempts to build the no code project, it would just take a additional unnecessary time in that case. So changing Project Manager could be a lower priority. We may also want to make a "Quick Start" project template and perhaps make that the default. |
what about calling it "scripts-only"? |
That works for me. |
o3de/o3de#16645 contains a draft PR to get the first step of this. Needs testing in windows! |
Just wanted to post in here that I really like this proposal and was prototyping a similar thing for game jams using remote repositories. The flow was:
Because the remote project comes with pre-compiled binaries including a monolithic game build it is ready to open in the Editor and share. I didn't create the |
This PR o3de/o3de#16903 should achieve most of what is mentioned in the above RFC.
|
Summary:
The ability of O3DE to have a "No-Code" project
What is the relevance of this feature?
Creating a No-Code project would allow users to immediately enter the Editor for their project, work with Script Canvas and LUA components, and evaluate the engine without having to download gigs of 3rd party libraries or mess with compilers. It would remove a significant barrier to being able to start working with O3DE.
Feature design description:
This RFC is created to spark interest and help find alternatives to various pieces of the implementation. Prototypes for some aspects are already completed to prove that this works. This project can be delivered in steps, each of which provide more functionality.
From a user-journey point of view (UX TBD), an example of the FULL implementation would be something like
Technical design description:
O3DE already actually allows projects to launch without any compile or build step. The way the Editor or game runtime starts up, is that they read a JSON file which contains the list of shared libraries (dlls) to load. They then load those libraries and start up. The editor and runtime and tools like Asset Processor do not require CMake, only those files which contain the list of module plugins to load, and it is not a requirement that the game project being launched actually has one of its own.
Unfortunately, right now, that "list of dlls to load" is generated by CMake when you 'build' the project. This is why a project build is currently required even if using the pre-built installer version of O3DE and even if your project has no dlls of its own. To generate that file that tells the editor what shared libraries to load. If that file can be generated by some other means or shipped, the entire build step is not necessary.
You can currently make a prototype no-code project yourself by creating a project and then eliminating the project's own code targets and dlls from that JSON file.
The proposed feature implementation is this (See alternatives below):
"no-code" : True
. This will allow python, cmake, and other tools to know that the project is a no-code project, without having to run CMake to find that out.At this point, we have a basic no-code project that can instantly be templated and start the editor with no complaint from Project Manager. However, there are several drawbacks and disadvantages to doing this this part instead of going further.
Firstly, the no-code project template would have a 'frozen' set of gems activated. You cannot modify this list, as the information here is captured from the list of shared libraries to load which was copied instead of generated.
Secondly, you cannot create final actual game deliverables using this template, as there is no game executable to use.
However, there is a benefit to doing these 5 steps above - because it still hooks into the existing engine cmake, it is possible to modify the engine in subsequent engine versions to provide more and more of the above functionality. These above 5 steps could be completed quickly in order to ship a "demo project" mode that you can quickly use to open the editor and play around, even if you can't build a final game with it or change active gems.
To overcome the "no gems can be changed" problem, further changes are required:
(alternatively, modify the actual code in the bootstrap of the engine code that looks at these mapping files instead)
This would allow gems to be modified evne in no-code projects. You would have to select from already pre-built gems though, like the ones that come with the installer, or, any 3rd party gems that come with pre-built modules. You would not be able to use gems that only ship as code.
To overcome the "you cannot build an actual game runtime" problem, further changes are required:
Are there any alternatives to this feature?
How will users learn this feature?
Are there any open questions?
One suggestion for making it work with 3rd-party prebuilt gems is to make it so that map of "gem name to dlls it needs to load" is separated into a different file (or different section in a json regset file) for each gem. This would allow the regset system to automatically handle this, because it merges the registries of active gems. But it also merges the registries of the entire engine. So it may be better to separate these into specific regset files that are keyed off the gem names that are active instead, and make it so that the boot loader of the engine sets the tags for each gem active in the project beofre it tries to merge registries. This also means that Gem ZZZZ could include a registry folder in its prebuilt version that contains
modulemap.gem_active_zzzz.regset
and have it automatically be applied to anything that specifiesgem_active_zzzz
in its list of active tags for registry combining.The text was updated successfully, but these errors were encountered: