-
Notifications
You must be signed in to change notification settings - Fork 0
Game Story
The Game Story is an interactive narrative interface that presents the game's backstory and lore through a visually immersive book display. It serves as the narrative hub where players can explore the game's setting, understand the AI uprising context, and learn about their mission.
- Provides an elegant, book-themed presentation of the game's narrative.
- Accessible from the main menu via the "Story" button.
- Acts as the lore repository: introduces the year 2157 setting, AI uprising backstory, and player's role as Commander.
- Uses StoryBook.jpg as the background to create an authentic book-reading experience.
Visual Sequence & Animation
Book Interface
- Background: Full-screen StoryBook.jpg image providing an immersive book aesthetic.
- Text Display: Story content rendered in dark brown (RGB: 0.2, 0.1, 0.05) to simulate ink on paper.
- Typography: 1.3x scaled font for optimal readability on the book background.
- Layout: Centered text layout with proper padding to fit within the book's visual boundaries.
- Navigation: Clean "Back" button to return to the main menu.
Story Content Structure
The narrative is organized into distinct sections: 1. Temporal Setting
- "Year 2157. The AI Uprising."
- Establishes the dystopian future timeline.
2. Background Crisis
- Details humanity's loss of control over AI creations.
- Explains the military AI corruption and rebellion.
3. Player Role
- Introduces the player as "Commander".
- Defines the mission: defending the last two strongholds.
4. Location Details
- Forest Demo Sector: Natural maze defense zone.
- Map Two Sector: Open battlefield testing strategic mastery.
5. Enemy Forces
- Drones: Swift swarms from neon megacities.
- Grunts: Mass-produced cyber-soldiers.
- Tanks: Armored siegebreakers.
- Dividers: Unstable units that split into deadly offspring.
- Boss: Corrupted defender turned greatest threat.
6. Gameplay Elements
- Tower deployment mechanics.
- Hero unit command system.
- Strategic defense emphasis.
7. Dramatic Closing
- "The fate of humanity rests in your hands!"
↓↓ Here’s a live demo ↓↓
GameStory.mp4
Technical Implementation
Screen Architecture
- Class: StoryBookScreen.java
- Inheritance: Extends ScreenAdapter for lifecycle management.
- Dependencies: ResourceService for asset loading, Stage for UI rendering.
Asset Requirements
- Primary Background: images/StoryBook.jpg
- Font: Dynamic BitmapFont with 1.3x scaling.
- Button Style: Custom TextButton with white text and gray down state.
Performance Considerations
- Lazy loading: Assets loaded only when Story Book is accessed.
- Efficient rendering: Single-pass text rendering with wrapping.
- Memory management: Proper disposal of fonts and textures in dispose() method.
For Developers
-
Initialize Story Book from Main Menu:
game.setScreen(GdxGame.ScreenType.STORY_BOOK);
-
Preload Required Assets:
- Add StoryBook.jpg to images/ directory.
- Ensure ResourceService is available before showing the screen.
- Customize Story Content:
Edit the storyText variable in createStoryBook() method:
String storyText =
"Year 2157. The AI Uprising.\n\n" +
"Your custom story content here...\n\n" +- Adjust Visual Styling:
Modify text appearance:
storyFont.getData().setScale(1.3f); // Font size
storyStyle.fontColor = new Color(0.2f, 0.1f, 0.05f, 1f); // Text color- Configure Layout:
Adjust content positioning:
contentTable.add(storyLabel)
.width(Gdx.graphics.getWidth() * 0.7f) // Text width
.pad(100f); // Padding from edgesFor Players
- Access: Click the "Story" button on the main menu.
- Reading Experience: Story content is displayed in a book format with authentic styling.
- Navigation: Use the "Back" button at the bottom to return to the main menu.
- Lore Understanding: Read the complete backstory to understand your mission context.
- Strategic Context: Learn about enemy types and defensive strategies mentioned in the narrative.
