gnu: surgescript: Update to 0.5.4.4.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
index 23cf913..3252eb3 100644 (file)
@@ -4,8 +4,8 @@
 ;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2020 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -18,6 +18,8 @@
 ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler@student.tugraz.at>
 ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler@student.tugraz.at>
 ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
+;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,6 +38,7 @@
 
 (define-module (gnu packages game-development)
   #:use-module (srfi srfi-1)
 
 (define-module (gnu packages game-development)
   #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -77,6 +80,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages stb)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages stb)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
@@ -167,7 +173,11 @@ is used in some video games and movies.")
              (base32
               "07w3asqxx89wl2wfv1z3cak8v83h3ys3b39mq9qq4gyf3xdhs76n"))))
    (build-system gnu-build-system)
              (base32
               "07w3asqxx89wl2wfv1z3cak8v83h3ys3b39mq9qq4gyf3xdhs76n"))))
    (build-system gnu-build-system)
-   (native-inputs `(("asciidoc" ,asciidoc)))
+   (inputs
+    `(("libpng" ,libpng)))
+   (native-inputs
+    `(("asciidoc" ,asciidoc)
+      ("pkg-config" ,pkg-config)))
    (home-page "https://github.com/Doom-Utils/deutex")
    (synopsis "WAD file composer for Doom and related games")
    (description
    (home-page "https://github.com/Doom-Utils/deutex")
    (synopsis "WAD file composer for Doom and related games")
    (description
@@ -185,39 +195,39 @@ DeuTex has functions such as merging wads, etc.")
   (package
     (name "grfcodec")
     (version "6.0.6")
   (package
     (name "grfcodec")
     (version "6.0.6")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://binaries.openttd.org/extra/"
-                                  name "/" version "/" name "-" version
-                                  "-source.tar.xz"))
-              (sha256
-               (base32
-                "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://binaries.openttd.org/extra/"
+                           name "/" version "/" name "-" version
+                           "-source.tar.xz"))
+       (sha256
+        (base32 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
     (build-system gnu-build-system)
     (arguments
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f no check target
+     '(#:tests? #f                      ;no check target
        #:phases
        #:phases
-      (modify-phases %standard-phases
-        (delete 'configure) ; no configure script
-        (replace 'install   ; no install target
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (bin (string-append out "/bin"))
-                   (doc (string-append out "/share/doc"))
-                   (man (string-append out "/share/man/man1")))
-              (for-each (lambda (file)
-                          (install-file file bin))
-                        '("grfcodec" "grfid" "grfstrip" "nforenum"))
-              (install-file "COPYING" doc)
-              (with-directory-excursion "docs"
-                (for-each (lambda (file)
-                            (install-file (string-append file ".txt") doc))
-                          '("auto_correct" "commands" "grf" "grfcodec" "grftut"
-                            "readme" "readme.rpn"))
-                (for-each (lambda (file)
-                            (install-file file man))
-                          (find-files "." "\\.1"))))
-            #t)))))
+       (modify-phases %standard-phases
+         (delete 'configure)            ;no configure script
+         (replace 'install              ;no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (doc (string-append out "/share/doc"))
+                    (man (string-append out "/share/man/man1")))
+               (for-each (lambda (file)
+                           (install-file file bin))
+                         '("grfcodec" "grfid" "grfstrip" "nforenum"))
+               (install-file "COPYING" doc)
+               (with-directory-excursion "docs"
+                 (for-each (lambda (file)
+                             (install-file (string-append file ".txt") doc))
+                           '("auto_correct" "commands" "grf" "grfcodec" "grftut"
+                             "readme" "readme.rpn"))
+                 (for-each (lambda (file)
+                             (install-file file man))
+                           (find-files "." "\\.1"))))
+             #t)))))
     (inputs
      `(("boost" ,boost)
        ("libpng" ,libpng)
     (inputs
      `(("boost" ,boost)
        ("libpng" ,libpng)
@@ -234,7 +244,7 @@ with a specific task:
 @item @code{nforenum} checks NFO code for errors, making corrections when
 necessary.
 @end enumerate")
 @item @code{nforenum} checks NFO code for errors, making corrections when
 necessary.
 @end enumerate")
-    (home-page "http://dev.openttdcoop.org/projects/grfcodec")
+    (home-page "https://dev.openttdcoop.org/projects/grfcodec")
     ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
     ;; NFORenum is under the GPL2+.
     ;; The MD5 implementation contained in GRFID is under the zlib license.
     ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
     ;; NFORenum is under the GPL2+.
     ;; The MD5 implementation contained in GRFID is under the zlib license.
@@ -250,15 +260,14 @@ necessary.
        (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
                            version "/catcodec-" version "-source.tar.xz"))
        (sha256
        (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
                            version "/catcodec-" version "-source.tar.xz"))
        (sha256
-        (base32
-         "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
+        (base32 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests
        #:make-flags (list (string-append "prefix=" %output))
        #:phases (modify-phases %standard-phases
                   (delete 'configure))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests
        #:make-flags (list (string-append "prefix=" %output))
        #:phases (modify-phases %standard-phases
                   (delete 'configure))))
-    (home-page "http://dev.openttdcoop.org/projects/catcodec")
+    (home-page "https://dev.openttdcoop.org/projects/catcodec")
     (synopsis "Encode/decode OpenTTD sounds")
     (description "catcodec encodes and decodes sounds for OpenTTD.  These
 sounds are not much more than some metadata (description and filename) and raw
     (synopsis "Encode/decode OpenTTD sounds")
     (description "catcodec encodes and decodes sounds for OpenTTD.  These
 sounds are not much more than some metadata (description and filename) and raw
@@ -308,30 +317,24 @@ provide connectivity for client applications written in any language.")
 (define-public nml
   (package
     (name "nml")
 (define-public nml
   (package
     (name "nml")
-    (version "0.4.5")
+    (version "0.5.2")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
-                           version "/nml-" version ".tar.gz"))
+       (uri (pypi-uri "nml" version))
        (sha256
         (base32
        (sha256
         (base32
-         "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53"))))
+         "1lwf5sc5qqzrkxfx5wkkj3yh2j2nzh5r599ly5psy8yw92km24hy"))))
     (build-system python-build-system)
     (build-system python-build-system)
+    ;; TODO: Fix test that fails with
+    ;; "AttributeError: partially initialized module 'nml.nmlop' has no
+    ;; attribute 'ADD' (most likely due to a circular import)"
     (arguments
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'fix-pillow
-           (lambda _
-             ;; pillow's version is not in PIL.Image.VERSION anymore
-             (substitute* "nml/version_info.py"
-               (("from PIL import Image") "import PIL")
-               (("Image.VERSION") "PIL.__version__"))
-             #t)))))
+     '(#:tests? #f))
     (propagated-inputs
      `(("python-pillow" ,python-pillow)
        ("python-ply" ,python-ply)))
     (propagated-inputs
      `(("python-pillow" ,python-pillow)
        ("python-ply" ,python-ply)))
-    (home-page "https://dev.openttdcoop.org/projects/nml")
+    (home-page "https://github.com/OpenTTD/nml")
     (synopsis "NML compiler")
     (description
      "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
     (synopsis "NML compiler")
     (description
      "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
@@ -339,26 +342,22 @@ compiling NML files (along with their associated language, sound and graphic
 files) into @file{.grf} and/or @file{.nfo} files.")
     (license license:gpl2+)))
 
 files) into @file{.grf} and/or @file{.nfo} files.")
     (license license:gpl2+)))
 
-(define-public python-sge-pygame
+(define-public python-sge
   (package
   (package
-    (name "python-sge-pygame")
-    (version "1.5.1")
+    (name "python-sge")
+    (version "1.7")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://savannah/stellarengine/"
-                           (version-major+minor version) "/sge-pygame-"
-                           version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (uri (pypi-uri "sge" version))
        (sha256
         (base32
        (sha256
         (base32
-         "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
+         "02fn6v6bxk3sngwd4kd3mglrp0jlnhx7x6h8nnkik6wdv150a0wv"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pygame" ,python-pygame)
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pygame" ,python-pygame)
-       ("python-six" ,python-six)
        ("python-uniseg" ,python-uniseg)))
        ("python-uniseg" ,python-uniseg)))
-    (home-page "http://stellarengine.nongnu.org")
+    (home-page "https://python-sge.github.io/")
     (synopsis "2D game engine for Python")
     (description
      "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
     (synopsis "2D game engine for Python")
     (description
      "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
@@ -367,8 +366,8 @@ you can focus on the game itself.  This makes more rapid game development
 possible, and it also makes the SGE easy to learn.")
     (license license:lgpl3+)))
 
 possible, and it also makes the SGE easy to learn.")
     (license license:lgpl3+)))
 
-(define-public python2-sge-pygame
-  (package-with-python2 python-sge-pygame))
+(define-public python-sge-pygame
+  (deprecated-package "python-sge-pygame" python-sge))
 
 (define-public python-tmx
   (package
 
 (define-public python-tmx
   (package
@@ -409,14 +408,15 @@ levels.")
 (define-public python-xsge
   (package
     (name "python-xsge")
 (define-public python-xsge
   (package
     (name "python-xsge")
-    (version "2018.02.26")
+    (version "2020.09.07")
     (source (origin
               (method url-fetch)
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
-                                  version ".tar.gz"))
+              (uri (string-append "https://github.com/python-sge/xsge"
+                                  "/releases/download/v" version
+                                  "/xsge-" version ".zip"))
               (sha256
                (base32
               (sha256
                (base32
-                "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40"))))
+                "136xgy3f9vw636wxpqbha022avk0wyxw63mm3a2dvwhh90s716f9"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
     (build-system python-build-system)
     (arguments
      '(#:phases
@@ -429,12 +429,11 @@ levels.")
                      (string-append "--prefix=" (assoc-ref outputs "out"))
                      "--root=/"))))
        #:tests? #f)) ; no check target
                      (string-append "--prefix=" (assoc-ref outputs "out"))
                      "--root=/"))))
        #:tests? #f)) ; no check target
+    (native-inputs
+     `(("unzip" ,unzip)))
     (propagated-inputs
     (propagated-inputs
-     `(("python-sge-pygame" ,python-sge-pygame)
-       ("python-pygame" ,python-pygame)
-       ("python-six" ,python-six)
-       ("python-tmx" ,python-tmx)))
-    (home-page "http://xsge.nongnu.org")
+     `(("python-sge" ,python-sge)))
+    (home-page "https://python-sge.github.io/")
     (synopsis "Extensions for the SGE Game Engine")
     (description
      "xSGE is a collection of modules that make doing certain tasks with the SGE
     (synopsis "Extensions for the SGE Game Engine")
     (description
      "xSGE is a collection of modules that make doing certain tasks with the SGE
@@ -443,9 +442,6 @@ GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
 support.")
     (license license:gpl3+)))
 
 support.")
     (license license:gpl3+)))
 
-(define-public python2-xsge
-  (package-with-python2 python-xsge))
-
 (define-public tiled
   (package
     (name "tiled")
 (define-public tiled
   (package
     (name "tiled")
@@ -453,7 +449,7 @@ support.")
     (source (origin
               (method git-fetch)
               (uri (git-reference
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/bjorn/tiled.git")
+                    (url "https://github.com/bjorn/tiled")
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
@@ -500,7 +496,7 @@ clone.")
               ;; http://mirror0.sfml-dev.org/files/ because files there seem
               ;; to be changed in place.
               (uri (git-reference
               ;; http://mirror0.sfml-dev.org/files/ because files there seem
               ;; to be changed in place.
               (uri (git-reference
-                    (url "https://github.com/SFML/SFML.git")
+                    (url "https://github.com/SFML/SFML")
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
@@ -527,7 +523,7 @@ clone.")
        ("xcb-util-image" ,xcb-util-image)
        ("libxrandr" ,libxrandr)
        ("eudev" ,eudev)
        ("xcb-util-image" ,xcb-util-image)
        ("libxrandr" ,libxrandr)
        ("eudev" ,eudev)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libsndfile" ,libsndfile)
        ("stb-image" ,stb-image)
        ("stb-image-write" ,stb-image-write)))
        ("libsndfile" ,libsndfile)
        ("stb-image" ,stb-image)
        ("stb-image-write" ,stb-image-write)))
@@ -582,6 +578,34 @@ sounds from presets such as \"explosion\" or \"powerup\".")
     (home-page "http://www.drpetter.se/project_sfxr.html")
     (license license:expat)))
 
     (home-page "http://www.drpetter.se/project_sfxr.html")
     (license license:expat)))
 
+(define-public surgescript
+  (package
+    (name "surgescript")
+    (version "0.5.4.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/alemart/surgescript")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vck1wk6r6jrrw5xzpqldplz601dfgpk5s5p45fam00nfsid0p7p"))))
+     (build-system cmake-build-system)
+     (arguments
+      '(#:configure-flags
+        (let ((share (string-append (assoc-ref %outputs "out") "/share")))
+          (list (string-append "-DICON_PATH=" share "/pixmaps")
+                (string-append "-DMETAINFO_PATH=" share "/metainfo")))
+        #:tests? #f))
+     (home-page "https://docs.opensurge2d.org")
+     (synopsis "Scripting language for games")
+     (description "@code{SurgeScript} is a dynamically typed object-oriented
+scripting language designed for games.  Each object is a state machine that
+can be customized by attaching other objects.  The language supports automatic
+garbage collection and can be extended with plugins.")
+    (license license:asl2.0)))
+
 (define-public physfs
   (package
     (name "physfs")
 (define-public physfs
   (package
     (name "physfs")
@@ -598,6 +622,7 @@ sounds from presets such as \"explosion\" or \"powerup\".")
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; no check target
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; no check target
+       #:configure-flags '("-DPHYSFS_BUILD_STATIC=OFF")
        #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'patch-CMakeLists.txt
                     (lambda _
        #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'patch-CMakeLists.txt
                     (lambda _
@@ -647,7 +672,6 @@ archive on a per-file basis.")
        ("mesa" ,mesa)
        ("mpg123" ,mpg123)
        ("openal" ,openal)
        ("mesa" ,mesa)
        ("mpg123" ,mpg123)
        ("openal" ,openal)
-       ("physfs" ,physfs)
        ("sdl2" ,sdl2)
        ("zlib" ,zlib)))
     (synopsis "2D game framework for Lua")
        ("sdl2" ,sdl2)
        ("zlib" ,zlib)))
     (synopsis "2D game framework for Lua")
@@ -723,7 +747,7 @@ package is the Nuklear bindings for LÖVE created by Kevin Harrison.")
 multimedia programming.  It handles common, low-level tasks such as creating
 windows, accepting user input, loading data, drawing images, playing sounds,
 etc.")
 multimedia programming.  It handles common, low-level tasks such as creating
 windows, accepting user input, loading data, drawing images, playing sounds,
 etc.")
-    (home-page "http://liballeg.org")
+    (home-page "https://liballeg.org")
     (license license:giftware)))
 
 (define-public allegro
     (license license:giftware)))
 
 (define-public allegro
@@ -746,7 +770,7 @@ etc.")
        ("freetype" ,freetype)
        ("glu" ,glu)
        ("gtk" ,gtk+-2)
        ("freetype" ,freetype)
        ("glu" ,glu)
        ("gtk" ,gtk+-2)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libtheora" ,libtheora)
        ("libvorbis" ,libvorbis)
        ("libpng" ,libpng)
        ("libtheora" ,libtheora)
        ("libvorbis" ,libvorbis)
@@ -764,7 +788,7 @@ etc.")
 multimedia programming.  It handles common, low-level tasks such as creating
 windows, accepting user input, loading data, drawing images, playing sounds,
 etc.")
 multimedia programming.  It handles common, low-level tasks such as creating
 windows, accepting user input, loading data, drawing images, playing sounds,
 etc.")
-    (home-page "http://liballeg.org")
+    (home-page "https://liballeg.org")
     (license license:bsd-3)))
 
 (define-public allegro-5.0
     (license license:bsd-3)))
 
 (define-public allegro-5.0
@@ -828,7 +852,7 @@ etc.")
        ("curl" ,curl)
        ("freetype" ,freetype)
        ("giflib" ,giflib)
        ("curl" ,curl)
        ("freetype" ,freetype)
        ("giflib" ,giflib)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libwebp" ,libwebp)
        ("libx11" ,libx11)
        ("libpng" ,libpng)
        ("libwebp" ,libwebp)
        ("libx11" ,libx11)
@@ -980,7 +1004,7 @@ interface (API).")
        ("sdl-mixer" ,sdl-mixer)
        ("sdl-ttf" ,sdl-ttf)
        ("sdl-gfx" ,sdl-gfx)
        ("sdl-mixer" ,sdl-mixer)
        ("sdl-ttf" ,sdl-ttf)
        ("sdl-gfx" ,sdl-gfx)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libX11" ,libx11)
        ("libsmpeg" ,libsmpeg)
        ("libpng" ,libpng)
        ("libX11" ,libx11)
        ("libsmpeg" ,libsmpeg)
@@ -1123,7 +1147,7 @@ developed mainly for Ren'py.")
     (native-inputs
      `(("python2-cython" ,python2-cython)
        ("xdg-utils" ,xdg-utils)))
     (native-inputs
      `(("python2-cython" ,python2-cython)
        ("xdg-utils" ,xdg-utils)))
-    (home-page "http://www.renpy.org/")
+    (home-page "https://www.renpy.org/")
     (synopsis "Ren'py python module")
     (description "This package contains the shared libraries and Python
 modules of Ren'py.")
     (synopsis "Ren'py python module")
     (description "This package contains the shared libraries and Python
 modules of Ren'py.")
@@ -1311,7 +1335,7 @@ if __name__ == \"__main__\":
        ("xorg-server" ,xorg-server)))
     (outputs
      (list "out" "tutorial" "the-question"))
        ("xorg-server" ,xorg-server)))
     (outputs
      (list "out" "tutorial" "the-question"))
-    (home-page "http://www.renpy.org/")
+    (home-page "https://www.renpy.org/")
     (synopsis "Visual Novel Engine")
     (description "Ren'Py is a visual novel engine that helps you use words,
 images, and sounds to tell interactive stories that run on computers and
     (synopsis "Visual Novel Engine")
     (description "Ren'Py is a visual novel engine that helps you use words,
 images, and sounds to tell interactive stories that run on computers and
@@ -1372,7 +1396,7 @@ painted with a mouse.")
      (origin
        (method git-fetch)
        (uri (git-reference
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/wgois/OIS.git")
+             (url "https://github.com/wgois/OIS")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
@@ -1462,16 +1486,17 @@ of use.")
 (define-public openmw
   (package
     (name "openmw")
 (define-public openmw
   (package
     (name "openmw")
-    (version "0.45.0")
+    (version "0.46.0")
     (source
      (origin
     (source
      (origin
-       (method url-fetch)
-       (uri
-        (string-append "https://github.com/OpenMW/openmw/archive/"
-                       "openmw-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/OpenMW/openmw")
+              (commit (string-append "openmw-" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
        (sha256
         (base32
-         "0r0wgvv1faan8z8lbply8lks4hcnppifjrcz04l5zvq6yiqzjg5n"))))
+         "0rm32zsmxvr6b0jjihfj543skhicbw5kg6shjx312clhlm035w2x"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ; No test target
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ; No test target
@@ -1503,7 +1528,7 @@ games.")
 (define-public godot
   (package
     (name "godot")
 (define-public godot
   (package
     (name "godot")
-    (version "3.0.6")
+    (version "3.2.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1512,35 +1537,49 @@ games.")
               (file-name (git-file-name name version))
               (sha256
                (base32
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
-              (modules '((guix build utils)))
+                "1libz83mbyrkbbsmmi8z2rydv3ls0w9r4vb5v6diqqwn7ka8z804"))
+              (modules '((guix build utils)
+                         (ice-9 ftw)
+                         (srfi srfi-1)))
               (snippet
                '(begin
               (snippet
                '(begin
-                  ;; Drop libraries that we take from Guix.  Note that some
-                  ;; of these may be modified; see "thirdparty/README.md".
+                  ;; Keep only those bundled files we have not (yet) replaced
+                  ;; with Guix versions. Note that some of these may be
+                  ;; modified; see "thirdparty/README.md".
                   (with-directory-excursion "thirdparty"
                   (with-directory-excursion "thirdparty"
-                    (for-each delete-file-recursively
-                              '("freetype"
-                                "libogg"
-                                "libpng"
-                                "libtheora"
-                                "libvorbis"
-                                "libvpx"
-                                "libwebp"
-                                "openssl"
-                                "opus"
-                                "zlib"))
-                    #t)))))
+                    (let* ((preserved-files
+                            '("README.md"
+                              "assimp"
+                              "certs"
+                              "cvtt"
+                              "enet"
+                              "etc2comp"
+                              "fonts"
+                              "glad"
+                              "jpeg-compressor"
+                              "libsimplewebm"
+                              "miniupnpc"
+                              "minizip"
+                              "misc"
+                              "nanosvg"
+                              "pvrtccompressor"
+                              "recastnavigation"
+                              "squish"
+                              "tinyexr"
+                              "vhacd"
+                              "xatlas")))
+                      (for-each delete-file-recursively
+                                (lset-difference string=?
+                                                 (scandir ".")
+                                                 (cons* "." ".." preserved-files)))))
+                  #t))))
     (build-system scons-build-system)
     (arguments
      `(#:scons ,scons-python2
     (build-system scons-build-system)
     (arguments
      `(#:scons ,scons-python2
-       #:scons-flags (list "platform=x11"
-                           ,@(if (string-prefix? "aarch64" (or (%current-target-system)
-                                                               (%current-system)))
-                               `("CCFLAGS=-DNO_THREADS")
-                               '())
+       #:scons-flags (list "platform=x11" "target=release_debug"
                            ;; Avoid using many of the bundled libs.
                            ;; Note: These options can be found in the SConstruct file.
                            ;; Avoid using many of the bundled libs.
                            ;; Note: These options can be found in the SConstruct file.
+                           "builtin_bullet=no"
                            "builtin_freetype=no"
                            "builtin_glew=no"
                            "builtin_libmpdec=no"
                            "builtin_freetype=no"
                            "builtin_glew=no"
                            "builtin_libmpdec=no"
@@ -1550,10 +1589,13 @@ games.")
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
                            "builtin_libvorbis=no"
                            "builtin_libvpx=no"
                            "builtin_libwebp=no"
-                           "builtin_openssl=no"
+                           "builtin_mbedtls=no"
                            "builtin_opus=no"
                            "builtin_opus=no"
-                           "builtin_zlib=no")
-       #:tests? #f ; There are no tests
+                           "builtin_pcre2=no"
+                           "builtin_wslay=no"
+                           "builtin_zlib=no"
+                           "builtin_zstd=no")
+       #:tests? #f                      ; There are no tests
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'scons-use-env
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'scons-use-env
@@ -1566,39 +1608,49 @@ games.")
                  "env_base = Environment(tools=custom_tools)\n"
                  "env_base = Environment(ENV=os.environ)")))
              #t))
                  "env_base = Environment(tools=custom_tools)\n"
                  "env_base = Environment(ENV=os.environ)")))
              #t))
+         ;; Build headless tools, used for packaging games without depending on X.
+         (add-after 'build 'build-headless
+           (lambda* (#:key scons-flags #:allow-other-keys)
+             (apply invoke "scons"
+                    `(,(string-append "-j" (number->string (parallel-job-count)))
+                      "platform=server" ,@(delete "platform=x11" scons-flags)))))
          (replace 'install
          (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
              (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin")))
+                    (headless (assoc-ref outputs "headless"))
+                    (zenity (assoc-ref inputs "zenity")))
+               ;; Strip build info from filenames.
                (with-directory-excursion "bin"
                (with-directory-excursion "bin"
-                 (if (file-exists? "godot.x11.tools.64")
-                     (rename-file "godot.x11.tools.64" "godot")
-                     (rename-file "godot.x11.tools.32" "godot"))
-                 (install-file "godot" bin))
-               #t)))
+                 (for-each
+                  (lambda (file)
+                    (let ((dest (car (string-split (basename file) #\.))))
+                      (rename-file file dest)))
+                  (find-files "." "godot.*\\.x11\\.opt\\.tools.*"))
+                 (install-file "godot" (string-append out "/bin"))
+                 (install-file "godot_server" (string-append headless "/bin")))
+               ;; Tell the editor where to find zenity for OS.alert().
+               (wrap-program (string-append out "/bin/godot")
+                 `("PATH" ":" prefix (,(string-append zenity "/bin")))))
+             #t))
          (add-after 'install 'install-godot-desktop
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
          (add-after 'install 'install-godot-desktop
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (desktop (string-append out "/share/applications"))
-                    (icon-dir (string-append out "/share/pixmaps")))
-               (rename-file "icon.png" "godot.png")
-               (install-file "godot.png" icon-dir)
-               (mkdir-p desktop)
-               (with-output-to-file
-                   (string-append desktop "/godot.desktop")
-                 (lambda _
-                   (format #t
-                           "[Desktop Entry]~@
-                           Name=godot~@
-                           Comment=The godot game engine~@
-                           Exec=~a/bin/godot~@
-                           TryExec=~@*~a/bin/godot~@
-                           Icon=godot~@
-                           Type=Application~%"
-                           out)))
-               #t))))))
+                    (applications (string-append out "/share/applications"))
+                    (icons (string-append out "/share/icons/hicolor")))
+               (mkdir-p applications)
+               (copy-file "misc/dist/linux/org.godotengine.Godot.desktop"
+                          (string-append applications "/godot.desktop"))
+               (for-each (lambda (icon dest)
+                           (mkdir-p (dirname dest))
+                           (copy-file icon dest))
+                         '("icon.png" "icon.svg")
+                         `(,(string-append icons "/256x256/apps/godot.png")
+                           ,(string-append icons "/scalable/apps/godot.svg"))))
+             #t)))))
+    (outputs '("out" "headless"))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("alsa-lib" ,alsa-lib)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("alsa-lib" ,alsa-lib)
+              ("bullet" ,bullet)
               ("freetype" ,freetype)
               ("glew" ,glew)
               ("glu" ,glu)
               ("freetype" ,freetype)
               ("glew" ,glew)
               ("glu" ,glu)
@@ -1611,10 +1663,14 @@ games.")
               ("libxi" ,libxi)
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
               ("libxi" ,libxi)
               ("libxinerama" ,libxinerama)
               ("libxrandr" ,libxrandr)
+              ("mbedtls" ,mbedtls-apache)
               ("mesa" ,mesa)
               ("mesa" ,mesa)
-              ("openssl" ,openssl)
               ("opusfile" ,opusfile)
               ("opusfile" ,opusfile)
-              ("pulseaudio" ,pulseaudio)))
+              ("pcre2" ,pcre2)
+              ("pulseaudio" ,pulseaudio)
+              ("wslay" ,wslay)
+              ("zenity" ,zenity)
+              ("zstd" ,zstd "lib")))
     (home-page "https://godotengine.org/")
     (synopsis "Advanced 2D and 3D game engine")
     (description
     (home-page "https://godotengine.org/")
     (synopsis "Advanced 2D and 3D game engine")
     (description
@@ -1663,7 +1719,7 @@ scripted in a Python-like language.")
               ("libxft" ,libxft)
               ("libxinerama" ,libxinerama)
               ("libfontconfig" ,fontconfig)
               ("libxft" ,libxft)
               ("libxinerama" ,libxinerama)
               ("libfontconfig" ,fontconfig)
-              ("libjpeg" ,libjpeg)
+              ("libjpeg" ,libjpeg-turbo)
               ("libpng" ,libpng)
               ("fltk" ,fltk)
               ("zlib" ,zlib)))
               ("libpng" ,libpng)
               ("fltk" ,fltk)
               ("zlib" ,zlib)))
@@ -1679,20 +1735,64 @@ a 2D editor view.")
 (define-public guile-chickadee
   (package
     (name "guile-chickadee")
 (define-public guile-chickadee
   (package
     (name "guile-chickadee")
-    (version "0.4.0")
+    (version "0.5.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://files.dthompson.us/chickadee/"
                                   "chickadee-" version ".tar.gz"))
               (sha256
                (base32
     (source (origin
               (method url-fetch)
               (uri (string-append "https://files.dthompson.us/chickadee/"
                                   "chickadee-" version ".tar.gz"))
               (sha256
                (base32
-                "1fdicsgls5cp0yffcm5vjmav67gv9bxhz1s3jvdvinspxb485x7l"))))
+                "0y3s0p4zyghys48sayfhcbmxmflh8hwawnx5an2jlb3x84yr0dsx"))))
     (build-system gnu-build-system)
     (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags '("GUILE_AUTO_COMPILE=0")))
     (propagated-inputs
      `(("guile-opengl" ,guile-opengl)
        ("guile-sdl2" ,guile-sdl2)))
     (inputs
     (propagated-inputs
      `(("guile-opengl" ,guile-opengl)
        ("guile-sdl2" ,guile-sdl2)))
     (inputs
-     `(("guile" ,guile-2.2)))
+     `(("guile" ,guile-2.2)
+       ("libvorbis" ,libvorbis)
+       ("mpg123" ,mpg123)
+       ("openal" ,openal)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("texinfo" ,texinfo)))
+    (home-page "https://dthompson.us/projects/chickadee.html")
+    (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
+    (description "Chickadee is a game development toolkit for Guile Scheme
+built on top of SDL2 and OpenGL.  Chickadee aims to provide all the features
+that parenthetically inclined game developers need to make 2D (and eventually
+3D) games in Scheme, such as:
+
+@enumerate
+@item extensible, fixed-timestep game loop
+@item OpenGL-based rendering engine
+@item keyboard, mouse, controller input
+@item REPL-driven development model
+@end enumerate\n")
+    (license license:gpl3+)))
+
+(define-public guile3.0-chickadee
+  (package
+    (inherit guile-chickadee)
+    (name "guile3.0-chickadee")
+    (version "0.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://files.dthompson.us/chickadee/"
+                                  "chickadee-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0y3s0p4zyghys48sayfhcbmxmflh8hwawnx5an2jlb3x84yr0dsx"))))
+    (build-system gnu-build-system)
+    (propagated-inputs
+     `(("guile-opengl" ,guile3.0-opengl)
+       ("guile-sdl2" ,guile3.0-sdl2)))
+    (inputs
+     `(("guile" ,guile-3.0)
+       ("libvorbis" ,libvorbis)
+       ("mpg123" ,mpg123)
+       ("openal" ,openal)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("texinfo" ,texinfo)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("texinfo" ,texinfo)))
@@ -1826,7 +1926,7 @@ of the others")
        (origin
          (method git-fetch)
          (uri (git-reference
        (origin
          (method git-fetch)
          (uri (git-reference
-               (url "https://github.com/ioquake/ioq3.git")
+               (url "https://github.com/ioquake/ioq3")
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
@@ -1835,7 +1935,7 @@ of the others")
       (build-system gnu-build-system)
       (inputs
        `(("sdl2" ,sdl2)
       (build-system gnu-build-system)
       (inputs
        `(("sdl2" ,sdl2)
-         ("libjpeg" ,libjpeg)
+         ("libjpeg" ,libjpeg-turbo)
          ("openal" ,openal)
          ("curl" ,curl)
          ("opusfile" ,opusfile)
          ("openal" ,openal)
          ("curl" ,curl)
          ("opusfile" ,opusfile)
@@ -1899,6 +1999,43 @@ hardware from multiple vendors without requiring that applications have
 specific knowledge of the hardware they are targeting.")
     (license license:bsd-3)))
 
 specific knowledge of the hardware they are targeting.")
     (license license:bsd-3)))
 
+(define-public flatzebra
+  (package
+    (name "flatzebra")
+    (version "0.1.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://perso.b2b2c.ca/~sarrazip/dev/"
+                           "flatzebra-" version ".tar.gz"))
+       (sha256
+        (base32 "1x2dy41c8vrq62bn03b82fpmk7x4rzd7qqiwvq0mgcl5rmasc2c8"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-sdl-config
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; XXX: sdl-config in sdl-union is a link to sdl-config from
+             ;; plain sdl package.  As a consequence, the prefix is wrong.
+             ;; Force correct one with "--prefix" argument.
+             (let ((sdl-union (assoc-ref inputs "sdl")))
+               (setenv "SDL_CONFIG"
+                       (string-append sdl-union
+                                      "/bin/sdl-config --prefix="
+                                      sdl-union)))
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))))
+    (home-page "http://perso.b2b2c.ca/~sarrazip/dev/burgerspace.html")
+    (synopsis "Generic game engine for 2D double-buffering animation")
+    (description
+     "Flatzebra is a simple, generic C++ game engine library supporting 2D
+double-buffering.")
+    (license license:gpl2+)))
+
 (define-public fna
   (package
     (name "fna")
 (define-public fna
   (package
     (name "fna")
@@ -1907,7 +2044,7 @@ specific knowledge of the hardware they are targeting.")
      (origin
        (method git-fetch)
        (uri (git-reference
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/FNA-XNA/FNA.git")
+             (url "https://github.com/FNA-XNA/FNA")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
@@ -1959,7 +2096,7 @@ focuses solely on developing a fully accurate XNA4 runtime for the desktop.")
      (origin
        (method git-fetch)
        (uri (git-reference
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/danfis/libccd.git")
+             (url "https://github.com/danfis/libccd")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
@@ -1983,14 +2120,14 @@ a.k.a. XenoCollide) as described in Game Programming Gems 7.")
 (define-public ode
   (package
     (name "ode")
 (define-public ode
   (package
     (name "ode")
-    (version "0.16")
+    (version "0.16.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://bitbucket.org/odedevs/ode/downloads/"
                            "ode-" version ".tar.gz"))
        (sha256
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://bitbucket.org/odedevs/ode/downloads/"
                            "ode-" version ".tar.gz"))
        (sha256
-        (base32 "09xzrarxwxcf6rdv5jsjfjh454jnn29dpcw3wh6ic50kkipvg8sb"))
+        (base32 "08hgh4gqdk77jcw8b7gq2mwsfg4a5v5y0j7g42bxiqhmn3ffnsmj"))
        (modules '((guix build utils)))
        (snippet
         '(begin
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -2010,7 +2147,7 @@ a.k.a. XenoCollide) as described in Game Programming Gems 7.")
      `(("glu" ,glu)
        ("libccd" ,libccd)
        ("mesa" ,mesa)))
      `(("glu" ,glu)
        ("libccd" ,libccd)
        ("mesa" ,mesa)))
-    (home-page "http://www.ode.org/")
+    (home-page "https://www.ode.org/")
     (synopsis "High performance library for simulating rigid body dynamics")
     (description "ODE is a high performance library for simulating
 rigid body dynamics.  It is fully featured, stable, mature and
     (synopsis "High performance library for simulating rigid body dynamics")
     (description "ODE is a high performance library for simulating
 rigid body dynamics.  It is fully featured, stable, mature and
@@ -2021,3 +2158,322 @@ environments and virtual creatures.  It is currently used in many
 computer games, 3D authoring tools and simulation tools.")
     ;; Software is dual-licensed.
     (license (list license:lgpl2.1+ license:expat))))
 computer games, 3D authoring tools and simulation tools.")
     ;; Software is dual-licensed.
     (license (list license:lgpl2.1+ license:expat))))
+
+(define-public chipmunk
+  (package
+    (name "chipmunk")
+    (version "7.0.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/slembcke/Chipmunk2D")
+             (commit (string-append "Chipmunk-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qmkn01g06p3rnhmbyffmjns6wj5vhgf9cscigk3wzxcpwv1hyxb"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;no test
+       #:configure-flags '("-DBUILD_STATIC=OFF"
+                           "-DBUILD_DEMOS=OFF")))
+    (inputs
+     `(("freeglut" ,freeglut)
+       ("libxmu" ,libxmu)
+       ("libxrandr" ,libxrandr)))
+    (home-page "https://chipmunk-physics.net/")
+    (synopsis "Fast and lightweight 2D game physics library")
+    (description "Chipmunk is a simple, lightweight, fast and portable 2D
+rigid body physics library written in C.")
+    (license license:expat)))
+
+(define-public libtcod
+  (package
+    (name "libtcod")
+    (version "1.15.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/libtcod/libtcod")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0pzr8ajmbqvh43ldjajx962xirj3rf8ayh344p6mqlrmb8gxrfr5"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          (delete-file-recursively "src/vendor/utf8proc")
+                          (delete-file-recursively "src/vendor/zlib")
+                          (delete-file "src/vendor/stb_truetype.h")
+                          (delete-file "src/vendor/stb_sprintf.h")
+                          (delete-file "src/vendor/lodepng.cpp")
+                          (delete-file "src/vendor/lodepng.h")
+
+                          (substitute* "buildsys/autotools/sources.am"
+                            (("\\.\\./\\.\\./src/vendor/lodepng\\.cpp \\\\\n") "")
+                            (("\\.\\./\\.\\./src/vendor/stb\\.c \\\\")
+                             "../../src/vendor/stb.c")
+                            (("\\.\\./\\.\\./src/vendor/utf8proc/utf8proc\\.c") ""))
+
+                          (substitute* "src/libtcod/sys_sdl_img_png.cpp"
+                            (("\\.\\./vendor/") ""))
+
+                          (substitute* '("src/libtcod/color/canvas.cpp"
+                                         "src/libtcod/sys_sdl_img_png.cpp"
+                                         "src/libtcod/tileset/truetype.cpp"
+                                         "src/libtcod/tileset/tilesheet.cpp")
+                            (("\\.\\./\\.\\./vendor/") ""))
+
+                          (substitute* "src/libtcod/console/printing.cpp"
+                            (("\\.\\./\\.\\./vendor/utf8proc/") ""))
+                          #t))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--with-gnu-ld"
+                           "LIBS=-lutf8proc -llodepng")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'change-to-build-dir
+           (lambda _
+             (chdir "buildsys/autotools")
+             (patch-shebang "get_version.py")
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("python" ,python)
+       ("pkg-config" ,pkg-config)
+       ("stb-sprintf" ,stb-sprintf)
+       ("stb-truetype" ,stb-truetype)))
+    (inputs
+     `(("lodepng" ,lodepng)
+       ("sdl2" ,sdl2)
+       ("utf8proc" ,utf8proc)
+       ("zlib" ,zlib)))
+    (home-page "https://github.com/libtcod/libtcod")
+    (synopsis "Library specifically designed for writing roguelikes")
+    (description
+     "libtcod is a fast, portable and uncomplicated API for roguelike
+developers providing an advanced true color console, input, and lots of other
+utilities frequently used in roguelikes.")
+    (license license:bsd-3)))
+
+(define-public warsow-qfusion
+  ;; As of 2020-04-09, the latest stable version 2.1.0 is deprecated.
+  ;; The 2.5 beta as published on the homepage is commit
+  ;; c4de15df559410aff0ca6643724e24cddb0ecbbd
+  (let ((commit "c4de15df559410aff0ca6643724e24cddb0ecbbd"))
+    (package
+      (name "warsow-qfusion")
+      (version (git-version "2.5" "1" commit)) ; 2.5-beta
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/Warsow/qfusion/")
+                      (commit commit)
+                      (recursive? #t)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0xv2yycr43p3xmq7lm6j6zb3cpcr6w00x7qg918faq0mw9j7v48g"))
+                ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46
+                (patches (search-patches "warsow-qfusion-fix-bool-return-type.patch"))
+                (modules '((guix build utils)))
+                (snippet '(begin
+                            (delete-file-recursively "platforms")
+                            (delete-file-recursively "debian")
+                            (delete-file-recursively "libsrcs")
+                            #t))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f                    ; No tests.
+         #:configure-flags '("-DQFUSION_GAME=Warsow")
+         #:modules
+         ((guix build utils)
+          (guix build cmake-build-system)
+          (ice-9 match))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'change-to-build-dir
+             (lambda _
+               (chdir "source")
+               #t))
+           (add-after 'install 'really-install
+             (lambda* (#:key outputs system #:allow-other-keys)
+               (let ((arch (match system
+                             ("x86_64-linux" "x86_64")
+                             ("i686-linux" "i386")))
+                     (out (assoc-ref outputs "out")))
+                 (install-file (string-append "../source/build/basewsw/libgame_"
+                                              arch ".so")
+                               (string-append out "/lib/"))
+                 (install-file (string-append "../source/build/libui_" arch ".so")
+                               (string-append out "/lib/"))
+                 (for-each
+                  (lambda (file)
+                    (install-file file (string-append out "/bin/")))
+                  (append (find-files "../source/build" "warsow")
+                          (find-files "../source/build" "wsw_server."))))
+               #t)))))
+      (inputs
+       `(("alsa-lib" ,alsa-lib)
+         ("curl" ,curl)
+         ("freetype" ,freetype)
+         ("ffmpeg" ,ffmpeg)
+         ("libjpeg" ,libjpeg-turbo)
+         ("libogg" ,libogg)
+         ("libpng" ,libpng)
+         ("libtheora" ,libtheora)
+         ("libvorbis" ,libvorbis)
+         ("mesa" ,mesa)
+         ("openal" ,openal)
+         ("pulseaudio" ,pulseaudio)
+         ("qtbase" ,qtbase)
+         ("qtdeclarative" ,qtdeclarative)
+         ("sdl2" ,sdl2)
+         ("uuid.h" ,util-linux "lib")
+         ("zlib" ,zlib)))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)))
+      (home-page "https://github.com/Warsow/qfusion")
+      (supported-systems '("i686-linux" "x86_64-linux"))
+      (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine")
+      (description
+       "This package contains the game engine of Warsow, a first-person
+shooter video game.  The engine is based on qfusion, the id Tech 2 derived
+game engine.  id Tech 2 is the engine originally behind Quake 2.")
+      (license license:gpl2+))))
+
+(define-public dhewm3
+  (package
+    (name "dhewm3")
+    (version "1.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/dhewm/dhewm3/releases/download/"
+                    version "/dhewm3-" version "-src.tar.xz"))
+              (sha256
+               (base32
+                "0dmd1876az5q8gbjrd1jk8zidz11ydj607z3m8m5kvw2yj136jzv"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ; No tests.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'change-to-build-dir
+           (lambda _
+             (chdir "neo")
+             #t)))))
+    (inputs
+     `(("curl" ,curl)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libogg" ,libogg)
+       ("libvorbis" ,libvorbis)
+       ("libx11" ,libx11)
+       ("openal" ,openal)
+       ("sdl2" ,sdl2)
+       ("zlib" ,zlib)))
+    (home-page "https://dhewm3.org/")
+    (synopsis "Port of the original Doom 3 engine")
+    (description
+     "@command{dhewm3} is a source port of the original Doom 3 engine (not
+Doom 3: BFG Edition), also known as id Tech 4.  Compared to the original
+version of the Doom 3 engine, dhewm3 has many bugfixes, supports EAX-like
+sound effects on all operating systems and hardware (via OpenAL Softs EFX
+support), has much better support for widescreen resolutions and has 64bit
+support.")
+    (license license:gpl3)))
+
+(define-public tesseract-engine
+  (let ((svn-revision 2411))
+    (package
+      (name "tesseract-engine")
+      (version (string-append "20200615-" (number->string svn-revision)))
+      (source
+       (origin
+         (method svn-fetch)
+         (uri (svn-reference
+               (url "svn://svn.tuxfamily.org/svnroot/tesseract/main")
+               (revision svn-revision)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1av9jhl2ivbl7wfszyhyna84llvh1z2d8khkmadm8d105addj10q"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             (for-each delete-file-recursively
+                       '("bin" "bin64"
+                         ;; Remove "media" since some files such as
+                         ;; media/sound/game/soundsnap/info.txt refer to a
+                         ;; non-commercial license.
+                         "media"
+                         "server.bat"
+                         "tesseract.bat"
+                         "src/lib"
+                         "src/lib64"))
+             #t))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:make-flags (list "CC=gcc")
+         #:tests? #f                    ; No tests.
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-after 'unpack 'cd-src
+             (lambda _ (chdir "src") #t))
+           (add-before 'build 'fix-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (setenv "CPATH"
+                       (string-append (assoc-ref inputs "sdl2-union")
+                                      "/include/SDL2:"
+                                      (or (getenv "CPATH") "")))
+               #t))
+           (add-after 'install 'really-install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (share (string-append out "/share/tesseract"))
+                      (bin (string-append out "/bin/tesseract"))
+                      (client (string-append out "/bin/tesseract-client")))
+                 (chdir "..")           ; Back to root.
+                 (for-each
+                  (lambda (dir)
+                    (mkdir-p (string-append share "/" dir))
+                    (copy-recursively dir (string-append share "/" dir)))
+                  '("config"))
+                 (mkdir-p (string-append out "/bin/"))
+                 (copy-file "bin_unix/native_client" client)
+                 (copy-file "bin_unix/native_server"
+                            (string-append out "/bin/tesseract-server"))
+                 (call-with-output-file bin
+                   (lambda (p)
+                     (format p "#!~a
+TESS_DATA=~a
+TESS_BIN=~a
+TESS_OPTIONS=\"-u$HOME/.tesseract\"
+cd \"$TESS_DATA\"
+exec \"$TESS_BIN\" \"$TESS_OPTIONS\" \"$@\""
+                             (which "bash")
+                             share
+                             client)))
+                 (chmod bin #o755)
+                 (install-file "src/readme_tesseract.txt"
+                               (string-append out "/share/licenses/tesseract/LICENSE")))
+               #t)))))
+      (inputs
+       `(("sdl2-union" ,(sdl-union (list sdl2 sdl2-mixer sdl2-image)))
+         ("zlib" ,zlib)
+         ("libpng" ,libpng)
+         ("libgl" ,mesa)))
+      (home-page "http://tesseract.gg/")
+      (synopsis "First-person shooter engine with map editing, instagib, DM and CTF")
+      (description "This package contains the game engine of Tesseract, a
+first-person shooter focused on cooperative in-game map editing.
+
+The engine is derived from @emph{Cube 2: Sauerbraten} technology but with
+upgraded modern rendering techniques.  The new rendering features include
+fully dynamic omnidirectional shadows, global illumination, HDR lighting,
+deferred shading, morphological / temporal / multisample anti-aliasing, and
+much more.")
+      (license license:zlib))))