© Seth Kenlon 2019
Seth KenlonDeveloping Games on the Raspberry Pihttps://doi.org/10.1007/978-1-4842-4170-7_5

5. Database and Libraries

Seth Kenlon1 
(1)
Wellington, New Zealand
 

There are lots of ways to store data. In the Blackjack game, you stored the building blocks for a deck of playing cards in two tables—one for suits and one for values. That’s a good method for small data sets that don’t change from game to game, but it won’t work if, for instance, it was possible for a player to level up and earn the ability to play with Jokers in the deck, because the tables defining the deck is hard-coded into the application.

To make permanent changes to a game environment, or to track player progress, scores, or preferences, you must create a data file ...

Get Developing Games on the Raspberry Pi: App Programming with Lua and LÖVE now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.