GrimSqueaker / remc2

Recode Binary code of game Magic Carpet2 to C/C++ language(remake MC2 for any platform)
6 stars 0 forks source link

Magic Carpet 2 HD

Based off the Reverse engineering of game Magic Carpet 2 from assembler to c/c++ language by Tomas Versly
Forked from Tomas Vesely's repo here: https://github.com/turican0/remc2

Tomas has done amazing work, not only reverse engineering this code but updating it to use more modern memory allocation and use the SDL library for input and sound. He has even increased the sprite resolutions.

Download the latest Alpha Here (now with MSI Installer)!

https://github.com/thobbsinteractive/magic-carpet-2-hd/releases/latest

Install Guide for GOG Edition or from Magic Carpet CD

Windows

Command Line Args

You can use the following arguments:
To jump to a selected Level use:
--set_level [0-25]
To run a level you have created using the editor:
--custom_level "[Path to .mc2 file]"

For more information on Magic Carpet 2

Moburma has been tirelessly working to document cut levels, level data structures and missing graphics at: https://tcrf.net/Magic_Carpet_2:_The_Netherworlds

My intention is to make a patch for Magic Carpet 1 and 2 (GOG editions) that initially will:

Build Status:

Branch Windows Linux
master MSBuild CI Linux 64bit CI
development MSBuild CI Linux 64bit CI

STATUS: Code now runs and all of MC2 (in both Windows and Linux) seems to be playable. Anyone with the GOG edition can download this repo, extract the Game Assets (from a legal GOG copy of the game) and run it.

Steps: to build and run this code

Windows:

Linux:

Building on Linux

There are two ways to build the Linux binary.

Providing the original game assets to remc2 and running the game

In order to run the game you need to own a copy of Magic Carpet 2. We provide a script to extract the assets from the GOG version. The following steps extract the required files from the original.

  1. Purchase a copy of Magic Carpet 2 from GOG here: https://www.gog.com/game/magic_carpet_2_the_netherworlds
  2. Download the Windows "Offline Backup Game Installer"
    • Open GOGGalaxy
    • Install the game
  3. In order to retrieve the original game's assets run the following script located in the root of the repository:
    bash check_install.sh -s [directory where GOG installed MC2] -d [destination directory]
    # for example :
    bash check_install.sh -s "${HOME}/.wine/drive_c/games/Magic Carpet 2/" -d "build/${BUILDTYPE}/inst/bin/"

    Please note that if you have used any other method to get the assets, at least run a check to make sure that remc2 has access to every file it needs:

    bash check_install.sh -d [destination directory]
    # for example:
    bash check_install.sh -d "build/${BUILDTYPE}/inst/bin/"
    [ ok ] CD_Files directory
    [ ok ] GAME directory

    this script will fix the permissions, make everything uppercase, check all file hashes and complain if any file is missing. it's also recommended that before the first run you remove the file GAME/NETHERW/CONFIG.DAT if it exists.

  4. NOTE: The game will search in the following locations (and in this particular order) for the game assets. For the flatpak only the first two locations can be used.
    1. $XDG_DATA_HOME/remc2/
    2. $HOME/.local/share/remc2
    3. next to the remc2 binary
  5. Run the remc2 executable in install directory
    cd magic-carpet-2-hd/build/${BUILDTYPE}/inst/bin
    ./remc2

Configuring remc2

Some settings can be configured via the file config.ini. An example for this file can be found in the root directory of the remc2 repository. The game will search for this file in the following locations and this particular order. For the flatpak only the first two locations can be used.

  1. $XDG_CONFIG_HOME/remc2
  2. $HOME/.config/remc2
  3. next to the remc2 binary

ROADMAP:

MILLSTONE 1

MILLSTONE 2

MILLSTONE 3

MILLSTONE 4

MILLSTONE 5

LONG TERM GOALS

If you know a bit about game development or want to help out, branch away or email me here: thobbsinteractive@gmail.com or find us on Discord here: https://discord.gg/GR55HCbJJ4

Development Guide

License

Original Source Code is Copyright 1995 Bullfrog Productions

Additonal Code is Licensed under the following MIT Licence:

Copyright 2022 Magic Carpet 2 HD

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.