Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
[XP] BlackJack [RMRK+]
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[XP] BlackJack [RMRK+]

Started by modern algebra, February 12, 2007, 03:51:47 AM

0 Members and 2 Guests are viewing this topic.

modern algebra

BlackJack
Version: 2.0
Author: modern algebra
Date: November 10, 2007

Version History




  • Version 2.0: Converted to RMRK+ Format. Double option appears only on First draw. Proper reward for BlackJack given. Now possible to black out the screen with a switch. Numerous style and structure changes.
  • Version 1.2: Bug fixes
  • Version 1.0: Original. Included hit, stand, and double.

Description



This event system allows you to play BlackJack. To replace the default card set with your own, save over each card with the new graphic.

Features



  • Includes Double, Hit and Stand
  • Dealer stands on Hard 17
  • Very easy to plug into your game (RMRK+ Format)

Screenshots







Instructions

Download the demo. Make sure you have your maximum variable count in your project to greater then 546. Then, all you have to do is paste the event from the demo into your game at all the places you want to play BlackJack. You can also set the Self-Switch D to determine whether you want to black the screen out or not

Credit




  • modern algebra

Support



I will provide support here. Be sure to tell me of any bugs and I will fix them for the next release. I may not add a function, even if you request it.

Author's Notes

This is actually a very old script. Having to go through it for the purpose of converting it to RMRK+ Format, I changed a few things here and there, but was too lazy to fix the rather clumsy-ish structure. It still works very well though. It was my first event system that I released I believe.

RMRK+ Format

This script is RMRK+ Format.

Variables Used


  • 527-528:: Location X & Y: Tracks the pixel placement for drawing each card.
  • 529-530:: Player & Dealer Score: Tracks the value of each hand
  • 531-539:: Card Values: track each card already drawn. These ensure no cards are drawn more then once per game.
  • 540:: Bet: The amount of Gold bet by the player
  • 541-542:: Suit & Value: These represent the suit and value of the card currently to be drawn
  • 543-544:: Player & Dealer Draws: Number of times each player has drawn. Convenience, mostly.
  • 545-546:: Player & Dealer Aces: Number of aces each player has drawn. Makes it convenient to calculate score

Demo



Attached

:)

i THINK it looks kick ass! sweet idea for a battle system with events!
Watch out for: HaloOfTheSun

ShellShocked

Nice job! Btw, the game got stuck, I got 20 and the dealer used 5 cards and then nothing happened, but my character in the background could move around O_o

Nightwolf

Very good algebric eventing! :P

lol, nice job man.
Arlen is hot.

Snailer

Lol is this normall to happen ?




But anyways its really nice !

modern algebra

It looks all right Snailer. I'm not quite sure what the problem is... Did it get stuck there?

I noticed a few glitches on my own so V. 1.2 is out now. Remember to post if you encounter any problems  :)

Irock

You should have a counter to count what your number is, so that the player won't have to keep counting.

Quote from: Snailer on February 13, 2007, 03:57:10 PM
Lol is this normall to happen ?




You won  19 to 18

modern algebra

That's a good idea. But, because of the Ace, it wouldn't be as simple as just displaying the variable which contains the Player Score. I'd have to change the way it counts aces, so I'll include it if I decide to make a version 2.0, since I'd have to change some stuff around to include the Split function anyway. It's a good idea though and I'll definitely do it if I can find the time.

Sigma

Sorry to revive this, but how would this be used in RM2k3? Sorry for the silly question if it is one.

modern algebra

In the same way, though you would have to translate the event. Do they have labels in 2k3? I may consider making a version in 2k3, but my experience with 2k3 is lousy, at best, so we'll see :P

Sigma

Can you run through it in RM2k3 for me?
I'm really happy with my work so far, and I believe some minigames will make it even better.

Qig

Quote from: modern algebra on September 18, 2007, 06:20:51 AM
In the same way, though you would have to translate the event. Do they have labels in 2k3? I may consider making a version in 2k3, but my experience with 2k3 is lousy, at best, so we'll see :P
Labels are in rm2k3
Working on world of sorrow again.

Forty

If you are still having the problem where you don't have those two cards, you could do this.
Make all the number cards, then make a spade, clubs, diamonds, and hearts card back. Then make a king, queen and jack. What this will do is that all the kings queens and jacks will looks the same but all the cards will be there.

modern algebra

#13
That would involve doing a check to see which draw you are on though

Forty

That is understandable, but couldn't you tell it to produce both images? And doesn't it check for draw anyway?

modern algebra

You can tell it to use both images yes, but the thing is that when you show picture, you give it a label. If you show any picture after it with the same label, then the first picture is erased. Right now, the system is:

If Ace of Hearts
Show Picture 1: Ace of Hearts
If 2 of Hearts
Show Picture 2: 2 of Hearts
etc...

The way you are suggesting would be like this:

If Ace of Hearts
   If First Draw
      Show Picture 1: Heart Card Back
      Show Picture 2: Ace Card
   If Second Draw
      Show Picture 3: Heart Card Back
      Show Picture 4: Ace Card
   If Third Draw
      Show Picture 5: Heart Card Back
      Show Picture 6: Ace Card
   If Fourth Draw
      Show Picture 7: Heart Card Back
      Show Picture 8: Ace Card
   If Fifth Draw
      Show Picture 9: Heart Card Back
      Show Picture 10: Ace Card
   If Sixth Draw
      Show Picture 11: Heart Card Back
      Show Picture 12: Ace Card
   If Seventh Draw
      Show Picture 13: Heart Card Back
      Show Picture 14: Ace Card
   If Eighth Draw
      Show Picture 15: Heart Card Back
      Show Picture 16: Ace Card
   If Ninth Draw
      Show Picture 17: Heart Card Back
      Show Picture 18: Ace Card
   If Tenth Draw
      Show Picture 19: Heart Card Back
      Show Picture 20: Ace Card
   End
etc...

While that would work, and allow for all cards, it is the problem I was specifically trying to avoid when I first designed my system. In any case, if I were to work on this system again I would either script it or hybrid it to add in the extra cards. Thanks for the suggestion though.

Forty

Im not trying to be a pain in the butt, but what about different labels, is that possible? And only do it for a few, you know what I mean?

modern algebra

Not really. I was talking about the labels. If you mean give a few of the cards different possible labels based on what cards are already out there, that would be somewhat annoying and result in about 9 extra conditional branches for each card that I give two possible labels to the picture. Even then, it may not work. The fact is, I don't really give a shit about three cards. It doesn't effect the game in any significant way.

Forty

Thats cool.

As an alternative, just make like one card appear twice
Like if your missing a king, make one king appear twice

modern algebra

I'm not sure I understand. Anyway:

New version is up. The main difference is I converted the system to RMRK+ Format and commented it.

Forty

Here, I'll look at the event and fix it up.

modern algebra


Tsunokiette

This looks cool, but shouldn't the dealer's cards be hidden? That's half the game of blackjack, you don't know if you cards are higher than theirs and vice versa.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

modern algebra

Whenever I've played Blackjack, it's always been one card up one card down ... Maybe there are different variations?

Tsunokiette

Quote from: modern algebra on December 01, 2007, 08:02:38 PM
Whenever I've played Blackjack, it's always been one card up one card down ... Maybe there are different variations?

Nm, you're right. For some reason I thought that card that was face down was right side up. -_- My bad. Great event! :D
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."