How to make User accounts?

Started by A�rendyll (formerly Yurina), Sat 28/01/2006 15:11:40

Previous topic - Next topic

A�rendyll (formerly Yurina)

Hi all,

I'm asking a lot around (I'm sure of that), and this time I want to know or it is possible to create a savegame style like in the Zelda games.

With this I mean:
- Give your character a (pre-programmed or text parsed) name,
- being able to save in up to 3 slots only,
- Maybe some kind of password security

This may sound strange, but I want to try this out.

~Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ashen

Don't worry about asking questions, it's one of the best ways to learn. (As long as they haven't already been answered hundreds of times, of course ;))


Limiting the number of save slots is the easiest bit. You can use SaveGameSlot(..) and RestoreGameSlot(..) to save to / load from specific slots, and provided you avoid the built in save/load functions (SaveGameDialog() RestoreGameDialog(), ListBox.FillSaveGameList()) you can have as few - or as many - save slots as you like.

Password security and user accounts are the trickier parts. You'll probably need to give each player a number, so you know which save slots they can use (Player 1 gets slots 1-3, player 2 gets 4-6, etc). You can either store these and the player's name and password, externally with the File functions and properties (you might find the IniFile Module and/or the Encrytped File Module useful here), or save them into the game itself.

Sorry if this is a bit vague, but it's the best I can do without giving specifc code, which I don't know off hand. This is all definitely possible though, try starting a new game and seeing what you can come up with by trial and error (another good way to learn).
I know what you're thinking ... Don't think that.

A�rendyll (formerly Yurina)

Thanks, I'll try it out!

In general I have a new game for testing GUI's and these kinds of things ready. It's the standard game which isn't totally empty (with Roger in it), customized with a grey and empty room and also an other character, a hotspot, a region, an object, etc. This way I can test nearly anything, but sometimes that doesn't totally work of course.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

SMF spam blocked by CleanTalk