Pawel Zawitowski 318f811fea Bytecode pattern #553 (#896)
* Added bytecode pattern

* Diagram changed and added licence information

* Added bytecode module to main pom.

* Fixed missing dependency error
2019-09-03 21:50:48 +03:00

26 lines
789 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: pattern
title: Bytecode
folder: bytecode
permalink: /patterns/bytecode/
categories: Behavioral
tags:
- Java
- Difficulty-Beginner
---
## Intent
Allows to encode behaviour as instructions for virtual machine.
## 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
* [Game programming patterns](http://gameprogrammingpatterns.com/bytecode.html)