Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Resources/Example Projects

# Prerequisites
*.d
__pycache__/
*.py[cod]

# Compiled Object files
*.slo
Expand Down
43 changes: 40 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# AGENTS.md
# Guidelines

This file provides repository-wide guidance for coding agents working in EvoEngine.
## Before Writing Code

**NEVER GUESS - ALWAYS VERIFY:**

## Branch Task Tracking
- Check codebase for existing solutions
- Read actual source code/docs to verify APIs, signatures, parameters
- Search for built-in features or libraries that already solve this
- Prefer language/framework built-ins over custom implementations
- When uncertain about behavior, write and run a small test script to verify instead of reasoning about it

**When uncertain:** Ask before implementing if requirements are ambiguous, multiple approaches exist, or trade-offs are significant.

When working on a new branch, create a local `./tasks` directory with these files:

Expand All @@ -12,6 +20,34 @@ When working on a new branch, create a local `./tasks` directory with these file

Use these files to keep a brief, current record of planned work, active work, and completed work for the branch. The `./tasks` directory is intentionally git-ignored and should remain local to the working branch/worktree.

Record the current branch at the top of `tasks/todo.md` as `# Branch: <branch-name>`. Before reusing an existing `./tasks` directory, compare that branch name with `git branch --show-current`. If `tasks/todo.md` names a different branch, remove the local `./tasks` directory and recreate fresh `todo.md`, `in-progress.md`, and `done.md` files for the current branch. If no branch is recorded yet and the tasks clearly belong to the current branch, add the branch line instead of deleting them.

## Implementation

**Write minimal, simple code:**

- Minimize lines and complexity. Remove unnecessary variables and combine operations.
- Bias toward REMOVING code, not adding
- No new abstractions for one-time operations
- Minimize comments (only for non-obvious logic)
- Write testable code (prefer pure functions, dependency injection over globals)

**Iterate toward perfection:**

- Refactor and simplify code before finalizing. Aim for improvements to conciseness, readability, maintainability, and best practices with each pass.

**Avoid scope creep:**

- Minimal, targeted changes only
- No error handling for impossible scenarios

## After Implementation

- Grep for usages of any removed or renamed symbols to clean up dead references
- Add unit tests for new logic when a test framework is available

This file provides repository-wide guidance for coding agents working in EvoEngine.

## Commit Workflow

