[DF]
[Dragonfly]

Engine

Home Engine Games Tutorial Docs Book Notes

License

Requirements

Download

Setup

License

Dragonfly is free! This means free of charge for personal use. Dragonfly may be copied and distributed, provided that this copyright notice is kept intact. There cannot be a charge for the use of Dragonfly to anyone else. The copyright holders (Mark Claypool and WPI) reserve the right to reclassify this software as non-freeware at a later date (e.g., as shareware). Doing so will not modify the license agreement of any previously distributed executables.

License

Requirements

Download

Setup

Requirements for developing with Dragonfly

The Dragonfly library below (appropriate for each platform)
A C++ compiler (e.g., g++)
Standard development libraries (e.g., stdc++)
The Simple and Fast Multimedia Library (SFML)
A computer with a Windows, Mac or Linux operating system

Recommended

Project development software (e.g., make or Microsoft Visual Studio)
A debugger (e.g., gdb)

License

Requirements

Download

Setup

Download

Version 4.19 zipfile: dragonfly-v4.19.zip, containing:
README.txt
Sample Makefile
"Hello, world" game (game.cpp)
Configuration file (df-config.txt)
Font file (df-font.ttf)
changelog.txt

Versions of Dragonfly:

libdragonfly-x64-debug.lib (Windows, debug version, 64-bit)
libdragonfly-x64-release.lib (Windows, release version, 64-bit)
libdragonfly-x64-linux.a (Linux, 64-bit)
libdragonfly-x64-mac.a (Mac, 64-bit, x86 processor)
libdragonfly-arm64-mac.a (Mac, 64-bit, Arm processor)

License

Requirements

Download

Setup

Setup Guides

Linux

Windows

Mac

Linux Setup

This is a setup guide for developing with (and developing) Dragonfly in Linux. This setup guide has been tested as of SFML version 2.6.1.

  1. Install development tools

    The minimum needed is g++, but a debugger such as gdb is also recommended. The exact method to install development tools depends upon the Linux distribution. e.g., on Debian sudo apt-get install build-essential.

  2. Install SFML

    SFML is free to download and use from the SFML Web site. Depending upon the Linux distribution, SFML may be installed via the software manager. e.g., in Debian, sudo apt-get install libsfml-dev. Note, SFML version 2.6 or later is required! Often, the SFML versions for the Linux distributions are out of date. In this case, the pre-compiled binaries can be downloaded or the SFML source can be downloaded and compiled.

    Installation link: http://www.sfml-dev.org/tutorials/2.6/start-linux.php#installing-sfml
    link: https://www.sfml-dev.org/tutorials/2.6/compile-with-cmake.php
    Download link: http://www.sfml-dev.org/download.php

  3. Install Dragonfly

    Dragonfly is available via the Dragonfly Web page. The engine zip file contains pre-compiled binaries for Windows (Visual Studio), Linux, and Mac.

    link: http://dragonfly.wpi.edu/engine/index.html#download

    Installation is done by extracting the zip file. While Dragonfly can be installed anywhere, it is recommended to put it in the same directory as your game(s) (including the tutorial) will go. That way, the installation will work with the Makefile that comes with the Dragonfly tutorial.

  4. Download and Setup Saucer Shoot, Game 0

    The first Saucer Shoot tutorial file is a basic "hello, world" for Dragonfly. Running it successfully will verify that the development environment is set up properly.

    link: http://dragonfly.wpi.edu/tutorial/game0.zip

    Download and extract the zip file. The zip file includes a Makefile that can be used for development.

    Edit the Makefile:

    1. Uncomment the portions of the Makefile referring to Linux (LINKLIB, LINKDIR and INCDIR) and make sure the corresponding portions referring to Mac are commented.
    2. Check, and then edit if needed, that INCDIR and LINKNDIR refer to the location of the Dragonfly header files (.h) and library (.a), respectively.

  5. Build and Run
    1. Build/compile with make.
    2. Run with ./game. A window should appear, playing the Dragonfly splash animation, then closing.

Linux

Windows

Mac

Windows Setup

This is a setup guide for developing with (and developing) Dragonfly in Microsoft Windows using Microsoft Visual Studio (this has a purple icon, as opposed to "Visual Studio Code" that has a blue icon). This setup guide has been tested as of SFML version 2.6.1 and Microsoft Visual Studio 2022.

