godot-open-rpg
godot-open-rpg copied to clipboard
OpenRPG code rewrite
Update: June 12, 2020
We're planning a rewrite of the project, reworking it from its foundations. It will take us a while to start working on it.
The codebase is hard to get into for new contributors, and we're looking to write code that's more accessible and easier to build upon. Things like coroutines worked well at first but break when you need to control the flow of events or cancel them. The demo was meant to be a small project about turn-based combat, with basic gameplay. It got a lot bigger than that and too big for its own good.
@razcore-art has been working on a full rewrite with self-contained modules and clearer code. It's a rewrite from scratch and an experiment to build great code guidelines for the Godot community.
Razvan's branch: https://github.com/razcore-art/godot-open-rpg/tree/rebuild Code guidelines: https://github.com/GDquest/kickstarter-quest-3/blob/master/docs/code-guidelines.md
I came across two issues that maybe related (let me know if you like me open proper issues for either of them).
-
I wanted to put a Dialogue, StartCombat then Dialogue actions on a PawnInteractive.
- After the combat it resume back at the in map on not continue on with the next Dialogue action.
- I figured out that combat removes the LocalMap node and then adds the CombatArea node. Then, after the combat it would add the LocalMap.
- I think this is not working because it does not save which actions have been yielded for "finished".
-
After that previous issues, I wanted to see if I could put two consecutive dialogues.
- After the first dialogue it would not show the next dialogue and kept the tree paused.
- I figured out that it was due to the order in which the signal are resolved.
- My bad solution to this was adding
yield(get_tree().create_timer(0.5), "timeout")
after the line https://github.com/GDquest/godot-open-rpg/blob/337c4bca33d9168f21a956c367493a51df57a883/godot/local_map/pawns/PawnInteractive.gd#L112
I'm all about this. The guidelines look great and I'm using them for my own project. Can't wait to see the finished rewrite!
The links are dead. What happened to this issue?
We need time and/or budget to redo the entire system, so it's not happening now.
The links are dead. What happened to this issue?
Hey @aganm, this is probably my fault. I recently cleaned up all my github repos and I was sure that my rewrite to OpenRPG was merged or included in a branch of sorts in this main repo. I'm not sure I even have the code I wrote any more.
So sorry for any inconveniences. Maybe @NathanLovato knows if my code is already part of this repo
@razcore-art It's not, your rewrite was incompatible with the original game, you told me you'd have to redo everything before I could merge. But I have a copy of your code on this computer!
I just created a branch on this repo: https://github.com/GDQuest/godot-open-rpg/tree/feature/code-rewrite
I knew you'd save the day, no sweat :)
😎
Any updates on the rewrite or has the plugged been pulled on this?
It's still something I'd like to get to, but we need proper funding or revenue to do that, as it's a time-consuming project.