# Turn-based Game Plug-In Ideas

**URL:** <https://meta.discourse.org/t/turn-based-game-plug-in-ideas/95026>\
**Category:** Development\
**Created:** [August 17, 2018, 7:56pm UTC](https://meta.discourse.org/t/turn-based-game-plug-in-ideas/95026 "2018-08-17T19:56:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fearlessfrog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fearlessfrog/32/119653_2.png) [@fearlessfrog](https://meta.discourse.org/u/fearlessfrog)\
**Post date:** [August 18, 2018, 7:28pm UTC](https://meta.discourse.org/t/turn-based-game-plug-in-ideas/95026/3 "2018-08-18T19:28:22Z")

</div>

> [@zogstrip](#):
>
> I don’t know of one. Search on GitHub, maybe there’s one?

I couldn’t find much, but was thinking if anyone had already had a crack at it then they would probably travel through here.

> [@zogstrip](#):
>
> It’s not a stupid idea. I guess it all depends on the size of the game state you have to store. If it’s small, using custom fields should be fine. Otherwise, I would store the data in the database.

Most of the unknowns for me are around the basic usability and worth of the idea, and for that it’s probably just ok to go build it small and find out. The main flaw is moving an interactive game state into a conversation flow; that is a little awkward. While it’s fun for others to watch along (peanut gallery for games etc), it only lends itself to ‘open board’ type games like chess.

The contact points with Discourse via the plug-in API are pretty light, in that apart from `on(:post_created)` and traversing the post then it’s pretty much plain ol ruby. My main lang is C++, so part of this is having some fun getting better at plain ol ruby objects. I am toying with some interactivity on the Ember side of things (just to reduce the command parsing awkwardness for usability with some direct clicks etc), but _thar be dragons_ 🐉 for me on that side of things, so will limit it just to make it a bit more self-contained, i.e. learn one thing badly at a time.

For state storage, are Discourse plug-ins free to add their own model/db migrations and such? Is there a complex existing plug-in already that does that well that I could follow?

EDIT: plugin/instance.rb has all the answers:

> <https://github.com/discourse/discourse/blob/main/lib/plugin/instance.rb#L457>

---

_[View the full topic](https://meta.discourse.org/t/turn-based-game-plug-in-ideas/95026)._
