Blackjack minigame

● ARCHIVED · READ-ONLY
Started by Mac15001900 51 posts Page 2 of 3 View original ↗
  1. TheAM-Dol said:
    It would, firstly, take out the guess work for anyone making their own table
    The main problem I'd see with this is that there would still be guesswork involved, since you wouldn't know how big to make various elements. Which would not be present if you just screenshot the game and use that as a reference layer in a graphical program.

    Though if someone tries to customise it and would prefer if it worked that way please do let me know.

    TheAM-Dol said:
    in the rare chance someone has some sort of plugin to change game resolution
    Is that rare? I was under the impression that most people change it in some way. It's even an option in a plugin that's automatically there when you start a new project.
    Either way, it handles any reasonable resolution perfectly fine.
    And unreasonable ones a bit worse
    Game_2024-06-26_11-28-50.png
    Game_2024-06-26_11-32-59.png
  2. Mac15001900 said:
    Is that rare?
    Sorry, I phrased that poorly. What I meant was that the rare case the dev has implemented a resolution setting in the options menu for the player to adjust.
  3. TheAM-Dol said:
    Sorry, I phrased that poorly. What I meant was that the rare case the dev has implemented a resolution setting in the options menu for the player to adjust.
    Ah, I see what you meant. While that would still have the problem of images being the wrong size in different resolutions, there might exist some cases where automatically positioning elements could be useful. Though that'd be a very low priority feature, unless I get some requests for it.
  4. Fun little mini game, is there a command to stop/exit the blackjack game?
    I.E if an opponent runs out of gold, the game quits out
  5. DaveHolmes said:
    Fun little mini game, is there a command to stop/exit the blackjack game?
    I.E if an opponent runs out of gold, the game quits out
    Limited dealer's tokens are not a feature that exists (though it is an interesting idea). And you're the second person asking for a way to end the game earlier, so I'll definitely think about adding something in that direction.

    For now, if you just want to force the minigame to quit, you could do SceneManager._scene.setupOutputs(); SceneManager.pop();.
  6. Is it possible to exchange the tokens for gold? And that you also need gold to play.
  7. The_Power_Of_Green_Games said:
    Is it possible to exchange the tokens for gold? And that you also need gold to play.
    By default the game uses player's gold directly.

    If you want to use a custom currency, you can specify the amount of starting tokens with a variable, and set a specific variable to the new amount of tokens after the game. Any conversion between it and gold you'd need to setup yourself with events, perhaps through an NPC.
  8. Mac15001900 said:

    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".

    Very grateful, I was seriously thinking about whether to add something like this to my game. Do you plan to do more gambling eventually?
  9. Juaxen Said said:
    Very grateful, I was seriously thinking about whether to add something like this to my game. Do you plan to do more gambling eventually?
    Eventually is a good word for it - there is a bunch of other things I'd like to do first, but I might get to it at some point. There's definitely quite a few things I'd be able to reuse from this one in other card games.
  10. Awesome! Great stuff!
  11. Mac15001900 said:
    By default the game uses player's gold directly.

    If you want to use a custom currency, you can specify the amount of starting tokens with a variable, and set a specific variable to the new amount of tokens after the game. Any conversion between it and gold you'd need to setup yourself with events, perhaps through an NPC.
    I don't think I explained myself well, I was referring to whether there is some way to know the number of tokens the player has (probably with a variable) and exchange them for money.

    If you know how, I would appreciate if you could tell me.

    The_Power_Of_Green_Games said:
    I don't think I explained myself well, I was referring to whether there is some way to know the number of tokens the player has (probably with a variable) and exchange them for money.

    If you know how, I would appreciate if you could tell me.
    Nevermind
  12. BRO THIS IS INCREDIBLE! I hope you continue making minigames, you're doing great!
  13. Hello again, is there a way to change the graphics of the cards during the game (maybe with variables)?
  14. TereDim said:
    Hello again, is there a way to change the graphics of the cards during the game (maybe with variables)?
    Sure. There is a plugin parameter for selecting the file that's used for the cards, and there is a plugin command that can change plugin parameters mid-game.

    So you'd probably want to have some conditional branches before the start of the game for various values of that variable, and for each set a different card graphic. Details on how to do that should be in the help file.
  15. Mac15001900 said:
    Sure. There is a plugin parameter for selecting the file that's used for the cards, and there is a plugin command that can change plugin parameters mid-game.

    So you'd probably want to have some conditional branches before the start of the game for various values of that variable, and for each set a different card graphic. Details on how to do that should be in the help file.
    This is exactly what is not there, attempts are made as in the example, but none of the commands are suitable (I apologize in advance for the stupid question)
  16. TereDim said:
    This is exactly what is not there, attempts are made as in the example, but none of the commands are suitable (I apologize in advance for the stupid question)
    You're almost right, there's just one thing that needs correcting: plugin parameters are case-sensitive. So Cards_file, not cards_file

    EDIT: I initially mentioned that you shouldn't be adding .png at the end, but now I've noticed that was actually the first thing you've tried.
  17. Mac15001900 said:
    You're almost right, there's just one thing that needs correcting: plugin parameters are case-sensitive. So Cards_file, not cards_file

    EDIT: I initially mentioned that you shouldn't be adding .png at the end, but now I've noticed that was actually the first thing you've tried.
    Ty a lot, thats work.
  18. Update 1.1 is now available
    After updating, make sure to open the plugin in Plugin Manager and save, to make sure the new plugin parameters generate.

    New features:
    • An option to set an opacity for all windows. This will not affect their contents (i.e. text and images), only the window border and background.
    • An option to set an image as a background for the entire scene. This could previously be achieved by running a Show Picture command before starting the game, but resulted in that imaged getting blurred because of the scene change.
    • An option to limit the number of rounds that can be played in a single game.

    This update might be of particular interest to @171stStreetGames (who uses a full scene background) and @adro (who wanted to run the game with a limited number of rounds).
  19. im trying to use custom currency with variables, but when i win a game and leave it, then it stays the same amount that i enter with
  20. TRIS101 said:
    im trying to use custom currency with variables, but when i win a game and leave it, then it stays the same amount that i enter with
    Have you specified which variable do you want updated in the Outputs section in plugin parameters?