README 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. _____ _
  2. | ___| | |
  3. | |__ _ __ _ _| |_ __ _
  4. | __| '__| | | | __/ _` |
  5. | |__| | | |_| | || (_| |
  6. \____/_| \__,_|\__\__,_|
  7. Eruta is a futuristic Japanese style RPG under development.
  8. Requirements:
  9. * OS: Linux for now. Windows port is under development. OSX may work too.
  10. * Allegro 5.1.9 or later.
  11. Earlier versions won't be found by the build script.
  12. * libxml2 (www.xmlsoft.org)
  13. * mruby (latest gitub version). To install globally in /usr/local
  14. use
  15. `cd <directory_where_mruby_is> ; make ; sudo bin/install_mruby`
  16. to compile and install mruby into /usr/local
  17. * For compilation: cmake 2.8.10.2 or later (see vendor directory), make or ninja.
  18. * For development: cproto to generate header files.
  19. * For testing and debugging: gdb, ddd, valgrind.
  20. * For map editing: tiled (www.mapeditor.org)
  21. * For some of the tools and continuous testing: Ruby, watchr.
  22. Installation:
  23. You have to make sure that you have all the requirements. On Linux
  24. distributitions like Ubuntu, make sure that the development packages for all
  25. requirements are installed. Then do on the command line:
  26. cmake . ; make
  27. Or if you want to build with Ninja, use the latest version of cmake and go
  28. cmake -G Ninja . ; ninja
  29. Please note that cmake and the word "Ninja" is case-sensitive!
  30. How to try it:
  31. Run bin/eruta from the project's main directory.
  32. Expect to be underwhelmed for now. :-)
  33. How to develop using the contious testing script:
  34. Use the supplied watchr script like this:
  35. watchr tool/watchr/eruta_watchr.rb
  36. Every time you change a c file or header, the matching
  37. test will be compiled though cmake and make, and
  38. will be run. This does compile all C files of eruta,
  39. so it may be a bit slow at times.
  40. How to generate developer's documentation:
  41. Use naturaldocs.
  42. License:
  43. Eruta is copyright (C)
  44. 2007-2017 Beoran beoran@rubyforge.org.
  45. 2012 com64 (music files in data/music/*_com64.ogg)
  46. Redistribution and use in source and binary forms, with or without modification,
  47. are permitted provided that the following conditions are met:
  48. 1. Redistributions of source code must retain the above copyright notice,
  49. this list of conditions and the following disclaimer.
  50. 2. Redistributions in binary form must reproduce the above copyright notice,
  51. this list of conditions and the following disclaimer in the documentation
  52. and/or other materials provided with the distribution.
  53. 3. Redistributions in any form must be accompanied by information on how to
  54. obtain complete source code for the Eruta software and any accompanying
  55. software that uses the Eruta software. The source code must either be
  56. included in the distribution or be available for no more than the cost of
  57. distribution plus a nominal fee, and must be freely redistributable under
  58. reasonable conditions. For an executable file, complete source code means
  59. the source code for all modules it contains. It does not include source code
  60. for modules or files that typically accompany the major components of the
  61. operating system on which the executable file runs.
  62. THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR IMPLIED
  63. WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  64. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
  65. DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
  66. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  67. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  68. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  69. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  70. OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  71. ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  72. As you can see, above, Eruta is licenced under a "Sleepycat license", which is
  73. GPL compatible, but much shorter and easier to read. Basically you're allowed
  74. to use the Eruta as you like. However, if you make your own game with Eruta's
  75. sources, you'll have to make the sources of your program freely available and
  76. redistributable as well. If you don't like these terms, contact me for making
  77. different arrangments. :)
  78. Credits and third party licenses:
  79. json-parser (src/json.c and include/json.h):
  80. Copyright (C) 2012 James McLaughlin, Alex Gartrell, Peter Scott,
  81. Mathias Kaerlev, Emiel Mols, Czarek Tomczak, Nicholas Braden,
  82. Ivan Kozub, Árpád Goretity. All rights reserved.
  83. https://github.com/udp/json-parser
  84. Redistribution and use in source and binary forms, with or without
  85. modification, are permitted provided that the following conditions
  86. are met:
  87. 1. Redistributions of source code must retain the above copyright
  88. notice, this list of conditions and the following disclaimer.
  89. 2. Redistributions in binary form must reproduce the above copyright
  90. notice, this list of conditions and the following disclaimer in the
  91. documentation and/or other materials provided with the distribution.
  92. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  93. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  94. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  95. ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  96. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  97. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  98. OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  99. HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  100. LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  101. OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  102. SUCH DAMAGE.
  103. ext/gari/test/test_music.ogg, data/music/musictest.ogg
  104. Original title: : Town in ruins loop
  105. Artist: Brandon Morris
  106. License: CC-BY 3.0
  107. data/font/Tuffy.ttf
  108. - Thatcher Ulrich <tu@tulrich.com> http://tulrich.com
  109. Tuffy fonts License:
  110. I have placed these fonts in the Public Domain. This is all 100% my
  111. own work. Usage is totally unrestricted. If you want to make
  112. derivative works for any purpose, please go ahead.
  113. data/font/GranaPadano.ttf
  114. Daniel Johnson (font maintainer)
  115. il.basso.buffo at gmail dot com
  116. http://io.debian.net/~danielj/
  117. Licensed under the Open Font License (OFL).
  118. data/image/ulpcss/*
  119. See README and AUTHORS in that directory.
  120. These images are temporary open source placeholders for the game sprites.
  121. data/image/ui/icon/gin/*
  122. Icons made by Lorc, Delapoite and John Colbutn.
  123. Icons provided under the Creative Commons 3.0 BY license.
  124. See licence.txt in that directory for more details.
  125. data/music/nethis-the_writer.ogg
  126. License: CC-BY 3.0
  127. Artists: Nethis, based on vocals by myvanillaworld.
  128. http://ccmixter.org/files/Nethis/38405
  129. data/music/ramblinglibrarian_how_do_i_make_you_see.ogg
  130. License: CC-BY 3.0
  131. Artists: ramblinglibrarian, based on vocals by myvanillaworld.
  132. http://ccmixter.org/files/ramblinglibrarian/25641
  133. data/music/admiralbob77_in_peace_now.ogg
  134. License: CC-BY 3.0
  135. Artists: Admiralbob77, based on vocals by SackJo22
  136. http://ccmixter.org/files/admiralbob77/40555
  137. http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100875
  138. data/music/*_com64.ogg
  139. By Com64 under CC-BY 3.0 license.
  140. data/music/*_joclemons.ogg
  141. By Jo Clemons under CC-BY 3.0 license.
  142. Thanks to the following people for their suggestions:
  143. Alexbond45, LunarKnite, Mikka, Sagephoenix.
  144. Remarks for developers:
  145. The header files are partially automatically generated using the cproto tool.
  146. The documentation should therefore be written in the C files.
  147. When a new .c file is needed, use the bin/newmodule tool like this
  148. bin/newmodule bar
  149. and automatically, empty src/bar.c and include/bar.h will be generated.
  150. As for why I use plain C and not, say C++: it's to keep the code simple, tight
  151. and focused, and easy to interface with the Ruby scripts. C is a very simple
  152. language, but it can do anything and it does it fast. And to save time, quite
  153. a bit of the programming will happen on the mruby side.
  154. An overview of the C files andwhat they are about:
  155. src/area.c : In-game areas or levels.
  156. src/bad.c : Beoran's Algorithms and datastructures.
  157. src/base64.c : Base64 implementation, currently unused.
  158. src/brex.c : Reular expressions ,currently unused.
  159. src/bxml.c : My own XML parser, currently not in use.
  160. src/bxmlparser.c : My own XML parser, currently not in use.
  161. src/camera.c : Camera models a view port over an in-game level.
  162. src/castor.c : Cache and in memory storage for resources. Needs work.
  163. src/ch.c : Chipmunk Helper functions.
  164. src/cocell.c : Cons cell, currenly not used.
  165. src/draw.c : Additional drawing functions.
  166. src/dynar.c : Dynamic arrays in C. Used everywhere.
  167. src/effect.c : Effects and particle engine. Needs a lot of work.
  168. src/event.c : Additional event functions.
  169. src/every.c : Iterators and iteration in C.
  170. src/ezxml.c : XML parser based on Aaron Voisine's work.
  171. src/fifi.c : Find Files. Helps find game data and eases resource loading.
  172. src/flags.c : Simple integer bitflag setting and getting helpers.
  173. src/glh.c : OpenGL helper functions. Currently not in use.
  174. src/hatab.c : Hash table. Needs work, so not in use yet.
  175. src/ifa.c : Generic interfaces for C. Currently not used.
  176. src/inli.c : Intrusive linked ist, currently not used.
  177. src/json.c : JSON support.
  178. src/main.c : Main function and many helpers and tests.
  179. src/mem.c : Memory handling helpers.
  180. src/miniz.c : Minimalistic zip library for later use.
  181. src/mobile.c : Autonomously moving game entities.
  182. src/mode.c : Game mode switching functions.
  183. src/obj.c : OOP in C playground. Currently not in use.
  184. src/pachi.c : Parent child tree. Currently not in use.
  185. src/pointergrid.c : Two dimensional grid, used for the tile map.
  186. src/react.c : Input handling system. Needs to be merged with UI and mode.
  187. src/rebl.c : Red black tree, under construction, unused.
  188. src/rebox.c : Rectangular boxes. Used in UI, camera etc.
  189. src/rh.c : MRuby helper functions.
  190. src/scegra.c : Scene graph idea, may be discared, currently unused.
  191. src/silut.c : Simple string lookup table.
  192. src/sound.c : Sound and music helper functions.
  193. src/sprite.c : Sprite functions, in use but needs work.
  194. src/spritelayout.c: Sprite Layouts used for loading sprite sheets.
  195. src/spritelist.c : List of sprite functions, split off from sprite.c
  196. src/spritestate.c : Sprite state functions, split off from sprite.c
  197. src/state.c : Manages all state data of the engine.
  198. src/str.c : USTR and String helper functions.
  199. src/tarray.c : XMacro template matrix. Currently unused.
  200. src/tile.c : Tile map tile functionality.
  201. src/tileio.c : Tile map reading and later perhaps writing for ingame edit.
  202. src/tilemap.c : Tile map functonality.
  203. src/tilepane.c : Tile pane, a layer in a tile map.
  204. src/tinfl.c : Tiny inflater, uncompression, currently unused.
  205. src/tlilis.c : Templated linked list, currently unused.
  206. src/tmatrix.c : Templated matrix currently unused.
  207. src/toruby.c : Functions that are exposed to the mruby scripting.
  208. src/tr_audio.c : MRuby script bindings for audio functionality.
  209. src/tr_path.c : MRuby script bindings for path functionality.
  210. src/tr_store.c : MRuby script bindings for data storage functionality.
  211. src/tr_graph.c : MRuby script bindings for 2D scene graph functionality.
  212. src/tr_sprite.c : MRuby script bindings for sprite functionality.
  213. src/tr_thing.c : MRuby script bindings for physical thing functionality.
  214. src/ui.c : User interface functionality.
  215. src/widget.c : UI widgets, currently only script console.
  216. src/xml.c : Libxml helper functions.
  217. src/zori/*.c : UI engine.
  218. Since I try out a lot of things, ther are quite a few unused C fils in
  219. the project. Perhaps I will clean them out some day.. :)