Skip to content

Enhancement: Replace HScript with cppia #5077

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

Open
3 of 6 tasks
AbnormalPoof opened this issue May 13, 2025 · 2 comments · May be fixed by #5087
Open
3 of 6 tasks

Enhancement: Replace HScript with cppia #5077

AbnormalPoof opened this issue May 13, 2025 · 2 comments · May be fixed by #5087
Labels
status: pending pull request Dependent on a pull request that is currently awaiting review. topic: dependencies Related to one or more of the game's required internal libraries. topic: mods Related to the creation or use of mods. type: enhancement Involves an enhancement or new feature.

Comments

@AbnormalPoof
Copy link
Collaborator

AbnormalPoof commented May 13, 2025

Issue Checklist

  • I have read the Contributing Guide
  • I have checked the Issues/Discussions pages to see if my enhancement has already been suggested
  • I have properly titled my enhancement

What is your suggestion, and why should it be implemented?

Making this issue to track this comment separately.

In short: cppia is a scripting system similar to HScript, except it's more performant (it no longer uses reflection) and has all the Haxe language features available.

Scripting for FNF should, for the most part, not change with cppia, aside from having to call the class directly (no more Scripted[Class].init and scriptGet/scriptSet/scriptCall): #5075 (comment)

There are some caveats:

@AbnormalPoof AbnormalPoof added type: enhancement Involves an enhancement or new feature. status: pending triage Awaiting review. topic: mods Related to the creation or use of mods. topic: dependencies Related to one or more of the game's required internal libraries. status: needs r&d Requires further research and development. and removed status: pending triage Awaiting review. labels May 13, 2025
@lemz1
Copy link
Contributor

lemz1 commented May 13, 2025

Some things might not compile anymore (Bug Report: Passing an invalid argument in a script passes null rather than throwing #5075 (comment))

I opened an issue for this

However, if you want to compile right now using the scriptable flag, then you need to disable FEATURE_DISCORD_RPC and FEATURE_VIDEO_PLAYBACK.

@lemz1 lemz1 linked a pull request May 14, 2025 that will close this issue
5 tasks
@AbnormalPoof AbnormalPoof added status: pending pull request Dependent on a pull request that is currently awaiting review. and removed status: needs r&d Requires further research and development. labels May 15, 2025
@lemz1
Copy link
Contributor

lemz1 commented May 21, 2025

Mobile can't(?) use cppia, which might be problematic since a mobile FNF port is planned in the future (Bug Report: Passing an invalid argument in a script passes null rather than throwing #5075 (comment))

this talk from 2015 seems to explain that it is possible to use cppia on mobile (android and ios).

we'd need to look further into this, but this talk is a good start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending pull request Dependent on a pull request that is currently awaiting review. topic: dependencies Related to one or more of the game's required internal libraries. topic: mods Related to the creation or use of mods. type: enhancement Involves an enhancement or new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants