vendredi 1 mai 2020

How do you make a function that makes an upgrade for a video game

I have been thinking about games, and they have so much stuff. Often, they have lots of similar stuff in them, and here I am thinking about upgrades.

How would we do something like make a function that builds an upgrade for us, or manages an upgrade easily, so that the programmer would not have to tediously right out each upgrade, and the system manages them easily. Ideally, I am looking for a way to have virtually limitless upgrade amounts.

Take Cookie Clicker for an example. It has hundreds of upgrades. How would I make a game that has hundreds of upgrades, and ,manage all of them, making them do any functions I need them to.

I really want someone to show me how to write these kinds of functions or whatever, because every game has so much similar stuff, and they use it all so elagantly.

Aucun commentaire:

Enregistrer un commentaire