Skip to content

Advik-B/Obsidian-Launcher

Repository files navigation

Obsidian Launcher

GitHub stars GitHub last commit GitHub issues License .NET Platform


๐ŸŒฑ The Origin Story: From C++ to C#

This project, Obsidian Launcher, is a custom 'cracked' Minecraft launcher.

It didn't start its life in C#, though. My first attempt was in C++. ๐Ÿ‘‰ Click here to browse the last C++ commit

Why the switch? Letโ€™s just say C++ development, while powerful, presented a series of... character-building experiences that eventually led me to the more streamlined environment of C# and .NET.

๐Ÿ” A few highlights from the C++ trenches:

  • โš”๏ธ The Great Library Hunt & CMake Wars: Simply getting a reliable compression and archive library integrated felt like a quest. I wrestled with CMake for days just to get a clean build across setups. Hours spent debugging build scripts could've built actual features!

  • ๐Ÿ” The SSL Certificate Fiasco: Remember OpenSSLโ€™s lovely inability to easily read system certs on some platforms? I do. I embedded cacert.pem manually. It mostly workedโ€”except for one URL that always failed outside of tests. The kicker? Tests passed every single time. Eventually, I gave up and disabled SSL verification altogether.

It was clear that for this project, the everything-is-manual nature of C++ was a roadblock. So, I ditched it and started fresh with C#


๐ŸŽฏ What Obsidian Launcher Aims To Do

This project aims to replicate the key features of a modern Minecraft launcher:

  • ๐Ÿงฉ Fetching and managing official Minecraft versions.
  • โ˜• Handling Java runtimes (discovery, download, extraction).
  • ๐Ÿงฑ Downloading & verifying all required game assets.
  • ๐Ÿ“š Managing libraries, including native ones for LWJGL.
  • ๐Ÿงต Building classpaths and JVM/game arguments.
  • โ–ถ๏ธ Launching the game!

๐Ÿ”ง Current Status & Features

Actively in development ๐Ÿ”„ Here's what's working or in progress:

  • ๐Ÿ“œ Version Manifests: Fetches and parses Mojang's data.
  • โ˜• Java Management: Finds Java, downloads, extracts archives (.zip โœ…, .tar.gz โœ…).
  • ๐ŸŽจ Asset Management: Downloads and verifies game assets.
  • ๐Ÿ“ฆ Library Management: Handles downloads, verification, extraction + native rules.
  • ๐Ÿง  Argument & Classpath Builder: Fully functional with placeholder support.
  • ๐ŸŽฎ Game Launch: Successfully launches Minecraft with output capture.
  • ๐Ÿ“‹ Logging: Serilog-based console and file logging.

๐Ÿ’ป Why C#

  • ๐Ÿ“š Rich Standard Library โ€“ HttpClient, System.IO.Compression.ZipFile, and more.
  • ๐Ÿ“ฆ NuGet Ecosystem โ€“ Easy, fast package management.
  • โšก Productivity โ€“ Less boilerplate, more logic.
  • ๐Ÿงผ Modern Features โ€“ Async/await, LINQ, clean syntax.
  • ๐Ÿง˜ Sanity Preservation โ€“ No more build system nightmares.

๐Ÿ—‚๏ธ Project Structure

ObsidianLauncher/
โ”œโ”€โ”€ ObsidianLauncher.sln
โ””โ”€โ”€ ObsidianLauncher/
    โ”œโ”€โ”€ ObsidianLauncher.csproj
    โ”œโ”€โ”€ Program.cs
    โ”œโ”€โ”€ LauncherConfig.cs
    โ”œโ”€โ”€ Models/
    โ”‚   โ””โ”€โ”€ (e.g., MinecraftVersion.cs, Library.cs)
    โ”œโ”€โ”€ Enums/
    โ”‚   โ””โ”€โ”€ (e.g., OperatingSystemType.cs)
    โ”œโ”€โ”€ Services/
    โ”‚   โ””โ”€โ”€ (e.g., HttpManagerService.cs, JavaManager.cs)
    โ””โ”€โ”€ Utils/
        โ””โ”€โ”€ (e.g., CryptoUtils.cs, LoggerSetup.cs)

๐Ÿ“ฆ Prerequisites

  • .NET 10.0 SDK (or newer) โœ…

๐Ÿ› ๏ธ Building and Running

Cross-Platform Support

This launcher runs on Windows, Linux, and macOS thanks to .NET 10!

  1. ๐Ÿงฌ Clone the repository.

  2. ๐Ÿ”„ Restore packages:

    dotnet restore "Obsidian Launcher.csproj"
  3. ๐Ÿ—๏ธ Build it:

    dotnet build "Obsidian Launcher.csproj" -c Release
  4. ๐Ÿš€ Run it:

    On Windows:

    dotnet run --configuration Release
    # Or directly: bin\Release\net10.0\Obsidian Launcher.exe

    On Linux/macOS:

    dotnet run --configuration Release
    # Or directly: ./bin/Release/net10.0/Obsidian\ Launcher

    (Data will be stored in .ObsidianLauncher)

Publishing for a Specific Platform

To create a standalone executable for a specific platform:

# For Windows (x64)
dotnet publish -c Release -r win-x64 --self-contained

# For Linux (x64)
dotnet publish -c Release -r linux-x64 --self-contained

# For macOS (x64)
dotnet publish -c Release -r osx-x64 --self-contained

# For macOS (ARM64 - M1/M2/M3)
dotnet publish -c Release -r osx-arm64 --self-contained

The standalone executable will be in bin/Release/net10.0/{runtime-id}/publish/


๐Ÿ”ฎ TODO / Future Enhancements

  • ๐Ÿ” Authentication: Add Microsoft login (only offline mode supported currently).
  • ๐Ÿ–ผ๏ธ UI: Build a GUI! (Console โ‰  user-friendly ๐Ÿ˜…)
  • ๐Ÿ“ Profile Management
  • ๐Ÿงฉ Mod Management
  • ๐Ÿง  Placeholder Replacements: Finish โ€˜em all.
  • ๐Ÿงช Unit Tests
  • ๐Ÿ’ก And lots more!

See .ai-docs/PRISM_LAUNCHER_FEATURE_COMPARISON.md for a comprehensive feature comparison with PrismLauncher and a roadmap for future development.


๐Ÿ“š Documentation

AI-Generated Documentation

This project includes AI-generated documentation to help with development, testing, and feature planning. These documents are located in the .ai-docs/ folder:

These documents are provided as reference material and should be reviewed and validated as the project evolves.

๐Ÿค Contributing

Found a ๐Ÿžbug or have an ๐Ÿ’กidea? Open an issue or PR โ€” all help is appreciated!


๐Ÿ“œ License

This project is licensed under the GPL v3 License ๐Ÿ“„


About

A "cracked" launcher for Minecraft: Java Edition. NOT AFFILIATED WITH MOJANG OR MICROSOFT.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages