You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
4.7 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. <img src="http://www.raylib.com/img/fb_raylib_logo.png" width=256>
  2. about
  3. -----
  4. raylib is a simple and easy-to-use library to learn videogames programming.
  5. raylib is highly inspired by Borland BGI graphics lib (more specifically WinBGI) and by XNA framework.
  6. Allegro and SDL have also been analyzed for reference.
  7. Want to see how easy is making games with raylib? Jump to [code examples!] (http://www.raylib.com/examples.htm)
  8. history
  9. -------
  10. I've developed videogames for some years and last year I had to taught videogames development
  11. to young people with artistic profile, most of them had never written a single line of code.
  12. I started with C language basis and, after searching for the most simple and easy-to-use library to teach
  13. videogames programming, I found WinBGI; it was great and it worked very well with students, in just a
  14. couple of weeks that people that had never written a single line of code were able to program (and understand)
  15. a simple PONG and some of them even a BREAKOUT!
  16. But WinBGI was not the clearer and most organized lib. There were a lot of things I found useless and
  17. confusing and some function names were not clear enough for most of the students; not to mention points
  18. like no transparencies support or no hardware acceleration.
  19. So, I decided to create my own lib, hardware accelerated, clear function names, quite organized, well structured,
  20. plain C coding and, the most important, primarily intended to LEARN videogames programming.
  21. I've coded quite a lot in C# and XNA and I really love it (in fact, my students learn C# with XNA after C),
  22. so, I decided to use C# language notation and XNA naming conventions. That way, students can jump from
  23. raylib to XNA (or MonoGame) extremely easily.
  24. raylib started as a weekend project and after three months of hard work, here it is the first version.
  25. Enjoy it.
  26. features
  27. --------
  28. * Written in plain C code (C99)
  29. * Uses C# PascalCase/camelCase notation
  30. * Hardware accelerated using OpenGL 1.1
  31. * Transparencies support (RGBA Colors)
  32. * Custom color palette for better use on white background
  33. * Basic 3D Support (camera, basic models, OBJ models, etc)
  34. * Powerful Text module with SpriteFonts support
  35. raylib uses on its core module the outstanding [GLFW3] (http://www.glfw.org/) library. The best option by far I found for
  36. window/context and input management (clean, focused, great license, well documented, modern, ...).
  37. raylib is licensed under a zlib/libpng license like GLFW3. View [LICENSE] (https://github.com/raysan5/raylib/blob/master/LICENSE.md).
  38. tool requirements
  39. ------------------
  40. raylib has been developed using exclusively two tools:
  41. * Notepad++ (text editor) - [http://notepad-plus-plus.org/](http://notepad-plus-plus.org/)
  42. * MinGW (GCC compiler) - [http://www.mingw.org/](http://www.mingw.org/)
  43. Those are the tools I recommend to develop with raylib, in fact, those are the tools my students use.
  44. I believe those are the best tools to train spartan-programmers.
  45. Someone could argue about debugging. raylib is a library intended for learning and I think C it's a clear enough language
  46. to allow writing small-mid size programs with a printf-based debugging. All raylib examples have also been written this way.
  47. building
  48. --------
  49. raylib could be build with the following command lines (Using GCC compiler):
  50. cd raylib/src
  51. gcc -c core.c -std=c99 -Wall
  52. gcc -c shapes.c -std=c99 -Wall
  53. gcc -c textures.c -std=c99 -Wall
  54. gcc -c stb_image.c -std=c99 -Wall
  55. gcc -c text.c -std=c99 -Wall
  56. gcc -c models.c -std=c99 -Wall
  57. gcc -c vector3.c -std=c99 -Wall
  58. gcc -c audio.c -std=c99 -Wall
  59. gcc -c utils.c -std=c99 -Wall
  60. ar rcs raylib.a core.o shapes.o textures.o stb_image.o text.o models.o vector3.o utils.o audio.o
  61. To compile examples, make sure raylib.h is placed in include path and libraries raylib (libraylib.a) and glfw3 (libglfw3.a)
  62. are placed in the libraries path. It's also recommended to link with file icon.o for fancy raylib icon usage.
  63. cd raylib/examples
  64. gcc -o test_code.exe test_code.c icon.o -lraylib -lglfw3 -lopengl32 -lgdi32 -std=c99 -Wl,--subsystem,windows
  65. contact
  66. -------
  67. * Webpage: [http://www.raylib.com](http://www.raylib.com)
  68. * Twitter: [http://www.twitter.com/raysan5](http://www.twitter.com/raysan5)
  69. * Facebook: [http://www.facebook.com/raylibgames](http://www.facebook.com/raylibgames)
  70. If you are using raylib and you enjoy it, please, [let me know][raysan5].
  71. If you feel you can help, then, [helpme!] (http://www.raylib.com/helpme.htm)
  72. acknowledgments
  73. ---------------
  74. The following people have contributed in some way to make raylib project a reality. Big thanks to them!
  75. - [Zopokx](https://github.com/Zopokx)
  76. - [Elendow](http://www.elendow.com)
  77. [raysan5]: mailto:raysan@raysanweb.com "Ramon Santamaria - Ray San"