gnu: octave: Update to 4.0.2.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
CommitLineData
6cb89466
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
f586c877 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
c24fff61
JG
4;;; Copyright © 2015 Julian Graham <joolean@gmail.com>
5;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
0f6139b1 6;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
154f6156 7;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
e8ea01d9 8;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
966dff3b 9;;; Copyright © 2016 Kei Yamashita <kei@openmailbox.org>
6cb89466
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages game-development)
b0910aad 27 #:use-module ((guix licenses) #:prefix license:)
6cb89466
28 #:use-module (guix packages)
29 #:use-module (guix download)
2a068aec 30 #:use-module (guix git-download)
6cb89466 31 #:use-module (guix build-system cmake)
b0910aad
DT
32 #:use-module (guix build-system gnu)
33 #:use-module (gnu packages)
2a068aec 34 #:use-module (gnu packages curl)
c24fff61 35 #:use-module (gnu packages databases)
99828fa7 36 #:use-module (gnu packages documentation)
c24fff61
JG
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gnunet)
39 #:use-module (gnu packages guile)
40 #:use-module (gnu packages multiprecision)
41 #:use-module (gnu packages ncurses)
b0910aad 42 #:use-module (gnu packages qt)
5809ffcc
DT
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages zip)
45 #:use-module (gnu packages gl)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages xorg)
2a068aec 48 #:use-module (gnu packages xdisorg)
5809ffcc
DT
49 #:use-module (gnu packages fontutils)
50 #:use-module (gnu packages image)
51 #:use-module (gnu packages audio)
d620ea88
DT
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages sdl)
240f2785 56 #:use-module (gnu packages pkg-config)
83a4a70b
DT
57 #:use-module (gnu packages xiph)
58 #:use-module (gnu packages lua)
2a068aec
DT
59 #:use-module (gnu packages mp3)
60 #:use-module (gnu packages xml))
6cb89466
61
62(define-public bullet
63 (package
64 (name "bullet")
65 (version "2.82-r2704")
66 (source (origin
67 (method url-fetch)
68 (uri (string-append "https://bullet.googlecode.com/files/bullet-"
69 version ".tgz"))
70 (sha256
71 (base32
72 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))))
73 (build-system cmake-build-system)
74 (arguments '(#:tests? #f ; no 'test' target
75 #:configure-flags (list
76 (string-append
77 "-DCMAKE_CXX_FLAGS=-fPIC "
78 (or (getenv "CXXFLAGS") "")))))
79 (home-page "http://bulletphysics.org/")
80 (synopsis "3D physics engine library")
81 (description
82 "Bullet is a physics engine library usable for collision detection. It
83is used in some video games and movies.")
b0910aad
DT
84 (license license:zlib)))
85
c24fff61
JG
86(define-public gzochi
87 (package
88 (name "gzochi")
89 (version "0.9")
90 (source (origin
91 (method url-fetch)
92 (uri (string-append "mirror://savannah/gzochi/gzochi-"
93 version ".tar.gz"))
94 (sha256
95 (base32
96 "1nf8naqbc4hmhy99b8n70yswg9j71nh5mfpwwh6d8pdw5mp9b46a"))))
97 (build-system gnu-build-system)
98 (arguments
99 '(#:phases (modify-phases %standard-phases
100 (add-before 'configure 'remove-Werror
101 (lambda _
102 ;; We can't build with '-Werror', notably
103 ;; because deprecated functions of
104 ;; libmicrohttpd are being used.
105 (substitute* (find-files "." "^Makefile\\.in$")
106 (("-Werror")
107 ""))
108 #t)))))
109 (native-inputs `(("pkgconfig" ,pkg-config)))
110 (inputs `(("bdb" ,bdb)
111 ("glib" ,glib)
112 ("gmp" ,gmp)
113 ("guile" ,guile-2.0)
114 ("libmicrohttpd" ,libmicrohttpd)
115 ("ncurses" ,ncurses)
116 ("sdl" ,sdl)
117 ("zlib" ,zlib)))
118 (home-page "http://www.nongnu.org/gzochi/")
119 (synopsis "Scalable middleware for multiplayer games")
120 (description
121 "gzochi is a framework for developing massively multiplayer online games.
122A server container provides services to deployed games, which are written in
123Guile Scheme, that abstract and simplify some of the most challenging and
124error-prone aspects of online game development: Concurrency, data persistence,
125and network communications. A very thin client library can be embedded to
126provide connectivity for client applications written in any language.")
127 (license license:gpl3+)))
128
b0910aad
DT
129(define-public tiled
130 (package
131 (name "tiled")
738fea30 132 (version "0.16.1")
b0910aad
DT
133 (source (origin
134 (method url-fetch)
135 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
136 version ".tar.gz"))
f586c877 137 (file-name (string-append name "-" version ".tar.gz"))
b0910aad
DT
138 (sha256
139 (base32
738fea30 140 "0s1i6yhm1z9ayzjh8cprcc9jvj5m87l9snyqg6w7zlj3q9zn4rn6"))))
b0910aad
DT
141 (build-system gnu-build-system)
142 (inputs `(("qt" ,qt)
143 ("zlib" ,zlib)))
144 (arguments
145 '(#:phases
d06fc008
EF
146 (modify-phases %standard-phases
147 (replace 'configure
148 (lambda* (#:key outputs #:allow-other-keys)
149 (let ((out (assoc-ref outputs "out")))
150 (system* "qmake"
151 (string-append "PREFIX=" out))))))))
b0910aad
DT
152 (home-page "http://www.mapeditor.org/")
153 (synopsis "Tile map editor")
154 (description
155 "Tiled is a general purpose tile map editor. It is meant to be used for
156editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
157clone.")
158
159 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
160 ;; under BSD-2.
161 (license license:gpl2+)))
5809ffcc
DT
162
163(define-public sfml
164 (package
165 (name "sfml")
7d1b5022 166 (version "2.3.2")
5809ffcc
DT
167 (source (origin
168 (method url-fetch)
7d1b5022
RW
169 ;; Do not fetch the archives from
170 ;; http://mirror0.sfml-dev.org/files/ because files there seem
171 ;; to be changed in place.
172 (uri (string-append "https://github.com/SFML/SFML/archive/"
173 version ".tar.gz"))
174 (file-name (string-append name "-" version ".tar.gz"))
5809ffcc
DT
175 (sha256
176 (base32
7d1b5022 177 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
5809ffcc
DT
178 (build-system cmake-build-system)
179 (arguments
180 '(#:tests? #f)) ; no tests
5809ffcc
DT
181 (inputs
182 `(("mesa" ,mesa)
183 ("glew" ,glew)
240f2785
RW
184 ("flac" ,flac)
185 ("libvorbis" ,libvorbis)
5809ffcc 186 ("libx11" ,libx11)
240f2785 187 ("xcb-util-image" ,xcb-util-image)
5809ffcc
DT
188 ("libxrandr" ,libxrandr)
189 ("eudev" ,eudev)
190 ("freetype" ,freetype)
191 ("libjpeg" ,libjpeg)
192 ("libsndfile" ,libsndfile)
193 ("openal" ,openal)))
194 (home-page "http://www.sfml-dev.org")
195 (synopsis "Simple and Fast Multimedia Library")
196 (description
197 "SFML provides a simple interface to the various computer components,
198to ease the development of games and multimedia applications. It is composed
199of five modules: system, window, graphics, audio and network.")
200 (license license:zlib)))
d620ea88
DT
201
202(define-public sfxr
203 (package
204 (name "sfxr")
205 (version "1.2.1")
206 (source (origin
207 (method url-fetch)
208 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
209 (sha256
210 (base32
211 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
212 (build-system gnu-build-system)
213 (arguments
214 `(#:phases (modify-phases %standard-phases
215 (delete 'configure) ; no configure script
216 (add-before 'build 'patch-makefile
217 (lambda* (#:key outputs #:allow-other-keys)
218 (let ((out (assoc-ref outputs "out")))
219 (substitute* "Makefile"
220 (("\\$\\(DESTDIR\\)/usr") out))
221 (substitute* "main.cpp"
222 (("/usr/share")
223 (string-append out "/share")))
224 #t))))
225 #:tests? #f)) ; no tests
226 (native-inputs
227 `(("pkg-config" ,pkg-config)
228 ("desktop-file-utils" ,desktop-file-utils)))
229 (inputs
230 `(("sdl" ,sdl)
231 ("gtk+" ,gtk+)))
232 (synopsis "Simple sound effect generator")
233 (description "Sfxr is a tool for quickly generating simple sound effects.
234Originally created for use in video game prototypes, it can generate random
235sounds from presets such as \"explosion\" or \"powerup\".")
236 (home-page "http://www.drpetter.se/project_sfxr.html")
237 (license license:expat)))
0f6139b1
AK
238
239(define-public physfs
240 (package
241 (name "physfs")
242 (version "2.0.3")
243 (source (origin
244 (method url-fetch)
245 (uri (string-append
246 "http://icculus.org/physfs/downloads/physfs-"
247 version ".tar.bz2"))
248 (file-name (string-append name "-" version ".tar.gz"))
249 (sha256
250 (base32
251 "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
252 (build-system cmake-build-system)
253 (arguments
254 '(#:tests? #f)) ; no check target
255 (inputs
256 `(("zlib" ,zlib)))
257 (native-inputs
258 `(("doxygen" ,doxygen)))
259 (home-page "http://icculus.org/physfs")
260 (synopsis "File system abstraction library")
261 (description
262 "PhysicsFS is a library to provide abstract access to various archives.
263It is intended for use in video games. For security, no file writing done
264through the PhysicsFS API can leave a defined @emph{write directory}. For
265file reading, a @emph{search path} with archives and directories is defined,
266and it becomes a single, transparent hierarchical file system. So archive
267files can be accessed in the same way as you access files directly on a disk,
268and it makes it easy to ship a new archive that will override a previous
269archive on a per-file basis.")
270 (license license:zlib)))
83a4a70b
DT
271
272(define-public love
273 (package
274 (name "love")
e91fd7f5 275 (version "0.10.1")
83a4a70b
DT
276 (source (origin
277 (method url-fetch)
278 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
279 "love-" version "-linux-src.tar.gz"))
280 (sha256
281 (base32
e91fd7f5 282 "1ys18m7c4994k5s7avqlf17sc2icx5zgvfplz504q1ka16hwkc52"))))
83a4a70b
DT
283 (build-system gnu-build-system)
284 (native-inputs
285 `(("pkg-config" ,pkg-config)))
286 (inputs
287 `(("devil" ,devil)
288 ("freetype" ,freetype)
289 ("libmodplug" ,libmodplug)
05d48c52 290 ("libtheora" ,libtheora)
83a4a70b
DT
291 ("libvorbis" ,libvorbis)
292 ("luajit" ,luajit)
293 ("mesa" ,mesa)
294 ("mpg123" ,mpg123)
295 ("openal" ,openal)
296 ("physfs" ,physfs)
297 ("sdl2" ,sdl2)
298 ("zlib" ,zlib)))
299 (synopsis "2D game framework for Lua")
300 (description "LÖVE is a framework for making 2D games in the Lua
301programming language.")
302 (home-page "https://love2d.org/")
303 (license license:zlib)))
154f6156
DT
304
305(define-public allegro-4
306 (package
307 (name "allegro")
308 (version "4.4.2")
309 (source (origin
310 (method url-fetch)
311 (uri (string-append "http://download.gna.org/allegro/allegro/"
312 version "/allegro-" version ".tar.gz"))
313 (sha256
314 (base32
315 "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"))))
316 (build-system cmake-build-system)
317 (arguments
318 '(#:phases
319 (modify-phases %standard-phases
320 (add-after 'unpack 'patch-build-system
321 (lambda _
322 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
323 ;; via a command line option doesn't work because it is
324 ;; unconditionally clobbered in the build script.
325 (substitute* '("CMakeLists.txt")
326 (("ADDON_LINKAGE STATIC")
327 "ADDON_LINKAGE SHARED"))
328 #t)))))
329 (inputs
330 `(("glu" ,glu)
331 ("libpng" ,libpng)
332 ("libvorbis" ,libvorbis)
333 ("mesa" ,mesa)
334 ("zlib" ,zlib)))
335 (synopsis "Game programming library")
336 (description "Allegro is a library mainly aimed at video game and
337multimedia programming. It handles common, low-level tasks such as creating
338windows, accepting user input, loading data, drawing images, playing sounds,
339etc.")
340 (home-page "http://liballeg.org")
341 (license license:giftware)))
2a068aec
DT
342
343(define-public aseprite
344 (package
345 (name "aseprite")
346 (version "1.1.1")
347 ;; The release tarball isn't good enough because it's missing some
348 ;; necessary code that is only in git submodules.
349 (source (origin
350 (method git-fetch)
351 (uri (git-reference
352 (url "https://github.com/aseprite/aseprite.git")
353 (commit "v1.1.1")
354 (recursive? #t)))
355 (sha256
356 (base32
357 "1yr0l3bc68lyrffrzxgw98zznv8yz5ldl98lyvp6s5grny4s4jyk"))))
358 (build-system cmake-build-system)
359 (arguments
360 '(#:configure-flags
361 ;; Use shared libraries instead of building bundled source.
362 (list "-DWITH_WEBP_SUPPORT=1"
363 "-DUSE_SHARED_CURL=1"
364 "-DUSE_SHARED_GIFLIB=1"
365 "-DUSE_SHARED_JPEGLIB=1"
366 "-DUSE_SHARED_ZLIB=1"
367 "-DUSE_SHARED_LIBPNG=1"
368 "-DUSE_SHARED_LIBLOADPNG=1"
369 "-DUSE_SHARED_LIBWEBP=1"
370 "-DUSE_SHARED_TINYXML=1"
371 "-DUSE_SHARED_PIXMAN=1"
372 "-DUSE_SHARED_FREETYPE=1"
373 "-DUSE_SHARED_ALLEGRO4=1"
374 "-DENABLE_UPDATER=0" ; no auto-updates
375 (string-append "-DFREETYPE_INCLUDE_DIR="
376 (assoc-ref %build-inputs "freetype")
de1d68a2 377 "/include/freetype2"))))
2a068aec
DT
378 (native-inputs
379 `(("pkg-config" ,pkg-config)))
380 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
381 ;; patched version is bundled with Aseprite, but the patches should be
382 ;; extracted and applied on top of a standalone Allegro 4 package.
383 (inputs
384 `(("allegro" ,allegro-4)
385 ("curl" ,curl)
386 ("freetype" ,freetype)
387 ("giflib" ,giflib)
388 ("libjpeg" ,libjpeg)
389 ("libpng" ,libpng)
390 ("libwebp" ,libwebp)
391 ("libx11" ,libx11)
392 ("libxext" ,libxext)
393 ("libxxf86vm" ,libxxf86vm)
394 ("pixman" ,pixman)
395 ("tinyxml" ,tinyxml)
396 ("zlib" ,zlib)))
397 (synopsis "Animated sprite editor and pixel art tool")
398 (description "Aseprite is a tool for creating 2D pixel art for video
399games. In addition to basic pixel editing features, Aseprite can assist in
400the creation of animations, tiled graphics, texture atlases, and more.")
401 (home-page "http://www.aseprite.org/")
402 (license license:gpl2+)))
966dff3b
KY
403
404(define-public qqwing
405 (package
406 (name "qqwing")
407 (version "1.3.4")
408 (source (origin
409 (method url-fetch)
410 (uri (string-append
411 "https://qqwing.com/"
412 name "-" version ".tar.gz"))
413 (sha256
414 (base32
415 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
416 (build-system gnu-build-system)
417 (native-inputs
418 `(("pkg-config" ,pkg-config)))
419 (home-page "https://qqwing.com/")
420 (synopsis "Sudoku puzzle solver and generator")
421 (description
422 "QQWing is a Sudoku puzzle generator and solver.
423It offers the following features:
424@enumerate
425@item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
426@item Uses logic. Uses as many solve techniques as possible when solving
427 puzzles rather than guessing.
428@item Rates puzzles. Most generators don't give an indication of the difficulty
429 of a Sudoku puzzle. QQwing does.
430@item Can print solve instructions for any puzzle.
431@item Customizable output style, including a CSV style that is easy to
432 import into a database.
433@end enumerate")
434 (license license:gpl2+)))