https://github.com/excessive/love-game-patterns
Here is an example of various ways to write game code, written by @shakesoda. This includes a bare procedural approach, an OOP approach, and an ECS approach. Bonus inclusion is a hand-minified version of the procedural code cut down to only 1318 bytes! All of the examples are functionally identical and provide a look into different ways of structuring game code to provide the same results.
If you have some other way of reimplementing this exact game, feel free to send a PR! Any questions about the various approaches are welcome, we're all here to learn!
Game Code Design Patterns
Game Code Design Patterns
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
-
- Prole
- Posts: 3
- Joined: Fri Sep 15, 2017 2:14 am
Re: Game Code Design Patterns
Wow! Really illustrative. I love how you so clearly show the same result from these three different approaches.
I'm a hobbyist programmer from the 1990s: the heady days of OOP. So that's my go-to. Lately, I'd been curious about ECS. Your demos answer practically every question I could think of as to what the different approaches entail.
Much appreciated!
I'm a hobbyist programmer from the 1990s: the heady days of OOP. So that's my go-to. Lately, I'd been curious about ECS. Your demos answer practically every question I could think of as to what the different approaches entail.
Much appreciated!
Re: Game Code Design Patterns
Awesome! I'm glad you found this useful. If you have any unanswered questions, feel free to ask!
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Who is online
Users browsing this forum: No registered users and 7 guests