godotengine / godotengine/godot
Move initialize_physics to own file
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in 4.3 stable - 0dda6a974c0b782216b3bf8a2a27fdbc5b0a6cd9
### System information
Windows 11 - Godot 4.3
### Issue description
Enhancement request: Move initialize_physics() function from main.cpp to a dedicated file
Current location: main.cpp line 317
Current implementation:
// FIXME: Could maybe be moved to have less code in main.cpp.
void initialize_physics() {
#ifndef *3D*DISABLED
/// 3D Physics Server
Moving this function to its own file would:
Reduce main.cpp complexity
Improve code organization
Address existing FIXME comment
No existing issue was found addressing this FIXME comment.
### Steps to reproduce
Steps to verify:
1. Open main.cpp
2. Locate initialize_physics() function at line 317
3. Note FIXME comment indicating the need to move the function
4. Search through open issues for "initialize_physics" or "main.cpp cleanup"
5. Verify no existing issue addresses this FIXME
Expected outcome: Issue tracking for moving initialize_physics() function to dedicated file, as suggested by existing FIXME comment.
### Minimal reproduction project (MRP)
[main.zip](https://github.com/user-attachments/files/17819908/main.zip)
Contributor guide
Research direction
Start in main.cpp around line 317 and read the initialize_physics() implementation and its FIXME comment. Identify the appropriate dedicated file while preserving the existing physics initialization behavior, then verify that main.cpp no longer contains the function and that the Godot build still succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, godot
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100