Nicht eingeloggt.
Passwort vergessen?


Bitte erst registrieren. Danach ist es möglich Beiträge zu schreiben.



 Nach unten   Vorheriges Thema   Nächstes Thema

#31
Re: Casino game for VB
Geschrieben am: 11.05.2018 10:42
PVB Elite
Dabei seit 26.04.2008
USA
937 Beiträge
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Anyone here an expert of Craps (the casino dice game)?

I'm trying to make a version of Craps using the rules in Wikipedia: https://en.wikipedia.org/wiki/Craps

I've got pass and don't pass bets and what I think are basic rules down, but since I've never played the game, I don't know if they're correct or not. Check out what I've got so far and a ROM and code zip file here: http://www.atari2600land.com/casino/casino20180511.zip

Let me know what you think so far.
Nach oben

#32
Re: Casino game for VB
Geschrieben am: 11.05.2018 13:21
Nintendoid!
Dabei seit 02.10.2006
128 Beiträge
ContributorLong Time User (13 Years)
Craps is a very difficult game to learn. I watched someone trying to teach it, and it was mind-boggling how many rules there were. Who in the heck even came up with something like that???
Nach oben

#33
Re: Casino game for VB
Geschrieben am: 11.05.2018 23:12
PVB Elite
Dabei seit 26.04.2008
USA
937 Beiträge
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I think I got the Come/Don't Come bets in. I'm using the Hoyle website for these rules now. http://www.hoylegaming.com/rules/showrule.aspx?RuleID=206
To turn on/off a Come bet, press the Left Trigger button. To turn on/off a Don't Come bet, press the Right Trigger button. As per rules, you can only make a Come/Don't Come bet after a non-crapping out/non-winning roll.
Nach oben

#34
Re: Casino game for VB
Geschrieben am: 12.07.2018 12:58
VUE(xpert)
Dabei seit 27.10.2007
Schweden
418 Beiträge
ContributorLong Time User (12 Years) 40+ Game Ratings
Good work man. I love how you make game after game and never give up
Nach oben

#35
Re: Casino game for VB
Geschrieben am: 23.09.2018 8:37
PVB Elite
Dabei seit 26.04.2008
USA
937 Beiträge
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Just poking my head in to say "hi, I'm back working on my casino game."

No craps, I've decided it was too tough to program and learn, so I'm going to attempt to replace it with a version of Video Poker.

Datei anhängen:



png  videopokerscreen.png (1.40 KB)
768_5ba734a3516b0.png 384X224 px
Nach oben

#36
Re: Casino game for VB
Geschrieben am: 24.09.2018 1:37
PVB Elite
Dabei seit 26.04.2008
USA
937 Beiträge
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
So someone was kind enough to give me some code for ranking hands:

