Poker Kingdoms


  • Jammer

    Very cool read. Interesting on your change of platform, and the challenges you tried to attack:

    ImpactJS was the first time I’d worked in a framework, rather than an engine, but it became rapidly apparent that the Framework was designed for platform games

    Honestly this has been a concern of mine for a while with MelonJS. It’s why I worked on the space invaders tutorial which uses none of the TMX & LevelDirector stuff that we have in MelonJS.

    I haven’t used HTML5 as much lately, not so much for tech reasons, but the fact that I find libgdx to be much more of my liking. I rather enjoy the fact it’s JVM byte code over live code execution as well. Though I still say if you wanna make a game to run in a browser, use html5. Don’t use something that compiles to it.


  • Tiger Hat

    @Vox said:

    In the description it said multiplayer maybe a direction the game is headed, if that does occur, I would be excited to read about implementing that feature into the game!

    I don’t detail it, but multi-player has been around since Part Six turns out, when you build things well, some functionality comes for free. When I made a player object type, it was encapsulated so well, that I can spawn as many as I like, and the game deals with it.

    Players at the moment, can be human, or AI, but both of those are subclassed from the same base object where I do most of the work.

    Once I get through the remaining work I have to do with the AI, I’m going to dip my toe into networking, so I can have a Networked player type. At the moment, the multiplayer is effectively a hot-seat style affair.


  • Tiger Hat

    @agmcleod said:

    Honestly this has been a concern of mine for a while with MelonJS. It’s why I worked on the space invaders tutorial which uses none of the TMX & LevelDirector stuff that we have in MelonJS.

    Yeah, Unity is one of the few engines I’ve used that doesn’t feel like it’s expecting you to make a particular game - especially considering how feature-rich it is (things like irrlicht, Ogre, and SDL are less focussed, but make you do far more work). You can make a 2D game in UE4, but it feels like you’re making a 2D game inside a FPS.

    I haven’t used HTML5 as much lately, not so much for tech reasons, but the fact that I find libgdx to be much more of my liking. I rather enjoy the fact it’s JVM byte code over live code execution as well. Though I still say if you wanna make a game to run in a browser, use html5. Don’t use something that compiles to it.

    I dunno, I’ve had a lot of luck with the Unity WebGL exporter, even if it makes quite a large download, if you get your game compiled in it, I’ve not seen people complain about getting it to run - I’ve had no troubles with the exporter, but other people’s experience seems to differ. It’d be nice if I could compile Unity to NaCL, but I suppose it’s unfair to expect everyone to be using Chrome on a x86 :)


  • Tiger Hat

    Part Nine: Mathematical Personality

    The AI is really quite good at playing the game, and whilst changing the number of cards that remain flipped scales difficulty, the AI is far better at finding patterns - and has a fairly consistent skill level, I’ve never seen it attempt to play any hand that does not utilize all 5 cards. It also has quite a gung-ho approach to the game, playing flipped cards far too riskily - if you play visible cards only, it’ll fail because it thinks every set of 5 hidden cards is a Royal Flush.

    Basically, it ranks every potential hand by it’s score - which is a product of the cards in the hand, and a multiplier for the type of hand. A high card attracts a multiplier of 1, a royal flush much higher (100 at the time of writing).

    One of the ambitions for the game is a quest mode, where you defeat the titular Poker Kingdoms, I envision each card in the desk as a node in that quest, but there’s not enough variety in the game for 52 games, I could make some obstacles on the board, but once you understand the mechanics of the game, layout really won’t make that much challenge.

    So I’m experimenting with giving the AI a personality - at least a difference in the strategy the AI plays with. The simplest, and most obvious given that you’re playing against members of the deck is to make them preference certain cards - each card preferences its own face, and suit higher (4 of spades is more likely to pick 4, and spades) - the more advanced the card, the less it will preference itself (being a better ‘player’).

    The other factor that needs to be dealt with is hidden-cards, vs jokers, to the AI they appear identical, as a result of how they’re dealt with by the AI, but playing a Joker is less risky than playing a flipped card, with that comes a lower reward. So, each hand generates a risk state, from 0 to 100% risk (20% for each flipped card). This can be used to influence AI players as either a positive or negative value, conservative players would take a penalty, but daring players can add this as a bonus.

    Finally, each personality can receive a custom table for hand multipliers, I can heavily weight basic hands early game, and as the player progressed, shift that weighting closer to real values as the player approaches later stages in the game - perhaps throwing in some curve-balls on the way.


  • Jammer

    @salmonmoose said:

    but multi-player has been around since Part Six

    Ah I see! Online multiplayer to me is an intriguing, and also I’m sure very complex concept and execution. I was just curious if this was going to be implemented, and how you would go about doing it. Or does steam have some specific implementation they require?

    Words With Friends, was a hit- but I think it was a hit because people fully understood how they were competing with their friends and they could compete at their own leisure. Do you feel the mobile version would be able to handle multiplayer in that fashion? Basically I am ignorant of the different restrictions that would be present in a mobile multiplayer title, a steam multiplayer title, etc… If this seems all over the place, I’m sorry. I find what you have written interesting, but these questions bubbled up.


  • Jammer

    @salmonmoose said:

    I dunno, I’ve had a lot of luck with the Unity WebGL exporter, even if it makes quite a large download

    Interesting. Good to hear. I’ve typically heard others say that it didn’t work that well, or yeah the file size was too big. But glad to hear that it ran stable for you at least. The reason I said to use an html framework/engine is because filesize can be super important when it comes to games on the web. You need to consider mobile on a crappy connection, or even a desktop machine running on a slower internet. People are impatient, it needs to load fast.

    That said, my main argument was more on the lines of: “If the web is your main target”. If you’re mainly going for desktop+mobile and you want a web version for people to try, then yeah unity makes sense, libgdx can be a good candidate as well.


  • Patron

    Well, I imagine making an online multiplayer version of a turn-based game wouldn’t be too hard. You don’t even have to worry that much about latency at all!

    Of course, if you’re working with WebRTC and using Steam’s matchmaking servers, that is. I have no idea how networking works outside of WebRTC and Socket.io :P


  • Tiger Hat

    @agmcleod said:

    Interesting. Good to hear. I’ve typically heard others say that it didn’t work that well, or yeah the file size was too big

    Yeah - I’d actually like to have some troubles, so I can learn more about what goes wrong, and help people out - I’ve pushed 6 games to the platform with no problem. The filesize is big, but smaller than the desktop version, and you don’t have to run what could be malicious executables, it’s a slow build though.


  • Tiger Hat

    @Vox said:

    Ah I see! Online multiplayer to me is an intriguing, and also I’m sure very complex concept and execution. I was just curious if this was going to be implemented, and how you would go about doing it. Or does steam have some specific implementation they require?

    I’m not sure - I’m steering clear of any Steam implementation until I have that fancy badge by my account that signifies that I’m a developer. Regardless, tying myself to Steam is a bad plan, I may revisit mobile, or choose another network, so I need to remain unbound from a specific network platform.

    Words With Friends, was a hit- but I think it was a hit because people fully understood how they were competing with their friends and they could compete at their own leisure. Do you feel the mobile version would be able to handle multiplayer in that fashion? Basically I am ignorant of the different restrictions that would be present in a mobile multiplayer title, a steam multiplayer title, etc… If this seems all over the place, I’m sorry. I find what you have written interesting, but these questions bubbled up.

    So Google Play Game Services supports both turn-based and realtime multiplayer, WWF would have been turn based, but probably rolled it’s own network layer as I think it predates GPGS. I will implement networked play, as I mentioned before, I’m using Poker Kingdoms as a test-bed for new ideas, so even if the game never really goes anywhere, I can continue to use it as a tool to learn new things, and I need to understand networking as it relates to games (I work as a Systems Administrator, so I understand the rest of the network stack pretty well).

    To me, the biggest dilemma is the game itself - the current version plays for 30 rounds, for no real reason, other than that felt like a nice playtime for the solo play version. It starts being a bit heavy for the quest, and I’m really thinking of cutting that back to a 5 round affair, or even a Puzzle Quest style combat affair (where your score becomes damage). Short paced games would almost have to be realtime, and there needs to be a meta-game wrapped around that. The longer form game could be turn based, but to me, it feels like the single turn is not enough interaction per turn, and full games would drag on. Perhaps I could play it like those people who play 10 games of chess, and you just bank up a series of games, and play a bunch of hands really quickly? I’m not sure, and it requires a lot more thought. Hot-seat will work, and at the very least, you’ll be able to emulate that over multiple devices. But networking in this case, is more than just playing over a network.


  • Tiger Hat

    @Josue said:

    Well, I imagine making an online multiplayer version of a turn-based game wouldn’t be too hard. You don’t even have to worry that much about latency at all!

    Seriously grateful for that - the AI would be nightmarish in realtime - I’d have to consider porting the game logic to pure c++ and making it a Unity library.


  • Jammer

    @salmonmoose
    Thanks for the reply. Just the thought process alone is interesting. I look forward to seeing where all this goes for you.


  • Tiger Hat

    Wow, this is really a great thread, thanks for sharing! Post mortem and dev diary all in one!

    I voted for your greenlight, good luck :)


  • Tiger Hat

    Part Ten: Combat & Brains

    I’ve been a bit silent lately - but I’ve been putting a lot of time into the game - I’ve revamped the game-play, and transitioned to a combat style, there’s far more room for things like Juice, and adding some real personality to the game. Having things like player health, means I can add depth with effects on cards, and the like.

    This is knocked together with the assets I have floating around:

    Poker Kingdoms

    It’s already more interesting to look at - but it’s locked at that point whilst I wait for assets - so I’ve gone back to working on the AI.

    I’ve had AI that can play the game for a while now, and I’ve transitioned to using it as one of my test tools - it’s already turned out a few bugs, because I can make it just play on its own for hours on end. Now it comes time to tuning.

    In addition to favouring their own card, AI players will also have favourite hands. So looking at hands, it generates a number looking at what cards are in the hand, and rates that hand. This has been pretty much un-tested, the AI players tended to make good choices, so I left that as problem for the future.

    To get a better idea of what was going on, I needed some feedback, watching the log file is pretty noisy, and only really offers a state update, not any cumulative information. The solution I’ve gone with (trying to do things the Unity Way) building my own inspectors - so I’ve made each player collect history, and be able to report on it - this is displayed with custom histograms, in theory without any influence, I should see flat lines on faces and suits, and a probability graph on various hands.

    Nothing comes so easily.

    One of the assumptions I’ve made from day one is that hands would appear as commonly in the Poker Kingdoms draw, as they would in a more traditional implementation of Poker, but this isn’t the case. Poker does not let you select your hand, you’re dealt 5 cards, Poker Kingdoms is essentially dealing you a set of cards, and letting you select which cards you like.

    But I’ve got everything I need to work out what I should be doing surely. I’ve got an AI that can play against itself, and I’ve got statistics on each player. So now for a new game component - one that selects a set of modifiers for the heuristic engine, spins up a game, plays for a number of hands, and evaluates the end state, makes adjustments, and starts again.


  • Jammer

    @salmonmoose said:

    smart things

    Gosh damn that’s some good stuff. In the essence of poker, I really like how you lay things out on the table. Basically the idea of 2 AI’s testing your game is just so neat to me, do they log errors? I mean could they? If they reach a fatal error the game crashes, but then again you’d see the last thing being done. This is just all really cool, thanks for keeping us in the loop!


  • Tiger Hat

    B-Grade Bundles

    In an effort to gain traction on Greenlight, I submitted Poker Kingdoms for an off-market bundle, one pitched largely at pre-greenlit titles. As is my wont, this meant a little patching of the current playable version, update the Unity backend, switch on some new features, add a link on the title screen back to the Greenlight page because I really have no idea how to generate traffic any other way. Unity has opened up a free analytics engine, so this was a great opportunity to push that out, and hopefully see some feedback.

    Great - various documents signed, new build uploaded to itch.io and the provider (because apparently some people consider itch.io to not be a great place to download stuff from), time to sit an wait for the bundle to launch.

    Sales were… less than expected, not that I was interested in actually selling the game, rather, driving people to Greenlight, and getting closer to that top 100 slot. This is where the interesting information started exposing itself - previously, I had only been able to see patterns of existing users, not pending customers. However, I could see how many bundles were sold with PK included, and then further, how many keys were redeemed, how many downloads, and how many people actually booted the game up.

    Some of this may be a symptom of the bundle provider in question, as it allows you to trade games before you redeem them - and there are plenty of copies sitting in trade limbo - it also uses a “pre-order” period where you get a discount on the bundle. You can also select which of the available games you want packaged in your bundle, so in theory, anyone who bought a bundle with PK explicitly requested it.

    The bundle ran for 15 days, and around 2/3 of the sales came on the initial day. It took around a week before anyone redeemed a key however, and another couple of days before someone took the time to boot the game up.

    The numbers I feel are an insight to how people treat games now, from around 1200 copies sold, about 350 have redeemed the key, of that number, there have been 50 downloads (across 4 platforms), and 15 people actually starting the game (satisfyingly, and as a recurring theme, once people start the game, I get some basic retention).

    On the Steam front, I’ve received a boost of around 200 ‘yes’ votes, and shifted from 25% to 30% ‘yes’ score, not a disaster, but sadly, not pushing me over the goal by a fair amount still. There seems to be a long-tail of votes, I suspect generated by the tradeable games being picked up.

    There has been zero feedback about the game itself, outside of comments based on the screenshots.

    An interesting experiment - but in this instance at least, it did not help me out in any significant way, the cash rewards were slim, as is to be expected with a bundle, but the lack of traffic generation was beyond disappointing, especially (as mentioned above) people selected the game explicitly.

    • Note: I’ve been laid out with pneumonia for the past month, other than watching this tick over, I’ve done little but lay in bed and if I’m lucky stream games from my real PC - I’ll be back to the actual work soon.

  • LDG

    Good stuff @salmonmoose! Hope you feel better dude, get well.


  • Tiger Hat

    Your title, “Poker Kingdoms,” has been Greenlit!


  • Patron

    @salmonmoose said in Poker Kingdoms:

    Your title, “Poker Kingdoms,” has been Greenlit!

    Wahey, congrats! @salmonmoose for president!!


  • LDG

    Heyyy huge congrats!


Log in to reply