Original 2D Cosmicrafts
Cosmicrafts2019 is a Unity-based 2D space strategy game that has been modified for WebGL compatibility and includes a comprehensive development bypass mode for offline testing.
The game includes a comprehensive development bypass mode that allows full offline functionality for WebGL builds where HTTP requests are not available.
Key Features:
- Automatic login with dummy credentials (
devuser/devpass) - Populated player data with 8 default units
- Complete tutorial system functionality
- All game modes accessible without server connection
Implementation:
- Located in
Assets/Scripts/Connections/Scr_Database.cs - Controlled by
DEV_BYPASS = trueflag - Automatically populates player stats, units, and achievements
All server calls are bypassed in dev mode through scr_BDUpdate.cs:
- Network requests are skipped with debug logging
- Local data persistence maintained
- All game functionality preserved
Issue: Tutorial text was empty in English
Solution: Added missing English translations to Assets/Resources/XML/UIStrings.xml
- Fixed all tutorial strings (
txt_tutorial_03totxt_tutorial_22) - Fixed menu tutorial strings (
txt_menu_tut_01totxt_menu_tut_16) - Now displays proper English text in tutorial popups
Issue: Skill cards (U_Skill_02) couldn't be dragged in tutorial
Solution: Fixed logic in Assets/Scripts/Interfaze/scr_DragUnit.cs
- Skills now properly set
okPosition = true - Non-skills use spawn area validation
- Skills can be dropped anywhere on the map
Assets/Scripts/Connections/Scr_Database.cs- Dev bypass implementationAssets/Scripts/Connections/scr_BDUpdate.cs- Network call bypassingAssets/Scripts/Interfaze/scr_DragUnit.cs- Drag & drop fixAssets/Resources/XML/UIStrings.xml- Language strings fix
- Login System: Automatic dev login with dummy data
- Tutorial System: Fully functional with proper text display
- Card System: Drag & drop working for all unit types
- Language System: English translations complete
- Set
DEV_BYPASS = trueinScr_Database.cs - Game will automatically login with dev credentials
- All server calls are bypassed with debug logging
- Set
DEV_BYPASS = falseinScr_Database.cs - Game will use normal server authentication
- Requires valid server connection
- Target platform: WebGL
- Compression format: Disabled (for faster loading)
- Development build recommended for testing
- All XML files in
Assets/Resources/XML/ - Language strings properly configured
- Tutorial assets and prefabs
Problem: Tutorial popups showed empty text Solution: Added missing English translations to UIStrings.xml
Problem: U_Skill_02 couldn't be dragged in tutorial Solution: Fixed skill positioning logic in scr_DragUnit.cs
Problem: Game requires server for normal operation Solution: Implemented comprehensive dev bypass mode
- Add more dev units for testing
- Implement save/load for dev progress
- Add configuration options for dev mode
- Expand tutorial system
- Keep DEV_BYPASS flag synchronized across scripts
- Maintain language string completeness
- Test drag & drop functionality regularly
- Verify tutorial flow in dev mode
Original Cosmicrafts game with WebGL compatibility modifications for offline development and testing.