Oct 7, 2011

Config loading and saving is ready

I had some spare time today so I've implemented config loading and saving into the game.

I've no idea why I didn't do it before, because it's very convinient. It's missing a couple of features, like as the key settings, but it's extensible, so I'll add that later.

The reason why I've implemented it right now is because there is no menu yet in the game, but I want you to be able to fine-tune the settings for your preferences. Oh and I've also added a temporary option to try out cooperative gameplay. It's just a temporary solution because there will be a nice menu later on, of course.

Here, have a look at the config.ini, I think it's easily understandable:
# Pacaman configuration file
# Resolution width, height and bits per pixel
resolution 800 600 32

# Fullscreen 0 to set it false, or 1 to set it true
fullscreen 0

# Vertical sync 0 to set it false, or 1 to set it true
vsync 1

# Tilesize 32 or 40 or 48
tilesize 40

# Music volume in percent from 0 to 100
music 80

# Sound volume in percent from 0 to 100
sound 80

# Cooperative mode 0 to set it false, or 1 to set it true
cooperative 0

# Show frames per second 0 to set it false, or 1 to set it true
showfps 1

No comments:

Post a Comment