function rankHand()
{
var 
rank;
// sort hand into card rank order
for (i=1;i<=5;i++){
for (
j=i;j<=5;j++){
if (
rankHandRank[i] > rankHandRank[j])
{
tmpSuit rankHandSuit[i];
tmpRank rankHandRank[i];
rankHandSuit[i] = rankHandSuit[j];
rankHandRank[i] = rankHandRank[j];
rankHandSuit[j] = tmpSuit;
rankHandRank[j] = tmpRank;
}
}
}
// now rank the hand (1 is the highest)
if (rankHandSuit[1] == rankHandSuit[2] && rankHandSuit[2] == rankHandSuit[3] && rankHandSuit[3] == rankHandSuit[4] && rankHandSuit[4] == rankHandSuit[5] && rankHandRank[5] == 13 && rankHandRank[4] == 12 && rankHandRank[3] == 11 && rankHandRank[2] == 10 && rankHandRank[1] == 1)
{
    
rank 1;    // royal straight flush
}
else if (
rankHandSuit[1] == rankHandSuit[2] && rankHandSuit[2] == rankHandSuit[3] && rankHandSuit[3] == rankHandSuit[4] && rankHandSuit[4] == rankHandSuit[5] && rankHandRank[5] == (rankHandRank[4] + 1) && rankHandRank[4] == (rankHandRank[3] + 1) && rankHandRank[3] == (rankHandRank[2] + 1) && rankHandRank[2] == (rankHandRank[1] + 1))
{
rank 1;    // straight flush
}
else if (
rankHandRank[1] == rankHandRank[2] && rankHandRank[2] == rankHandRank[3] && rankHandRank[3] == rankHandRank[4]) 
{
rank 2;    // 4 of a kind
}
else if (
rankHandRank[2] == rankHandRank[3] && rankHandRank[3] == rankHandRank[4] && rankHandRank[4] == rankHandRank[5])
{
rank 2;    // 4 of a kind
}
else if (
rankHandRank[1] == rankHandRank[2] && rankHandRank[2] == rankHandRank[3] && rankHandRank[4] == rankHandRank[5]) 
{
rank 3    // full house
}
else if (
rankHandRank[3] == rankHandRank[4] && rankHandRank[4] == rankHandRank[5] && rankHandRank[1] == rankHandRank[2]) {
rank 3;   // full house
}
else if (
rankHandSuit[1] == rankHandSuit[2] && rankHandSuit[2] == rankHandSuit[3] && rankHandSuit[3] == rankHandSuit[4] && rankHandSuit[4] == rankHandSuit[5])
{
rank 4;    // flush
}
else if (
rankHandRank[5] == (rankHandRank[4] + 1) && rankHandRank[4] == (rankHandRank[3] + 1) && rankHandRank[3] == (rankHandRank[2] + 1) && rankHandRank[2] == (rankHandRank[1] + 1))
{
rank 5;    // straight
}
else if (
rankHandRank[5] == 13 && rankHandRank[4] == 12 && rankHandRank[3] == 11 && rankHandRank[2] == 10 && rankHandRank[1] == 1)
{
rank 5;    // straight
}
else if (
rankHandRank[1] == rankHandRank[2] && rankHandRank[2] == rankHandRank[3])
{
rank 6;   // 3 of a kind
}
else if (
rankHandRank[2] == rankHandRank[3] && rankHandRank[3] == rankHandRank[4])
{
rank 6;   // 3 of a kind
}
else if (
rankHandRank[3] == rankHandRank[4] && rankHandRank[4] == rankHandRank[5])
{
rank 6;   // 3 of a kind
}
else if (
rankHandRank[1] == rankHandRank[2] && rankHandRank[3] == rankHandRank[4])
{
rank 7;   // 2 pair
}
else if (
rankHandRank[2] == rankHandRank[3] && rankHandRank[4] == rankHandRank[5])
{
rank 7;   // 2 pair
}
else if (
rankHandRank[1] == rankHandRank[2] && rankHandRank[4] == rankHandRank[5])
{
rank 7;   // 2 pair
}
else if (
rankHandRank[1] == rankHandRank[2])
{
rank 8;
}
else if (
rankHandRank[2] == rankHandRank[3])
{
rank 8;
}
else if (
rankHandRank[3] == rankHandRank[4])
{
rank 8;
}
else if (
rankHandRank[4] == rankHandRank[5])
{
rank 8;
}
else
{
rank 0;
}
return 
rank;
}

Since it's Javascript, I tried to convert it to C. I also adapted my code for the cards. I now have strings:
Cardnumber and Suitnumber, each having numbers 0-4. I tried to merge the card ranking code into my game, but I don't know what I need to do to make the code read the strings and work. Could someone please help me? The videopoker routine starts at line 2,062 and goes until the end.

Datei anhängen:


zip casino20180923code.zip Größe: 9.54 KB; Hits: 58
Nach oben

#37
Re: Casino game for VB
Geschrieben am: 24.09.2018 8:03
PVB Elite
Dabei seit 26.04.2008
USA
937 Beiträge
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Testing time. After hours of work, I think I may have done it. I tested this for 10 minutes, and there was no missed pairs like the previous versions I had tried.
SO LET ME KNOW if you come across any instance where it missed a pair. Take a picture of it (F9 in Mednafen).
The next thing I will do is add an option to change cards and redeal it again. Because right now, pressing start over and over again just gives you new hand after new hand. I am doing this for test purposes. Get the latest ROM here:
http://www.atari2600land.com/casino/
Nach oben

#38
Re: Casino game for VB
Geschrieben am: 24.09.2018 9:16
VUE(xpert)
Dabei seit 27.10.2007
Schweden
418 Beiträge
ContributorLong Time User (12 Years) 40+ Game Ratings
Welcome back and good luck. Nice to see you trying hard
Nach oben

#39
Re: Casino game for VB
Geschrieben am: 26.09.2018 0:37
PVB Elite
Dabei seit 26.04.2008
USA
937 Beiträge
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I think I finished a Video Poker game for the casino. Please test the latest version from the link in my previous post to play and test. The zip file will come with instructions.
Nach oben

#40
Re: Casino game for VB
Geschrieben am: 26.09.2018 1:25
PVB Elite
Dabei seit 26.04.2008
USA
937 Beiträge
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Tried on a real Virtual Boy. I had to make the wheel spinning silent because it wasn't working right with the music. Otherwise, all visual stuff should be working fine. If you have the one in the 3pm hour, upload the one in the 4pm hour.
Nach oben

 Nach oben   Vorheriges Thema   Nächstes Thema


Bitte erst registrieren. Danach ist es möglich Beiträge zu schreiben.