Managing Player Profiles
In my previous blog post, I shared how I implemented the opening logo animation for my sign language learning game "Sign Pals." Today, I'll share how I created a profile management system.
After the opening logo animation, players are directed to the Character Tabs screen where they can create and manage their profiles. This is a crucial feature for an educational game as it allows multiple users to track their individual progress.
What I want to Include
- Character Tabs - For selecting, creating, editing, and deleting profiles
- Character Selection - For customizing player avatars and names
This system allows multiple players to create personalized profiles and supports my future plans to track individual progress as they learn sign language through the game.
Profile Data Structure
Profile Manager
Saving and Loading Profiles
For persistent storage, I used Unity's PlayerPrefs system with JSON serialization:
The Character Tabs
The Character Tabs screen is where users select, create, edit, and delete profiles. Each profile slot shows the character avatar, player name, and management buttons. Empty slots display a "+" button to create a new profile.
When a player selects their profile, I apply a visual indication by slightly scaling up the selected slot:
Character Selection
When creating a new profile or editing an existing one, players are taken to the Character Selection screen. Here they can:
- Choose a character avatar
- Enter their name
- Save their profile
I implemented a dedicated manager for this screen to handle all the selection interactions:
The character selection UI shows a preview of the selected character and uses checkmarks to indicate the current selection:
When the player completes their selection and enters a name, the profile is saved:
I added validation to ensure the player enters a name and selects a character before they can continue:
Managing Profile
The Character Tabs screen supports several key operations:
- Creating a new profile: When a player clicks the "+" button on an empty slot, they're taken to the Character Selection screen.
- Editing an existing profile: Similar to creating a new profile, but with the current values pre-filled.
- Deleting a profile: Includes a confirmation dialog to prevent accidental deletions.
UI: Profile Cards
Inspiration
One of my first steps before starting the actual design is finding inspiration on Pinterest. I enjoy exploring the various UI layouts and visual styles there, and I came across two layouts that I think would be a great fit for my UI.
Character Cards
Final UI
Possible Future Enhancement
I plan to expand the profile system to include the LearningProgress tracking, which will allow me to:
- Track which sign language letters each player has mastered
- Remember where they left off in their learning journey
- Store scores and achievements to motivate continued practice
- Adapt difficulty based on individual performance
Comments
Post a Comment