Results 1 to 13 of 13

Thread: Ultimately the problem is this (game scoring)

  1. #1

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Ultimately the problem is this (game scoring)

    I'm just thinking out loud here - no response is necessary unless you have some unique insight into this sort of thing.

    I'm trying to develop a game engine. It's nothing special or unique and I have no real plans for it when (if) I finish it.

    But I've always like gizmos and this is my software gizmo. Also, I've literally written millions of lines of code but I never get to play with random numbers for the most part. Because I mostly write DB front-ends or utility apps. I don't need an app that randomly renames files.

    So getting the balance right is really hard. At least it is for me because I have no background in this and don't know how it's "supposed" to work.

    The problem is that I have to let it run for a very long time to see if it's working right.

    And any time I change anything about the scoring then the version that's running is no longer valid. And that's true even if I pause the running code and make the change there.

    So every time I change anything about the scoring I have to stop the app and restart it.

    I'm really looking forward to getting to a point where I think it's settled and can just let it run.

    Also, stupid windows ignores my instruction not to update and reboot unless I tell it to and does it anyway which isn't helpful.


    That is all.

  2. #2
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Ultimately the problem is this (game scoring)

    Funny your post never got any replies. Most of the regulars here keep the world record size "Post Race" going, talk about some lame Hamilton 5x championship, or continuously post in Team Fuki.

    There comes a time in your coding journey where you will decide to build a game engine. We've all done it. But then, there will come a time when you realize "why build?" There are plenty of game engines out there that are far superior of any of our builds that even AAA developers use such as Unreal Engine and Unity which are cross platform, come a slew of tools and special effects such as raytracing, and can export to any format such as PC, Mac, Linux, Xbox Series S/X, PS4/PS5, Nintendo Switch, Meta Quest 2/3, Android, and iOS just to name a few. So basically, you don't have to worry about rendering pipelines, graphics code, initializing DX/OpenGL/Vulkan, physics engines, collisions algorithms, and just about anything else you can think of. All of your focus can then be targeted towards pure game play. It then becomes a lot easier to actually finish projects for a change. There have been numerous projects I've been in the middle of but never actually finished due to how many elements of such games needed work for one person. And it was a royal pain hardcoding everything just to render an object, 2D or 3D otherwise. It is basically why I now use Unity and Unreal. Not always, but whenever I feel like busting out a game once my creative side kicks in.

    On a side note, I hate Windows updates in general.

  3. #3
    Lively Member
    Join Date
    Jun 2023
    Posts
    76

    Re: Ultimately the problem is this (game scoring)

    You could always add a "Debug menu" that you can pull up using a key combination like CTRL+D or something. Have it pull up a form with all of your numbers that you feel can be played with and give yourself a way to change them at run-time, even restart the game or reset score from the menu so you can test it more without stopping it.

  4. #4

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    Quote Originally Posted by Jacob Roman View Post
    But then, there will come a time when you realize "why build?"
    Because I want a gizmo to play with. I like RPG's. When Baldur's Gate 3 came out it would show you some of the die rolls. I've always been interested in the clockworks of point systems and that's what I want to build.

    But I want it to be so chaotic that not even I know what's going on while still being able to stop it when I want to.

    And I want it to be as efficient as I can make it using only actual classic VB6 tools that came standard equipment in the box or service packs.

    I have no interest in building actual games. I just want to watch the numbers work.

  5. #5

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    Quote Originally Posted by themindgoblin View Post
    You could always add a "Debug menu" that you can pull up using a key combination like CTRL+D or something. Have it pull up a form with all of your numbers that you feel can be played with and give yourself a way to change them at run-time, even restart the game or reset score from the menu so you can test it more without stopping it.
    I can already do that. That's not the problem. The problem is that if I *change* the way any of the numbers/calculations work during a run then I've made that run invalid.

    These long runs are to test the engine balance. I can't interfere with it in any that affects scoring during these tests.

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,091

    Re: Ultimately the problem is this (game scoring)

    You can if you initialize the randmizer only once and with a fixed seed

  7. #7

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    Why do you think that?

    First, the randomness is so random that things absolutely will not happen in the same order every run even if I do what you suggest. Because there are lots of events that can trigger other things and there is no way to know when an event will choose to interrupt something else and when it won't.\

    What I can do is exactly as you suggest - One Seed only and always the same seed, compile to an exe, upload it to *my* site and you can play with it all you want. I'll bet you money that it doesn't do the same things every time you run it.

  8. #8

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    You know what... I already removed all the Randomize statements from all the code last time we talked about randomizing. So it's just one at program start - randomize timer.

    I'm going to change that to randomize -1 and start and stop the program several times and the thing I'll look for is what gets or loses a point first. If it's always the same then I will concede and apologize or bake you a cake or something. (I've never baked a cake so you get what you get).

  9. #9

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    Code:
    Public Sub Main()
    Dim m_Callstacker As New cCallStacker
    
    ' Initialization has to start in this order so that calls to the callstack do not happen before the CallStack is initialized.
    
    dtSessionStart = Now
    
    Randomize Timer ' This is now -1.  I'll let you know what happens.  It's the ONLY place in the code where randomize is called.
    
    Set CallStack = New cCallStack
    
    m_Callstacker.Add NAME & ".Main(Public Sub)"
    
    LogFolder = App.Path & "\Logs\"
    
    If Not FolderExists(LogFolder) Then CreateFolder LogFolder, False
    
    StartDatabase
    
    LeastMcGuffinsTransferred = 111111000
    LeastMcGuffinsAbducted = 111111000
    
    GameDelay = 0
    
    With frmPlayerLuck
    
      .Show vbModal
    
      If .Cancelled Then
    
        Unload frmPlayerLuck
    
        CloseLogFile
      
        End
    
      End If
    
    End With
    
    End Sub

  10. #10

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    OK, just did it. "Random" starting stats were all the same. In fact, all the start-up stuff was the same because it's not getting into those events yet.

    First run the first thing that happened was it gave me a list of choices.

    Second run the first thing that happened was it did one of the story options from that Tree/Node db thing I posted a while back

    So less than 10 seconds in and it's already doing different things.

    Then there's the part where if you click anything on the form it does a random thing so if you click things you not only have to click them in the exact same order every single run, but you'd also have to click them at the exact same time during code execution.

    I got what I wanted out of this - something so random that I have no idea what's going to happen next.

  11. #11
    Lively Member
    Join Date
    Jun 2023
    Posts
    76

    Re: Ultimately the problem is this (game scoring)

    Quote Originally Posted by cafeenman View Post
    I can already do that. That's not the problem. The problem is that if I *change* the way any of the numbers/calculations work during a run then I've made that run invalid.

    These long runs are to test the engine balance. I can't interfere with it in any that affects scoring during these tests.
    Ahhh, I gotcha. I've fiddled around with idle games before and what I do for balance testing is make a time multiplier that I can change, so I don't have to wait around as long. It sounds like your concept is a bit more abstract though, so I'm not sure you'll be able to get over that hurdle as easily.

    Make like five builds each with some different calculations/numbers/etc. and run them all at the same time? Lol. It would at least save you SOME time.

  12. #12

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    Since you asked: (Multipliers)

    These are the Declarations for the Game Engine. A few "Constants" are actually generated by subs so not shown in declarations even though they are basically that kind of number if that makes any sense.

    Code:
    Option Explicit
    
    
    ' !! Note that all Multipliers, CAPS, etc. are being experminted with and are not necessarily anywhere close to being "right" or balanced.
    
    
    ' // Constants, Types and Enums.
    
    
    Private Const NAME As String = "bGameEngineSettings"
    
    
    ' / Leveling and Attributes.
    
    Public Const LEVEL_CAP As Long = 10000                             ' Maximum Level a Player can reach.
    Public Const CRITICAL_MODIFIER As Double = 2                       ' Multiplies Raw Points when Critical occurs.  1 / CRITICAL_MODIFIER when receiving Negative Points.
    
    Public Const AVAILABLE_STARTING_POINTS_MULTIPLIER As Double = 0.15 ' Used to calculate percentage of CAP that can be used as Starting Points.
    
    Public Const ATTRIBUTE_CAP As Long = 1000                          ' The Highest Any Attribute can Level except Developments.
    Public Const ATTRIBUTE_MIN As Long = -ATTRIBUTE_CAP                ' Ditto but Minimum.
    
    Public Const MAX_ATTRIBUTE_MULTIPLIER As Double = 0.4              ' 1 + ((This number * CurrentAttributePoints)/AttributePointsCap).
    
    
    Public Enum PLAYER_ATTRIBUTES
    
      idx_Player_Attribute_Braintrust = 0      ' B - Braintrust (Formerly Tech Savvy).
      idx_Player_Attribute_Readiness           ' R - Readiness (Formerly Situational Awareness).
      idx_Player_Attribute_IntestinalFortitude ' I - Intestinal Fortitude.
      idx_Player_Attribute_Cheer               ' C - Cheer (Formerly Joy Sparks).
      idx_Player_Attribute_Karma               ' K - Karma (Formerly Fate).
      idx_Player_Attribute_Energy              ' E - Energy (Formerly Health Points).
      idx_Player_Attribute_Developments        ' D - Developments (Formerly Advancements / Formerly Tech Points).
    
      idx_ShieldBurstID                        ' !! Only used when calculating multipliers and should not be included.
                                               '    with anything in regard to Attributes (such as looping through them, etc.).
    End Enum
    
    Public Const MIN_PLAYER_ATTRIBUTE As Long = idx_Player_Attribute_Braintrust
    Public Const MAX_PLAYER_ATTRIBUTE As Long = idx_Player_Attribute_Developments
    
    
    ' Reputation affects the Chance of McGuffins being transferred from Inventory to Siloes.
    
    Public Const MAX_REPUTATION As Long = 1000 ' The Highest Value the Player's Rep can get.
    Public Const MIN_REPUTATION As Long = 0    ' And the Lowest.
    
    ' Luck gives the Player and overall Modifier for everything.
    Public Enum PLAYER_LUCK
    
      idx_Player_Luck_VeryBadLuck = 0 ' Modifier More > 1. Worse Luck = Better Modifier.  E.g. Low-Luck gets a handicap.
      idx_Player_Luck_BadLuck         ' Modifier > 1.
      idx_Player_Luck_AverageLuck     ' Modifier = 1 (does nothing). Sets *all* other Modifiers to 1.
      idx_Player_Luck_GoodLuck        ' Modifier < 1.
      idx_Player_Luck_VeryGoodLuck    ' Modifier More < 1.
    
    End Enum
    
    Public Const MIN_PLAYER_LUCK As Long = idx_Player_Luck_VeryBadLuck
    Public Const MAX_PLAYER_LUCK As Long = idx_Player_Luck_VeryGoodLuck
    
    
    Public Enum PLAYER_CLASS ' Player Class is not currently being used for anything.  Plan is for each Class to have one buff and one debuff as standard equipment... or something.
    
      idx_PlayerClass_Android = 0
      idx_PlayerClass_Apple
      idx_PlayerClass_Chrome
      idx_PlayerClass_DOS
      idx_PlayerClass_Linux
      idx_PlayerClass_Macintosh
      idx_PlayerClass_Ubuntu
      idx_PlayerClass_Windows
    
    End Enum
    
    Public Const MAX_CLASSES As Long = idx_PlayerClass_Windows
    
    
    Public Enum PRE_OR_POSTFIX_CLASS
    
      idx_PrefixClass = 0
      idx_PostfixClass
    
    End Enum
    
    
    Public Enum BUFF_OR_DAMAGE
    
      idx_Buff = 0
      idx_Damage
    
    End Enum
    
    ' / Leveling and Attributes.
    
    
    ' / Color Tiers.
    
    Public Enum COLOR_TIER_ID
    
      idx_ColorTierID_White = 1
      idx_ColorTierID_Green = 2
      idx_ColorTierID_Blue = 3
      idx_ColorTierID_Purple = 4
      idx_ColorTierID_Gold = 5
      idx_ColorTierID_Platinum = 6
      idx_ColorTierID_Ruby = 7
      idx_ColorTierID_Diamond = 8
    
    End Enum
    
    Public Const MIN_COLOR_TIER_ID As Long = idx_ColorTierID_White
    Public Const MAX_COLOR_TIER_ID As Long = idx_ColorTierID_Diamond
    
    Private Const BASE_COLOR_TIER_MODIFIER As Long = 6 ' Determines difficulty of rolling higher color tiers.  See ColorTierChance procedure.
                                                       ' ColorTierChance = 1 / (BASE_COLOR_TIER_MODIFIER ^ (ColorTierID - 1)).
    
    Private Const COLOR_TIER_MODIFIER_DIE_SIDES As Long = BASE_COLOR_TIER_MODIFIER ^ (MAX_COLOR_TIER_ID - 1) ' Determines Chance of Rolling any given Color Tier.
    
    ' / Color Tiers.
    
    
    ' / Statistics.
    
    Public Enum ACCUMULATED_GAME_STAT
    
      idx_Accumulated_Game_Stat_PositivePointInstances = 0
      idx_Accumulated_Game_Stat_PositiveRawPointsAwarded
      idx_Accumulated_Game_Stat_PositiveModifiedPointsAwarded
      idx_Accumulated_Game_Stat_PositiveModifiedPointsGain
    
      idx_Accumulated_Game_Stat_NegativePointInstances
      idx_Accumulated_Game_Stat_NegativeRawPointsAwarded
      idx_Accumulated_Game_Stat_NegativeModifiedPointsAwarded
      idx_Accumulated_Game_Stat_NegativeModifiedPointsGain
    
    
    End Enum
    
    Public Const MIN_ACCUMULATED_GAME_STAT As Long = idx_Accumulated_Game_Stat_PositivePointInstances
    Public Const MAX_ACCUMULATED_GAME_STAT As Long = idx_Accumulated_Game_Stat_NegativeModifiedPointsGain
    
    
    Public Enum MISC_GAME_STAT
    
      idx_Accumulated_Game_Stat_BabiesBorn = idx_Accumulated_Game_Stat_NegativeModifiedPointsGain + 1
      idx_Accumulated_Game_Stat_DingoedBabies
      idx_Accumulated_Game_Stat_BabiesSurvivedToAdulthood
    
      idx_Accumulated_Game_Stat_McGuffinsProduced
      idx_Accumulated_Game_Stat_McGuffinsAbducted
    
    End Enum
    
    ' / Statistics.
    
    
    ' / Shields.
    
    Public Const MAX_SHIELDS As Long = 8   ' The Maximum Number of Shields that can be Active. Number of Shields authorized is determined by Player Level.
    
    Public Const SHIELD_BURST As Long = 50 ' Number of McGuffins one Shield saves.  This is single-burst, not cumulative.
                                           ' If SHIELD_BURST = 50 then and player gets hit for 49 McGuffins then all 49 McGuffins are Abducted.
                                           ' If hit for 51 then only 1 McGuffin is abducted and a Shield is lost.
    ' / Shields.
    
    
    ' / McGuffins.
    
    Public Const MCGUFFIN_CAP As Long = 30000                      ' Maximum number of McGuffins that can be in Inventory (not siloed).
    Public Const MIN_MCGUFFINS_TO_ACTIVATE_MODIFIERS As Long = 100 ' If player has fewer than this number than ALL modifiers are Disabled.
    Public Const MIN_MCGUFFINS_TO_ALLOW_TRANSFER As Long = 250     ' McGuffins are transfered in Batches of 100.  Player must keep 150.
    
    ' / McGuffins.
    
    
    ' / Miscellaneous.
    
    Public Const NUM_RANDOM_CHOICES As Long = 44    ' See 'Branch' Procedure in frmCallStackGame.
    
    Public Const BABY_TIMER_INTERVAL As Long = 7500 ' Saved so Timer can be reset after FasterGamePlay is activated.
    Public Const GAME_TIMER_INTERVAL As Long = 1000 ' Ditto.
    
    
    Public Enum STARTING_ATTRIBUTE_CHOICE
    
      idx_STARTING_ATTRIBUTE_CHOICE_Random = 0 ' All Attributes are random rolls.
      idx_STARTING_ATTRIBUTE_CHOICE_Equal      ' All Attributes are the same starting value. (TotalAvailablePoints / NumAttributes).
      idx_STARTING_ATTRIBUTE_CHOICE_Zero       ' All Attribtues start at 0.
      idx_STARTING_ATTRIBUTE_CHOICE_Custom     ' Player can do whatever they want.
    
    End Enum
    
    
    Public Enum RANDOM_PARTY_MEMBER_JOIN
    
      idx_Random_PartyMember_StatusUnchanged = 0
      idx_Random_PartyMember_Join
      idx_Random_PartyMember_Leave
    
    End Enum

  13. #13

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,665

    Re: Ultimately the problem is this (game scoring)

    Quote Originally Posted by themindgoblin View Post
    Ahhh, I gotcha. I've fiddled around with idle games before and what I do for balance testing is make a time multiplier that I can change, so I don't have to wait around as long. It sounds like your concept is a bit more abstract though, so I'm not sure you'll be able to get over that hurdle as easily.

    Make like five builds each with some different calculations/numbers/etc. and run them all at the same time? Lol. It would at least save you SOME time.

    Actually I usually have two copies in different folders running and minimized. I just check on them every once in a while. Both those runs are using different numbers or different start-up options or both. And those are separate from the version I'm currently editing.

    When I feel like I've gotten at least one thing solidified I replace one of the copies with the newest version and start it. Next time I replace the other version. And so on.

    That has saved a lot of time actually.

    For example, I originally had multipliers WAY too high. I think even 1.05 is too high. It feels slow because it takes forever to get started but once things are in motion (could take days) it start snowballing.

    I'm thinking 1.025 or even 1.01.

    By the way, this is a years-long game.

    When you download your copy you'll need to build a dedicated room in your home and just check it on anniversaries or something.

    Anyway, current run is going to max all its stats in a day or two while the Player Level is only 10% of cap and siloed widgets (the thing that actually wins the game) is *goes to check*

    610,100 out of the 111,111,000 you need to win.

    It's been running at double-speed for just over 3 days (3 days, 1h, 28m)

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