This guide uses the included Solution file. If the intent is to configure a new Solution file from scratch, see the Dragonfly with Visual Studio setup document: VS 2013, VS 2015, VS 2017, VS 2019, or VS 2022.

  1. Install Microsoft Visual Studio

    Most, if not all, versions should work. However, Visual Studio Community is full-featured and free. Select the "Desktop development with C++" component for install.

    link: https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx

  2. Install SFML

    SFML is free to download and use from the SFML Web site. Note! The SFML package downloaded must match the version of Visual C++. Either the 32-bit version or the 64-bit version should work.

    link: http://www.sfml-dev.org/download.php
    link: http://www.sfml-dev.org/tutorials/2.6/start-vc.php#installing-sfml

    Installation is done by extracting the zip file to the desired location. While SFML can be installed anywhere, it is recommended to put it in the same directory as the Visual Studio projects. e.g.,

    C:\Users\Claypool\My Documents\Visual Studio 2022\Projects\SFML-2.6.0

    Rename the directory extracted to SFML-2.6. e.g.,

    C:\Users\Claypool\My Documents\Visual Studio 2022\Projects\SFML-2.6

    That way, the installation will work with the Visual Studio solution files that come with the Dragonfly tutorial.

  3. Install Dragonfly

    Dragonfly is available via the Dragonfly Web page. The engine zip file contains pre-compiled binaries for Windows (Visual Studio), Linux, and Mac. Dragonfly for Windows is built with Visual Studio 2022.

    link: http://dragonfly.wpi.edu/engine/index.html#download

    Installation is done by extracting the zip file. While Dragonfly can be installed anywhere, it is recommended to put it in the same directory as the Visual Studio projects. e.g.,

    C:\Users\Claypool\My Documents\Visual Studio 2022\Projects\dragonfly

    That way, the installation will work with the Visual Studio solution files that come with the Dragonfly tutorial.

  4. Download and Setup Saucer Shoot, Game 0

    The first Saucer Shoot tutorial file is a basic "hello, world" for Dragonfly. Running it successfully will verify that the development environment is set up properly.

    link: http://dragonfly.wpi.edu/tutorial/game0.zip

    Download and extract the zip file. While the tutorial can be installed anywhere, it is recommended to put it in the same directory as the Visual Studio projects. e.g.,

    C:\Users\Claypool\My Documents\Visual Studio 2022\Projects\game0

    The zip file includes a Visual Studio solution file that can be used for development.

  5. Build and Run

    If the installation of SFML and Dragonfly are in the recommended location, opening the solution (the file saucer-shoot.sln in the directory game0/vs-2022/) should allow:

    1. Set the "Solution Platform" dropdown in the middle of the bottom menu bar (right next to "Debug") to match the desired build ("x86" for 32-bit version, "x64" for 64-bit version - matching both the Dragonfly and SFML libraries appropriately).
    2. Build (hotkey F7). Note, all "pdb" errors can be safely ignored. The result should report "Build: 1 succeeded".
    3. Run (hotkey F5). A window should appear, playing the Dragonfly splash animation, then closing.

    If installation was to another directory, see the Dragonfly with Visual Studio setup document to adjust the appropriate project variables.

Linux

Windows

Mac

Mac Setup

This is a setup guide for developing with (and developing) Dragonfly in Mac OS using the command line. This setup guide has been tested as of SFML version 2.6.1.

If the intent is to develop with Xcode, see the Dragonfly with Xcode setup document.

  1. Install development tools

    Homebrew is needed to install SFML. To install homebrew, open a terminal window and copy and run the following:

    ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

    The minimum development tool needed is the g++ compiler, but a debugger such as gdb is also recommended. Either homebrew or Xcode can be used to install the compiler and other tools. For homebrew:

    brew install gcc

    For Xcode:

    Xcode → Preferences → Downloads → Components

    link: http://brew.sh/
    link: https://developer.apple.com/xcode/downloads/

  2. Install SFML

    SFML is free, with details on the SFML Web site. Using homebrew, SFML can be installed via:

    brew install sfml

    Note, SFML version 2.6 or later is required! Often, the SFML versions for the homebrew distributions are out of date. In this case, the SFML source can be downloaded and compiled using CMake. When running SFML applications (e.g., Saucer Shoot), you may need to set your shell path to the SFML libraries, too (e.g., export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Users/claypool/SFML-2.6.0/lib").

    link: http://www.sfml-dev.org/download.php
    link: https://www.sfml-dev.org/tutorials/2.6/compile-with-cmake.php

  3. Install Dragonfly

    Dragonfly is available via the Dragonfly Web page. The engine zip file contains pre-compiled binaries for Windows (Visual Studio), Linux, and Mac.

    link: http://dragonfly.wpi.edu/engine/index.html#download

    Installation is done by extracting the zip file. While Dragonfly can be installed anywhere, it is recommended to put it in the same directory as your game tutorial(s) will go. That way, the installation will work with the Makefile that comes with the Dragonfly tutorial.

  4. Download and Setup Saucer Shoot, Game 0

    The first Saucer Shoot tutorial file is a basic "hello, world" for Dragonfly. Running it successfully will verify that the development environment is set up properly.

    link: http://dragonfly.wpi.edu/tutorial/game0.zip

    Download and extract the zip file. The zip file includes a Makefile that can be used for development.

    Edit the Makefile:

    1. Uncomment the portions of the Makefile referring to Mac (LINKLIB, LINKDIR and INCDIR) and make sure the corresponding portions referring to Linux are commented.
    2. Check, and then edit if needed, that LINKLIB and INCDIR refer to the correct version and location of SFML.
    3. Check, and then edit if needed, that LINKNDIR and INCDIR and refer to the location of the Dragonfly header files (.h) and library (.a), respectively.

    Change System Settings:

    1. Open the "System Preferences"
    2. Select "Security & Privacy" → "Privacy" → "Developer Tools"
    3. Make sure the checkbox next to "Terminal" is selected

    This setting allows terminal applications to run locally even if they do not meet the system's security policy. This should allow Dragonfly to run (next step).

  5. Build and Run
    1. Build/compile with make.
    2. Run with ./game. A window should appear, playing the Dragonfly splash animation, then closing. Note! On some systems, the splash screen may quickly disappear as if a key is pressed. This can be safely ignored.

Linux

Windows

Mac

License

Requirements

Download

Setup

Home Engine Games Tutorial Docs Book Notes

Copyright ©2012-2024, Mark Claypool (claypool [at] cs.wpi.edu) and WPI. All rights reserved.