godot-open-rpg icon indicating copy to clipboard operation
godot-open-rpg copied to clipboard

OpenRPG code rewrite

Open NathanLovato opened this issue 6 years ago • 11 comments

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

NathanLovato avatar Jan 26 '19 04:01 NathanLovato

I came across two issues that maybe related (let me know if you like me open proper issues for either of them).

  1. 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".
  2. 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

IAmActuallyCthulhu avatar Feb 01 '19 07:02 IAmActuallyCthulhu

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!

johnnygossdev avatar Feb 12 '19 06:02 johnnygossdev

The links are dead. What happened to this issue?

aganm avatar Dec 11 '19 06:12 aganm

We need time and/or budget to redo the entire system, so it's not happening now.

NathanLovato avatar Dec 11 '19 07:12 NathanLovato

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-rad avatar Dec 11 '19 07:12 razcore-rad

@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!

NathanLovato avatar Dec 11 '19 09:12 NathanLovato

I just created a branch on this repo: https://github.com/GDQuest/godot-open-rpg/tree/feature/code-rewrite

NathanLovato avatar Dec 11 '19 09:12 NathanLovato

I knew you'd save the day, no sweat :)

razcore-rad avatar Dec 11 '19 09:12 razcore-rad

😎

NathanLovato avatar Dec 11 '19 10:12 NathanLovato

Any updates on the rewrite or has the plugged been pulled on this?

lineberry30 avatar Feb 20 '20 03:02 lineberry30

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.

NathanLovato avatar Feb 20 '20 12:02 NathanLovato