{"id":111087,"date":"2020-04-01T18:14:03","date_gmt":"2020-04-01T18:14:03","guid":{"rendered":"http:\/\/gamefromscratch.com\/post.aspx?id=acd9e300-5446-47df-b517-31e3615be617"},"modified":"2020-04-01T18:14:03","modified_gmt":"2020-04-01T18:14:03","slug":"raylib-3-0-released","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2020\/04\/01\/raylib-3-0-released\/","title":{"rendered":"Raylib 3.0 Released"},"content":{"rendered":"<p>Raylib 3.0 was <a href=\"https:\/\/raysan5.itch.io\/raylib\/devlog\/134369\/raylib-30-released\">released today<\/a>.&nbsp; Raylib is an open source, cross platform C based framework of tools and libraries for making games.&nbsp; Components of raylib can be used on their own, however you can also download a preconfigured development environment making it among the easiest ways to get started doing C or C++ game programming.&nbsp; <\/p>\n<p>Details of the 3.0 release:<\/p>\n<ul>\n<li>All <strong>global variables<\/strong> from the multiple raylib modules have been <strong>moved to a global context state<\/strong>, it has several benefits, first, better code <strong>readability <\/strong>with more comprehensive variables naming and categorization (organized by types, i.e. <code>CORE.Window.display.width<\/code>, <code>CORE.Input.Keyboard.currentKeyState<\/code> or <code>RLGL.State.modelview<\/code>). Second, it allows <strong>better memory management <\/strong>to load global context state dynamically when required (not at the moment), making it easy to implement a <strong>hot-reloading mechanism<\/strong> if desired.<\/li>\n<\/ul>\n<ul>\n<li>All <strong>memory allocations<\/strong> on raylib and its dependencies now use <code>RL_MALLOC<\/code>, <code>RL_FREE<\/code> and similar macros. Now users can easely hook their <strong>own memory allocations mechanism<\/strong> if desired, having more control on how memory is allocated internally by the library. Additionally, it makes it easier to port the library to <strong>embedded devices<\/strong> where memory control is critical. For more info check raylib issue <a href=\"https:\/\/github.com\/raysan5\/raylib\/issues\/1074\">#1074<\/a>.<\/li>\n<\/ul>\n<ul>\n<li>All <strong>I\/O file accesses<\/strong> from raylib are being moved to <strong>memory data access<\/strong>, now all I\/O file access is centralized into just four functions: <code>LoadFileData()<\/code>, <code>SaveFileData()<\/code>, <code>LoadFileText()<\/code>, <code>SaveFileText()<\/code>. Users can just update those functions to <strong>any I\/O file system<\/strong>. This change makes it easier to integrate raylib with <strong>Virtual File Systems<\/strong> or <strong>custom I\/O file implementations<\/strong>.<\/li>\n<\/ul>\n<ul>\n<li>All raylib <strong>data structures have been reviewed<\/strong><strong> and optimized<\/strong> for pass-by-value usage. One of raylib distinctive design decisions is that most of its functions receive and return data by value. This design makes raylib really simple for newcomers, <strong>avoiding pointers<\/strong> and <strong>allowing complete access to all structures data<\/strong> in a simple way. The downside is that data is copied on stack every function call and that copy could be costly so, all raylib data structures have been optimized to <strong>stay under 64 bytes<\/strong> for fast copy and retrieve.<\/li>\n<\/ul>\n<ul>\n<li>All raylib <strong>tracelog messages have been reviewed<\/strong> and categorized for a more comprehensive output information when developing raylib applications, now all display, input, timer, platform, auxiliar libraries, file-accesses, data loading\/unloading issues are properly reported with <strong>more detailed and visual messages<\/strong>.<\/li>\n<\/ul>\n<ul>\n<li><code>raudio<\/code> module has been <strong>internally reviewed<\/strong> to accomodate the new <code>Music<\/code> structure (converted from previous pointer format) and the module has been <strong>adapted to the highly improved <\/strong><a href=\"https:\/\/github.com\/dr-soft\/miniaudio\"><strong>miniaudio v0.10<\/strong><\/a>.<\/li>\n<\/ul>\n<ul>\n<li><code>text<\/code> module reviewed to <strong>improve fonts generation and text management functions<\/strong>, <code>Font<\/code> structure has been redesigned to better accomodate characters data, decoupling individual characters as <code>Image<\/code> glyphs from the font atlas parameters. Several improvements have been made to <strong>better support Unicode strings with UTF-8 encoding<\/strong>.<\/li>\n<\/ul>\n<ul>\n<li><strong>Multiple new examples added<\/strong> (most of them contributed by raylib users) and all examples reviewed for correct execution on most of the supported platforms, specially <strong>Web and Raspberry Pi<\/strong>. A detailed categorized table has been created on github for <a href=\"https:\/\/github.com\/raysan5\/raylib\/tree\/master\/examples\"><strong>easy examples navigation and code access<\/strong><\/a>.<\/li>\n<\/ul>\n<ul>\n<li>New <strong>GitHub Actions CI system<\/strong> has been implemented for <strong>Windows, Linux and macOS<\/strong> code and examples compilation on every new commit or PR to make sure library keeps stable and usable with <strong>no breaking bugs<\/strong>.<\/li>\n<\/ul>\n<p>Raylib is available on <a title=\"https:\/\/www.raylib.com\/\" href=\"https:\/\/www.raylib.com\/\">https:\/\/www.raylib.com\/<\/a>, with the source code <a href=\"https:\/\/github.com\/raysan5\/raylib\">hosted on GitHub<\/a> under the liberal ZLib license.&nbsp; The <a href=\"https:\/\/www.raylib.com\/cheatsheet\/cheatsheet.html\">raylib cheatsheet<\/a> is a one stop shop for learning the commands from the various libraries.&nbsp; Raylib is also well documented <a href=\"https:\/\/github.com\/raysan5\/raylib\/wiki\">on the Wiki<\/a>.<\/p>\n<p>Learn more about raylib in the <a href=\"https:\/\/youtu.be\/xx9ntuvA1t0\">video<\/a> below.<\/p>\n<p align=\"center\">[embedded content]<\/p>\n<p class=\"under\"> <span class=\"categories\"><a href=\"https:\/\/www.gamefromscratch.com\/category\/GameDev-News.aspx\">GameDev News<\/a><\/span> <span class=\"tags\"><a href=\"https:\/\/www.gamefromscratch.com\/?tag=\/CPP\" rel=\"tag\">CPP<\/a><\/span> <\/p>\n<hr>\n<p> &lt;!&#8211;<\/p>\n<p>&#8211;&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Raylib 3.0 was released today.&nbsp; Raylib is an open source, cross platform C based framework of tools and libraries for making games.&nbsp; Components of raylib can be used on their own, however you can also download a preconfigured development environment making it among the easiest ways to get started doing C or C++ game programming.&nbsp; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[72],"class_list":["post-111087","post","type-post","status-publish","format-standard","hentry","category-game-development","tag-gamedev-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/111087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=111087"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/111087\/revisions"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=111087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=111087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=111087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}