va1m 5cf2fe009b
📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
2021-03-13 14:19:21 +02:00
..
2021-02-14 11:57:57 +02:00

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Bytecode bytecode /patterns/bytecode/ Behavioral
Game programming

Intent

Allows to encode behaviour as instructions for virtual machine.

Class diagram

alt text

Applicability

Use the Bytecode pattern when you have a lot of behavior you need to define and your games implementation language isnt a good fit because:

  • its too low-level, making it tedious or error-prone to program in.
  • iterating on it takes too long due to slow compile times or other tooling issues.
  • it has too much trust. If you want to ensure the behavior being defined cant break the game, you need to sandbox it from the rest of the codebase.

Credits