When the user asks you to make a commit:
Expand All @@ -20,3 +56,4 @@ When the user asks you to make a commit:
- If a full test run is not practical or cannot be completed, run the most relevant subset and clearly report what was and was not verified.
- Always update the README or other documentation when the change makes documentation inaccurate, incomplete, or missing.
- Do not include signs of AI/tool usage in commit summaries, commit messages, pull request titles, or pull request descriptions.
- Make sure perform code format check right before commit.
65 changes: 9 additions & 56 deletions EvoEngine_App/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ function(register_evoengine_app app_name default_enable)
${EVOENGINE_APP_SOURCE_DIR}/${app_name}.cpp
)
endif()
if (${app_name} STREQUAL "EvoEngineLauncher")
target_sources(${app_name}
PRIVATE
${EVOENGINE_APP_SOURCE_DIR}/LauncherUtils.cpp
)
endif()
target_compile_definitions(${app_name}
PRIVATE
${DEFAULT_PROJECT_DEF}
Expand Down Expand Up @@ -123,6 +129,9 @@ function(register_evoengine_app app_name default_enable)
endif ()
endfunction()

register_evoengine_app(EvoEngineEditor ON)
register_evoengine_app(EvoEngineLauncher ON)

register_evoengine_app(DemoApp ON)
register_evoengine_app(EcoSysLabApp ON)
register_evoengine_app(DigitalAgricultureApp ON)
Expand All @@ -132,62 +141,6 @@ register_evoengine_app(LSystemApp ON)
register_evoengine_app(TreeDataGeneratorApp ON)
register_evoengine_app(SorghumDataGeneratorApp ON)




# Setup an empty application for quicker compilation for testing SDK
if (${CMAKE_BINARY_DIR} STREQUAL ${PROJECT_BINARY_DIR})
set(option_name EvoEngine_App-EmptyApp)
option(${option_name} "Build Empty application" ON)
if(${option_name})
if (WIN32)
add_executable(EmptyApp
${EVOENGINE_APP_SOURCE_DIR}/EmptyApp.cpp
${EVOENGINE_APP_RESOURCE_DIR}/EmptyApp.rc
)
else()
add_executable(EmptyApp
${EVOENGINE_APP_SOURCE_DIR}/EmptyApp.cpp
)
endif()
target_compile_definitions(EmptyApp
PRIVATE
${DEFAULT_PROJECT_DEF}
${EVOENGINE_DEFS}
)
target_include_directories(EmptyApp
PRIVATE
${EVOENGINE_INCLUDES}
${EVOENGINE_APP_RESOURCE_DIR}
)
target_precompile_headers(EmptyApp
PRIVATE
${EVOENGINE_PCHS}
)
target_link_libraries(EmptyApp
PRIVATE
EvoEngine_SDK
)
if (EVOENGINE_ENABLE_RUNTIME_PACKAGES AND EvoEngine_RuntimePackages)
add_dependencies(EmptyApp ${EvoEngine_RuntimePackages})
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
target_compile_options(EmptyApp PRIVATE -Werror)
elseif (MSVC)
target_compile_options(EmptyApp PRIVATE /EHsc /W2 /c)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
target_compile_options(EmptyApp PRIVATE -fPIC --no-warnings -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-newline-eof -Wno-padded -Wno-exit-time-destructors -Wno-global-constructors -Wno-constant-conversion)
endif ()

add_dependencies(EmptyApp AppResourceCopy)
install(TARGETS EmptyApp
RUNTIME DESTINATION "${EVOENGINE_INSTALL_APP_RUNTIME_DIR}")
evoengine_install_target_pdb(EmptyApp "${EVOENGINE_INSTALL_APP_RUNTIME_DIR}")
set_property(TARGET EmptyApp PROPERTY FOLDER Executables)
endif ()
endif ()

if (${CMAKE_BINARY_DIR} STREQUAL ${PROJECT_BINARY_DIR})
evoengine_install_runtime_payload("${EVOENGINE_INSTALL_APP_RUNTIME_DIR}")
install(FILES ${EVOENGINE_APP_RESOURCE_DIR}/imgui.ini
Expand Down
58 changes: 58 additions & 0 deletions EvoEngine_App/include/LauncherUtils.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#pragma once

#include "PackageManager.hpp"
#include "ProjectManager.hpp"

#include <filesystem>
#include <string>
#include <unordered_map>
#include <vector>

namespace evo_engine::launcher {
constexpr size_t kMaxRecentProjectCount = 8;

struct ProjectTemplate {
std::string name;
std::vector<std::string> startup_runtime_packages;
};

struct DerivedProjectPath {
std::filesystem::path folder;
std::filesystem::path project_file;
};

using PackageAvailability = std::unordered_map<std::string, bool>;

[[nodiscard]] const std::vector<ProjectTemplate>& ProjectTemplates();
[[nodiscard]] ProjectLaunchMetadata BuildProjectLaunchMetadata(const std::string& project_name,
const ProjectTemplate& project_template);
[[nodiscard]] std::string Trim(const std::string& value);
[[nodiscard]] bool IsValidProjectName(const std::string& project_name);
[[nodiscard]] std::string JoinPackages(const std::vector<std::string>& package_names);
[[nodiscard]] PackageAvailability BuildPackageAvailability(const std::vector<AvailablePackageInfo>& packages);
[[nodiscard]] bool IsPackageAvailable(const PackageAvailability& availability, const std::string& package_name);
[[nodiscard]] std::vector<std::string> MissingPackages(const PackageAvailability& availability,
const std::vector<std::string>& package_names);
[[nodiscard]] bool ArePackagesAvailable(const PackageAvailability& availability,
const std::vector<std::string>& package_names);
[[nodiscard]] bool IsTemplateAvailable(const ProjectTemplate& project_template,
const PackageAvailability& availability);
[[nodiscard]] int SelectAvailableTemplateIndex(const std::vector<ProjectTemplate>& templates,
const PackageAvailability& availability, int selected_index);
[[nodiscard]] DerivedProjectPath BuildDerivedProjectPath(const std::filesystem::path& parent_folder,
const std::string& project_name);
[[nodiscard]] std::string ValidateCreateProjectRequest(const std::string& project_name,
const std::filesystem::path& parent_folder,
const std::filesystem::path& project_folder,
const std::filesystem::path& project_path,
const ProjectLaunchMetadata& metadata,
const PackageAvailability& availability);
[[nodiscard]] std::filesystem::path NormalizeProjectPath(const std::filesystem::path& path);
[[nodiscard]] std::vector<std::filesystem::path> LoadRecentProjects(const std::filesystem::path& settings_path,
bool& pruned,
size_t max_count = kMaxRecentProjectCount);
void SaveRecentProjects(const std::filesystem::path& settings_path,
const std::vector<std::filesystem::path>& recent_project_paths);
void AddRecentProject(std::vector<std::filesystem::path>& recent_project_paths, const std::filesystem::path& path,
size_t max_count = kMaxRecentProjectCount);
} // namespace evo_engine::launcher
1 change: 0 additions & 1 deletion EvoEngine_App/resources/EmptyApp.rc

This file was deleted.

1 change: 1 addition & 0 deletions EvoEngine_App/resources/EvoEngineEditor.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "EvoEngineApp.ico"
1 change: 1 addition & 0 deletions EvoEngine_App/resources/EvoEngineLauncher.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "EvoEngineApp.ico"
2 changes: 2 additions & 0 deletions EvoEngine_App/src/DemoApp.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "Application.hpp"
#include "DemoScene.hpp"
#include "EditorLayer.hpp"
#include "ImGuiLayer.hpp"
#include "Platform.hpp"
#include "ProjectManager.hpp"
#include "RenderLayer.hpp"
Expand Down Expand Up @@ -175,6 +176,7 @@ int main(const int argc, char** argv) {

ApplicationContext::Get().PushLayer<RenderLayer>("Render Layer");
ApplicationContext::Get().PushLayer<WindowLayer>("Window Layer");
ApplicationContext::Get().PushLayer<ImGuiLayer>("ImGui Layer");
ApplicationContext::Get().PushLayer<EditorLayer>("Editor Layer");
#ifdef PHYSX_PHYSICS_SERVICE
ApplicationContext::Get().PushLayer<PhysicsLayer>();
Expand Down
2 changes: 2 additions & 0 deletions EvoEngine_App/src/DigitalAgricultureApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "ProjectManager.hpp"

#include "EditorLayer.hpp"
#include "ImGuiLayer.hpp"
#include "RenderLayer.hpp"
#include "WindowLayer.hpp"
using namespace evo_engine;
Expand Down Expand Up @@ -70,6 +71,7 @@ int main() {
ApplicationContext::Get().PushLayer<RayTracerLayer>("Ray Tracer Layer");
#endif
ApplicationContext::Get().PushLayer<WindowLayer>("Window Layer");
ApplicationContext::Get().PushLayer<ImGuiLayer>("ImGui Layer");
ApplicationContext::Get().PushLayer<EditorLayer>("Editor Layer");

ApplicationInitializationSettings application_configs;
Expand Down
2 changes: 2 additions & 0 deletions EvoEngine_App/src/EcoSysLabApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "ProjectManager.hpp"

#include "EditorLayer.hpp"
#include "ImGuiLayer.hpp"
#include "RenderLayer.hpp"
#include "WindowLayer.hpp"
using namespace evo_engine;
Expand Down Expand Up @@ -64,6 +65,7 @@ int main() {

ApplicationContext::Get().PushLayer<RenderLayer>("Render Layer");
ApplicationContext::Get().PushLayer<WindowLayer>("Window Layer");
ApplicationContext::Get().PushLayer<ImGuiLayer>("ImGui Layer");
ApplicationContext::Get().PushLayer<EditorLayer>("Editor Layer");

#ifdef PHYSX_PHYSICS_SERVICE
Expand Down
28 changes: 0 additions & 28 deletions EvoEngine_App/src/EmptyApp.cpp

This file was deleted.

Loading
Loading