diff --git a/.github/workflows/unreal-ci.yml b/.github/workflows/unreal-ci.yml index dff16d46..43ea15f8 100644 --- a/.github/workflows/unreal-ci.yml +++ b/.github/workflows/unreal-ci.yml @@ -26,13 +26,13 @@ jobs: fi # Check for plugin structure - if [ ! -d "Plugins/GameFeatures/Quake3Arena" ]; then - echo "Error: Quake3Arena plugin not found" + if [ ! -d "Plugins/GameFeatures/ArenaFPS" ]; then + echo "Error: ArenaFPS plugin not found" exit 1 fi - if [ ! -f "Plugins/GameFeatures/Quake3Arena/Quake3Arena.uplugin" ]; then - echo "Error: Quake3Arena.uplugin not found" + if [ ! -f "Plugins/GameFeatures/ArenaFPS/ArenaFPS.uplugin" ]; then + echo "Error: ArenaFPS.uplugin not found" exit 1 fi @@ -65,7 +65,7 @@ jobs: run: | echo "Checking C++ source files..." - cpp_files=$(find Plugins/GameFeatures/Quake3Arena/Source -name "*.cpp" -o -name "*.h" | wc -l) + cpp_files=$(find Plugins/GameFeatures/ArenaFPS/Source -name "*.cpp" -o -name "*.h" | wc -l) echo "Found $cpp_files C++ source files" if [ $cpp_files -eq 0 ]; then diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 79803816..10a5281e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ Thank you for your interest in contributing to Unreal3Arena! This document provi ``` Unreal3Arena/ -├── Plugins/GameFeatures/Quake3Arena/ # Game mode plugin +├── Plugins/GameFeatures/ArenaFPS/ # Game mode plugin │ ├── Source/ # C++ source code │ ├── Content/ # Blueprints and assets │ └── README.md # Plugin documentation @@ -164,7 +164,7 @@ test(generator): Add tests for weapon generation ### High Priority -- **Weapon System**: Implement Q3A weapons (Rocket Launcher, Railgun, etc.) +- **Weapon System**: Implement Arena FPS weapons (Rocket Launcher, Railgun, etc.) - **Pickup System**: Health and armor pickups - **Movement System**: Strafe jumping and bunny hopping - **HUD**: Score display, health/armor indicators diff --git a/Plugins/GameFeatures/Quake3Arena/Quake3Arena.uplugin b/Plugins/GameFeatures/ArenaFPS/ArenaFPS.uplugin similarity index 85% rename from Plugins/GameFeatures/Quake3Arena/Quake3Arena.uplugin rename to Plugins/GameFeatures/ArenaFPS/ArenaFPS.uplugin index 645d8faf..5f5b0af0 100644 --- a/Plugins/GameFeatures/Quake3Arena/Quake3Arena.uplugin +++ b/Plugins/GameFeatures/ArenaFPS/ArenaFPS.uplugin @@ -2,8 +2,8 @@ "FileVersion": 3, "Version": 1, "VersionName": "1.0", - "FriendlyName": "Quake3Arena", - "Description": "Quake 3 Arena game mode with procedural generation and bot AI", + "FriendlyName": "ArenaFPS", + "Description": "Classic arena-style FPS game mode with procedural generation and bot AI", "Category": "Game Features", "CreatedBy": "Unreal3Arena Team", "CreatedByURL": "", @@ -19,7 +19,7 @@ "BuiltInInitialFeatureState": "Registered", "Modules": [ { - "Name": "Quake3ArenaRuntime", + "Name": "ArenaFPSRuntime", "Type": "Runtime", "LoadingPhase": "Default" } diff --git a/Plugins/GameFeatures/Quake3Arena/README.md b/Plugins/GameFeatures/ArenaFPS/README.md similarity index 88% rename from Plugins/GameFeatures/Quake3Arena/README.md rename to Plugins/GameFeatures/ArenaFPS/README.md index 69d9c731..a8c1cb8e 100644 --- a/Plugins/GameFeatures/Quake3Arena/README.md +++ b/Plugins/GameFeatures/ArenaFPS/README.md @@ -1,17 +1,17 @@ -# Quake3Arena Plugin Documentation +# ArenaFPS Plugin Documentation ## Overview -The Quake3Arena plugin provides a complete Quake 3 Arena-style deathmatch experience for Unreal Engine 5, including: +The ArenaFPS plugin provides a complete Arena FPS-style deathmatch experience for Unreal Engine 5, including: - Game mode implementation -- Bot AI (Crash bot) +- Bot AI (Bot AI) - Procedural geometry import system ## Components -### Game Mode: AQuake3GameMode +### Game Mode: AArenaGameMode -The main game mode class that implements Q3A deathmatch rules. +The main game mode class that implements Arena FPS deathmatch rules. **Key Properties:** - `FragLimit` (int32): Number of frags needed to win (default: 25) @@ -20,13 +20,13 @@ The main game mode class that implements Q3A deathmatch rules. - `RespawnDelay` (float): Delay before respawning in seconds (default: 3.0) **Usage in Blueprint:** -1. Create a new Blueprint based on `AQuake3GameMode` +1. Create a new Blueprint based on `AArenaGameMode` 2. Configure game settings (frag limit, time limit, etc.) 3. Set as the default game mode in World Settings -### Bot AI: AQuake3Bot +### Bot AI: AArenaBot -AI controller for bot players, implementing Crash bot behavior. +AI controller for bot players, implementing Bot AI behavior. **Key Properties:** - `SkillLevel` (int32): Bot skill level from 0-5 (5 = nightmare difficulty) @@ -123,11 +123,11 @@ platform_configs = [ ### Creating Custom Bot Behavior -Extend `AQuake3Bot` in C++ or Blueprint: +Extend `AArenaBot` in C++ or Blueprint: ```cpp UCLASS() -class AMyCustomBot : public AQuake3Bot +class AMyCustomBot : public AArenaBot { // Override UpdateBehavior() for custom AI virtual void UpdateBehavior() override; @@ -136,7 +136,7 @@ class AMyCustomBot : public AQuake3Bot ### Adding Weapons and Pickups -The plugin is designed to work with Lyra's weapon system. To add Q3A-style weapons: +The plugin is designed to work with Lyra's weapon system. To add Arena FPS-style weapons: 1. Create weapon data assets based on Lyra's weapon system 2. Place weapon spawners in the level @@ -155,7 +155,7 @@ python -m pytest test_arena_generator.py -v ### In-Engine Testing -1. Open the level with Quake3Arena game mode +1. Open the level with ArenaFPS game mode 2. PIE (Play In Editor) 3. Verify bots spawn and behave correctly 4. Test game rules (frag limit, time limit) @@ -176,7 +176,7 @@ This plugin is designed to work alongside Lyra's systems: - Works with Lyra's input system - Integrates with Gameplay Abilities -You can mix and match Quake3Arena features with Lyra's existing game modes. +You can mix and match ArenaFPS features with Lyra's existing game modes. ## Troubleshooting diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Quake3ArenaRuntime.Build.cs b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/ArenaFPSRuntime.Build.cs similarity index 85% rename from Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Quake3ArenaRuntime.Build.cs rename to Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/ArenaFPSRuntime.Build.cs index abac62be..ee4b262c 100644 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Quake3ArenaRuntime.Build.cs +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/ArenaFPSRuntime.Build.cs @@ -2,9 +2,9 @@ using UnrealBuildTool; -public class Quake3ArenaRuntime : ModuleRules +public class ArenaFPSRuntime : ModuleRules { - public Quake3ArenaRuntime(ReadOnlyTargetRules Target) : base(Target) + public ArenaFPSRuntime(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3Bot.cpp b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp similarity index 90% rename from Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3Bot.cpp rename to Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp index fce9aa81..fc6033a3 100644 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3Bot.cpp +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaBot.cpp @@ -1,12 +1,12 @@ // Copyright Epic Games, Inc. All Rights Reserved. -#include "Quake3Bot.h" +#include "ArenaBot.h" #include "GameFramework/Character.h" #include "Kismet/GameplayStatics.h" #include "NavigationSystem.h" #include "NavigationPath.h" -AQuake3Bot::AQuake3Bot() +AArenaBot::AArenaBot() { PrimaryActorTick.bCanEverTick = true; CurrentState = EBotState::Idle; @@ -14,7 +14,7 @@ AQuake3Bot::AQuake3Bot() LastStateChangeTime = 0.0f; } -void AQuake3Bot::BeginPlay() +void AArenaBot::BeginPlay() { Super::BeginPlay(); @@ -22,14 +22,14 @@ void AQuake3Bot::BeginPlay() CurrentState = EBotState::Roaming; } -void AQuake3Bot::Tick(float DeltaTime) +void AArenaBot::Tick(float DeltaTime) { Super::Tick(DeltaTime); UpdateBehavior(); } -void AQuake3Bot::UpdateBehavior() +void AArenaBot::UpdateBehavior() { if (!GetPawn()) { @@ -120,7 +120,7 @@ void AQuake3Bot::UpdateBehavior() } } -AActor* AQuake3Bot::FindNearestEnemy() +AActor* AArenaBot::FindNearestEnemy() { // Find all pawns and return the nearest one that isn't us TArray AllPawns; @@ -147,21 +147,21 @@ AActor* AQuake3Bot::FindNearestEnemy() return NearestEnemy; } -AActor* AQuake3Bot::FindNearestWeapon() +AActor* AArenaBot::FindNearestWeapon() { // This would find weapon pickups in the level // Placeholder for now return nullptr; } -AActor* AQuake3Bot::FindNearestHealthPack() +AActor* AArenaBot::FindNearestHealthPack() { // This would find health pickups in the level // Placeholder for now return nullptr; } -void AQuake3Bot::MoveToTarget(AActor* Target) +void AArenaBot::MoveToTarget(AActor* Target) { if (Target) { diff --git a/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaFPSRuntimeModule.cpp b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaFPSRuntimeModule.cpp new file mode 100644 index 00000000..8d2241fc --- /dev/null +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaFPSRuntimeModule.cpp @@ -0,0 +1,19 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#include "ArenaFPSRuntimeModule.h" + +#define LOCTEXT_NAMESPACE "FArenaFPSRuntimeModule" + +void FArenaFPSRuntimeModule::StartupModule() +{ + // This code will execute after your module is loaded into memory +} + +void FArenaFPSRuntimeModule::ShutdownModule() +{ + // This function may be called during shutdown to clean up your module +} + +#undef LOCTEXT_NAMESPACE + +IMPLEMENT_MODULE(FArenaFPSRuntimeModule, ArenaFPSRuntime) diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3GameMode.cpp b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGameMode.cpp similarity index 82% rename from Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3GameMode.cpp rename to Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGameMode.cpp index aa0ce322..3c8be9e1 100644 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3GameMode.cpp +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGameMode.cpp @@ -1,17 +1,17 @@ // Copyright Epic Games, Inc. All Rights Reserved. -#include "Quake3GameMode.h" -#include "Quake3Bot.h" +#include "ArenaGameMode.h" +#include "ArenaBot.h" #include "GameFramework/PlayerStart.h" #include "Kismet/GameplayStatics.h" #include "EngineUtils.h" -AQuake3GameMode::AQuake3GameMode() +AArenaGameMode::AArenaGameMode() { GameStartTime = 0.0f; } -void AQuake3GameMode::BeginPlay() +void AArenaGameMode::BeginPlay() { Super::BeginPlay(); @@ -19,17 +19,17 @@ void AQuake3GameMode::BeginPlay() // Spawn bots after a short delay FTimerHandle SpawnTimerHandle; - GetWorld()->GetTimerManager().SetTimer(SpawnTimerHandle, this, &AQuake3GameMode::SpawnBots, 1.0f, false); + GetWorld()->GetTimerManager().SetTimer(SpawnTimerHandle, this, &AArenaGameMode::SpawnBots, 1.0f, false); } -void AQuake3GameMode::PostLogin(APlayerController* NewPlayer) +void AArenaGameMode::PostLogin(APlayerController* NewPlayer) { Super::PostLogin(NewPlayer); // Player spawned, initialize their score } -void AQuake3GameMode::SpawnBots() +void AArenaGameMode::SpawnBots() { // Find all player starts TArray PlayerStarts; @@ -56,7 +56,7 @@ void AQuake3GameMode::SpawnBots() } } -void AQuake3GameMode::OnPlayerKilled(AController* Killer, AController* Victim) +void AArenaGameMode::OnPlayerKilled(AController* Killer, AController* Victim) { // Increment killer's score if (Killer && Killer != Victim) @@ -75,7 +75,7 @@ void AQuake3GameMode::OnPlayerKilled(AController* Killer, AController* Victim) } } -bool AQuake3GameMode::CheckGameEnd() +bool AArenaGameMode::CheckGameEnd() { // Check frag limit // This will be implemented with proper score tracking diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/ArenaGeometryImporter.cpp b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGeometryImporter.cpp similarity index 100% rename from Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/ArenaGeometryImporter.cpp rename to Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Private/ArenaGeometryImporter.cpp diff --git a/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaBot.h b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaBot.h new file mode 100644 index 00000000..35ea4420 --- /dev/null +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaBot.h @@ -0,0 +1,68 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "AIController.h" +#include "ArenaBot.generated.h" + +/** + * Arena FPS Bot AI Controller + * Implements basic bot behavior for arena-style FPS deathmatch + */ +UCLASS() +class ARENAFPSRUNTIME_API AArenaBot : public AAIController +{ + GENERATED_BODY() + +public: + AArenaBot(); + + // Bot skill level (0-5, where 5 is nightmare) + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|Bot") + int32 SkillLevel = 2; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|Bot") + FString BotName = "Bot"; + + // Combat settings + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|Combat") + float AccuracyModifier = 0.7f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|Combat") + float ReactionTime = 0.3f; + +protected: + virtual void BeginPlay() override; + virtual void Tick(float DeltaTime) override; + + // AI behavior functions + UFUNCTION(BlueprintCallable, Category = "ArenaFPS|AI") + void UpdateBehavior(); + + UFUNCTION(BlueprintCallable, Category = "ArenaFPS|AI") + AActor* FindNearestEnemy(); + + UFUNCTION(BlueprintCallable, Category = "ArenaFPS|AI") + AActor* FindNearestWeapon(); + + UFUNCTION(BlueprintCallable, Category = "ArenaFPS|AI") + AActor* FindNearestHealthPack(); + + UFUNCTION(BlueprintCallable, Category = "ArenaFPS|AI") + void MoveToTarget(AActor* Target); + +private: + enum class EBotState : uint8 + { + Idle, + SeekingWeapon, + SeekingHealth, + Combat, + Roaming + }; + + EBotState CurrentState; + AActor* CurrentTarget; + float LastStateChangeTime; +}; diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3ArenaRuntimeModule.h b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaFPSRuntimeModule.h similarity index 82% rename from Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3ArenaRuntimeModule.h rename to Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaFPSRuntimeModule.h index 3cad6a25..201569b7 100644 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3ArenaRuntimeModule.h +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaFPSRuntimeModule.h @@ -4,7 +4,7 @@ #include "Modules/ModuleManager.h" -class FQuake3ArenaRuntimeModule : public IModuleInterface +class FArenaFPSRuntimeModule : public IModuleInterface { public: //~ Begin IModuleInterface interface diff --git a/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaGameMode.h b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaGameMode.h new file mode 100644 index 00000000..a1a0be58 --- /dev/null +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaGameMode.h @@ -0,0 +1,55 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/GameModeBase.h" +#include "ArenaGameMode.generated.h" + +class AArenaBot; + +/** + * Arena FPS Deathmatch Game Mode + * Implements classic arena-style FPS deathmatch rules with frag limit and time limit + */ +UCLASS() +class ARENAFPSRUNTIME_API AArenaGameMode : public AGameModeBase +{ + GENERATED_BODY() + +public: + AArenaGameMode(); + + // Game settings + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|GameRules") + int32 FragLimit = 25; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|GameRules") + float TimeLimit = 600.0f; // 10 minutes in seconds + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|GameRules") + int32 NumberOfBots = 3; + + // Respawn settings + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ArenaFPS|Respawn") + float RespawnDelay = 3.0f; + +protected: + virtual void BeginPlay() override; + virtual void PostLogin(APlayerController* NewPlayer) override; + + UFUNCTION(BlueprintCallable, Category = "ArenaFPS") + void SpawnBots(); + + UFUNCTION(BlueprintCallable, Category = "ArenaFPS") + void OnPlayerKilled(AController* Killer, AController* Victim); + + UFUNCTION(BlueprintCallable, Category = "ArenaFPS") + bool CheckGameEnd(); + +private: + UPROPERTY() + TArray BotList; + + float GameStartTime; +}; diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/ArenaGeometryImporter.h b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaGeometryImporter.h similarity index 94% rename from Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/ArenaGeometryImporter.h rename to Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaGeometryImporter.h index c95307f7..395b5924 100644 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/ArenaGeometryImporter.h +++ b/Plugins/GameFeatures/ArenaFPS/Source/ArenaFPSRuntime/Public/ArenaGeometryImporter.h @@ -12,7 +12,7 @@ * Can be used in Blueprint or C++ to load arena_geometry.json */ UCLASS(Blueprintable, BlueprintType) -class QUAKE3ARENARUNTIME_API AArenaGeometryImporter : public AActor +class ARENAFPSRUNTIME_API AArenaGeometryImporter : public AActor { GENERATED_BODY() diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3ArenaRuntimeModule.cpp b/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3ArenaRuntimeModule.cpp deleted file mode 100644 index e0ce565e..00000000 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Private/Quake3ArenaRuntimeModule.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#include "Quake3ArenaRuntimeModule.h" - -#define LOCTEXT_NAMESPACE "FQuake3ArenaRuntimeModule" - -void FQuake3ArenaRuntimeModule::StartupModule() -{ - // This code will execute after your module is loaded into memory -} - -void FQuake3ArenaRuntimeModule::ShutdownModule() -{ - // This function may be called during shutdown to clean up your module -} - -#undef LOCTEXT_NAMESPACE - -IMPLEMENT_MODULE(FQuake3ArenaRuntimeModule, Quake3ArenaRuntime) diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3Bot.h b/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3Bot.h deleted file mode 100644 index ebb9e7d6..00000000 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3Bot.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#pragma once - -#include "CoreMinimal.h" -#include "AIController.h" -#include "Quake3Bot.generated.h" - -/** - * Quake 3 Bot AI Controller (Crash Bot) - * Implements basic bot behavior for Quake 3 Arena deathmatch - */ -UCLASS() -class QUAKE3ARENARUNTIME_API AQuake3Bot : public AAIController -{ - GENERATED_BODY() - -public: - AQuake3Bot(); - - // Bot skill level (0-5, where 5 is nightmare) - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|Bot") - int32 SkillLevel = 2; - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|Bot") - FString BotName = "Crash"; - - // Combat settings - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|Combat") - float AccuracyModifier = 0.7f; - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|Combat") - float ReactionTime = 0.3f; - -protected: - virtual void BeginPlay() override; - virtual void Tick(float DeltaTime) override; - - // AI behavior functions - UFUNCTION(BlueprintCallable, Category = "Quake3|AI") - void UpdateBehavior(); - - UFUNCTION(BlueprintCallable, Category = "Quake3|AI") - AActor* FindNearestEnemy(); - - UFUNCTION(BlueprintCallable, Category = "Quake3|AI") - AActor* FindNearestWeapon(); - - UFUNCTION(BlueprintCallable, Category = "Quake3|AI") - AActor* FindNearestHealthPack(); - - UFUNCTION(BlueprintCallable, Category = "Quake3|AI") - void MoveToTarget(AActor* Target); - -private: - enum class EBotState : uint8 - { - Idle, - SeekingWeapon, - SeekingHealth, - Combat, - Roaming - }; - - EBotState CurrentState; - AActor* CurrentTarget; - float LastStateChangeTime; -}; diff --git a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3GameMode.h b/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3GameMode.h deleted file mode 100644 index bf01d8b5..00000000 --- a/Plugins/GameFeatures/Quake3Arena/Source/Quake3ArenaRuntime/Public/Quake3GameMode.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#pragma once - -#include "CoreMinimal.h" -#include "GameFramework/GameModeBase.h" -#include "Quake3GameMode.generated.h" - -class AQuake3Bot; - -/** - * Quake 3 Arena Deathmatch Game Mode - * Implements classic Q3A deathmatch rules with frag limit and time limit - */ -UCLASS() -class QUAKE3ARENARUNTIME_API AQuake3GameMode : public AGameModeBase -{ - GENERATED_BODY() - -public: - AQuake3GameMode(); - - // Game settings - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|GameRules") - int32 FragLimit = 25; - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|GameRules") - float TimeLimit = 600.0f; // 10 minutes in seconds - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|GameRules") - int32 NumberOfBots = 3; - - // Respawn settings - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quake3|Respawn") - float RespawnDelay = 3.0f; - -protected: - virtual void BeginPlay() override; - virtual void PostLogin(APlayerController* NewPlayer) override; - - UFUNCTION(BlueprintCallable, Category = "Quake3") - void SpawnBots(); - - UFUNCTION(BlueprintCallable, Category = "Quake3") - void OnPlayerKilled(AController* Killer, AController* Victim); - - UFUNCTION(BlueprintCallable, Category = "Quake3") - bool CheckGameEnd(); - -private: - UPROPERTY() - TArray BotList; - - float GameStartTime; -}; diff --git a/QUICKSTART.md b/QUICKSTART.md index bcf5d3c5..15249f17 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -1,4 +1,4 @@ -# Quake3Arena Quick Reference +# ArenaFPS Quick Reference ## Quick Start @@ -50,9 +50,9 @@ git push origin feature/my-feature | What | Where | |------|-------| -| Game Mode | `Plugins/GameFeatures/Quake3Arena/Source/.../Quake3GameMode.cpp` | -| Bot AI | `Plugins/GameFeatures/Quake3Arena/Source/.../Quake3Bot.cpp` | -| Geometry Importer | `Plugins/GameFeatures/Quake3Arena/Source/.../ArenaGeometryImporter.cpp` | +| Game Mode | `Plugins/GameFeatures/ArenaFPS/Source/.../ArenaGameMode.cpp` | +| Bot AI | `Plugins/GameFeatures/ArenaFPS/Source/.../ArenaBot.cpp` | +| Geometry Importer | `Plugins/GameFeatures/ArenaFPS/Source/.../ArenaGeometryImporter.cpp` | | Arena Generator | `Tools/ProceduralGeneration/arena_generator.py` | | Weapon Generator | `Tools/ProceduralGeneration/weapon_generator.py` | | CI/CD Config | `.github/workflows/` | @@ -63,8 +63,8 @@ git push origin feature/my-feature | Class | Purpose | |-------|---------| -| `AQuake3GameMode` | Main game mode with Q3A rules | -| `AQuake3Bot` | Bot AI controller | +| `AArenaGameMode` | Main game mode with Arena FPS rules | +| `AArenaBot` | Bot AI controller | | `AArenaGeometryImporter` | Imports JSON geometry to UE5 | ### Python Classes @@ -160,7 +160,7 @@ platform_configs = [ ## Project Status ✅ Implemented: -- Game mode with Q3A rules +- Game mode with Arena FPS rules - Bot AI with state machine - Procedural arena generation - Weapon/pickup generators diff --git a/README.md b/README.md index da3b0fc8..b70022d3 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ # Unreal3Arena -A Quake 3 Arena clone built in Unreal Engine 5 with procedurally generated assets and CI/CD pipeline. +A Arena FPS clone built in Unreal Engine 5 with procedurally generated assets and CI/CD pipeline. ## Overview -This project recreates the classic Quake 3 Arena experience in Unreal Engine 5, featuring: +This project recreates the classic Arena FPS experience in Unreal Engine 5, featuring: - **Procedural Level Generation**: Levels generated from Python code for testability -- **Bot AI**: Crash bot implementation with combat and navigation logic -- **Deathmatch Game Mode**: Classic Q3A deathmatch rules +- **Bot AI**: Bot AI implementation with combat and navigation logic +- **Deathmatch Game Mode**: Classic Arena FPS deathmatch rules - **CI/CD Pipeline**: Automated testing and validation ## Features ### Game Systems -- **Quake 3 Arena Game Mode** (`Plugins/GameFeatures/Quake3Arena`) +- **Arena FPS Game Mode** (`Plugins/GameFeatures/ArenaFPS`) - Deathmatch with frag limit and time limit - Bot spawning and management - Respawn system @@ -28,7 +28,7 @@ This project recreates the classic Quake 3 Arena experience in Unreal Engine 5, - Code-based geometry generation - Exports to JSON format - Unit tested with pytest - - Inspired by Q3DM17 "The Longest Yard" + - Inspired by DM17 "The Longest Yard" ### CI/CD - **Automated Testing**: Python unit tests for procedural generators @@ -81,7 +81,7 @@ Unreal3Arena/ ├── Content/ # Unreal Engine content ├── Plugins/ │ └── GameFeatures/ -│ └── Quake3Arena/ # Q3A game mode plugin +│ └── ArenaFPS/ # Arena FPS game mode plugin │ ├── Content/ # Assets and blueprints │ └── Source/ # C++ source code ├── Source/ # Main game source (Lyra-based) @@ -95,10 +95,10 @@ Unreal3Arena/ ## Key Components -### Quake3Arena Plugin -Located in `Plugins/GameFeatures/Quake3Arena/`: -- `Quake3GameMode`: Deathmatch game mode with Q3A rules -- `Quake3Bot`: AI controller for bot players (Crash bot) +### ArenaFPS Plugin +Located in `Plugins/GameFeatures/ArenaFPS/`: +- `ArenaGameMode`: Deathmatch game mode with Arena FPS rules +- `ArenaBot`: AI controller for bot players (Bot AI) ### Procedural Generation Located in `Tools/ProceduralGeneration/`: @@ -121,5 +121,5 @@ Developed with Unreal Engine 5 ## Acknowledgments - Based on Epic Games' Lyra Sample Game -- Inspired by id Software's Quake 3 Arena +- Inspired by classic arena-style FPS games - Uses Unreal Engine 5.7 diff --git a/Tools/ProceduralGeneration/README.md b/Tools/ProceduralGeneration/README.md index f5db09dd..0e195b76 100644 --- a/Tools/ProceduralGeneration/README.md +++ b/Tools/ProceduralGeneration/README.md @@ -1,6 +1,6 @@ # Procedural Arena Generator -This directory contains Python scripts for procedurally generating Quake 3 Arena style levels and assets. +This directory contains Python scripts for procedurally generating Arena FPS style levels and assets. ## Features @@ -43,7 +43,7 @@ The generator creates: 1. **Main Floor**: The base arena floor 2. **Walls**: Perimeter walls around the arena -3. **Platforms**: Floating platforms (similar to Q3DM17 "The Longest Yard") +3. **Platforms**: Floating platforms (similar to DM17 "The Longest Yard") 4. **Jump Pads**: Launch pad positions (geometry for placement) ## Integration with Unreal Engine diff --git a/Tools/ProceduralGeneration/arena_generator.py b/Tools/ProceduralGeneration/arena_generator.py index f9ef639b..8eb94888 100644 --- a/Tools/ProceduralGeneration/arena_generator.py +++ b/Tools/ProceduralGeneration/arena_generator.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Procedural Arena Generator for Quake 3 Arena clone +Procedural Arena Generator for Arena FPS clone Generates arena geometry using code that can be unit tested Uses simple geometric primitives that can be exported to FBX/OBJ """ @@ -30,7 +30,7 @@ class Mesh: class ArenaGenerator: """ - Generates a Quake 3 style arena level procedurally + Generates a Arena FPS style arena level procedurally This is a simplified version that generates platform layouts """ @@ -49,7 +49,7 @@ class ArenaGenerator: # Generate walls self.generate_walls() - # Generate platforms (like Q3DM17 "The Longest Yard") + # Generate platforms (like DM17 "The Longest Yard") self.generate_platforms() # Generate jump pads @@ -137,7 +137,7 @@ class ArenaGenerator: self.meshes.append(mesh) def generate_platforms(self): - """Generate floating platforms (Q3DM17 style)""" + """Generate floating platforms (DM17 style)""" platform_configs = [ # Central platform (0, 0, 300, 800, 800, 100), @@ -284,7 +284,7 @@ class ArenaGenerator: def main(): - """Generate a Quake 3 style arena""" + """Generate a Arena FPS style arena""" generator = ArenaGenerator(size=5000.0, height=1000.0) generator.generate_arena() generator.export_to_json("arena_geometry.json") diff --git a/Tools/ProceduralGeneration/generate_all.py b/Tools/ProceduralGeneration/generate_all.py index 264269a4..834baf2b 100755 --- a/Tools/ProceduralGeneration/generate_all.py +++ b/Tools/ProceduralGeneration/generate_all.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Master script to generate all procedural assets for Quake3Arena +Master script to generate all procedural assets for ArenaFPS Run this script to generate the complete asset set """ @@ -16,7 +16,7 @@ import json def generate_all_assets(): """Generate all procedural assets""" print("=" * 60) - print("Quake3Arena Procedural Asset Generator") + print("ArenaFPS Procedural Asset Generator") print("=" * 60) success_count = 0 diff --git a/Tools/ProceduralGeneration/weapon_generator.py b/Tools/ProceduralGeneration/weapon_generator.py index bc3926c1..5a9e63b6 100644 --- a/Tools/ProceduralGeneration/weapon_generator.py +++ b/Tools/ProceduralGeneration/weapon_generator.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Procedural weapon generator for Quake 3 Arena +Procedural weapon generator for Arena FPS Generates simple weapon meshes that can be imported into Unreal Engine """ @@ -15,7 +15,7 @@ from arena_generator import Vector3, Mesh class WeaponGenerator: """ Generates procedural weapon meshes - Simple geometric representations for Q3A weapons + Simple geometric representations for Arena FPS weapons """ def __init__(self): diff --git a/Unreal3Arena.uproject b/Unreal3Arena.uproject index 770e5d26..b1171a4c 100644 --- a/Unreal3Arena.uproject +++ b/Unreal3Arena.uproject @@ -308,7 +308,7 @@ "Enabled": true }, { - "Name": "Quake3Arena", + "Name": "ArenaFPS", "Enabled": true }, { diff --git a/setup.sh b/setup.sh index cc1a63dd..306b83d2 100755 --- a/setup.sh +++ b/setup.sh @@ -1,10 +1,10 @@ #!/bin/bash -# Setup script for Quake3Arena development environment +# Setup script for ArenaFPS development environment set -e echo "==========================================" -echo "Quake3Arena Development Setup" +echo "ArenaFPS Development Setup" echo "==========================================" echo "" @@ -50,11 +50,11 @@ echo "" echo "Next steps:" echo " 1. Open Unreal3Arena.uproject in Unreal Engine 5.7" echo " 2. Build the project (Development Editor configuration)" -echo " 3. Enable the Quake3Arena plugin if needed" +echo " 3. Enable the ArenaFPS plugin if needed" echo " 4. Create a level and add ArenaGeometryImporter actor" echo "" echo "For more information, see:" echo " - README.md" -echo " - Plugins/GameFeatures/Quake3Arena/README.md" +echo " - Plugins/GameFeatures/ArenaFPS/README.md" echo " - Tools/ProceduralGeneration/README.md" echo ""