1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
7 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
9 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
11 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
13 ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
14 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
15 ;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com>
16 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages game-development)
35 #:use-module (srfi srfi-1)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix git-download)
40 #:use-module (guix svn-download)
41 #:use-module (guix utils)
42 #:use-module (guix build-system cmake)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system python)
45 #:use-module (guix build-system scons)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages audio)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages boost)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages curl)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages fltk)
55 #:use-module (gnu packages fonts)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages freedesktop)
58 #:use-module (gnu packages fribidi)
59 #:use-module (gnu packages dbm)
60 #:use-module (gnu packages gl)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gnome)
63 #:use-module (gnu packages gnunet)
64 #:use-module (gnu packages graphics)
65 #:use-module (gnu packages graphviz)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages guile)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages lua)
71 #:use-module (gnu packages m4)
72 #:use-module (gnu packages mp3)
73 #:use-module (gnu packages multiprecision)
74 #:use-module (gnu packages music)
75 #:use-module (gnu packages ncurses)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages pulseaudio)
78 #:use-module (gnu packages python)
79 #:use-module (gnu packages python-xyz)
80 #:use-module (gnu packages qt)
81 #:use-module (gnu packages sdl)
82 #:use-module (gnu packages stb)
83 #:use-module (gnu packages texinfo)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages video)
86 #:use-module (gnu packages xdisorg)
87 #:use-module (gnu packages xiph)
88 #:use-module (gnu packages xml)
89 #:use-module (gnu packages xorg))
98 (url "https://github.com/bulletphysics/bullet3/")
100 (file-name (git-file-name name version))
103 "00qkif245yj7n2f262bgjaxv1bz3wmmcsfnjgy3qpzvlpzpns5z8"))
104 (modules '((guix build utils)))
107 (for-each delete-file (find-files "build3" "premake*"))
108 (with-directory-excursion "examples/ThirdPartyLibs"
109 (for-each delete-file-recursively
110 '("Gwen" "clsocket" "enet" "glad" "imgui"
111 "lua-5.2.3" "midi" "minizip" "openvr"
112 "optionalX11" "serial" "zlib")))
113 ;; These need files from ThirdPartyLibs
114 (substitute* "Extras/CMakeLists.txt"
115 (("BulletRobotics") "")
117 ;; Tests fail on linking, cannot find -lBussIK
118 (substitute* "test/CMakeLists.txt"
119 ((" InverseDynamics")
120 "../examples/ThirdPartyLibs/BussIK InverseDynamics"))
121 ; (("SharedMemory") ""))
123 (build-system cmake-build-system)
125 '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
126 "-DBUILD_CPU_DEMOS=OFF"
127 "-DBUILD_OPENGL3_DEMOS=OFF"
128 "-DBUILD_BULLET2_DEMOS=OFF"
129 (string-append "-DCMAKE_CXX_FLAGS=-fPIC "
130 (or (getenv "CXXFLAGS") "")))
132 (modify-phases %standard-phases
133 (add-after 'unpack 'remove-failing-tests
134 ;; These tests fail specifically after removing 3rd party code
136 (substitute* "test/SharedMemory/CMakeLists.txt"
137 (("ADD_TEST") "# ADD_TEST"))
138 (substitute* "test/InverseDynamics/CMakeLists.txt"
139 (("ADD_TEST\\(Test_BulletInverseForward")
140 "# ADD_TEST(Test_BulletInverseForward"))
146 (home-page "https://pybullet.org/wordpress/")
147 (synopsis "3D physics engine library")
149 "Bullet is a physics engine library usable for collision detection. It
150 is used in some video games and movies.")
151 (license license:zlib)))
153 (define-public deutex
159 (uri (string-append "https://github.com/Doom-Utils/" name
160 "/releases/download/v" version "/"
161 name "-" version ".tar.xz"))
164 "1rj3w4xa0n4jixy4j7p6gbclylbgxvhdnji7xnkydrqii9rxnbp4"))))
165 (build-system gnu-build-system)
166 (native-inputs `(("asciidoc" ,asciidoc)))
167 (home-page "https://github.com/Doom-Utils/deutex")
168 (synopsis "WAD file composer for Doom and related games")
170 "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be
171 used to extract the lumps of a wad and save them as individual files.
172 Conversely, it can also build a wad from separate files. When extracting a
173 lump to a file, it does not just copy the raw data, it converts it to an
174 appropriate format (such as PPM for graphics, Sun audio for samples, etc.).
175 Conversely, when it reads files for inclusion in pwads, it does the necessary
176 conversions (for example, from PPM to Doom picture format). In addition,
177 DeuTex has functions such as merging wads, etc.")
178 (license license:gpl2+)))
180 (define-public grfcodec
186 (uri (string-append "http://binaries.openttd.org/extra/"
187 name "/" version "/" name "-" version
191 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
192 (build-system gnu-build-system)
194 '(#:tests? #f ; no check target
196 (modify-phases %standard-phases
197 (delete 'configure) ; no configure script
198 (replace 'install ; no install target
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let* ((out (assoc-ref outputs "out"))
201 (bin (string-append out "/bin"))
202 (doc (string-append out "/share/doc"))
203 (man (string-append out "/share/man/man1")))
204 (for-each (lambda (file)
205 (install-file file bin))
206 '("grfcodec" "grfid" "grfstrip" "nforenum"))
207 (install-file "COPYING" doc)
208 (with-directory-excursion "docs"
209 (for-each (lambda (file)
210 (install-file (string-append file ".txt") doc))
211 '("auto_correct" "commands" "grf" "grfcodec" "grftut"
212 "readme" "readme.rpn"))
213 (for-each (lambda (file)
214 (install-file file man))
215 (find-files "." "\\.1"))))
221 (synopsis "GRF development tools")
223 "The @dfn{Graphics Resource File} (GRF) development tools are a set of
224 tools for developing (New)GRFs. It includes a number of smaller programs, each
225 with a specific task:
227 @item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
228 @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
229 @item @code{grfstrip} strips all sprites from a GRF.
230 @item @code{nforenum} checks NFO code for errors, making corrections when
233 (home-page "http://dev.openttdcoop.org/projects/grfcodec")
234 ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
235 ;; NFORenum is under the GPL2+.
236 ;; The MD5 implementation contained in GRFID is under the zlib license.
237 (license (list license:gpl2 license:gpl2+ license:zlib))))
239 (define-public catcodec
246 (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
247 version "/catcodec-" version "-source.tar.xz"))
250 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
251 (build-system gnu-build-system)
253 `(#:tests? #f ; no tests
254 #:make-flags (list (string-append "prefix=" %output))
255 #:phases (modify-phases %standard-phases
256 (delete 'configure))))
257 (home-page "http://dev.openttdcoop.org/projects/catcodec")
258 (synopsis "Encode/decode OpenTTD sounds")
259 (description "catcodec encodes and decodes sounds for OpenTTD. These
260 sounds are not much more than some metadata (description and filename) and raw
262 (license license:gpl2)))
264 (define-public gzochi
270 (uri (string-append "mirror://savannah/gzochi/gzochi-"
274 "0h8yvk7154kd8zdfa9nqy73blrjq2x19kv305jcnwlmm09vvss59"))))
275 (build-system gnu-build-system)
277 '(#:phases (modify-phases %standard-phases
278 (add-before 'build 'no-Werror
280 ;; Don't abort builds due to things like GLib
281 ;; deprecation warnings.
282 (substitute* (find-files "." "^Makefile\\.in$")
285 (native-inputs `(("pkgconfig" ,pkg-config)))
286 (inputs `(("bdb" ,bdb)
289 ("libmicrohttpd" ,libmicrohttpd)
293 (home-page "https://www.nongnu.org/gzochi/")
294 (synopsis "Scalable middleware for multiplayer games")
296 "gzochi is a framework for developing massively multiplayer online games.
297 A server container provides services to deployed games, which are written in
298 Guile Scheme, that abstract and simplify some of the most challenging and
299 error-prone aspects of online game development: Concurrency, data persistence,
300 and network communications. A very thin client library can be embedded to
301 provide connectivity for client applications written in any language.")
302 (license license:gpl3+)))
311 (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
312 version "/nml-" version ".tar.gz"))
315 "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53"))))
316 (build-system python-build-system)
318 `(("python-pillow" ,python-pillow)
319 ("python-ply" ,python-ply)))
320 (home-page "https://dev.openttdcoop.org/projects/nml")
321 (synopsis "NML compiler")
323 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
324 compiling NML files (along with their associated language, sound and graphic
325 files) into @file{.grf} and/or @file{.nfo} files.")
326 (license license:gpl2+)))
328 (define-public python-sge-pygame
330 (name "python-sge-pygame")
335 (uri (string-append "mirror://savannah/stellarengine/"
336 (version-major+minor version) "/sge-pygame-"
338 (file-name (string-append name "-" version ".tar.gz"))
341 "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
342 (build-system python-build-system)
344 `(("python-pygame" ,python-pygame)
345 ("python-six" ,python-six)
346 ("python-uniseg" ,python-uniseg)))
347 (home-page "http://stellarengine.nongnu.org")
348 (synopsis "2D game engine for Python")
350 "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
351 general-purpose 2D game engine. It takes care of several details for you so
352 you can focus on the game itself. This makes more rapid game development
353 possible, and it also makes the SGE easy to learn.")
354 (license license:lgpl3+)))
356 (define-public python2-sge-pygame
357 (package-with-python2 python-sge-pygame))
359 (define-public python-tmx
366 (uri (string-append "mirror://savannah/python-tmx/"
367 (version-major+minor version) "/tmx-"
371 "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0"))))
372 (build-system python-build-system)
374 `(("python-six" ,python-six)))
375 (home-page "http://python-tmx.nongnu.org")
376 (synopsis "Python library for the @code{Tiled} TMX format")
378 "Python TMX reads and writes the @code{Tiled} TMX format in a simple way.
379 This is useful for map editors or generic level editors, and it's also useful
380 for using a map editor or generic level editor like Tiled to edit your game's
382 (license (list license:asl2.0
383 ;; Documentation (only available in the source tarball) is
384 ;; under the CC0 license.
387 (define-public python2-tmx
388 (let ((python2-tmx (package-with-python2 python-tmx)))
390 (inherit python2-tmx)
392 `(("python2-pathlib" ,python2-pathlib)
393 ,@(package-propagated-inputs python2-tmx))))))
395 (define-public python-xsge
398 (version "2018.02.26")
401 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
405 "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40"))))
406 (build-system python-build-system)
409 (modify-phases %standard-phases
410 ;; xSGE's setup.py script does not support one of the Python build
411 ;; system's default flags, "--single-version-externally-managed".
413 (lambda* (#:key outputs #:allow-other-keys)
414 (invoke "python" "setup.py" "install"
415 (string-append "--prefix=" (assoc-ref outputs "out"))
417 #:tests? #f)) ; no check target
419 `(("python-sge-pygame" ,python-sge-pygame)
420 ("python-pygame" ,python-pygame)
421 ("python-six" ,python-six)
422 ("python-tmx" ,python-tmx)))
423 (home-page "http://xsge.nongnu.org")
424 (synopsis "Extensions for the SGE Game Engine")
426 "xSGE is a collection of modules that make doing certain tasks with the SGE
427 Game Engine easier. In addition to SGE's conveniences, the user has access to a
428 GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
430 (license license:gpl3+)))
432 (define-public python2-xsge
433 (package-with-python2 python-xsge))
442 (url "https://github.com/bjorn/tiled.git")
443 (commit (string-append "v" version))))
444 (file-name (git-file-name name version))
447 "04v738h298pvcwb70mwd1r2yj7578f6gkfzs0165j9fqy7avwm18"))))
448 (build-system gnu-build-system)
454 `(("qttools" ,qttools)))
457 (modify-phases %standard-phases
459 (lambda* (#:key inputs outputs #:allow-other-keys)
460 (substitute* "translations/translations.pro"
462 (string-append "LRELEASE = "
463 (assoc-ref inputs "qttools")
465 (let ((out (assoc-ref outputs "out")))
467 (string-append "PREFIX=" out))))))))
468 (home-page "http://www.mapeditor.org/")
469 (synopsis "Tile map editor")
471 "Tiled is a general purpose tile map editor. It is meant to be used for
472 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
475 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
477 (license license:gpl2+)))
485 ;; Do not fetch the archives from
486 ;; http://mirror0.sfml-dev.org/files/ because files there seem
487 ;; to be changed in place.
489 (url "https://github.com/SFML/SFML.git")
491 (file-name (git-file-name name version))
494 "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay"))
495 (modules '((guix build utils)))
498 ;; Ensure system libraries are used.
499 (delete-file-recursively "extlibs")
501 (build-system cmake-build-system)
504 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE"
505 "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig")
506 #:tests? #f)) ; no tests
508 `(("pkg-config" ,pkg-config)))
513 ("xcb-util-image" ,xcb-util-image)
514 ("libxrandr" ,libxrandr)
517 ("libsndfile" ,libsndfile)
518 ("stb-image" ,stb-image)
519 ("stb-image-write" ,stb-image-write)))
521 ;; In Requires.private of pkg-config files.
523 ("freetype" ,freetype)
524 ("libvorbis" ,libvorbis)
526 (home-page "https://www.sfml-dev.org")
527 (synopsis "Simple and Fast Multimedia Library")
529 "SFML provides a simple interface to the various computer components,
530 to ease the development of games and multimedia applications. It is composed
531 of five modules: system, window, graphics, audio and network.")
532 (license license:zlib)))
540 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
543 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
544 (build-system gnu-build-system)
546 `(#:phases (modify-phases %standard-phases
547 (delete 'configure) ; no configure script
548 (add-before 'build 'patch-makefile
549 (lambda* (#:key outputs #:allow-other-keys)
550 (let ((out (assoc-ref outputs "out")))
551 (substitute* "Makefile"
552 (("\\$\\(DESTDIR\\)/usr") out))
553 (substitute* "main.cpp"
555 (string-append out "/share")))
557 #:tests? #f)) ; no tests
559 `(("pkg-config" ,pkg-config)
560 ("desktop-file-utils" ,desktop-file-utils)))
564 (synopsis "Simple sound effect generator")
565 (description "Sfxr is a tool for quickly generating simple sound effects.
566 Originally created for use in video game prototypes, it can generate random
567 sounds from presets such as \"explosion\" or \"powerup\".")
568 (home-page "http://www.drpetter.se/project_sfxr.html")
569 (license license:expat)))
571 (define-public physfs
578 "https://icculus.org/physfs/downloads/physfs-"
580 (file-name (string-append name "-" version ".tar.gz"))
583 "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h"))))
584 (build-system cmake-build-system)
586 '(#:tests? #f ; no check target
587 #:phases (modify-phases %standard-phases
588 (add-after 'unpack 'patch-CMakeLists.txt
590 (substitute* "CMakeLists.txt"
591 ;; XXX: For some reason CMakeLists.txt disables
592 ;; RUNPATH manipulation when the compiler is GCC.
593 (("CMAKE_COMPILER_IS_GNUCC") "FALSE"))
598 `(("doxygen" ,doxygen)))
599 (home-page "https://icculus.org/physfs")
600 (synopsis "File system abstraction library")
602 "PhysicsFS is a library to provide abstract access to various archives.
603 It is intended for use in video games. For security, no file writing done
604 through the PhysicsFS API can leave a defined @emph{write directory}. For
605 file reading, a @emph{search path} with archives and directories is defined,
606 and it becomes a single, transparent hierarchical file system. So archive
607 files can be accessed in the same way as you access files directly on a disk,
608 and it makes it easy to ship a new archive that will override a previous
609 archive on a per-file basis.")
610 (license license:zlib)))
618 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
619 "love-" version "-linux-src.tar.gz"))
622 "1pkwiszmjs0xrwk0wqbc5cp9108b1y8gwsid0gqk1s0x09q9lpmw"))))
623 (build-system gnu-build-system)
625 `(("pkg-config" ,pkg-config)))
628 ("freetype" ,freetype)
629 ("libmodplug" ,libmodplug)
630 ("libtheora" ,libtheora)
631 ("libvorbis" ,libvorbis)
639 (synopsis "2D game framework for Lua")
640 (description "LÖVE is a framework for making 2D games in the Lua
641 programming language.")
642 (home-page "https://love2d.org/")
643 (license license:zlib)))
645 (define-public allegro-4
651 (uri (string-append "https://github.com/liballeg/allegro5/"
652 "releases/download/" version "/allegro-"
656 "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y"))))
657 (build-system cmake-build-system)
660 (modify-phases %standard-phases
661 (add-after 'unpack 'patch-build-system
663 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
664 ;; via a command line option doesn't work because it is
665 ;; unconditionally clobbered in the build script.
666 (substitute* '("CMakeLists.txt")
667 (("ADDON_LINKAGE STATIC")
668 "ADDON_LINKAGE SHARED"))
673 ("libvorbis" ,libvorbis)
676 (synopsis "Game programming library")
677 (description "Allegro is a library mainly aimed at video game and
678 multimedia programming. It handles common, low-level tasks such as creating
679 windows, accepting user input, loading data, drawing images, playing sounds,
681 (home-page "http://liballeg.org")
682 (license license:giftware)))
684 (define-public allegro
690 (uri (string-append "https://github.com/liballeg/allegro5/releases"
691 "/download/" version "/allegro-"
693 (patches (search-patches
694 "allegro-mesa-18.2.5-and-later.patch"))
697 "1w9a5yqi5q03b2qvmx5ff90paz0xbr9cy7i7f0xiqa65ava66q9l"))))
698 (build-system cmake-build-system)
699 (arguments `(#:tests? #f)) ; there are no tests
701 ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
703 ("freetype" ,freetype)
708 ("libtheora" ,libtheora)
709 ("libvorbis" ,libvorbis)
710 ("libxcursor" ,libxcursor)
711 ("libxinerama" ,libxinerama)
712 ("libxrandr" ,libxrandr)
718 `(("pkg-config" ,pkg-config)))
719 (synopsis "Game programming library")
720 (description "Allegro is a library mainly aimed at video game and
721 multimedia programming. It handles common, low-level tasks such as creating
722 windows, accepting user input, loading data, drawing images, playing sounds,
724 (home-page "http://liballeg.org")
725 (license license:bsd-3)))
727 (define-public allegro-5.0
728 (package (inherit allegro)
733 (uri (string-append "https://github.com/liballeg/allegro5/releases"
734 "/download/" version "/allegro-"
735 (if (equal? "0" (string-take-right version 1))
736 (string-drop-right version 2)
739 (patches (search-patches
740 "allegro-mesa-18.2.5-and-later.patch"))
743 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
745 (define-public aseprite
748 (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
749 ;; TODO: Unbundle third party software.
751 (method url-fetch/zipbomb)
752 (uri (string-append "https://github.com/aseprite/aseprite"
753 "/releases/download/v" version
754 "/Aseprite-v" version "-Source.zip"))
757 "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
758 (build-system cmake-build-system)
761 ;; Use shared libraries instead of building bundled source.
762 (list "-DWITH_WEBP_SUPPORT=1"
763 "-DUSE_SHARED_CURL=1"
764 "-DUSE_SHARED_GIFLIB=1"
765 "-DUSE_SHARED_JPEGLIB=1"
766 "-DUSE_SHARED_ZLIB=1"
767 "-DUSE_SHARED_LIBPNG=1"
768 "-DUSE_SHARED_LIBLOADPNG=1"
769 "-DUSE_SHARED_LIBWEBP=1"
770 "-DUSE_SHARED_TINYXML=1"
771 "-DUSE_SHARED_PIXMAN=1"
772 "-DUSE_SHARED_FREETYPE=1"
773 "-DUSE_SHARED_ALLEGRO4=1"
774 "-DENABLE_UPDATER=0" ; no auto-updates
775 (string-append "-DFREETYPE_INCLUDE_DIR="
776 (assoc-ref %build-inputs "freetype")
777 "/include/freetype2"))))
779 `(("pkg-config" ,pkg-config)))
780 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
781 ;; patched version is bundled with Aseprite, but the patches should be
782 ;; extracted and applied on top of a standalone Allegro 4 package.
784 `(("allegro" ,allegro-4)
786 ("freetype" ,freetype)
793 ("libxxf86vm" ,libxxf86vm)
797 (synopsis "Animated sprite editor and pixel art tool")
798 (description "Aseprite is a tool for creating 2D pixel art for video
799 games. In addition to basic pixel editing features, Aseprite can assist in
800 the creation of animations, tiled graphics, texture atlases, and more.")
801 (home-page "https://www.aseprite.org/")
802 (license license:gpl2+)))
804 (define-public qqwing
811 "https://qqwing.com/"
812 name "-" version ".tar.gz"))
815 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
816 (build-system gnu-build-system)
818 `(("pkg-config" ,pkg-config)))
819 (home-page "https://qqwing.com/")
820 (synopsis "Sudoku puzzle solver and generator")
822 "QQWing is a Sudoku puzzle generator and solver.
823 It offers the following features:
825 @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
826 @item Uses logic. Uses as many solve techniques as possible when solving
827 puzzles rather than guessing.
828 @item Rates puzzles. Most generators don't give an indication of the difficulty
829 of a Sudoku puzzle. QQwing does.
830 @item Can print solve instructions for any puzzle.
831 @item Customizable output style, including a CSV style that is easy to
832 import into a database.
834 (license license:gpl2+)))
836 (define-public quesoglc
842 (uri (string-append "mirror://sourceforge/" name "/" version "/"
843 name "-" version "-free.tar.bz2"))
846 "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
847 (build-system gnu-build-system)
848 (native-inputs `(("pkg-config" ,pkg-config)))
849 (inputs `(("fontconfig" ,fontconfig)
850 ("freeglute" ,freeglut)
853 (home-page "http://quesoglc.sourceforge.net")
854 (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
856 "The OpenGL Character Renderer (GLC) is a state machine that provides
857 OpenGL programs with character rendering services via an application programming
859 (license (list license:expat license:lgpl2.1+))))
861 (define-public python-pygame
863 (name "python-pygame")
867 (uri (pypi-uri "pygame" version))
870 "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh"))))
871 (build-system python-build-system)
873 `(#:tests? #f ; tests require pygame to be installed first
875 (modify-phases %standard-phases
876 ;; Set the paths to the dependencies manually because
877 ;; the configure script does not allow passing them as
878 ;; parameters. This also means we can skip the configure
880 (add-before 'build 'set-library-paths
881 (lambda* (#:key inputs outputs #:allow-other-keys)
882 (let ((sdl-ref (assoc-ref inputs "sdl"))
883 (font-ref (assoc-ref inputs "sdl-ttf"))
884 (image-ref (assoc-ref inputs "sdl-image"))
885 (mixer-ref (assoc-ref inputs "sdl-mixer"))
886 (smpeg-ref (assoc-ref inputs "libsmpeg"))
887 (png-ref (assoc-ref inputs "libpng"))
888 (jpeg-ref (assoc-ref inputs "libjpeg"))
889 (freetype-ref (assoc-ref inputs "freetype"))
890 (v4l-ref (assoc-ref inputs "v4l-utils"))
891 (out-ref (assoc-ref outputs "out")))
892 (substitute* "Setup.in"
893 (("SDL = -I/usr/include/SDL")
894 (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
895 (substitute* "Setup.in"
896 (("FONT = -lSDL_ttf")
897 (string-append "FONT = -I" font-ref "/include/SDL -L"
898 font-ref "/lib -lSDL_ttf")))
899 (substitute* "Setup.in"
900 (("IMAGE = -lSDL_image")
901 (string-append "IMAGE = -I" image-ref "/include/SDL -L"
902 image-ref "/lib -lSDL_image")))
903 (substitute* "Setup.in"
904 (("MIXER = -lSDL_mixer")
905 (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
906 mixer-ref "/lib -lSDL_mixer")))
907 (substitute* "Setup.in"
909 (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
910 smpeg-ref "/lib -lsmpeg")))
911 (substitute* "Setup.in"
913 (string-append "PNG = -I" png-ref "/include -L"
914 png-ref "/lib -lpng")))
915 (substitute* "Setup.in"
917 (string-append "JPEG = -I" jpeg-ref "/include -L"
918 jpeg-ref "/lib -ljpeg")))
920 (substitute* "Setup.in"
921 (("FREETYPE = -lfreetype")
922 (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
923 freetype-ref "/lib -lfreetype")))
925 (substitute* "Setup.in"
927 ;; Create a path to a header file provided by v4l-utils.
928 (system* "mkdir" "linux")
929 (system* "ln" "--symbolic"
930 (string-append v4l-ref "/include/libv4l1-videodev.h")
932 (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
934 `(("freetype" ,freetype)
936 ("sdl-image" ,sdl-image)
937 ("sdl-mixer" ,sdl-mixer)
943 ("libsmpeg" ,libsmpeg)
944 ("portmidi" ,portmidi)
945 ("v4l-utils" ,v4l-utils)))
946 (home-page "https://www.pygame.org")
947 (synopsis "SDL wrapper for Python")
948 (description "Pygame is a set of Python modules designed for writing games.
949 Pygame adds functionality on top of the excellent SDL library. This allows you
950 to create fully featured games and multimedia programs in the python language.")
951 (license (list license:bsd-2
952 ;; python numeric license as listed by Debian looks like
953 ;; an Expat-style license with a warranty disclaimer for
954 ;; the U.S. government and the University of California.
960 license:public-domain
963 (define-public python2-pygame
964 (package-with-python2 python-pygame))
966 (define-public grafx2
972 ;; XXX: There is no URL that contains the version. :(
973 (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
976 "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
977 (build-system gnu-build-system)
980 (modify-phases %standard-phases
981 (delete 'configure) ; no configure script
982 (add-before 'build 'change-to-src-directory
987 ;; SDL header files are referenced without the preceeding "SDL/".
988 (list (string-append "CFLAGS=-I"
989 (assoc-ref %build-inputs "sdl-union")
991 (string-append "prefix="
992 (assoc-ref %outputs "out")))
993 #:tests? #f)) ; no check target
995 `(("pkg-config" ,pkg-config)))
999 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
1000 (synopsis "Bitmap paint program")
1001 (description "GrafX2 is a bitmap paint program inspired by the Amiga
1002 programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
1003 includes a very large number of tools and effects that make it particularly
1004 suitable for pixel art, game graphics, and generally any detailed graphics
1005 painted with a mouse.")
1006 (home-page "http://pulkomandy.tk/projects/GrafX2")
1007 (license license:gpl2))) ; GPLv2 only
1017 (url "https://github.com/wgois/OIS.git")
1018 (commit (string-append "v" version))))
1019 (file-name (git-file-name name version))
1021 (base32 "0g8krgq5bdx2rw7ig0xva4kqv4x815672i7z6lljp3n8847wmypa"))))
1022 (build-system cmake-build-system)
1024 `(#:tests? #f)) ; no test suite
1026 `(("libx11" ,libx11)))
1027 (synopsis "Object Oriented Input System")
1029 "Cross Platform Object Oriented Input Lib System is a cross platform,
1030 simple solution for using all kinds of Input Devices (Keyboards, Mice,
1031 Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very
1032 robust and compatible with many systems and operating systems.")
1033 (home-page "https://github.com/wgois/OIS")
1034 (license license:zlib)))
1036 (define-public mygui
1044 (url "https://github.com/MyGUI/mygui")
1045 (commit (string-append "MyGUI" version))))
1046 (file-name (git-file-name name version))
1049 "1wk7jmwm55rhlqqcyvqsxdmwvl70bysl9azh4kd9n57qlmgk3zmw"))))
1050 (build-system cmake-build-system)
1052 '(#:tests? #f ; No test target
1054 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1055 (string-append "-DOGRE_INCLUDE_DIR="
1056 (assoc-ref %build-inputs "ogre")
1058 ;; Demos and tools are Windows-specific:
1059 ;; https://github.com/MyGUI/mygui/issues/24.
1060 "-DMYGUI_BUILD_DEMOS=FALSE"
1061 "-DMYGUI_BUILD_TOOLS=FALSE")))
1064 ("doxygen" ,doxygen)
1065 ("pkg-config" ,pkg-config)))
1067 `(("font-dejavu" ,font-dejavu)
1068 ("freetype" ,freetype)
1069 ("graphviz" ,graphviz)
1073 (synopsis "Fast, flexible and simple GUI")
1075 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
1076 and 3D applications. The main goals of mygui are: speed, flexibility and ease
1078 (home-page "http://mygui.info/")
1079 (license license:expat)))
1081 (define-public mygui-gl
1082 ;; Closure size is reduced by some 800 MiB.
1088 (substitute-keyword-arguments (package-arguments mygui)
1089 ((#:configure-flags _)
1090 `(cons* "-DMYGUI_RENDERSYSTEM=4" ; 3 is Ogre, 4 is OpenGL.
1091 ;; We can't reuse the flags because of the mention to Ogre.
1092 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1093 ;; Demos and tools are Windows-specific:
1094 ;; https://github.com/MyGUI/mygui/issues/24.
1095 "-DMYGUI_BUILD_DEMOS=FALSE"
1096 "-DMYGUI_BUILD_TOOLS=FALSE")))))
1100 ,@(fold alist-delete (package-inputs mygui)
1102 (synopsis "Fast, flexible and simple GUI (OpenGL backend)")))
1104 (define-public openmw
1112 (string-append "https://github.com/OpenMW/openmw/archive/"
1113 "openmw-" version ".tar.gz"))
1116 "0r0wgvv1faan8z8lbply8lks4hcnppifjrcz04l5zvq6yiqzjg5n"))))
1117 (build-system cmake-build-system)
1119 `(#:tests? #f ; No test target
1121 (list "-DDESIRED_QT_VERSION=5")))
1124 ("doxygen" ,doxygen)
1125 ("pkg-config" ,pkg-config)))
1127 `(("bullet" ,bullet)
1130 ("mygui" ,mygui-gl) ; OpenMW does not need Ogre.
1132 ("openscenegraph" ,openscenegraph)
1135 ("unshield" ,unshield)))
1136 (synopsis "Re-implementation of the RPG Morrowind engine")
1138 "OpenMW is a game engine which reimplements and extends the one that runs
1139 the 2002 open-world RPG Morrowind. The engine comes with its own editor,
1140 called OpenMW-CS which allows the user to edit or create their own original
1142 (home-page "https://openmw.org")
1143 (license license:gpl3)))
1145 (define-public godot
1152 (url "https://github.com/godotengine/godot")
1153 (commit (string-append version "-stable"))))
1154 (file-name (git-file-name name version))
1157 "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
1158 (modules '((guix build utils)))
1161 ;; Drop libraries that we take from Guix. Note that some
1162 ;; of these may be modified; see "thirdparty/README.md".
1163 (with-directory-excursion "thirdparty"
1164 (for-each delete-file-recursively
1176 (build-system scons-build-system)
1178 `(#:scons ,scons-python2
1179 #:scons-flags (list "platform=x11"
1180 ,@(if (string-prefix? "aarch64" (or (%current-target-system)
1182 `("CCFLAGS=-DNO_THREADS")
1184 ;; Avoid using many of the bundled libs.
1185 ;; Note: These options can be found in the SConstruct file.
1186 "builtin_freetype=no"
1188 "builtin_libmpdec=no"
1191 "builtin_libtheora=no"
1192 "builtin_libvorbis=no"
1194 "builtin_libwebp=no"
1195 "builtin_openssl=no"
1198 #:tests? #f ; There are no tests
1200 (modify-phases %standard-phases
1201 (add-after 'unpack 'scons-use-env
1203 ;; Scons does not use the environment variables by default,
1204 ;; but this substitution makes it do so.
1205 (substitute* "SConstruct"
1206 (("env_base = Environment\\(tools=custom_tools\\)")
1208 "env_base = Environment(tools=custom_tools)\n"
1209 "env_base = Environment(ENV=os.environ)")))
1212 (lambda* (#:key outputs #:allow-other-keys)
1213 (let* ((out (assoc-ref outputs "out"))
1214 (bin (string-append out "/bin")))
1215 (with-directory-excursion "bin"
1216 (if (file-exists? "godot.x11.tools.64")
1217 (rename-file "godot.x11.tools.64" "godot")
1218 (rename-file "godot.x11.tools.32" "godot"))
1219 (install-file "godot" bin))
1221 (add-after 'install 'install-godot-desktop
1222 (lambda* (#:key outputs #:allow-other-keys)
1223 (let* ((out (assoc-ref outputs "out"))
1224 (desktop (string-append out "/share/applications"))
1225 (icon-dir (string-append out "/share/pixmaps")))
1226 (rename-file "icon.png" "godot.png")
1227 (install-file "godot.png" icon-dir)
1229 (with-output-to-file
1230 (string-append desktop "/godot.desktop")
1235 Comment=The godot game engine~@
1237 TryExec=~@*~a/bin/godot~@
1242 (native-inputs `(("pkg-config" ,pkg-config)))
1243 (inputs `(("alsa-lib" ,alsa-lib)
1244 ("freetype" ,freetype)
1247 ("libtheora" ,libtheora)
1248 ("libvorbis" ,libvorbis)
1250 ("libwebp" ,libwebp)
1252 ("libxcursor" ,libxcursor)
1254 ("libxinerama" ,libxinerama)
1255 ("libxrandr" ,libxrandr)
1257 ("openssl" ,openssl)
1258 ("opusfile" ,opusfile)
1259 ("pulseaudio" ,pulseaudio)))
1260 (home-page "https://godotengine.org/")
1261 (synopsis "Advanced 2D and 3D game engine")
1263 "Godot is an advanced multi-platform game engine written in C++. If
1264 features design tools such as a visual editor, can import 3D models and
1265 provide high-quality 3D rendering, it contains an animation editor, and can be
1266 scripted in a Python-like language.")
1267 (license license:expat)))
1269 (define-public eureka
1275 (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
1277 ;; version without dots e.g 1.21 => 121
1278 (string-join (string-split version #\.) "")
1282 "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v"))))
1283 (build-system gnu-build-system)
1287 (let ((out (assoc-ref %outputs "out")))
1288 (list (string-append "PREFIX=" out)))
1290 (modify-phases %standard-phases
1292 (add-before 'build 'prepare-install-directories
1293 (lambda* (#:key outputs #:allow-other-keys)
1294 (let ((out (assoc-ref outputs "out")))
1295 (mkdir-p (string-append out "/bin"))
1296 (mkdir-p (string-append out "/share"))
1298 (with-fluids ((%default-port-encoding #f))
1299 (substitute* "./src/main.cc"
1300 (("/usr/local") out)))
1302 (substitute* "Makefile"
1303 (("-o root") ""))))))))
1304 (inputs `(("mesa" ,mesa)
1306 ("libxinerama" ,libxinerama)
1307 ("libfontconfig" ,fontconfig)
1308 ("libjpeg" ,libjpeg)
1312 (native-inputs `(("pkg-config" ,pkg-config)
1313 ("xdg-utils" ,xdg-utils)))
1314 (synopsis "Doom map editor")
1315 (description "Eureka is a map editor for the classic DOOM games, and a few
1316 related games such as Heretic and Hexen. It comes with a 3d preview mode and
1318 (home-page "http://eureka-editor.sourceforge.net/")
1319 (license license:gpl2+)))
1321 (define-public guile-chickadee
1323 (name "guile-chickadee")
1327 (uri (string-append "https://files.dthompson.us/chickadee/"
1328 "chickadee-" version ".tar.gz"))
1331 "1fdicsgls5cp0yffcm5vjmav67gv9bxhz1s3jvdvinspxb485x7l"))))
1332 (build-system gnu-build-system)
1334 `(("guile-opengl" ,guile-opengl)
1335 ("guile-sdl2" ,guile-sdl2)))
1337 `(("guile" ,guile-2.2)))
1339 `(("pkg-config" ,pkg-config)
1340 ("texinfo" ,texinfo)))
1341 (home-page "https://dthompson.us/projects/chickadee.html")
1342 (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
1343 (description "Chickadee is a game development toolkit for Guile Scheme
1344 built on top of SDL2 and OpenGL. Chickadee aims to provide all the features
1345 that parenthetically inclined game developers need to make 2D (and eventually
1346 3D) games in Scheme, such as:
1349 @item extensible, fixed-timestep game loop
1350 @item OpenGL-based rendering engine
1351 @item keyboard, mouse, controller input
1352 @item REPL-driven development model
1354 (license license:gpl3+)))
1356 (define-public bennu-game-development
1358 (name "bennu-game-development")
1363 (url "http://svn.code.sf.net/p/bennugd/code")
1364 (revision (string->number version))))
1365 (file-name (string-append name "-" version))
1368 "0wpzsbh4zi3931493dnyl5ffmh1b7fj2sx3mzrq304z9zs4d6lqq"))
1369 (modules '((guix build utils)))
1372 (delete-file-recursively "3rdparty") #t))))
1373 (build-system gnu-build-system)
1376 (modify-phases %standard-phases
1377 (add-after 'unpack 'patch-configure-to-use-openssl
1378 (lambda* (#:key outputs #:allow-other-keys)
1380 (delete-file "configure")
1381 (substitute* "configure.in"
1384 COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\"
1385 COMMON_LDFLAGS=\"$COMMON_LDFLAGS\"
1392 (inputs `(("openssl" ,openssl)
1394 (native-inputs `(("pkg-config" ,pkg-config)
1395 ("autoconf" ,autoconf)
1396 ("automake" ,automake)
1397 ("libtool" ,libtool)))
1398 (synopsis "Programming language to create games")
1399 (description "Bennu Game Development, also known as bennudg, is a
1400 programming language tailored at game development. It is the successor of
1402 (home-page "https://sourceforge.net/projects/bennugd/")
1403 (license license:zlib)))
1405 (define-public bennu-game-development-modules
1407 (inherit bennu-game-development)
1408 (name "bennu-game-development-modules")
1411 (modify-phases %standard-phases
1412 (add-after 'unpack 'patch-conflicting-definitions
1414 (with-fluids ((%default-port-encoding #f))
1415 (substitute* "core/include/fmath.h"
1416 (("extern fixed fmul\\( int x, int y \\);") "")
1417 (("extern fixed fdiv\\( int x, int y \\);") "")))
1418 (chdir "modules"))))))
1419 (inputs `(("zlib" ,zlib)
1421 ("openssl" ,openssl)
1422 ("sdl-mixer" ,sdl-mixer)
1423 ("bennu-game-development" ,bennu-game-development)))
1424 (synopsis "Modules for the Bennu Game Development programming language")
1425 (description "This package contains a collection of modules for the Bennu
1426 Game Development programming language, from CD handling through SDL to
1427 joystick support.")))
1435 (uri (string-append "http://plib.sourceforge.net/dist/"
1436 "plib-" version ".tar.gz"))
1439 "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8"))))
1440 (build-system gnu-build-system)
1444 ("libxmu" ,libxmu)))
1446 `(("pkg-config" ,pkg-config)))
1447 (home-page "http://plib.sourceforge.net/")
1448 (synopsis "Suite of portable game libraries")
1449 (description "PLIB is a set of libraries that will permit programmers to
1450 write games and other realtime interactive applications that are 100% portable
1451 across a wide range of hardware and operating systems. PLIB includes sound
1452 effects, music, a complete 3D engine, font rendering, a simple Windowing
1453 library, a game scripting language, a GUI, networking, 3D math library and a
1454 collection of handy utility functions. All are 100% portable across nearly
1455 all modern computing platforms. Each library component is fairly independent
1457 (license license:lgpl2.0+)))
1459 (define-public ioquake3
1460 ;; We follow master since it seems that there won't be releases after 1.3.6.
1461 (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0"))
1464 (version (git-version "1.3.6" "1" commit))
1469 (url "https://github.com/ioquake/ioq3.git")
1471 (file-name (git-file-name name version))
1474 "1vflk028z9gccg5yfi5451y1k5wxjdh3qbhjf4x6r7w2pzlxh16z"))))
1475 (build-system gnu-build-system)
1478 ("libjpeg" ,libjpeg)
1481 ("opusfile" ,opusfile)
1483 ("libvorbis" ,libvorbis)
1484 ("freetype" ,freetype)
1485 ("libogg" ,libogg)))
1487 `(("which" ,which) ; Else SDL_version.h won't be found.
1488 ("pkg-config" ,pkg-config)))
1490 '(#:tests? #f ; No tests.
1491 #:make-flags '("CC=gcc"
1492 "USE_INTERNAL_LIBS=0"
1494 "USE_RENDERER_DLOPEN=0"
1495 "USE_OPENAL_DLOPEN=0"
1496 "USE_CURL_DLOPEN=0")
1498 (modify-phases %standard-phases
1501 (lambda* (#:key outputs #:allow-other-keys)
1502 (invoke "make" "copyfiles" "CC=gcc"
1503 "USE_INTERNAL_LIBS=0"
1504 (string-append "COPYDIR="
1505 (assoc-ref outputs "out")
1507 (home-page "https://ioquake3.org/")
1508 (synopsis "FPS game engine based on Quake 3")
1509 (description "ioquake3 is a free software first person shooter engine
1510 based on the Quake 3: Arena and Quake 3: Team Arena source code. Compared to
1511 the original, ioquake3 has been cleaned up, bugs have been fixed and features
1512 added. The permanent goal is to create the open source Quake 3 distribution
1513 upon which people base their games, ports to new platforms, and other
1515 (license license:gpl2))))