mirror of
https://github.com/kuhyx/praca_magisterska.git
synced 2026-07-04 15:03:07 +02:00
5.7 KiB
5.7 KiB
Part 9: Final Setup and Testing
← Previous: Part 8 - Game Mode and Level | Back to Index | Appendix A: Variables →
Step 9.1: Assign Blueprint References
1. Open BP_Player
- In Details panel (with blueprint open)
- Set BulletClass:
BP_Bullet
2. Open BP_EnemySpawner
- Set EnemyClass:
BP_Enemy
3. Open BP_Enemy
- Set BulletClass:
BP_Bullet
4. Compile and Save all blueprints
Expected Result after Compile (all blueprints)
- All blueprints compile with GREEN checkmark
- No "None" or missing references in variable defaults
- BP_Player.BulletClass → BP_Bullet
- BP_Enemy.BulletClass → BP_Bullet
- BP_EnemySpawner.EnemyClass → BP_Enemy
Expected Result in Play mode
- Player can shoot bullets (BP_Bullet spawns)
- Enemies spawn and shoot bullets
- All collision/damage systems functional
Step 9.2: Create Final Visuals (Replace Placeholder)
Now replace the temporary cube visuals with proper colored materials:
1. REMOVE TEMPORARY COMPONENTS
- Open BP_Player blueprint
- In Components panel, select "TempVisual" (the cube added in Step 2.2)
- Press Delete to remove it
- Select "PlayerCamera" and delete it (the level camera from Step 8.4 will be used)
- Repeat for BP_Bullet and BP_Enemy (delete their TempVisual cubes)
2. Content Browser → Materials folder
3. PLAYER MATERIAL
- Right-click → Material
- Name:
M_Player - Double-click to open Material Editor
- Create Vector3 node (hold 3, click)
- Set to blue color
(0, 0.5, 1) - Connect to Base Color
- Save and Close
4. BULLET MATERIALS
- Create
M_PlayerBullet- Yellow(1, 1, 0) - Create
M_EnemyBullet- Red(1, 0, 0)
5. ENEMY MATERIAL
- Create
M_Enemy- Magenta(1, 0, 1)
6. Apply materials to sprite components in each Blueprint
(Or use Sprite assets if you have 2D images)
Expected Result in Play mode
- Player visible as blue shape
- Player bullets visible as yellow shapes
- Enemy bullets visible as red shapes
- Enemies visible as magenta shapes
- All game elements distinguishable by color
Step 9.3: Add Background (Optional)
1. In level, add a Plane mesh
- Place Actors → Basic → Plane
- Scale:
X=20, Y=30, Z=1 - Position:
X=0, Y=0, Z=-100(behind everything)
2. Create dark space material
M_Background- Dark blue/black
Expected Result in Play mode
- Dark background visible behind all game elements
- Game elements (player, enemies, bullets) clearly visible against background
- Background doesn't interfere with gameplay (Z=-100, behind everything)
Step 9.4: Test the Game
1. Click "Play" button (green arrow in main toolbar)
OR press Alt+P
2. TEST CHECKLIST
| # | Test | Pass? |
|---|---|---|
| 1 | Player moves with WASD or Arrow keys | ☐ |
| 2 | Player stays within screen bounds | ☐ |
| 3 | Player shoots with Z key or Left Mouse | ☐ |
| 4 | Bullets travel upward | ☐ |
| 5 | Enemies spawn at top of screen | ☐ |
| 6 | Enemies move down with wavy motion | ☐ |
| 7 | Enemies shoot radial bullet patterns | ☐ |
| 8 | Player bullets damage enemies | ☐ |
| 9 | Enemy bullets damage player | ☐ |
| 10 | Score increases when enemies die | ☐ |
| 11 | Lives decrease when player is hit | ☐ |
| 12 | Timer counts down from 5:00 | ☐ |
| 13 | Game shows "Game Over" when lives = 0 | ☐ |
| 14 | Game shows "Mission Complete" after 5 minutes | ☐ |
| 15 | Special ability (X key) clears screen | ☐ |
3. To stop playing: Press ESC or click "Stop" button
Expected Result - Complete Game Test
- All checklist items above should pass
- Frame rate stable (60+ FPS recommended)
- No crashes or Blueprint errors in Output Log
- Game is playable from start to victory/defeat
Step 9.5: Build Standalone Game
- File → Package Project → Windows (or your platform)
- Select output folder
- Wait for build to complete
- Navigate to output folder → WindowsNoEditor → [ProjectName].exe
- Run the executable to play standalone
Expected Result
- Build completes without errors (check Output Log)
- Executable file created in output folder
- Running .exe launches the game in fullscreen
- Game plays identically to editor Play mode
- Can close with
Alt+F4or in-game quit (if implemented)
🎉 Congratulations
You have completed the Unreal Engine Bullet Hell tutorial!
Your game includes:
- ✅ Player with 3 lives, WASD movement, Z/mouse shooting
- ✅ Volley shooting (3 bullets in spread pattern)
- ✅ Screen-clear special ability (X key, one use)
- ✅ Enemies with sine-wave movement
- ✅ Radial bullet patterns (20 bullets per burst)
- ✅ Progressive difficulty (spawn rate increases over 5 minutes)
- ✅ Score, lives, and timer UI
- ✅ Victory after 5 minutes survival
- ✅ Game over when lives reach 0
Additional Resources
- Appendix A: Complete Variable Reference
- Appendix B: Troubleshooting
- Appendix C: Unity to Unreal Conversion Notes
← Previous: Part 8 - Game Mode and Level | Back to Index | Appendix A: Variables →