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

Destiny Patch support #3131

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Destiny Patch support #3131

wants to merge 6 commits into from

Conversation

drxgb
Copy link

@drxgb drxgb commented Oct 25, 2023

I'm going to start implementing Destiny Patch support on EasyRPG.
I hope can help.
Awaiting for a feedback. Thanks! =D

@jetrotal
Copy link
Contributor

jetrotal commented Oct 25, 2023

Nice!

Some Documentation, to help contextualize this patch:
Original Destiny Patch 1.0, made by Bananen-Joe:
DestinyScript_Eng.pdf
image

Destiny Patch 2.0 (also from Bananen-Joe) + Maniacs Update, by Kotatsu Akira:
https://dev.makerpendium.de/docs/destiny_help/main-de.htm?page=object_command
image

@Ghabry
Copy link
Member

Ghabry commented Oct 25, 2023

Hello. As adding the rest of destiny will be a huge task I have to ask:

Your code looks good but do you feel confident enough in C++ to implement the rest of it?

  1. You will have to write a parser for the entire destiny syntax (imo this is the hard part)
  2. Implement the functions offered by destiny (this is more tedious than hard imo, the tricky ones like sockets can be skipped for now)

@Ghabry
Copy link
Member

Ghabry commented Oct 25, 2023

Hm actually the grammar doesn't look too hard to parse because the language lacks flow control like if and for. Very straightforward.

I can offer my help here if you encounter problems.

src/destiny.cpp Outdated
@@ -0,0 +1,160 @@
/*
Copy link
Member

@Ghabry Ghabry Oct 25, 2023

Choose a reason for hiding this comment

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

Imo this is a good start. Just a little nit-pick:

Can you rename it to Game_Destiny similiar to how Ineluki patch is implemented (which is Game_Ineluki).

Then make it a class and put the instance variable in main_data.h/cpp and instantiate it in ResetGameObjects.

Also please update Makefile.am and CMakeLists.txt by adding the new files to it (put them at the correct location in alphabetical order).


Yes I know that DynRPG does it in a different way but I plan to rewrite this as less global state makes the cleanup easier when switching the game.

Copy link
Author

@drxgb drxgb Oct 25, 2023

Choose a reason for hiding this comment

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

Yes, no problem. I thought that I must create a singleton, but if already exists a container so it's much better.
I'll make this fixes. =D
Thanks for the tips.

@drxgb
Copy link
Author

drxgb commented Oct 25, 2023

Hello. As adding the rest of destiny will be a huge task I have to ask:

Your code looks good but do you feel confident enough in C++ to implement the rest of it?

  1. You will have to write a parser for the entire destiny syntax (imo this is the hard part)
  2. Implement the functions offered by destiny (this is more tedious than hard imo, the tricky ones like sockets can be skipped for now)

Thanks for the feedback!
I'm basing on the Assembly source code made by Bananen-joe. There's a lot of work to do yet. But I'm going step by step while I'm studying the EasyRPG infrastructure.

Maybe the interpreter I could use OOP.
Besides we can create some parsing interfaces (like parser, scanner and handler) that can be implemented by another patches like DynRPG and Maniacs. Idk if this idea can be acceptable but I have this wish.

@Ghabry
Copy link
Member

Ghabry commented Oct 25, 2023

If you think you can implement such a parser then go for it :).

When it is flexible enough it can also be used for other parts as you proposed

(Maniac has nothing to parse on the player side but there is an expression parser needed for the editor.)

@Ghabry Ghabry marked this pull request as draft November 2, 2023 15:17
@Ghabry Ghabry added this to the 0.8.1 milestone May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants