Page 9 of 10 FirstFirst ... 678910 LastLast
Results 321 to 360 of 366

Thread: Flickering Buttons: How Do I Get Rid Of Them?

  1. #321
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Could you explain in detail why you feel you need to use separate forms for each round?

    Global variables that you can use to pass data from form to form are easy to implement. Just put things like

    Code:
    Public BLScore As Integer ' if integer is the right type
    in GameEssentials.

  2. #322

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss
    Could you explain in detail why you feel you need to use separate forms for each round?
    Perhaps because it's easier for me to keep track instead of having to go through large volumes of code?

    Also, this morning, I realized a problem with the executing of the wrong vs. right subs again - only this time it occurs somewhere in round two, and when both rounds 1 and 2 are consolidated onto one form. I also discovered that using the NameCard function in the GameEssentials may not work on a consolidated form or on multiple forms, but it may work better using the NameCard as a private function on each sub. That may be why I might be having all these issues with setting off the wrong subs vs. the right subs.

    And thanks for the help on the Public variable.
    Last edited by JonSea31; Mar 11th, 2010 at 06:39 PM.

  3. #323

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    BTW, I did a test run with the public variables. While the blue player did win the first round (the first form), and added $100 to the blue player's score plus added 1 to the BWin, when Round2 form was set off, the variables didn't carry over.

    Is it possible I have to place the following into the Form_Load section:

    Code:
    RWin = RWin
    BWin = BWin
    RDScore = RDScore
    BLScore = BLScore

  4. #324

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    To give you a visual example of why the information is not carrying over to subsequent forms, is it okay if I send you the latest files in the morning?

  5. #325
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by JonSea31 View Post
    BTW, I did a test run with the public variables. While the blue player did win the first round (the first form), and added $100 to the blue player's score plus added 1 to the BWin, when Round2 form was set off, the variables didn't carry over.

    Is it possible I have to place the following into the Form_Load section:

    Code:
    RWin = RWin
    BWin = BWin
    RDScore = RDScore
    BLScore = BLScore
    No. If you create a Public variable in GameEssentials named (for example) BLScore and in Form1 (for example) you do BLScore = 100, then the value of 100 is available to any form or any code module from that point on. So if for example you did MsgBox BLScore in Form2 you would see 100.

  6. #326
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I made several mistakes in the CSInfo form when I added cboCPU. I've attached a form with corrected code that you should use instead of my old one.
    Attached Files Attached Files

  7. #327

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Also, I am still struggling to figure out how to carry information over from form to form - like how many rounds the blue (or red) player has won thus far, and the cash totals (including bonuses for exact guesses). But there must be a way to carry over such information without having to rely on Label captions. Can I get some help on this? I tried to code it, but to no avail.

    And thanks for the latest delivery, Marty.

  8. #328

  9. #329

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    You didn't answer my question which was "Why do you think you need multiple forms"?
    Actually, I think I did. But sorry for misleading by ending what I answered with with a question mark. Here was my response:

    Quote Originally Posted by JonSea31 View Post
    Perhaps because it's easier for me to keep track instead of having to go through large volumes of code?

  10. #330
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Assuming you have multiple forms for games/questions that are mostly the same, you will most likely wind up with much more code to maintain than if you have only one form. But it's your choice of course.

  11. #331
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Talking about the $100 exact guess bonus, here is what happens now. Red player's name is Marty, Blue Players name is Fred.

    1. Game starts
    2. Question is: "Do you keep a secret stash of cookies?"
    3. Marty guesses 5 (which is exactly right)
    4. Blue player says higher (or lower, it doesn't matter)
    5. Program says: "Marty got it right on the nose! Fred wins a $100 bonus"


    That comes from this line of code:

    Code:
    SetDialog RName & " got it right on the nose! " & BName & " wins a $100 bonus!"
    BName in that line should be RName, right?

  12. #332

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    ^ Ah, I see what you mean.

    Yes, the BName should be RName on that line.

  13. #333
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Okay that line (or one like it with a $500 bonus) occurs 4 times in the app and I've changed them in my copy. All 4 now refer solely to the red player. Can the blue player ever get a bonus?

  14. #334

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    Okay that line (or one like it with a $500 bonus) occurs 4 times in the app and I've changed them in my copy. All 4 now refer solely to the red player. Can the blue player ever get a bonus?
    Both players should have an equal chance to receive a $100 (or $500) bonus (including the AI player).

    And btw, I did do a revamp of the code, and it allows each player a fair chance of winning the $100/$500 bonus for an exact guess.

    And as for the AI player and its intelligence level, I say "Deep Blue" is the route to go. At least it will allow a slightly higher probability - a ratio of 60:40 - of the AI player being right.
    Last edited by JonSea31; Mar 12th, 2010 at 07:13 AM.

  15. #335
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by JonSea31 View Post
    Both players should have an equal chance to receive a $100 (or $500) bonus (including the AI player).

    And btw, I did do a revamp of the code, and it allows each player a fair chance of winning the $100/$500 bonus for an exact guess.

    And as for the AI player and its intelligence level, I say "Deep Blue" is the route to go. At least it will allow a slightly higher probability - a ratio of 60:40 - of the AI player being right.
    My idea for the computer player was to allow the human player to choose the computer he plays against, rather than there being just one.

  16. #336

  17. #337

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    You are missing the code to display the "on the nose" message for the blue player. You should add that in your version of the code.
    I'm already a step ahead on that one. I did that yesterday, in fact.

    I also replaced the "BName" with "RName" on what you pointed out in Post #331.

  18. #338

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    BTW, I decided that the "Deep Blue" AI player cheat percent level of 60% being right is probably the best route to go in this game. That will put some excitement into the game, and at least doing that will allow the AI player to have almost an equal chance to win or lose (and a very slim margin between 60% right/40% wrong).

    However, is there any way I could use the cheat percent level of 60% with these players?

    Code:
    Private Sub BComputer_Click()
    'ai
    Dim strNames(13) As String
    
    strNames(0) = "Peggy"
    strNames(1) = "Rachelle"
    strNames(2) = "Deborah"
    strNames(3) = "Jessica"
    strNames(4) = "Shannon"
    strNames(5) = "Stacy"
    strNames(6) = "Jasmine"
    strNames(7) = "Ciara"
    strNames(8) = "Erika"
    strNames(9) = "Danielle"
    strNames(10) = "Lindsay"
    strNames(11) = "Misty"
    strNames(12) = "Nikki"
    strNames(13) = "Robyn"
    
    BName.Text = strNames(Int((UBound(strNames) - 1) * Rnd))
    BName.Enabled = False
    gbComputerPlaying = True
    
    End Sub
    Also, I am going to use Male AI Players, and that is what the other combo box on the CSInfo form is designed for - it is designed for selecting the male or female AI player (yes, the human player can choose the male or female player in this game, but when the gender is chosen, it randomly selects a name for that particular gender.

    I just revamped some of the code (though I tweaked it on a Notepad document, but is not on the code yet):

    Code:
    Private Sub BComputer_Click()
    'ai
    Dim strFNames(13) As String
    Dim strMNames(13) As String
    
    strFNames(0) = "Peggy"
    strFNames(1) = "Rachelle"
    strFNames(2) = "Deborah"
    strFNames(3) = "Jessica"
    strFNames(4) = "Shannon"
    strFNames(5) = "Stacy"
    strFNames(6) = "Jasmine"
    strFNames(7) = "Ciara"
    strFNames(8) = "Erika"
    strFNames(9) = "Danielle"
    strFNames(10) = "Lindsay"
    strFNames(11) = "Misty"
    strFNames(12) = "Nikki"
    strFNames(13) = "Robyn"
    
    strMNames(0) = "Paul"
    strMNames(1) = "Ryan"
    strMNames(2) = "Devon"
    strMNames(3) = "Jonathan"
    strMNames(4) = "Steve"
    strMNames(5) = "Scott"
    strMNames(6) = "James"
    strMNames(7) = "Chris"
    strMNames(8) = "Evan"
    strMNames(9) = "David"
    strMNames(10) = "Louis"
    strMNames(11) = "Michael"
    strMNames(12) = "Nick"
    strMNames(13) = "Robert"
    
    BName.Text = strFNames(Int((UBound(strFNames) - 1) * Rnd))
    BName.Text = strMNames(Int((UBound(strMNames) - 1) * Rnd))
    BName.Enabled = False
    
    gbComputerPlaying = True
    
    End Sub
    Now how do I allow the strFNames to appear when the user selects the female option on the combo box, and same for the male option for strMNames? And remember, it's better to use 60% cheat percent all the way for the AI player. It's great to be consistent.

  19. #339
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Well any time gbComputerPlaying is True you know the computer is playing. So all you need to do is to just replace

    Code:
        If gbComputerPlaying Then
            gintCheatPct = cboCPU.ItemData(cboCPU.ListIndex)
        End If
    with

    Code:
        If gbComputerPlaying Then
            gintCheatPct = 60
        End If
    EDIT: Actually instead of doing gintCheatPct = 60, you could just make gintCheatPct a Const with a value of 60.

  20. #340

  21. #341

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    ^ Didn't confuse me at all. Thanks.

    Now, on to adding the AI gender. I explained in my last post how I would like to use the names of AI gender players (male names for male gender, and female names for female gender). Also, I plan on using some audio files that mention "he"/"she", "him"/"her", which is why gender players are good in this aspect.

    Also, human players can be set to allow either gender to play, but they have to select an avatar of the same gender from a dropdown menu (which will be worked on later).

  22. #342
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    In post #338 you show code that creates to arrays of names, one for male and the other female. Unless you want to show the user two separate lists, there's no need to do that.

    Do you still have the code where I assigned 0, 20, 40, 60 and 80 values to cboCPU ItemData values? If so you could do something similar. Using (and changing) the names in cboCPU you could do this:

    Code:
    cboCPU.AddItem "Peggy"
    cboCPU.ItemData(0) = 0 ' where 0 = female
    cboCPU.AddItem "Ryan"
    cboCPU.ItemData(1) = 1 ' where 1 = male
    'etc

  23. #343
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Thinking about the computer player names, why would anyone want to choose one name over the other if they all play the same way? If you don't want different cheat levels then why not have just one computer name and give it a level of 60.

    If you haven't thought about this already, here's an idea for the human player selection. When they enter or choose a name, display a form that contains thumbnails of all the available avatars and let them pick the one they want. This should be remembered from game to game and there should also be a facility to change avatar without changing the name.

    When you send me your new code, include a few avatars and I could do that coding for you if you like.

  24. #344

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I have to work on creating contestant avatars, and that may take a few days. I will consider putting in 6, maybe 7, avatars for each gender. I do have 2 done already for each gender (including the individual male and female avatars in the last many deliveries), so I will only need to come up with 5 more for each gender.

    As for the AI player's avatar, maybe that avatar player can be chosen at random, but given a choice of 3 random names for each gender.

    I know that the Wheel of Fortune game for basic computers back in the 1980s used different names for their corresponding gender. Basic versions of Jeopardy!, Classic Concentration, and Card Sharks had the contestants' names and their corresponding avatar based on their gender randomly selected for the computer player. Human players could choose their avatar and their name, as they have that option.

    Quote Originally Posted by MartinLiss
    Do you still have the code where I assigned 0, 20, 40, 60 and 80 values to cboCPU ItemData values?
    I believe I do still have it (gotta love doing frequent backups). I will edit that part very soon.
    Last edited by JonSea31; Mar 13th, 2010 at 08:50 PM.

  25. #345

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    While I will be creating some more contestant avatars in the coming days, I have another dilemma I'd like to figure out.

    Every time a contestant becomes the champion by winning two out of three rounds, I get a type mismatch error on the line bolded in red in the following code:
    Code:
            GetMatchWinCue2
            RWinTotal = RWinTotal + 1
            Wait 2000
            SetDialog "Congratulations, " & RName & "!  You are the champion!"
            BFreezeBar.Visible = False
            RFreezeBar.Visible = False
            For i = 0 To 4
                RCard(i).Visible = False
                BCard(i).Visible = False
            Next
            For i = 0 To 1
                lblRName(i).Visible = True
                lblBName(i).Visible = True
                RScore(i).Visible = True
                BScore(i).Visible = True
            Next
            lblRNameBar.Visible = False
            lblBNameBar.Visible = False
            RBorder.Visible = True
            BBorder.Visible = True
            cmdHigherCds.Visible = False
            cmdHigherCds.Enabled = False
            cmdLowerCds.Enabled = False
            cmdLowerCds.Visible = False
            cmdFreezeCd.Visible = False
            cmdFreezeCd.Enabled = False
            Set RBorder.Picture = RDBorderDim
            Set BBorder.Picture = BLBorderDim
            Set QPodium.Picture = QCard4
            QPodium.Visible = True
            RedAvatar.Visible = True
            Set RedAvatar.Picture = MaleAV1
            BlueAvatar.Visible = True
            Set BlueAvatar.Picture = FemaleAV1
            XB.Visible = True
            For lngblink = 1 To 16
                Set Picture1.Picture = RDBkgdFlash
                Set XR.Picture = RedX
                XR.Visible = True
                Wait 200
                Set Picture1.Picture = BkgdBothDim
                Set XR.Picture = BlankX
                XR.Visible = True
                Wait 200
            Next
            Set XR.Picture = RedX
            XR.Visible = True
            Wait 500
            RDScore = RDScore + 100
            For i = 0 To 1
                RScore(i).Caption = "$" & RDScore
            Next
            ChampMoney = RDScore
            ChampName = CSInfo.RName.Text
            Wait 2000
            SetDialog RName & " will be playing the Money Cards in just a minute..."
            Wait 3000
            If BLScore = 0 Then
                SetDialog BName & ", you played a fine game, and we have some lovely parting gifts for you and our thanks for being here."
            Else
                SetDialog BName & ", you played a great game, and you have $" & BLScore & ", and our thanks for being here!"
            End If
            Wait 3000
            SetDialog "Now, let's go to the Money Cards!"
            Wait 3000
            If Gameplay = 1 Then
                MC86.Show
            ElseIf Gameplay = 2 Then
                MC88.Show
            End If
    I have a global variable in the GameEssentials9 module, and it says:

    Code:
    Public ChampName As Integer
    Where did I go wrong, and why did I receive the Type Mismatch error? Should the "Integer" really be something else?

  26. #346
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Integers are numbers and so since you want to store text in it you should have done

    Public ChampName As String

    (I would name it gstrChampName. Where "g" is for global and "str" is for String. In that way by looking at it you know 1) that it's it is in a code module and has global scope, and 2) that it contains a string).

  27. #347

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I haven't been creating the contestant avatars much this past week, as I was busy enhancing the "Card Sharks Challenge Game" form files to allow for a scoring format that is not exactly like the game show but very darn close.

    Also, I learned very recently that Card Sharks (the game show) is played similar to the popular card game Acey Deucey. I downloaded a sample code for Acey Deucey somewhere on the Internet just now, and I am going to assess it to see if it functions the way I prefer it to, and if the code is better than my version (originally created by technorobbo, btw), I will probably consider using that code by copying/pasting it onto my code (assuming I do a backup first, which I have).

    However, are there other Acey Deucey VB games that I could download somewhere?

    As for the show, I found out it's returning to Game Show Network on April 1st (and it's no April Fool's joke, btw).

  28. #348

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Martin, sorry I have been delayed on creating the avatars, but I have been working on repairing the code to allow the higher/lower calls to function properly. I'll do a series of thorough test runs before the weekend, and see what happens from there.

    In the meantime, I was working on the Money Cards form and updating it to reflect the newer version of code (which I got from an Acey Deucy game I downloaded last Sunday). However, there are a few problems with the newer version of the Money Cards form:

    1. When a contestant changes his/her card on any of the 3 rows, and that card is changed to a Joker, the Joker should be replaced, and the red card back should display, and the contestant should be able to have the option to change the same card (or another of the remaining available), or stick with the card and call it higher or lower.

    2. When the third card on the second row (CurrentSlot = 7) is revealed, the MC(8) picture automatically moves to the MC(9) slot when really the contestant should have the option to call it higher or lower (or change it if the cmdChangeMC button is enabled and not used on that row).

    I am sending you the updated code by PM, and you can see for yourself where I may have went wrong, and what else needs to be fixed.

  29. #349

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    I fixed part of the code where the card at the end of a row gets moved to the beginning of the next row yesterday. But the replacing of the card whenever a Joker gets revealed is still a problem to me.

    When a joker is revealed after the player calls the next card higher or lower, or when a joker is revealed on the first card of the bottom row at the start of the Money Cards:

    - The card should be replaced and not revealed, and the contestant should have the option to call higher, lower, or change (if a contestant had not changed on that row already).

    When a joker is revealed during a card changing transaction:

    - the empty change card slot (1, 2, or 3) should be reloaded by replacing the sp#-empty.gif with the sp#-full, and the contestant should have the right to change the same card or any other spare card available. The new card result should not be revealed at all unless prompted.

    I'll be sending the updated files later today, so some work will already have been done on the Money Cards forms.
    Last edited by JonSea31; Mar 27th, 2010 at 12:55 PM.

  30. #350

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Just discovered now that when a Joker is revealed on the turn of the next card, that sngCard is recorded as 14 (for Joker), after getting an Ace on the first card on the bottom row (in CurrentSlot = 1). I wagered $200 lower than the Ace (sngCard = 13), and the next card result (in CurrentSlot = 2) was a Joker (sngCard = 14). The sngCard should be cleared immediately or, if possible, not given a numeric value such as 14. At least, you could try giving it a string name such as strMoneyCd = Joker, so that a non-numeric value would be recorded as potentially higher or lower. When a joker is revealed, the card should be reloaded showing the back of the card and the contestant should be prompted to re-bet his/her money and call the next card higher or lower than the previous card value in the last slot.

  31. #351

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Martin, just want to ask you: did you receive my last PM delivery? You haven't replied to me lately, so I presume you're busy with other projects as of lately?

  32. #352
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Yes I did and I'm going to download it now. I am busy but if you have a specific problem you want me to look at please post it or refer me back to a previous post and I'll try to take a look.

  33. #353

  34. #354

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by MartinLiss View Post
    The zip is missing Eggcrate.ttf. It runs okay if I comment out the line that uses it so I don't need a whole new zip, just that file.
    Attached.
    Attached Files Attached Files

  35. #355
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Okay I have the file.

    Let me make a suggestion that will decrease the amount of code in the project. Currently you have Dim-ed sngCard1 As Single, sngCard2 As Single, sngCard3 As Single, sngCard4 As Single, sngCard5 As Single, sngCard6 As Single, sngCard7 As Single, sngCard8 As Single, sngCard9 As Single, sngCard10 As Single and you have code like this
    Code:
    Private Function CallChange()
    If CurrentSlot = 1 Then
        Call GetCard
        sngCard1 = sngCard
        sngCardSuit1 = sngCardSuit
        MC(1).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard1
    ElseIf CurrentSlot = 2 Then
        Call GetCard
        sngCard2 = sngCard
        sngCardSuit2 = sngCardSuit
        MC(2).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard2
    ElseIf CurrentSlot = 3 Then
        Call GetCard
        sngCard3 = sngCard
        sngCardSuit3 = sngCardSuit
        MC(3).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard3
    ElseIf CurrentSlot = 5 Then
        Call GetCard
        sngCard5 = sngCard
        sngCardSuit5 = sngCardSuit
        MC(5).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard5
    ElseIf CurrentSlot = 6 Then
        Call GetCard
        sngCard6 = sngCard
        sngCardSuit6 = sngCardSuit
        MC(6).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard6
    ElseIf CurrentSlot = 7 Then
        Call GetCard
        sngCard7 = sngCard
        sngCardSuit7 = sngCardSuit
        MC(7).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard7
    ElseIf CurrentSlot = 9 Then
        Call GetCard
        sngCard9 = sngCard
        sngCardSuit9 = sngCardSuit
        MC(9).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard9
    End If
    End Function
    If you replaced those Dims for sngCard1 through sngCard10 with Dim sngCard(1 to 10) As Single (and do the same for sngCardSuit1 through sngCardSuit10) you could change the function to this
    Code:
    Private Function CallChange()
    
        Call GetCard
        sngCard(CurrentSlot) = sngCard
        sngCardSuit(CurrentSlot) = sngCardSuit
        MC(CurrentSlot).Picture = LoadPicture(App.Path & strCard)
        oldCardValue = sngCard(CurrentSlot)
    End Function
    BTW, since CallChange doesn't return any value, you should make it a Sub instead of a Function.

  36. #356

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Just to provide an update on the progress of the game development (I'm surprised I didn't make a post to this thread in April):

    1. The problem with the card values is most likely resolved now - thanks to an Acey Deucey code sample I got from the Internet. Using some elements from Acey Deucey, and realizing that Card Sharks is based on Acey Deucey, I solved the problem for the most part.

    2. I also consolidated the Money Cards with the Main Gameplay onto one form. There are also control arrays for many images, labels, and other stuff - just to trim down the unnecessary controls.

    3. I now added a video opening this past weekend.

    4. This past week, I added a way to randomize the question types (Audience Poll, Educated Guess, and "Out of 100 People" Questions) so that there won't have to be a structured format for the questions, but more random question types throughout the game.

    5. I have also applied a card flipping animation using .GIF frames (12 images per card).


    Now, there are only a few minor problems with the game development remaining:

    1. In the Jokers Car Game, there are two problems that I have to have fixed at some point very soon. More to come on that later.

    2. The avatar players will be developed very soon. I have developed some still avatar images (5 female and 3 male), and more will be developed in the coming weeks.

    3. With the AI player (the blue player), the AI player can only guess higher or lower, and/or guess the number during the survey questions. The AI player should also be able to call the cards higher or lower or decide to freeze if the card is not favourable. Same higher/lower guessing should apply for the Money Cards and the car game.


    For the Main Gameplay:

    • If the card is lower than 9 (not including 9) but higher than 5 (not including 5), the AI player should call it higher or freeze.

    • If the card is higher than or equal to 9, but lower than a Jack (not including the Jack), the AI player should choose to call the next card lower or freeze.


    In the Money Cards form:

    • If the card is lower than 9 (not including 9) but higher than 5 (not including 5), the AI player should call it higher, or change the card on the row if he/she hadn't changed already.

    • If the card is higher than or equal to 9, but lower than a Jack (not including the Jack), the AI player should call it lower, or change the card on the row if he/she hadn't changed already.


    Martin, if you have time to help me some more, please let me know.

  37. #357
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Quote Originally Posted by JonSea31 View Post
    Just to provide an update on the progress of the game development (I'm surprised I didn't make a post to this thread in April):

    1. The problem with the card values is most likely resolved now - thanks to an Acey Deucey code sample I got from the Internet. Using some elements from Acey Deucey, and realizing that Card Sharks is based on Acey Deucey, I solved the problem for the most part.

    2. I also consolidated the Money Cards with the Main Gameplay onto one form. There are also control arrays for many images, labels, and other stuff - just to trim down the unnecessary controls.

    3. I now added a video opening this past weekend.

    4. This past week, I added a way to randomize the question types (Audience Poll, Educated Guess, and "Out of 100 People" Questions) so that there won't have to be a structured format for the questions, but more random question types throughout the game.

    5. I have also applied a card flipping animation using .GIF frames (12 images per card).


    Now, there are only a few minor problems with the game development remaining:

    1. In the Jokers Car Game, there are two problems that I have to have fixed at some point very soon. More to come on that later.

    2. The avatar players will be developed very soon. I have developed some still avatar images (5 female and 3 male), and more will be developed in the coming weeks.

    3. With the AI player (the blue player), the AI player can only guess higher or lower, and/or guess the number during the survey questions. The AI player should also be able to call the cards higher or lower or decide to freeze if the card is not favourable. Same higher/lower guessing should apply for the Money Cards and the car game.


    For the Main Gameplay:

    • If the card is lower than 9 (not including 9) but higher than 5 (not including 5), the AI player should call it higher or freeze.

    • If the card is higher than or equal to 9, but lower than a Jack (not including the Jack), the AI player should choose to call the next card lower or freeze.


    In the Money Cards form:

    • If the card is lower than 9 (not including 9) but higher than 5 (not including 5), the AI player should call it higher, or change the card on the row if he/she hadn't changed already.

    • If the card is higher than or equal to 9, but lower than a Jack (not including the Jack), the AI player should call it lower, or change the card on the row if he/she hadn't changed already.


    Martin, if you have time to help me some more, please let me know.
    Tell me what your top-priority problem is and send me a link to the current code and I'll be happy to help if I can.

  38. #358

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    Well, it turns out that there is significant progress as of lately. I decided to revamp the AI code so that it can allow the computer player to randomly select numbers from a certain range within the question type. While Martin's code is great, I think I can program the game to be almost similar to the MS-DOS and Commodore 64 versions of the Card Sharks game (released around 1988).

    In other words, if a red human player guesses a numeric answer, if that numeric guess is 50 or less, the AI player would automatically guess higher. If the numeric guess is greater than 50, the AI player would automatically guess lower.

    During the playing of the cards, if the AI contestant has first shot at the cards after winning the question, and that card was to be a 5 or under, that AI player would automatically guess higher than that card. If the card was to be a Jack or higher, the AI contestant would automatically guess lower. Anything in between (in this case, 6 to 10), the contestant would automatically change the card. If the contestant changed that card, the AI player would have to play it - no if's and's or but's. If a player ended up getting a 6 to 10 along the way, that player would automatically freeze.

    When the AI player has a turn to answer a question, I think the AI is supposed to randomly select a number between 1 and 99 (1 to 10 for Audience Poll questions). I am faced with a dilemma, but I will try to fix it myself first.

    Martin, when I have a key problem, I will send you a PM with a link to the updated project file with forms.

  39. #359

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    My first progress report in nearly two months, and this progress report shows some promising signs of things to come.

    The major coding is very nearly completed. I am currently doing some minor fixes in order to make the game very close to perfect.

    I am doing some test runs during most of July, and it looks very promising that my game will get the green light for release by the end of July or early August. I will have to create some more audio sounds from the show, and maybe even update some images to make the game realistic. Earlier this week, I added a flashing border as 2 separate frames to allow the lights to move to the contestant winning a game or the match. I may even do this to the Money Cards image also.

  40. #360

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2008
    Location
    St. John's, Newfoundland, Canada
    Posts
    965

    Re: Flickering Buttons: How Do I Get Rid Of Them?

    August 5th update, and you'll be happy to hear the news...

    The major coding will likely be completed by the weekend or early next week at the latest. Plus I have consolidated all the gameplay elements onto one form. This will really make things easier instead of having so many different forms.

    I have also decided to scrap the avatar images - too much extra work that I don't even need.

    So far, I have done test runs for the entire gameplay of the following game types (all with Human player vs. Human player):
    • Jokers Car Game

    • Jokers Game for Young People's Week (with the Trip to Hawaii instead of a car)

    • Range Board Car Game

    • Showdown Game and Combined Money Cards/Car Game


    I will be doing some test runs with the Computer player at some point over the weekend or the coming week.

    Once the major coding is completed, I will be working on creating some more small .wav files, as well as touch up some of the images to make the game look more smooth and crisp.

    I thank Martin and some other users for all the help they provided prior to last April, and it turns out that I didn't even need much help since I discovered the Acey-Deucey code lingering on the Internet, and Card Sharks is somewhat based on Acey-Deucey.

Page 9 of 10 FirstFirst ... 678910 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width