LÖVE Game Framework

repository·main·Indexed 25 days ago

https://github.com/love2d/love

A framework for making 2D games in the Lua programming language. This documentation provides instructions for installing LÖVE across various platforms, including Ubuntu, Arch Linux, macOS, iOS, and Android, as well as guides for compiling from source using CMake and Xcode. It also covers running the LÖVE test suite, core dependencies such as SDL3 and OpenGL, and building the ENet library for networking capabilities.

Tokens
1.3K
Snippets
3
Records
13
Agent score
92%

What's inside LÖVE

  1. Compile LÖVE for iOS

    main

    Building for iOS requires macOS and Xcode.

    Option 1: Using Release Zip

    1. Download the love-apple-dependencies zip file corresponding to your LÖVE version from the Releases page.
    2. Unzip and place iOS/libraries into platform/xcode/ios.
    3. Place shared into platform/xcode.

    Option 2: Using Git Repository

    1. Clone the love-apple-dependencies repository.
    2. Place iOS/libraries into platform/xcode/ios.
    3. Place shared into platform/xcode.

    Final Step: Open the Xcode project at platform/xcode/love.xcodeproj and build the love-ios target. Refer to readme-iOS.rtf for more details.

  2. Compile LÖVE on *nix systems

    main

    Because in-tree builds are not allowed, you must generate Makefiles in a separate build directory. Use CMake to configure and build the project.

    Note: If using CMake 3.15 or earlier, replace --install-prefix $PWD/prefix with -DCMAKE_INSTALL_PREFIX=$PWD/prefix.

    $ cmake -B build -S. --install-prefix $PWD/prefix
    $ cmake --build build --target install -j$(nproc)
  3. Compile LÖVE for macOS

    main

    To build for macOS, you must first prepare the dependencies:

    1. Download or clone the love-apple-dependencies repository.
    2. Copy/move/symlink the macOS/Frameworks subfolder into platform/xcode/macosx.
    3. Copy/move/symlink the shared subfolder into platform/xcode.
    4. Open the Xcode project at platform/xcode/love.xcodeproj and build the love-macosx target.
  4. Build ENet from source

    main

    If you have obtained the ENet package from GitHub, you can build it using the following steps:

    1. Generate the build system: Use autoreconf to prepare the build environment.
    2. Compile and install: Run the configuration script, compile the source with make, and install the library using make install.
    # Generate the build system.
    autoreconf -vfi
    
    # Compile and install the library.
    ./configure && make && make install
  5. Build LÖVE for iOS

    main

    To run LÖVE on iOS, you must compile and install it using macOS and Xcode.

    Prerequisites

    1. macOS and Xcode: Required for compilation.
    2. Third-party dependencies: Check if the include and libraries folders exist in love/platform/xcode/ios or if love/platform/xcode/shared/ exists. If they are missing, download them from the LÖVE iOS libraries zip and place them in the appropriate folder.

    Build Steps

    1. Open the Xcode project at love/platform/xcode/love.xcodeproj.
    2. Select the love-ios target from the dropdown menu at the top of the Xcode window.
    3. (Optional) For better runtime performance, change the Build Configuration from Debug to Release via the Edit Scheme... menu.
    4. Select an iOS Simulator or a connected iOS device from the device selector.
    5. Click the Build-and-Run button to compile, install, and launch LÖVE on the target device.
  6. Run Games on an iOS Device

    main

    To run a .love file or a game folder on a physical iOS device, use one of the following methods:

    1. Safari: Download the .love file directly on the device using Safari.
    2. iTunes/File Transfer:
      • Connect the device to your computer.
      • Open iTunes and select your iOS device.
      • Go to the Apps section.
      • Locate LÖVE in the list.
      • Drag and drop the .love file or game folder into the Documents section for LÖVE.
  7. Run Games on iOS Simulator

    main

    Once LÖVE is installed on the iOS Simulator, you can run a .love file by dragging and dropping the file directly onto the Simulator window while it is open.

    If LÖVE is not running, it will launch automatically. If another game is currently active, you may need to quit LÖVE first (use Shift-Command-H twice to open the App Switcher in the Simulator) to allow the new game to appear in the list.