Skip to content

Refactor game architecture and implemented sound + enemy#1

Open
IamSanjid wants to merge 2 commits intoUIU-Developers-Hub:mainfrom
IamSanjid:refactor-features-1
Open

Refactor game architecture and implemented sound + enemy#1
IamSanjid wants to merge 2 commits intoUIU-Developers-Hub:mainfrom
IamSanjid:refactor-features-1

Conversation

@IamSanjid
Copy link

Reorganized the project, implemented sound effects and enemies, upgraded to Godot Engine v4.6.1.

Adopted popular Game development patterns, OOP, Singleton/Autoloads, Components based architecture.

Project restructuring / cleanup / new features

  • Reorganized the src/ folder into clearer domains:
    • src/assets/ for fonts, sprites, icons, sounds
    • src/ui/ for menu + transition screens + in-level HUD
    • src/world/ for gameplay logic (player, enemies, levels, components)
    • Large renames/moves of existing scenes/scripts from src/scenes/*src/ui/* or src/world/*.
  • New central GameManager architecture
    • Handles dynamic level-loading
    • Maintains reference to global in-game states(Points, Player)
  • UI overhaul (HUD + flow screens)
    • HUD for showing in-game states Points, Player Health, gets dynamically loaded for each level.
    • Now every level "finish trigger" automatically loads a next-level scene where player can go to next level or main menu.
    • HUD handles GameOver logic seperately without touching anything else.
  • Gameplay features: health, damage, enemies, feedback, sound
    • Nodes can use reusable components for certain features. Eg. src/world/characters/player, src/world/characters/enemies/ use health, damage and flash components.
    • An autoload/singleton for managing sound called SoundManager was introduced, can play sounds on multiple Audio buses like: SFX, UI etc.. the buses don't interfere with each other.
    • Replaced old player controller with a much more advanced Player (src/world/characters/player.gd):
      • Configurable acceleration/deceleration, jump tuning, coyote/buffer options
      • Multi-jump support
      • Bullet firing (fire) with cooldown
      • Health regen system after delay
      • Integrations with GameManager and SoundManager

Demo

Please allow sound permission if not heard anything

frog_game_refactor_demo.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant