Skip to content
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

Reworked the scripting system to be fully agnostic #355

Merged
merged 18 commits into from
Feb 16, 2025

Conversation

adriengivry
Copy link
Owner

@adriengivry adriengivry commented Feb 10, 2025

Description

This rework will allow us to plug-in any type of scripting backend, such as Python!

  • Added generic TScript and TScriptEngine classes, that can be implemented through template specialization.
  • Updated the asset browser and relevant code to make sure hardcoded extensions aren't used anywhere. Valid extensions are now returned by each implementation of TScriptEngine.

Review Guidance

Tested with Lua and a new "Dummy" scripting backend (.ovscript), which does nothing, but you can still create scripts and add them as behaviour.

To-Do

Related Issues

Fixes #296

@adriengivry adriengivry added QoL Quality of Life : Something that can improve users productivity Feature New feature to the engine Refactoring Something that needs a refactoring labels Feb 10, 2025
@adriengivry adriengivry self-assigned this Feb 10, 2025
@adriengivry adriengivry marked this pull request as draft February 10, 2025 22:43
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch 2 times, most recently from f04ad88 to aacf055 Compare February 11, 2025 19:26
@adriengivry adriengivry changed the title [WIP] Reworked the scripting system to be fully agnostic Reworked the scripting system to be fully agnostic Feb 11, 2025
@adriengivry adriengivry marked this pull request as ready for review February 11, 2025 21:46
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch from 6b74459 to 2abd81f Compare February 12, 2025 17:57
@adriengivry adriengivry changed the base branch from develop to main February 14, 2025 15:30
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch 2 times, most recently from 8157d97 to 6580b00 Compare February 15, 2025 19:05
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch from 6580b00 to 2eb0276 Compare February 15, 2025 20:44
@adriengivry adriengivry marked this pull request as draft February 15, 2025 23:32
@adriengivry adriengivry marked this pull request as ready for review February 16, 2025 00:08
@litelawliet litelawliet self-requested a review February 16, 2025 13:28
Copy link
Collaborator

@litelawliet litelawliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A regression appaeared, the cursor still appears in Play Mode and doesn't allow us to move around or turn around anymore due to monitor constraints.

@adriengivry
Copy link
Owner Author

Fixed issue where OnAwake was called twice and OnStart wasn't at all

@adriengivry adriengivry merged commit 1cf3f8a into main Feb 16, 2025
1 check passed
@adriengivry adriengivry deleted the feature/agnostic_scripting_backend branch February 16, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature to the engine QoL Quality of Life : Something that can improve users productivity Refactoring Something that needs a refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Abstract the ScriptInterpreter to allow for multiple implementations (Lua, Python, C#)
3 participants