I have a game almost complete, but I need to increase the difficulty over time.
I am pretty sure it is an easy thing to do but I can't seem to get it to work the way I want to.
if anyone can help that would be great! or point me to a tutorial about it.
I am also having issues with Iads on my game as well.
Develop games in your browser. Powerful, performant & highly capable.
i figured out the iads. just need to figure out the difficulty speed over time.
What I did is to have a global variable called difficultyFactor, I incremented it every amount of time, then I used that factor to increment speed or anything I need to increment.
difficultyFactor = 0
regularSpeed = 100
Then in my game sheet:
Speed = regularSpeed + (regularSpeed * difficultyFactor/10)
This wont modify the speed because difficultyFactor is 0 at this point, then after some time:
difficultyFactor = 1
This will increment the speed by a decimal fraction giving us 110 for speed
You can play with those values.
Also I needed to spawn some enemies at a certain difficulty, so I just did:
if (difficultyFactor > 5) spawn Enemy
I hope it helps
Thanks that's extactly what I was looking for!!
Have u ever tried keeping a high score in a device storage? I have an ios game and the high score does update all the time. I am using a couple global var and web storage.
Again thanks for the help on the first part!