The Command Programming Pattern in OpenRpg

preview_player
Показать описание
See how we use the command pattern to create reusable and composable actions for battle and NPC in our open source RPG!

Рекомендации по теме
Комментарии
Автор

This is great! CrossCode uses a very similar system for almost everything! Dialogue, moving characters and quests, but also for the particle system and enemy behaviours!

A few ideas for the reader to think about:
- start with simple core commands like wait, move character, or to trigger an action like a jump etc.
- think about combining often used commands: you can chain several movement commands together for example
- think about using commands in parallel. A "wait for x to finish" command is useful there, if you want to move 2 characters to a certain place before you start the next command
- instead of going through a list of commands, think about using a reference to the next one. This opens up the possibilities for branching and dynamic scripting!

Teflora
Автор

Thanks for your hard work and effort to create those tutorials, tips and even the Open Source RPG!!!

ricardoalcantara
Автор

I had to maintain and debug command pattern based business application in the last 8 years.
The developers went to lvl starship with this pattern. Keep it simple. If you are implementing conditional and loop commands with scheaduled command chains that is a sign of trouble. I would recommend to stop before such an abstraction level. They developed "micro" commands with 1-2 lines of codes. As a result ... I had to open 20 files to understand a process instead of 1 method in a file with 30 lines of code. Not fun. :) Keep it simple.

david_peter
Автор

very good tutorial before i see it.
thanks for yor work.
it helped me a lot in godot.
when i was discouraged. i watch your videos and it give me the hope to continue to think that if i perserve i will be able to do as good as you.
forgive for the bad english. i speak french.

tallalo
Автор

Learning the recipe/pattern is the very heart, thanks for sharing!

MatheusBeoulve
Автор

Sorry, GDquest! Do you have any video that teaches to create, step by step, a dialog with json files?

Drew_Ed
join shbcf.ru