{"action":"created","issue":{"url":"https://api.github.com/repos/mehtank/androminion/issues/459","repository_url":"https://api.github.com/repos/mehtank/androminion","labels_url":"https://api.github.com/repos/mehtank/androminion/issues/459/labels{/name}","comments_url":"https://api.github.com/repos/mehtank/androminion/issues/459/comments","events_url":"https://api.github.com/repos/mehtank/androminion/issues/459/events","html_url":"https://github.com/mehtank/androminion/issues/459","id":249253603,"node_id":"MDU6SXNzdWUyNDkyNTM2MDM=","number":459,"title":"New Game Engine","user":{"login":"dominionator","id":16368538,"node_id":"MDQ6VXNlcjE2MzY4NTM4","avatar_url":"https://avatars0.githubusercontent.com/u/16368538?v=4","gravatar_id":"","url":"https://api.github.com/users/dominionator","html_url":"https://github.com/dominionator","followers_url":"https://api.github.com/users/dominionator/followers","following_url":"https://api.github.com/users/dominionator/following{/other_user}","gists_url":"https://api.github.com/users/dominionator/gists{/gist_id}","starred_url":"https://api.github.com/users/dominionator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominionator/subscriptions","organizations_url":"https://api.github.com/users/dominionator/orgs","repos_url":"https://api.github.com/users/dominionator/repos","events_url":"https://api.github.com/users/dominionator/events{/privacy}","received_events_url":"https://api.github.com/users/dominionator/received_events","type":"User","site_admin":false},"labels":[{"id":201345357,"node_id":"MDU6TGFiZWwyMDEzNDUzNTc=","url":"https://api.github.com/repos/mehtank/androminion/labels/Component-Core","name":"Component-Core","color":"ededed","default":false},{"id":201345299,"node_id":"MDU6TGFiZWwyMDEzNDUyOTk=","url":"https://api.github.com/repos/mehtank/androminion/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-08-10T07:13:21Z","updated_at":"2018-08-05T02:44:45Z","closed_at":null,"author_association":"COLLABORATOR","body":"As the complexity of Dominion has grown, the weight of the more complex mechanics and underlying design assumptions of the VDom engine have been stretched to their limits. This has made it hard to implement new features and maintain existing ones. As such, I believe **it is time to create a new game engine**. In case you don't know what a game engine is: it's basically the code that simulates the rules of the game, as opposed the code that displays the game or takes input from the user.\r\n\r\n## Some issues with the existing engine\r\n\r\n- Hard to implement a new or adaptable AI agent\r\n- Hard to update existing AI code for new mechanics or cards\r\n- Can't save state of the game and restore later (e.g. app switching / device reset)\r\n- Network code is hard to use and unnecessarily coupled in the engine\r\n- High coupling of UI labels to engine code - There appear to have been 2 different UI layers in VDom before the Androminion UI was pasted on top, neither of which was originally built for localisation. This has led to many strange issues in localisation efforts.\r\n- Many rule interactions between certain cards are hard-coded and are hard to maintain (or even make functional at all). This includes things like the \"lose track\" rule, Duration effect tracking and ability ordering, to name a few.\r\n- Common functionality is duplicated across many of the card implementations, leading to less maintainability, bugs, and bloated app sizes.\r\n\r\n## Proposed features for new engine\r\n\r\n- **Cards defined via configuration files** (instead of code) which will allow for:\r\n  - focusing on mechanic implementation in the engine, making the code overall simpler and more manageable\r\n  - making AI players more adaptable to new situations by responding to mechanics rather than specific cards\r\n  - easy injection of fan-made cards (as long as they obey existing mechanics), or play-testing card tweaks\r\n  - decoupling engine/app from card configurations (if this is ever needed)\r\n  - adding new cards in minutes rather than days/weeks\r\n  - well-defined errata for cards (so you can disallow Possession token taking or allow Masquerade pins)\r\n- Game **Undo**\r\n- **State saving/restoring** (which undo will facilitate) - which means the game won't quit on you when you switch away from it ever, or even restart your phone\r\n- **Card descriptions that can be automatically generated** from the rules configurations (would allow for automatic localisation of fan cards, or even official cards)\r\n- **Localisation friendly engine** - no text strings built into the core of the engine\r\n- **Abstract game logging** layer built into the engine (makes it possible to show the log in different ways and from different points of view)\r\n- **State Cloning and what-if scenario execution** (making it easier to implement more advanced AIs as well as executing test scenarios)\r\n- **Crash reporting** hooks\r\n- Little to **no hard-coding of parameters** (allow for tweaking game rules more freely - e.g. number of cards in a kingdom pile)\r\n\r\n## Status\r\n\r\nThis engine is **still in the design phase**. I've done an analysis on all existing cards (and some well-designed fan cards) to find commonalities and am currently working through putting these into a design structure that makes sense in code given the aforementioned features. (In case you've been wondering what I've been up to for the last while). Note that if this engine isn't ready in time for the release of Nocturne, then Nocturne will most likely be implemented in the old engine as well, depending on the complexity.\r\n\r\n## Feedback\r\n\r\nI'd like to hear your input as to **what features you'd like to see included**. Note that this is just a game engine rewrite - the core of the Androminion UI will most likely stay intact (at least for this change). Feel free to also relate features you'd like to see in the UI that might influence how the engine is built. This way the engine can be designed with these features in mind."},"comment":{"url":"https://api.github.com/repos/mehtank/androminion/issues/comments/410491454","html_url":"https://github.com/mehtank/androminion/issues/459#issuecomment-410491454","issue_url":"https://api.github.com/repos/mehtank/androminion/issues/459","id":410491454,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDQ5MTQ1NA==","user":{"login":"dominionator","id":16368538,"node_id":"MDQ6VXNlcjE2MzY4NTM4","avatar_url":"https://avatars0.githubusercontent.com/u/16368538?v=4","gravatar_id":"","url":"https://api.github.com/users/dominionator","html_url":"https://github.com/dominionator","followers_url":"https://api.github.com/users/dominionator/followers","following_url":"https://api.github.com/users/dominionator/following{/other_user}","gists_url":"https://api.github.com/users/dominionator/gists{/gist_id}","starred_url":"https://api.github.com/users/dominionator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominionator/subscriptions","organizations_url":"https://api.github.com/users/dominionator/orgs","repos_url":"https://api.github.com/users/dominionator/repos","events_url":"https://api.github.com/users/dominionator/events{/privacy}","received_events_url":"https://api.github.com/users/dominionator/received_events","type":"User","site_admin":false},"created_at":"2018-08-05T02:44:45Z","updated_at":"2018-08-05T02:44:45Z","author_association":"COLLABORATOR","body":"@powercat The plan is to make the engine able to support any mix of players: AI, local, or remote. It will be a later feature to enhance the UI to facilitate local multiplayer, but it will be designed to work much easier than it is now (possibly using a Wi-Fi Direct connection if needed)."}}
{"actor":{"display_login":"dominionator"}}