README 12 KB

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