Earlier in the week I was pondering some blockchain gamification with @howard_is, inspired by a recent GameOn challenge for early professionals in IBM. After helping out with a run through of the IBM InterConnect Fabric Composer lab this morning, it seemed like a good opportunity to make a start.
Instead of running yet another car auction, I think it could be fun to have a demo based on a ‘business’ network for playing games. To keep some similar elements to the more common trading examples, I’m currently wondering if keeping tabs on multi-player adventure games would work. This is the model I’ve come up with so far, and it seems like something that could be hooked up to a simple text based (powered by Watson Conversation of course!) or graphical game interface.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Defines a data model for a multi-player game | |
*/ | |
namespace org.example.game | |
enum ItemType { | |
o POTION | |
o WEAPON | |
} | |
asset Item identified by itemId { | |
o String itemId | |
o String name | |
o ItemType type | |
–> Player owner optional | |
} | |
asset Trophy identified by trophyId { | |
o String trophyId | |
o String name | |
–> Player owner optional | |
} | |
asset Game identified by gameId { | |
o String gameId | |
o Player[] players | |
–> Trophy prize | |
} | |
participant Player identified by characterName { | |
o String characterName | |
} |
If you’re interested in playing with your own blockchain network, fire up the Fabric Composer Playground and have a go. If you want to know more @danielselman will be at InterConnect next week, or get in touch with the community. Better yet, join in!