jakubg1 / OpenSMCE

Game engine which allows creating a broad range of marble popper games.
MIT License
14 stars 11 forks source link

Implement difficulties #1

Closed jakubg1 closed 1 month ago

jakubg1 commented 3 years ago

Difficulties are stored in runtime.json in a particular game's main directory, however they are not used. Change the type from integer to string. Difficulties alter some values. Consider implementing them similarly to Luxor 2's system. Example from difficulty.gvf (one of the difficulties):

{
   Directory           = "adventure"
   StartStage          = 1
   FinalStage          = 14
   StartingLives       = 4
   CoinsForLife        = 30
   MinCollapseCount    = 3
   SpeedScale          = 0.50
   StageStepSpeedScale = 0.019
   ScoreScale          = 1.0
   Timescale           = 1.0
   TimescaleWarmup     = 1.5
   LivesBonus          = 50000i64
   PerfectBonus        = 10000i64  
   Downgrade
   {
      LossDelay        = 1
      Reductions       = 5
      MidSpeed         = -5.0
      MinSpeed         = -0.2
      SpawnStreak      = 20
   }
}

If one implements such values like here (preferably in the main game config file), there's no need to do it separately in that case.

jakubg1 commented 2 years ago

Planned feature in Beta 5.0.0.

Outline:

jakubg1 commented 1 year ago

The same solution again, written in currently supported expression data:

    "spheres": {
        "value": "100 * ([length] + ([comboBoost] ? max([comboLv]-3, 0) : 0)) * [chainLv]",
        "text": "[_score] .. ([comboBoost] && [comboLv] > 2 ? \"\nCOMBO X\" .. [comboLv] : \"\") .. ([chainLv] != 1 ? \"\nCHAIN X\" .. [chainLv] : \"\")",
        "font": "[font]"
    }

In order for it to work, the following expression features need to be added:

jakubg1 commented 1 month ago

Score Events have been added here: https://github.com/jakubg1/OpenSMCE/commit/05d12130388a0ff892ab94df1a67e76fa6ff8b72

jakubg1 commented 1 month ago

Implemented in a basic form for now: https://github.com/jakubg1/OpenSMCE/commit/8b1b85347585b0d465b1ff6783b4e8a6a4ba2f10