Blackjack minigame

● ARCHIVED · READ-ONLY
Started by Mac15001900 51 posts Page 1 of 3 View original ↗
  1. [embedded media]

    Synopsis

    This plugin adds a Blackjack minigame. It will fit right in inside any casino in your game, but it's also customisable enough to not look out of place when played in a medieval tavern or on a futuristic spaceship.

    Features

    • A fully functional Blackjack minigame: including animated cards, and a helpful window explaining what various actions do.
    • An optional luck system: allows you to determine how lucky the player should be. Finally something to make use of that luck stat!
    • Simple to use: all you need is the "Blackjack" plugin command, which will start the game using the party's gold.
    • Extremely customisable: while it works just fine out of the box, there are 80 plugin parameters allowing you to customise nearly everything: all the text, sounds and colours, as well as things like animation speed or spacing between game's windows. And if there is anything you'd like to customise but you can't, please let me know ;)
    • Custom cards: you can not only replace the card graphics with your own, but even create completely unique decks. Want your fantasy version of Blackjack to have 7 card suits, kings to be worth 12 instead of 10, jacks to be worth -10 instead of 10, and queens to be worth either 5 or 15, depending on player's choice? This plugin has got you covered!
    • All parameters are dynamic: as usual with my minigames, every plugin parameter can be modified with a plugin command mid-game, all numerical parameters can instead use a variable, and all boolean (true/false) parameters can instead use a switch. So if one table/casino is not enough for you, you can make more of them, each working completely differently - changing things like the background, wager sizes, sounds, cards, action descriptions and so on. An underground dwarven casino that uses stone tablets as cards perhaps?
    • A bunch of outputs: Various stats from the game are saved to variables of your choice - this is needed when you want to update how many tokens the player now has (if you're not using gold), but can also be used to have NPCs react to how the game went.

    Download

    This plugin requires an image with cards, as well as a bunch of sound effects for various animations. Those come provided in the assetPack.zip file - big thanks to Kenney for providing these assets under CC0 so that they can be redistributed like this. To use the plugin, you'll need to unpack that zip, place the images inside img/pictures, and the sound effects inside audio/se.

    Even if you're planning on using your own sounds and graphics for the cards, I recommend downloading the pack to get an idea of how the card spritesheet should look like.

    Download on Itch

    Terms

    This plugin (MAC_Blackjack.js) is available under the MIT Licence. You're free to use it in any games, commercial or not, or use the code in your own plugins. Credit is appreciated, but not required. If you wish to give credit, do so for "Mac15001900" or link to https://mac15001900.itch.io/.

    The attached asset pack (assetPack.zip) is available under the Creative Commons 0 licence, and is free to use for any purpose with no credit. If you wish to include credits for it (which I highly recommend you do), credit "Kenney" or "www.kenney.nl".
  2. BRO! This sounds awesome! Do you think it would work for rmmz? Or maybe you could release a rmmz version? PLSSSSSSSSSS! This actually sounds really cool and it would fit well with an upcoming character in my game.
    MZ - Ultimate Fantasy (An RPG made in RMMZ)
  3. CoolBeans said:
    BRO! This sounds awesome! Do you think it would work for rmmz? Or maybe you could release a rmmz version? PLSSSSSSSSSS! This actually sounds really cool and it would fit well with an upcoming character in my game.
    MZ - Ultimate Fantasy (An RPG made in RMMZ)
    I have no idea, but since it's mostly based on using the canvas directly and doesn't interact with the engine that much, there is a good chance it will just work with Fossil.
    Otherwise there's not much I could do without having MZ, but the plugin is MIT-licenced, so anyone who wants to is free to make a port ;)
  4. Nice! Slight bug report, the sound parameter for sound for drawing a card defaults to cardPlace but what you included is cardPlace1. Very cool plugin, been playing black jack for like 30 minutes now, lol.
  5. Slaughty said:
    been playing black jack for like 30 minutes now, lol
    This might have been a slight problem when I was developing it too - I don't think it really needed all the "testing" that it got xD

    Slaughty said:
    the sound parameter for sound for drawing a card defaults to cardPlace but what you included is cardPlace1
    Thanks for letting me know, it should now be named correctly in the asset pack.
  6. finally we can gamble!!!:LZYcool::LZYcool::LZYcool:
    (help me)
  7. Finally, I can build my own game with black jack and hookers!
    (how's that hooker plugin coming?)
  8. Sorry if i write this here but can i use it in my game? Obv i will credit you in the credits
  9. Mac15001900 said:

    Terms

    This plugin (MAC_Blackjack.js) is available under the MIT Licence. You're free to use it in any games, commercial or not, or use the code in your own plugins. Credit is appreciated, but not required. If you wish to give credit, do so for "Mac15001900" or link to https://mac15001900.itch.io/.

    The attached asset pack (assetPack.zip) is available under the Creative Commons 0 licence, and is free to use for any purpose with no credit. If you wish to include credits for it (which I highly recommend you do), credit "Kenney" or "www.kenney.nl".

    Hadrianus27 said:
    can i use it in my game?

    If you take a moment to read his post, you'll find the answer :smile:
  10. .
  11. Ayy, cute! I evented this to do it plugin free a while back, but love a plug-and-play :D
  12. So I see where I am able to change the coloration of the windows but is there a way to make them completely transparent?
  13. 171stStreetGames said:
    So I see where I am able to change the coloration of the windows but is there a way to make them completely transparent?
    There's no way to change their opacity, though I guess I could add that in a future version.

    For now, the simplest way to make them completely transparent would be to replace this block on line 1316:
    JavaScript:
    let customUpdateTone = function () {
        if ($.windowColors) this.setTone($.windowColors.red, $.windowColors.green, $.windowColors.blue);
        else this.setTone($gameSystem.windowTone()[0], $gameSystem.windowTone()[1], $gameSystem.windowTone()[2]);
    }
    with:
    JavaScript:
    let customUpdateTone = function () {
        if ($.windowColors) this.setTone($.windowColors.red, $.windowColors.green, $.windowColors.blue);
        else this.setTone($gameSystem.windowTone()[0], $gameSystem.windowTone()[1], $gameSystem.windowTone()[2]);
        this.opacity = 0;
    }

    Though out of curiosity, why do you want to do this?
  14. Mac15001900 said:
    There's no way to change their opacity, though I guess I could add that in a future version.

    For now, the simplest way to make them completely transparent would be to replace this block on line 1316:
    JavaScript:
    let customUpdateTone = function () {
        if ($.windowColors) this.setTone($.windowColors.red, $.windowColors.green, $.windowColors.blue);
        else this.setTone($gameSystem.windowTone()[0], $gameSystem.windowTone()[1], $gameSystem.windowTone()[2]);
    }
    with:
    JavaScript:
    let customUpdateTone = function () {
        if ($.windowColors) this.setTone($.windowColors.red, $.windowColors.green, $.windowColors.blue);
        else this.setTone($gameSystem.windowTone()[0], $gameSystem.windowTone()[1], $gameSystem.windowTone()[2]);
        this.opacity = 0;
    }

    Though out of curiosity, why do you want to do this?
    That worked perfectly! Thanks for that!

    And it's because I have a full background I wanted to use for it that goes with the aesthetics of the in-game location and aligns with another gambling game I have.Blackjack.png
  15. 171stStreetGames said:
    And it's because I have a full background I wanted to use for it that goes with the aesthetics of the in-game location and aligns with another gambling game I have.
    Ah, I see, that makes sense. I guess a built-in option to use a full scene background could be nice addition too.
  16. I need a lot of things to change and im having troubles could you help me please? I will first explain the contest first. The player needs a key and a guy has it, so the player needs to challenge this guy at blackjack to get the keys. I wanted to do that the player plays 3 round vs this guy and if he wins a switch activates and an event triggered by that switch plays and he gives you the keys, if you lose another switch activates and another event is triggered this time it makes you rematch the guy. But the difficoult part is that i wanted to make that money aren't needed to play cause they're already betting the keys(so some options might be deleted or maybe just the double option). Thank you in advance and sorry for bothering you(sorry for the bad english):LZYdizzy::LZYdizzy::LZYdizzy:
  17. Hadrianus27 said:
    I need a lot of things to change and im having troubles could you help me please? I will first explain the contest first. The player needs a key and a guy has it, so the player needs to challenge this guy at blackjack to get the keys. I wanted to do that the player plays 3 round vs this guy and if he wins a switch activates and an event triggered by that switch plays and he gives you the keys, if you lose another switch activates and another event is triggered this time it makes you rematch the guy. But the difficoult part is that i wanted to make that money aren't needed to play cause they're already betting the keys(so some options might be deleted or maybe just the double option). Thank you in advance and sorry for bothering you(sorry for the bad english):LZYdizzy::LZYdizzy::LZYdizzy:
    Some of those things are possible, but some are not.

    I'd generally recommend using tokens for the "duel", and handing over they key if the player manages to increase their tokens to a certain amount. It'll be easier to make, and perhaps more interesting for the player too.

    If you really want to make it the way you described:
    - You can disable side strategies and only set one bet size in parameters, as well as save the number of rounds won and played to variables which you can then compare with event commands. And of course you'd probably want to modify a bunch of text to fit the scenario.
    - If you really want to hide them, you can comment out lines 914 and 915 (insert // at the beginning of each) to hide the wager size and token amount
    - There's currently no way to force the game to end after a specific amount of rounds, so you'd just need to check how many were actually played (though I am considering this as a feature for a future version)
  18. Mac15001900 said:
    Ah, I see, that makes sense. I guess a built-in option to use a full scene background could be nice addition too.
    Honestly...I'm sort of surprised to hear you don't have this!
    It would be nice if we could build our own tables, so if you wanted to go the extra mile, maybe you could program different picture events for various parts of the table, like the table itself, the spots on the table where the cards will be placed, the spot where the deck will be placed, etc.
  19. TheAM-Dol said:
    It would be nice if we could build our own tables
    To be clear, you can already set the background of the play area to a custom image, just not the entire scene.

    I'm not sure what would a separate images for different parts of the play area be used for - sound like it'd be rather confusing to make them so they're just the right size for whatever layout you're going with, and it'd be easier to just edit the table background in an image editor (like @171stStreetGames presumably did).
  20. So admittedly this is suggesting without having even used the plugin (yet). I was just making an assumption based on what 171st's request.

    The reason why different aspects of the table would be its own image is because the plugin knows where the cards are going to be placed on the table.
    It would, firstly, take out the guess work for anyone making their own table. Secondly, could just ensure maximal compatibility in the rare chance someone has some sort of plugin to change game resolution.

    Of course again, these are all just bad assumptions since I haven't touched the plugin. Maybe it only works in 4:3 ratios :LZSlol: