Creating a seperate high score file for Matlab game

5 vues (au cours des 30 derniers jours)
Parker Stevens
Parker Stevens le 26 Nov 2019
Réponse apportée : Rik le 26 Nov 2019
(Homework)
Hello, I am trying to create a seperate highscore file for a game but am not sure which data type to use. It was said to not use an "M" file so what are my next best options? The highscore file needs to include the name and score of the winners of my game. Thanks!

Réponses (1)

Rik
Rik le 26 Nov 2019
There are several options to store data. If you need to store it in a file you can either use a mat file (with the save and load functions), or use a text file. If you are not required to use an explicit file you can also store it internally to Matlab with getpref and setpref.
I would suggest using a mat file in this case.

Catégories

En savoir plus sur Video games dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by