* Work around issues with depth-buffer size on EGL-based platforms The OpenGL 1.1 and OpenGL ES 2.0 backends can break on EGL-based platforms, such as Wayland, or X11 with SDL_VIDEO_FORCE_EGL=1. One of the reasons for this (the other being glew on the GL1.1 backend) is that SDL/egl get very confused by the way we set OpenGL attributes, particularly SDL_GL_DEPTH_SIZE, resulting in SDL_GL_CreateContext() failing with EGL_BAD_MATCH. The exact cause of this is unknown, but it seems to be a combination of: - SDL_GL_SetAttribute() is supposed to be called _before_ the window is created, and we're calling it afterward. - Creating several test windows during the enumeration process, mixing and matching between OpenGL and OpenGL ES profiles. The "most correct" solution is probably to delay creating the game window until the backend creation process, rather than before the enumeration occurs. But that's a real refactor, which could cause other issues. Instead, set the 24-bit bit depth (which we've hardcoded anyway) before creating the window, and use SDL_GL_ResetAttributes() when creating backends. This seems to work here in all of the cases I was able to try (modulo the GLEW dependency, which is removed in the next patch). * miniwin: Remove GLEW dependency for OpenGL 1.1 GLEW normally backs directly onto glXGetProcAddress on Linux, which is broken on non-GLX setups, such as Wayland (but also X11 with EGL, and presumably KMSDRM). Replace it with manual calls to SDL_GL_GetProcAddress() for the VBO path. Note, however, that SDL_opengl.h includes "windows.h", so conflicts with the miniwin implementation, which breaks builds on windows. In order to work around this, we do what the Direct3D9 implementation does and push all of the OpenGL calls to a separate file, actual.cpp. Going forward, it may make sense to load _all_ OpenGL entry points via SDL, which would allow us to avoid linking directly with libGL/libOpenGL, and therefore eliminate the separate build dependency altogether, as well as allowing more runtime configurability as to the OpenGL library to load. (But that's definitely a bit uglier, and also useful very rarely.) |
||
|---|---|---|
| .github/workflows | ||
| 3rdparty | ||
| cmake | ||
| CMake | ||
| CONFIG | ||
| ISLE | ||
| LEGO1 | ||
| miniwin | ||
| tools | ||
| util | ||
| .clang-format | ||
| .clang-tidy | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .pylintrc | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
LEGO Island, portable
Development Vlog | Contributing | Matrix | Forums | Patreon
This initiative is a portable version of LEGO Island (Version 1.1, English) based on the decompilation project. Our primary goal is to transform the codebase to achieve platform independence, thereby enhancing compatibility across various systems while preserving the original game's experience as faithfully as possible.
Please note: this project is dedicated to achieving platform independence without altering the core gameplay, adding new features, enhancing visual quality, or rewriting code for improvement's sake. While those are worthwhile objectives, they are not within the scope of this project.
Status
Supported platforms
| Platform | Status |
|---|---|
| Windows | |
| Linux | |
| macOS | |
| Web |
We are actively working to support more platforms. If you have experience with a particular platform, we encourage you to contribute to isle-portable. You can find a list of ongoing efforts in our Wiki.
Library substitutions
To achieve our goal of platform independence, we need to replace any Windows-only libraries with platform-independent alternatives. This ensures that our codebase remains versatile and compatible across various systems. The following table serves as an overview of major libraries / subsystems and their chosen replacements. For any significant changes or additions, it's recommended to discuss them with the team on the Matrix chat first to ensure consistency and alignment with our project's objectives.
| Library/subsystem | Substitution | Status | |
|---|---|---|---|
| Window, Events | SDL3 | ✅ | Remarks |
| Windows Registry (Configuration) | libiniparser | ✅ | Remarks |
| Filesystem | SDL3 | ✅ | Remarks |
| Threads, Mutexes (Synchronization) | SDL3 | ✅ | Remarks |
| Keyboard/Mouse, DirectInput (Input) | SDL3 | ✅ | Remarks |
| Joystick/Gamepad, DirectInput (Input) | SDL3 | ✅ | Remarks |
| WinMM, DirectSound (Audio) | SDL3, miniaudio | ✅ | Remarks |
| DirectDraw (2D video) | SDL3 | ✅ | Remarks |
| Smacker | libsmacker | ✅ | Remarks |
| Direct3D (3D video) | SDL3 (Vulkan, Metal, D3D12), D3D9, OpenGL, OpenGL ES, Software | ✅ | Remarks |
| Direct3D Retained Mode | Custom re-implementation | ✅ | Remarks |
| SmartHeap | Default memory allocator | - | - |
Building
This project uses the CMake build system, which allows for a high degree of versatility regarding compilers and development environments. Please refer to the GitHub action for guidance.
Usage
An existing copy of LEGO Island is required to use this project.
As it stands, the builds provided in the Releases tab are for developers; as such, they may not work properly for end-users. Work is currently ongoing to create workable release builds ready for gameplay and general use by end-users. If you are technically inclined, you may find it easiest to compile the project yourself to get it running at this current point in time.
Contributing
If you're interested in helping or contributing to this project, check out the CONTRIBUTING page.