<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-37189295</id><updated>2026-06-05T16:36:15.054+02:00</updated><category term="gameboy"/><category term="unity3d"/><category term="zgb"/><category term="gbdk"/><category term="sdcc"/><category term="C++"/><category term="Unity"/><category term="bitbitjam"/><category term="boy"/><category term="cameras"/><category term="game"/><category term="interpolation"/><category term="FSM"/><category term="Game Boy"/><category term="Godot"/><category term="IMGUI"/><category term="Reflection"/><category term="ZGBJAM"/><category term="animator"/><category term="devkitpro"/><category term="engine"/><category term="gaphs"/><category term="homebrew"/><category term="machines"/><category term="nintendo 3ds"/><category term="nintendo ds"/><category term="state"/><category term="wii"/><title type='text'>Zalo DS Blog</title><subtitle type='html'>Another Homebrew development blog&#xa;Nintendo DS, Wii, Nintendo 3ds, Android, IOS</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>62</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-37189295.post-1262313236169284185</id><published>2020-01-08T06:55:00.002+01:00</published><updated>2020-01-10T08:16:11.508+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="devkitpro"/><category scheme="http://www.blogger.com/atom/ns#" term="engine"/><category scheme="http://www.blogger.com/atom/ns#" term="Game Boy"/><category scheme="http://www.blogger.com/atom/ns#" term="gameboy"/><category scheme="http://www.blogger.com/atom/ns#" term="Godot"/><category scheme="http://www.blogger.com/atom/ns#" term="homebrew"/><category scheme="http://www.blogger.com/atom/ns#" term="IMGUI"/><category scheme="http://www.blogger.com/atom/ns#" term="nintendo 3ds"/><category scheme="http://www.blogger.com/atom/ns#" term="nintendo ds"/><category scheme="http://www.blogger.com/atom/ns#" term="Reflection"/><category scheme="http://www.blogger.com/atom/ns#" term="Unity"/><category scheme="http://www.blogger.com/atom/ns#" term="unity3d"/><category scheme="http://www.blogger.com/atom/ns#" term="wii"/><category scheme="http://www.blogger.com/atom/ns#" term="zgb"/><category scheme="http://www.blogger.com/atom/ns#" term="ZGBJAM"/><title type='text'>A little bit of what I&#39;ve been working on</title><content type='html'>Happy New Year everyone! Since I posted this on twitter in summer I&#39;ve been willing to sit a little bit and write a small post talking about all the things I have been coding during the past year and a bit further &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://twitter.com/Zal0/status/1157988601591926784&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;https://twitter.com/Zal0&quot; border=&quot;0&quot; data-original-height=&quot;129&quot; data-original-width=&quot;439&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRJBT_XaWPdQTWPbiKQJ-3i2E9r3zbWZWJDfY4PYn35bMXcpM7O6anCDUeBCu_qabQhPwXijvQMyzQQbPRU4v0VnRQZ6g-ihQ4SN_qKccvcQfH7FzSu4Jkf6542nGOkTh-H5VY/s1600/tweet.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
ZGB&lt;/h2&gt;
This year we celebrated the &lt;a href=&quot;https://itch.io/jam/zgb-jam-2&quot; target=&quot;_blank&quot;&gt;ZGB Jam 2&lt;/a&gt; and released 8 new games (see myprevious &lt;a href=&quot;http://zalods.blogspot.com/2019/08/zgbjam-2.html&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt;). I am still working on the engine and am very happy with how it has evolved over the years. A total of &lt;a href=&quot;https://github.com/Zal0/ZGB/wiki/Made-with-ZGB&quot; target=&quot;_blank&quot;&gt;new 13 games&lt;/a&gt; were released during 2019 and there are at least a couple more games in development that I am aware of. Working on an engine is cool but getting people to use it on their own is really satisfying&lt;br /&gt;
&lt;br /&gt;
My contribution for this year was &lt;a href=&quot;https://zalo.itch.io/kaijufeeder&quot; target=&quot;_blank&quot;&gt;Kaijuu Feeder&lt;/a&gt;. I was happy with the result and would have loved working a litte bit more on it. Sadly I don&#39;t have time for that&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://raw.githubusercontent.com/Zal0/zgbjam2019/master/res/marketing/kaiju.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://raw.githubusercontent.com/Zal0/zgbjam2019/master/res/marketing/bgb00008.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://raw.githubusercontent.com/Zal0/zgbjam2019/master/res/marketing/kaiju.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://raw.githubusercontent.com/Zal0/zgbjam2019/master/res/marketing/kaiju.gif&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://raw.githubusercontent.com/Zal0/zgbjam2019/master/res/marketing/kaiju.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://raw.githubusercontent.com/Zal0/zgbjam2019/master/res/marketing/bgb00007.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I love working on &lt;a href=&quot;https://github.com/Zal0/ZGB&quot; target=&quot;_blank&quot;&gt;ZGB&lt;/a&gt; and still have great plans for the future but I just dedicate it a few weeks along the year&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Z3D&lt;/h2&gt;
Most of my spare time is dedicated to Z3D, the 3d engine that I used to create &lt;a href=&quot;https://zalods.blogspot.com/2015/08/whack-mania-on-nintendo-3ds.html&quot; target=&quot;_blank&quot;&gt;Whack Mania&lt;/a&gt;, &lt;a href=&quot;https://zalods.blogspot.com/2016/01/rokoban-for-nintendo-3ds.html&quot; target=&quot;_blank&quot;&gt;Rokoban&lt;/a&gt; and &lt;a href=&quot;https://zalods.blogspot.com/2015/07/jumping-jack-for-3ds.html&quot; target=&quot;_blank&quot;&gt;Jumping Jack&lt;/a&gt; (and other title that I have decided not to release yet) Because the last thing I published with the engine was the &lt;a href=&quot;https://gbatemp.net/threads/release-whack-mania-and-rokoban-versions-for-the-wii.441349&quot; target=&quot;_blank&quot;&gt;Wii ports&lt;/a&gt; back in 2016 it really makes sense to think that I have abandoned the project... so let&#39;s recap a little bit&lt;br /&gt;
&lt;br /&gt;
Z3D is a 3d cross platform engine available for Nintendo DS, Windows, Wii, Android, IOS and Nintendo 3ds. It hasn&#39;t been relased yet because is not as much user friendly as I&#39;d like it to be. Because of that in mid 2018, tired of all the issues caused by 3ds max, I started working on an editor inspired by (not gonna lie to you) Unity3d. I work with Unity3d on my daily basis so at some point I thought it would be great to have an editor like it for homebrew games (or at least try to do it). Here is the list of features I have implemented so far&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
ZIMGUI&lt;/h3&gt;
Prior to Unity3d I never heard before of &lt;a href=&quot;https://en.wikipedia.org/wiki/Immediate_mode_GUI&quot; target=&quot;_blank&quot;&gt;Immediate mode GUIs&lt;/a&gt;. As a programmer I grew up with editors like Borland C++ Buider, Visual Studio, NetBeans, Eclipse and some others all of them using what is known as Retained GUIs. Although easy to use, for small tools nothing beats IMGUI. People not very skilled are capable of writing complex tools for Unity3d. Try to build a C++ UI using Visual Studio, try to maintain that! IMGUI lacks performance (as if working with Eclipse didn&#39;t) but since it is designed for editor tools (you can use it on games, but... don&#39;t do it) it is perfectly acceptable&lt;br /&gt;
&lt;br /&gt;
The Unity team have been kind enough to write a few docs here and there showing how its implementation works&lt;br /&gt;
- &lt;a href=&quot;https://blogs.unity3d.com/2015/12/22/going-deep-with-imgui-and-editor-customization&quot; target=&quot;_blank&quot;&gt;https://blogs.unity3d.com/2015/12/22/going-deep-with-imgui-and-editor-customization&lt;/a&gt;&lt;br /&gt;
- &lt;a href=&quot;https://docs.unity3d.com/Manual/gui-Basics.html&quot; target=&quot;_blank&quot;&gt;https://docs.unity3d.com/Manual/gui-Basics.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There are also a few open source alternatives that are worth taking a look at&lt;br /&gt;
- &lt;a href=&quot;https://github.com/ocornut/imgui&quot; target=&quot;_blank&quot;&gt;DearIMGUI &lt;/a&gt;&lt;br /&gt;
- &lt;a href=&quot;https://github.com/vurtun/nuklear&quot; target=&quot;_blank&quot;&gt;Nuklear &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In the end I decided to create my custom solution for several reasons: &lt;br /&gt;
- The way events are handled in both solution is different from how Unity handles them&lt;br /&gt;
- Performance can be better, you don&#39;t need to draw all the editor windows every frame&lt;br /&gt;
- Lack of some features like dockable windows (which still seems to be a WIP) and customization options&lt;br /&gt;
- Although very portable I&#39;d need to invest time to get them working on some platforms that I support (like the Wii or the DS). If I create my custom solution with the code I already have I won&#39;t have that problem. I am planning to add more platforms in the future and I don&#39;t want to have a 3rd party library avoiding me to do so&lt;br /&gt;
- I felt skilled enough to try and create my own library and I wanted to give it a try&lt;br /&gt;
&lt;br /&gt;
You can of course say that there is no point on reinventing the wheel but, hey! I am building a game engine from scratch here so maybe it&#39;s a little bit late for that :P. I have already implemented:&lt;br /&gt;
- Labels&lt;br /&gt;
- Buttons&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6IIMgsGGk63cpS-a5VCMUnHcYZtFw_6Sv44Y3LQ-XPP6ujn33XfHu_eRIS6EG89pPRUQmJIdt7jXd8eQFCDFBu2vhnGz86w-VLD0gpWC2tv7lsb8ci9_zdbpS8IAFVTQphfQ/s1600/zimgui-textfield.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; data-original-height=&quot;34&quot; data-original-width=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF-Jygw1hxBAs_bpyEyU1c8S-xmuEv8UGibYq56nd50A5lSRhMMsSpm2TVB5iYxGZv7LXH7fzeMkeu24sKq46dDm-wR6n8h8zJ-W_oj-ttQvMUK9x5XDUYi1SLmIZFR0CBx84I/s1600/zimgui-button.gif&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
- Checkboxes&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6IIMgsGGk63cpS-a5VCMUnHcYZtFw_6Sv44Y3LQ-XPP6ujn33XfHu_eRIS6EG89pPRUQmJIdt7jXd8eQFCDFBu2vhnGz86w-VLD0gpWC2tv7lsb8ci9_zdbpS8IAFVTQphfQ/s1600/zimgui-textfield.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; data-original-height=&quot;47&quot; data-original-width=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_uzfB6nJmllVil3xlZuyKTtEic82j6qnCtZWQTtLWtjsZZ-ljtFGsAtZ3xvDCjzTLPjRUeG4aMKL2zL-R0r7kqCynV-UanuCFc-nyosO85HGaw2o7pgI6TGR9cnQKBR_Xke70/s1600/zimgui-checkbox.gif&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
- Combo boxes / enum combo boxes, thanks to &lt;a href=&quot;https://github.com/Zal0/Reflectpp&quot; target=&quot;_blank&quot;&gt;Reflectpp&lt;/a&gt; enum combo boxes are handled automatically given an enum tye&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6IIMgsGGk63cpS-a5VCMUnHcYZtFw_6Sv44Y3LQ-XPP6ujn33XfHu_eRIS6EG89pPRUQmJIdt7jXd8eQFCDFBu2vhnGz86w-VLD0gpWC2tv7lsb8ci9_zdbpS8IAFVTQphfQ/s1600/zimgui-textfield.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; data-original-height=&quot;244&quot; data-original-width=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwvnRFOB0R29Xis676aAqUQ4Inp3e_LxJHMLZfIFcwwTJFZ4Wi6pnVoNMvfUusxsS-Sh3kIAXsO-EysBogaVdFB_hWz8FrZPK97P8e6PHpaWYwEhcNMSRGGUI_uClgW3rQ0sn/s1600/zimgui-combobox.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
- Textfields&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6IIMgsGGk63cpS-a5VCMUnHcYZtFw_6Sv44Y3LQ-XPP6ujn33XfHu_eRIS6EG89pPRUQmJIdt7jXd8eQFCDFBu2vhnGz86w-VLD0gpWC2tv7lsb8ci9_zdbpS8IAFVTQphfQ/s1600/zimgui-textfield.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; data-original-height=&quot;64&quot; data-original-width=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6IIMgsGGk63cpS-a5VCMUnHcYZtFw_6Sv44Y3LQ-XPP6ujn33XfHu_eRIS6EG89pPRUQmJIdt7jXd8eQFCDFBu2vhnGz86w-VLD0gpWC2tv7lsb8ci9_zdbpS8IAFVTQphfQ/s1600/zimgui-textfield.gif&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
- Color picker&lt;br /&gt;
- Scroll bars&lt;br /&gt;
- Trees&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjstEo9ZfN7CkhzIcuF2aWY3_NDyvCijxLAmpn_n8VUpx0xHPaaE-NKed1ZQ1aMXM_RKyK5mKKULEhfu4hfRS1EKk-5lrgIL33uLPb5AwfCCXHdQ8fHvujbP4qGFM2W6s2QFd-u/s1600/zimgui-trees.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; data-original-height=&quot;304&quot; data-original-width=&quot;197&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjstEo9ZfN7CkhzIcuF2aWY3_NDyvCijxLAmpn_n8VUpx0xHPaaE-NKed1ZQ1aMXM_RKyK5mKKULEhfu4hfRS1EKk-5lrgIL33uLPb5AwfCCXHdQ8fHvujbP4qGFM2W6s2QFd-u/s1600/zimgui-trees.gif&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
- Views, which are capable of handling views within views and automatically display scroll bars when needed&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3-qDYm1sl5t0wQBs-GPYvMCgJjoVMoY5M0EVxNaC5ZFqhYjaN9BIQrL1gtwbHYH3CuA5zS6tkCJUwN3d-NSiYODAYhbpEmgYYAvZe2OvGVDHCMY6kYBSIDRZK5Gx9I8rmPU8T/s1600/zimgui-views.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; data-original-height=&quot;302&quot; data-original-width=&quot;324&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3-qDYm1sl5t0wQBs-GPYvMCgJjoVMoY5M0EVxNaC5ZFqhYjaN9BIQrL1gtwbHYH3CuA5zS6tkCJUwN3d-NSiYODAYhbpEmgYYAvZe2OvGVDHCMY6kYBSIDRZK5Gx9I8rmPU8T/s320/zimgui-views.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
- AsssetField&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6IIMgsGGk63cpS-a5VCMUnHcYZtFw_6Sv44Y3LQ-XPP6ujn33XfHu_eRIS6EG89pPRUQmJIdt7jXd8eQFCDFBu2vhnGz86w-VLD0gpWC2tv7lsb8ci9_zdbpS8IAFVTQphfQ/s1600/zimgui-textfield.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; data-original-height=&quot;113&quot; data-original-width=&quot;337&quot; height=&quot;107&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdgc_iIXl3YaWwUkP3Y00Te7_mP4eOXauBLzmxtCx7wuqOr36Tx56mRpC0FFZnlXs2RQn3722N_2huA0cwdEE-Py3SBW43zcx4YlX_in_IVeQ2kjJJ48uyqbsdzOpLnwTanFYr/s320/zimgui-assetfield.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
REFLECTION&lt;/h3&gt;
There is something I love from Unity and that&#39;s its easiness of use. One of its strongest points is how easy it is to configure components parameters in the editor. This is achieved using reflection available in C#, and it&#39;s automatic, the user doesn&#39;t need to create any custom inspector (although he can if he wants to)&lt;br /&gt;
C++ does not support reflection. Again, there are a few solutions available. A quick search in google will show you some popular options&lt;br /&gt;
- &lt;a href=&quot;https://preshing.com/20180116/a-primitive-reflection-system-in-cpp-part-1/&quot;&gt;https://preshing.com/20180116/a-primitive-reflection-system-in-cpp-part-1/&lt;/a&gt;&lt;br /&gt;
- &lt;a href=&quot;https://github.com/rttrorg/rttr&quot;&gt;https://github.com/rttrorg/rttr&lt;/a&gt;&lt;br /&gt;
- &lt;a href=&quot;http://pfultz2.com/blog/2012/07/31/reflection-in-under-100-lines/&quot;&gt;http://pfultz2.com/blog/2012/07/31/reflection-in-under-100-lines/&lt;/a&gt;&lt;br /&gt;
- &lt;a href=&quot;http://donw.io/post/reflection-cpp-1/&quot;&gt;http://donw.io/post/reflection-cpp-1/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
some of them are pretty cool, but again I didn&#39;t fully like them because:&lt;br /&gt;
- since my engine will work on legacy platforms I wanted a solution that worked on c++ 98 (not c++11 and definitely not c++17)&lt;br /&gt;
- I wanted a solution that required the minimun steps from the user. Having to declare a var and then add its reflecion info in the cpp are 2 steps, and I know it can be done with just one&lt;br /&gt;
- I wanted to have all that Unity offers on its editor: inheritance, composition, vectors, enums, strings&lt;br /&gt;
&lt;br /&gt;
In the end I came up with a library called Reflectpp, and decided to make it open source. It is available on &lt;a href=&quot;https://github.com/Zal0/Reflectpp&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
ZEDITOR&lt;/h3&gt;
With both ZIMGUI and Reflectpp I could start working on the editor. Just like Unity and other engines like Godot I loved the idea of the editor being implemented with the engine itself, that way porting it to MacOS or Linux when the time comes will be much easier. In this editor I have started working on the next windows:&lt;br /&gt;
- Scene: lets me navigate through all the objects&lt;br /&gt;
- Game: shows how the game is going to look like&lt;br /&gt;
- Hierarchy: shows a list of all the objects available and how they are parented&lt;br /&gt;
- Resources: shows a list of all the resources available in the current build&lt;br /&gt;
- Inspector: displays the information (using reflection) of the current selected object&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFHpRyj82K4R8kZm_QHpeYh-kpcVImFG2tfPS2AyryU8c05oS4H982G1dmZ54M6tuDZn3lcyjrpSMeXkL4HQnuwclNyeBIPdPLWmgmoaAui-Y48LLWRIfBmaW3Hh3olm1v5PVp/s1600/ZEditor2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;760&quot; data-original-width=&quot;1280&quot; height=&quot;379&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFHpRyj82K4R8kZm_QHpeYh-kpcVImFG2tfPS2AyryU8c05oS4H982G1dmZ54M6tuDZn3lcyjrpSMeXkL4HQnuwclNyeBIPdPLWmgmoaAui-Y48LLWRIfBmaW3Hh3olm1v5PVp/s640/ZEditor2.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;How the editor looks right now (click to enlarge)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
For these windows I had to spend a lot of time working on some features like&lt;br /&gt;
&lt;h4&gt;
Handles&lt;/h4&gt;
Besides ZIMGUI I needed another system to manipulate 3d objects. It also works as immediate mode but in this case it lets me manipulate 3d objects in space. I have gizmos for:&lt;br /&gt;
- Translate&lt;br /&gt;
- Rotate&lt;br /&gt;
- Scale&lt;br /&gt;
&lt;span id=&quot;goog_1231430222&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1231430223&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0OMrEUJbT5kkgGJLV4d04MpZTAT1RDDgfrPuzbVTH7vtSYVPi1t_D54NMe38PlEQKH36JIIVqqC02uAU5c2GKFz9hcJaLyWBNIyunqTVSRzyPD0yd3_hXmmXaDvDL8fpB_aTs/s1600/translate.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;188&quot; data-original-width=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0OMrEUJbT5kkgGJLV4d04MpZTAT1RDDgfrPuzbVTH7vtSYVPi1t_D54NMe38PlEQKH36JIIVqqC02uAU5c2GKFz9hcJaLyWBNIyunqTVSRzyPD0yd3_hXmmXaDvDL8fpB_aTs/s1600/translate.gif&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0OMrEUJbT5kkgGJLV4d04MpZTAT1RDDgfrPuzbVTH7vtSYVPi1t_D54NMe38PlEQKH36JIIVqqC02uAU5c2GKFz9hcJaLyWBNIyunqTVSRzyPD0yd3_hXmmXaDvDL8fpB_aTs/s1600/translate.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;188&quot; data-original-width=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTR422KQdsC-wM1ryd1H-TqmpdVVXYbCp6LFVybeavWkTjMicXq8Jc5pDufFt7SInwZIiReBOj8vHcSz2pEJsUBlenNHV2dHUdKQ5IleXQqm0WM8r57Z2WLxiVM58hXxVWeWax/s1600/rotate.gif&quot; /&gt; &lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0OMrEUJbT5kkgGJLV4d04MpZTAT1RDDgfrPuzbVTH7vtSYVPi1t_D54NMe38PlEQKH36JIIVqqC02uAU5c2GKFz9hcJaLyWBNIyunqTVSRzyPD0yd3_hXmmXaDvDL8fpB_aTs/s1600/translate.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;188&quot; data-original-width=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitTHPG_Xv6yjxadiAZ0NvHO5I57KOeyK_y-ZDAbu3nrsqmuUuPdEquNc_BChdF_Z0chsm0aL7SNbL4MF_oRoYbkfjM3n2W52mzO0wTd7Cy2LVgIo_hZGMvbF4fUb_3xMyBwGAL/s1600/scale.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;
Custom inspectors&lt;/h4&gt;
Automatic inspectors are ok for small components but when I started serializing my materials info I realized I needed to be able to create some custom inspectors. In the future I&#39;d like to add also custom editors and custom properties&lt;br /&gt;
Again, I needed to do this in a way that resulted easy for the final user. Take a look at how any of my materials are displayed with and without custom inspector&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgllEHWaV6MG8ReEm9_6KqXJBoqgfQPKEmeV3p1TKq0v30dJ1i7fjM593wQjBV3f8T3rPnaaMZ36A7Jax1l6BMQS7x_9Lm_b7DOFwxcGIbqK_CvJsGPIBnxvVCe4a_wCqYZMjyG/s1600/Normal+editor.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;906&quot; data-original-width=&quot;514&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgllEHWaV6MG8ReEm9_6KqXJBoqgfQPKEmeV3p1TKq0v30dJ1i7fjM593wQjBV3f8T3rPnaaMZ36A7Jax1l6BMQS7x_9Lm_b7DOFwxcGIbqK_CvJsGPIBnxvVCe4a_wCqYZMjyG/s400/Normal+editor.PNG&quot; width=&quot;226&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc0K1ozzFXhChwK3UxdUzRQymiWCMiusOEOapXeNDdqbMWLnGD_zYiGpYUV2bL07SmdmsY-qouu3ga46nd6IBN8jdUrwju_mWo-lxDNjul10gKXwK9MeLsmCISYCFDp7-9PZfQ/s1600/Custom+Editor.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;603&quot; data-original-width=&quot;515&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc0K1ozzFXhChwK3UxdUzRQymiWCMiusOEOapXeNDdqbMWLnGD_zYiGpYUV2bL07SmdmsY-qouu3ga46nd6IBN8jdUrwju_mWo-lxDNjul10gKXwK9MeLsmCISYCFDp7-9PZfQ/s400/Custom+Editor.PNG&quot; width=&quot;341&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
The Asset manager&lt;/h4&gt;
The last thing I&#39;ve been working on is an asset manager. The asset manager mantains a database of assets for the project and must be capable of &lt;br /&gt;
- given a path, load the asset in that path and if it has already been loaded increase its internal reference count. The asset manager must avoid loading the same asset twice&lt;br /&gt;
- given an asset, return the path where this asset was loaded from. This is very useful in the inspector Window when the user clicks on an AssetField and you see a bounce animation in the resources Window showing where it came from&lt;br /&gt;
&lt;br /&gt;
The AssetManager works with Assets. so far I have created Assets for:&lt;br /&gt;
- Textures&lt;br /&gt;
- Meshes&lt;br /&gt;
- Materials&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsc6udjWP8KbL3l2nZTjJ2oCKToe1CYWAxeV5IRXyqMJQxMbW7p2OzH8SViSF34vqHDI1cZi0CtE6o4T31RFVoZEHoemFJ3HuLmkgf8NgvhVfypBl8UNGcZfVTYxG7AasOvhBX/s1600/resources.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;320&quot; data-original-width=&quot;432&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsc6udjWP8KbL3l2nZTjJ2oCKToe1CYWAxeV5IRXyqMJQxMbW7p2OzH8SViSF34vqHDI1cZi0CtE6o4T31RFVoZEHoemFJ3HuLmkgf8NgvhVfypBl8UNGcZfVTYxG7AasOvhBX/s1600/resources.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
TO DO&lt;/h3&gt;
And this is more or less what I&#39;ve been working on. There is still a lot of work to do before releasing anything. During the next months I&#39;ll continue working on the AssetManager, adding more assets:&lt;br /&gt;
- Fonts&lt;br /&gt;
- Sounds, this two will be easy to update&lt;br /&gt;
- Animations, the way they are handled right now makes it hard to share information between duplicated nodes. Animation retargeting works pretty well though&lt;br /&gt;
- Prefabs, this is probably where most work needs to be done. I&#39;d love to have nested prefabs too&lt;br /&gt;
- Scenes... still need to check if I need a separate asset for scenes instead of using prefabs for them (like Godot does)&lt;br /&gt;
&lt;br /&gt;
But the work with the asset manager won&#39;t be finished when I have all this. I also need to work on&lt;br /&gt;
- Adding assets to the project: right now I have a text file with the list of assets and the export options for the different platforms. This works, but is very primitive. I like how Unity handles it, automatically adding all the content contained into the project folder but then stripping unused content from the build&lt;br /&gt;
- Uniquelly identifying assets for serialization. Unity uses UUIDs for this and meta files for each file added into the project. Also there is the concept of file ids for assets contained within assets (for example a component inside a prefab)&lt;br /&gt;
- Automatically updating loaded assets when the content on disk has changed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is a lot of stuff to be done but since it&#39;s my hobby I will continue working on it. I just wanted to write a quick post showing you all the things I have been working on and also let you know that I am still alive and kicking even though is getting hard to find time to dedicate to all this :)</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/1262313236169284185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/1262313236169284185' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/1262313236169284185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/1262313236169284185'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2020/01/a-little-bit-of-what-ive-been-working-on.html' title='A little bit of what I&#39;ve been working on'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRJBT_XaWPdQTWPbiKQJ-3i2E9r3zbWZWJDfY4PYn35bMXcpM7O6anCDUeBCu_qabQhPwXijvQMyzQQbPRU4v0VnRQZ6g-ihQ4SN_qKccvcQfH7FzSu4Jkf6542nGOkTh-H5VY/s72-c/tweet.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-433994721162379001</id><published>2019-08-04T17:28:00.000+02:00</published><updated>2019-08-04T20:06:06.624+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gameboy"/><category scheme="http://www.blogger.com/atom/ns#" term="gbdk"/><category scheme="http://www.blogger.com/atom/ns#" term="sdcc"/><category scheme="http://www.blogger.com/atom/ns#" term="zgb"/><title type='text'>ZGBJAM 2</title><content type='html'>The &lt;a href=&quot;https://itch.io/jam/zgb-jam-2&quot;&gt;ZGBJAM 2&lt;/a&gt; was hold during the weekend August 26t-28th, 2019. This is the second edition of our mini-jam focused on the creation of games for the Game Boy and specifically using &lt;a href=&quot;https://github.com/Zal0/ZGB&quot;&gt;ZGB&lt;/a&gt;. We&#39;ll be happy if more people were to join us (actually someone did!) but in the meantime this mini-jam has become a great excuse to share a good weekend with some friends and we even created a few games in the meantime!&lt;br /&gt;
&lt;br /&gt;
A total of 8 entries were &lt;a href=&quot;https://itch.io/jam/zgb-jam-2/entries&quot;&gt;submitted&lt;/a&gt; even with the absence of &lt;a href=&quot;https://twitter.com/Tatos_&quot;&gt;Tatos&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/Deebrol&quot;&gt;Deebrol&lt;/a&gt; who made some fantastic games the past year&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Xx6hcm4ARtkudmgyWZasPL9ThqgPIrdRg5OrKSNSEuw-YdAotSAI1xH9-Bst0biZChC2u4STqEW-lf9sHz6RyaGGifwPGfDEgbAHtw_CyH08SOOv32njL4u-fMaZWoLWqp2B/s1600/spetoblast.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Xx6hcm4ARtkudmgyWZasPL9ThqgPIrdRg5OrKSNSEuw-YdAotSAI1xH9-Bst0biZChC2u4STqEW-lf9sHz6RyaGGifwPGfDEgbAHtw_CyH08SOOv32njL4u-fMaZWoLWqp2B/s1600/spetoblast.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Espeto Blast! &lt;/b&gt;by &lt;a href=&quot;https://twitter.com/sergiodeprado&quot;&gt;sergeeo&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Collect the falling sardines and throw your espetos into the pipes (some kind of internal joke, but it is a fun game anyways :P) As usual the music is awesome&lt;br /&gt;
&lt;a href=&quot;https://twitter.com/Tatos_/status/1025044158208253952&quot;&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYsyHBhnvR5V1EX_wBG-hjRwYoUdMXQO9PTN9xZ-Q5JUbqXDqkJKk1OkHLSMFJiH-RdHzh7YL9DdGkDnFMQUBFVTI09LttSC-8iW_r3d_egMsRUMmPqKxiXGH7RRlxSfu8HYhw/s1600/lobopajaros.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYsyHBhnvR5V1EX_wBG-hjRwYoUdMXQO9PTN9xZ-Q5JUbqXDqkJKk1OkHLSMFJiH-RdHzh7YL9DdGkDnFMQUBFVTI09LttSC-8iW_r3d_egMsRUMmPqKxiXGH7RRlxSfu8HYhw/s1600/lobopajaros.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_R4WJZLDDeZqCzTtMkAgeOKKefbutMn2RFsvWdVbv8-YWfY072R11kSQWPnfsTmbNBZdqvSlC3bLiiRXPTzfMRdYWt4W4oL2q0y-wQlsA6UHODMu2BXToEvFbvPnQPrgCdTjK/s1600/boun-ma-ze.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;El topo y los pájaros &lt;/b&gt;by &lt;a href=&quot;https://twitter.com/david_erosa&quot;&gt;David Erosa&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The title is in spanish meaning &quot;The mole and the birds&quot;. You are a mole, so throw carrots to the birds to avoid them getting into your lair&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAHAIjlaXpGX8C1ANg_MRbPuvr2WLUBOz6NeBWIE2faT3S83_BCdiJJIIqpdKsaRk89olobhEd_NCccIOmYllPuwaDT4vyH3zN9UyEuyB6NJL_sDBtZYRiEfexvkP35odqkfNf/s1600/guardinghost.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAHAIjlaXpGX8C1ANg_MRbPuvr2WLUBOz6NeBWIE2faT3S83_BCdiJJIIqpdKsaRk89olobhEd_NCccIOmYllPuwaDT4vyH3zN9UyEuyB6NJL_sDBtZYRiEfexvkP35odqkfNf/s1600/guardinghost.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Mb7AW0U7uVCF8JSWyf9W_ILWPNcTJev9fPGXme9MKiPKOv8Sd7aR8-KNonJmfsCum_beysJlp1tIiMCCuQja4xSwX7YZXr8M5kYtIAEBlIdxfZLXjtjhyboC5JdyL1WGOtSb/s1600/axebound.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Guardian Ghost &lt;/b&gt;by &lt;a href=&quot;https://twitter.com/MaikelOrtega_&quot;&gt;Maikel Ortego&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A game with randomly generated dungeons and using colors for the GameBoy Color&lt;br /&gt;
Probably the most ambitious game of the jam and the one that helped me fix a couple of memory bugs in the engine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-jnRpgndorVSDCwpsHJCWOVNUXLDtu01iyi6-5TpuCmGslLnJVW-1-31_oIy87gw9bLW9qJImQKquQiV2eRpKMazNVaUoNx384JHZYDqF44dM5mjRBRSAunTgDlOFGZ23fTln/s1600/hungrybirds.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-jnRpgndorVSDCwpsHJCWOVNUXLDtu01iyi6-5TpuCmGslLnJVW-1-31_oIy87gw9bLW9qJImQKquQiV2eRpKMazNVaUoNx384JHZYDqF44dM5mjRBRSAunTgDlOFGZ23fTln/s1600/hungrybirds.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Hungry Birds&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/jshfrisby&quot;&gt;Joshua Frisby&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This one was a big surprise because it was made by someone from internet. The mechanic is simple, you make 3 birds jump with three different buttons and you need to get the food and avoid the rocks. It has music!&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4vl72ku5Y5C5aZ3PSazB2luYk6YMFpqkPcH0EjM9Onrvev9Z22PbbJlPN3p5i0lyh-SGda4H_jaIK6lN_oRygbdL0kaO3w1WnJ4DMPO1ITQQ9HusWON9CGcKxxYkj6gSjcOlq/s1600/hungrymonster.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4vl72ku5Y5C5aZ3PSazB2luYk6YMFpqkPcH0EjM9Onrvev9Z22PbbJlPN3p5i0lyh-SGda4H_jaIK6lN_oRygbdL0kaO3w1WnJ4DMPO1ITQQ9HusWON9CGcKxxYkj6gSjcOlq/s1600/hungrymonster.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlc0zgM9E8_Ej3CyehMcIbE2NG56ic-P_kA6KN71OtuNo5Rog1NigOrXYjgaZXvqDlhmv-gpMsFkIUBAwEMbLL-NtDD-2xCFdlwhb4fyQ5v0TWgd-XcMl0hQdGv3LRgb-9Y0u/s1600/deckbouncer.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Hungry Monster &lt;/b&gt;by &lt;a href=&quot;https://twitter.com/rvaquero82&quot;&gt;Raúl Vaquero&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Get the food and avoid the rest of falling objects with some cool animations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFMpRRdiZdpR6uG5o_lbiNUIeF1VtmY8SEm1MCngfdl8-pR_-DOi8Ct6tVsO68Zupa7aF3X_Mvv27LOAl-Q8X-xRXhYAoUD08VXama4Waq0ZWIgVif6e2Hv_5iLDBxuocYbB3e/s1600/kaiju.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFMpRRdiZdpR6uG5o_lbiNUIeF1VtmY8SEm1MCngfdl8-pR_-DOi8Ct6tVsO68Zupa7aF3X_Mvv27LOAl-Q8X-xRXhYAoUD08VXama4Waq0ZWIgVif6e2Hv_5iLDBxuocYbB3e/s1600/kaiju.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYWmJopEg0nVPphYOaEwRjJsRTQ6cm9LZxjV3lwQ9vFeQLsXaCWFxntOdCtKqek04VnsyMTibHLCKiD1GyYPsDfLAXGyZg_X7D60oSVGToKrtSzlzCz2NOuyh3PPeQIJ8cu1ye/s1600/shieldbouncer.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Feed the Kaiju &lt;/b&gt;by &lt;a href=&quot;https://twitter.com/Zal0&quot;&gt;Zal0&lt;/a&gt; (me!) and &lt;a href=&quot;https://www.artstation.com/abishai&quot;&gt;abishai&lt;/a&gt; &lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This was my entry! Drop the claw, get the chicken and feed the kaiju! I did this game joining forces with &lt;a href=&quot;https://www.artstation.com/abishai&quot;&gt;Emilio&lt;/a&gt; becuase the past year I realize I needed some extra help if I wanted to make something decent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7WXc3P1ay5WxKPxyzOxNlJ0jdW74dxrHtjO8lmrYK0CXGES6p6JzoTZ-BpFRlrZmciuzgr-TioeI5wMYj0DKhCAFRNJL06V4jJzlHuVpIRkhJZLnFnizzeSZlsiFVJdqdDAiX/s1600/muffin.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7WXc3P1ay5WxKPxyzOxNlJ0jdW74dxrHtjO8lmrYK0CXGES6p6JzoTZ-BpFRlrZmciuzgr-TioeI5wMYj0DKhCAFRNJL06V4jJzlHuVpIRkhJZLnFnizzeSZlsiFVJdqdDAiX/s1600/muffin.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOoBlpckKZOP6FdkRLG67dNRAVsDyvqN7ouM4RZ18tK1ZD9Uy75dRDsmOQZDDl4fm4c9CJmULhHroQYbkscWZpLKZd7IyANm_LismKPeti4ASsMDr1tg-IMyX79XVdckU7EtL9/s1600/basketcaseboy.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Muffin the alpaca&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/ulisesfronze&quot;&gt;Fronze&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Run across the infinite Alpaca&#39;s Valley and get all the apples you can&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKajMKrxlBLd-NB9Ul_GUusTVWXJg_lVZJs1TEZWk9MkvldqmfjyziXWth9xHx2zFbEbFw5h_GxBajWz_fYN50SuXTiU2JyKP5ZrPU4oaeHauNB7IkoB_v2TLFLII_jpPnU4x0/s1600/soviet.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKajMKrxlBLd-NB9Ul_GUusTVWXJg_lVZJs1TEZWk9MkvldqmfjyziXWth9xHx2zFbEbFw5h_GxBajWz_fYN50SuXTiU2JyKP5ZrPU4oaeHauNB7IkoB_v2TLFLII_jpPnU4x0/s1600/soviet.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitPZjys5OL5H-ElqYJ7QVh4LRfW2-UzSVNO9fxTI8yDvUpjtUyJ-kYKGL9aeG6b_FNB2uMlIMDjNwd231vSGL7hZ3Rm2zRS69r9TwB-NOcbSvYZ81w7SAR9zKgd3sCl9MEwE3R/s1600/buggytrollminigolf.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Soviet Snake&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/dani_mrquez&quot;&gt;Daniel Márquez&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you like good music this is the game for you. Ah, and it also has a snake game on it!&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
Although things have changed a little bit in the past years with more and more games being created for the old handheld (specially since the release of &lt;a href=&quot;https://www.gbstudio.dev/&quot;&gt;GB Studio&lt;/a&gt;) I still think there is room for ZGB. In my opinion both engines are targetted to different groups of developers with GBStudio more focused on artists with no knowledge of programming at all and ZGB being more targeted to (high level) coders. There is even a third group of developers who love asm and squeezing the machine. I think there is room for all of us out there&lt;br /&gt;
&lt;br /&gt;
I have a big list of features to implement but since the first ZGBJAM I have been specially working on making stuff easier to use in general. Here is the list of things I have been worwing on during the past weeks:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;since both GBTD and GBMB don&#39;t support input arguments people were 
forced to manually export and save after making any change. Also the 
exported info is not good enought since they only give you access to 
sprites and map data but you cannot get the height, width, bank and 
other interesting parameters forcing users to declare all these fields 
in their code (and having a lot of issues when changing one of them). 
Thanks to the good documentation of the file format (found &lt;a href=&quot;http://www.devrs.com/gb/hmgd/supp.html&quot;&gt;here&lt;/a&gt;)
 I was able to create my own exporter finally getting rid of all these 
limitations. I&#39;d like to create my own editors one day but in the 
meantime this solution is good enough&lt;/li&gt;
&lt;li&gt;I have added a modified version of &lt;a href=&quot;https://github.com/battlecoder/pngb&quot;&gt;pngb&lt;/a&gt;
 to the pipeline meaning you can finally import pngs and use them for 
splash screens without requiring the help of external tools&lt;/li&gt;
&lt;li&gt;A few bugs were fixed and specially a few of them related to memory 
management (I had the 2nd OAM buffer declared in the middle of the RAM) 
and collisions (I am sure there are still a few stupid decisions in the 
code because of how the old SDCC forced me to do things)&lt;/li&gt;
&lt;li&gt;All the tutorials have been reviewed and updated with the new workflow&lt;/li&gt;
&lt;/ul&gt;
I wish I had more time to dedicate to this project but I hope you understand that this is kind of my side-side-project and that when I started it I never expected it to become what it is today. I hope soon I can publish a little bit of what I&#39;ve been working on all these years.&lt;br /&gt;
&lt;br /&gt;
I finished the ZGBJAM first edition post asking if there will ever be a second edition of this jam. I&#39;m happy it actually happened. Will there be a 3rd one? Please, make it happen!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/433994721162379001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/433994721162379001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/433994721162379001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/433994721162379001'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2019/08/zgbjam-2.html' title='ZGBJAM 2'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Xx6hcm4ARtkudmgyWZasPL9ThqgPIrdRg5OrKSNSEuw-YdAotSAI1xH9-Bst0biZChC2u4STqEW-lf9sHz6RyaGGifwPGfDEgbAHtw_CyH08SOOv32njL4u-fMaZWoLWqp2B/s72-c/spetoblast.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-8142078689050980492</id><published>2019-01-07T16:04:00.001+01:00</published><updated>2019-01-08T13:28:57.060+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bitbitjam"/><category scheme="http://www.blogger.com/atom/ns#" term="boy"/><category scheme="http://www.blogger.com/atom/ns#" term="game"/><category scheme="http://www.blogger.com/atom/ns#" term="gameboy"/><category scheme="http://www.blogger.com/atom/ns#" term="gbdk"/><category scheme="http://www.blogger.com/atom/ns#" term="sdcc"/><category scheme="http://www.blogger.com/atom/ns#" term="zgb"/><title type='text'>ZGBJAM</title><content type='html'>Summer has become that time of the year when I stop everything I am working on and focus on &lt;a href=&quot;https://github.com/Zal0/ZGB&quot;&gt;ZGB&lt;/a&gt; for a few weeks. The &lt;a href=&quot;http://bitbitjam.com/&quot;&gt;bitbitjam&lt;/a&gt; wasn&#39;t finally hold this past year and we were missing a bit of retro-action so I talked with &lt;a href=&quot;https://twitter.com/sergiodeprado&quot;&gt;sergeeo &lt;/a&gt;(who takes care of the &lt;a href=&quot;http://familiargamejam.com/&quot;&gt;Familiar Game Jam&lt;/a&gt;) about holding a 48h mini-jam specifically for the Game Boy and using only the ZGB engine. The jam was online but a small group of people gathered together on my current company &lt;a href=&quot;https://generagames.com/&quot;&gt;Genera Games&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
As usual to avoid people bringing their creations before the start of the jam we picked a theme: bouncing. The jam was celebrated during the weekend of July 27th-29th 2018. You can still access the jam &lt;a href=&quot;https://itch.io/jam/zgbjam&quot;&gt;website&lt;/a&gt;&amp;nbsp;and play all the &lt;a href=&quot;https://itch.io/jam/zgbjam/entries&quot;&gt;8 entries&lt;/a&gt;:&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPlECLLQB1scb0k2m4AkLZyCZiR9AtjHTU_eo15eFnMmF4UXdbA_1bUbVZWnSBqchfgwpkpj6TZ7bUxjl9qAgdC5vDfGuYY1bmNfe7mscxqKSa9OGgmh9PCcM9zsA1usmFrXrl/s1600/downwel.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPlECLLQB1scb0k2m4AkLZyCZiR9AtjHTU_eo15eFnMmF4UXdbA_1bUbVZWnSBqchfgwpkpj6TZ7bUxjl9qAgdC5vDfGuYY1bmNfe7mscxqKSa9OGgmh9PCcM9zsA1usmFrXrl/s1600/downwel.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Upwell&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/Tatos_&quot;&gt;Tatos&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A Downwell demake wannabe that even caught the attention of &lt;a href=&quot;https://twitter.com/Tatos_/status/1025044158208253952&quot;&gt;Ojiro Fumoto&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_R4WJZLDDeZqCzTtMkAgeOKKefbutMn2RFsvWdVbv8-YWfY072R11kSQWPnfsTmbNBZdqvSlC3bLiiRXPTzfMRdYWt4W4oL2q0y-wQlsA6UHODMu2BXToEvFbvPnQPrgCdTjK/s1600/boun-ma-ze.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_R4WJZLDDeZqCzTtMkAgeOKKefbutMn2RFsvWdVbv8-YWfY072R11kSQWPnfsTmbNBZdqvSlC3bLiiRXPTzfMRdYWt4W4oL2q0y-wQlsA6UHODMu2BXToEvFbvPnQPrgCdTjK/s1600/boun-ma-ze.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Boun-Ma-Ze&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/Deebrol&quot;&gt;Deebrol&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Bouncing is the only thing you can do to avoid being killed by enemies in a maze&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Mb7AW0U7uVCF8JSWyf9W_ILWPNcTJev9fPGXme9MKiPKOv8Sd7aR8-KNonJmfsCum_beysJlp1tIiMCCuQja4xSwX7YZXr8M5kYtIAEBlIdxfZLXjtjhyboC5JdyL1WGOtSb/s1600/axebound.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Mb7AW0U7uVCF8JSWyf9W_ILWPNcTJev9fPGXme9MKiPKOv8Sd7aR8-KNonJmfsCum_beysJlp1tIiMCCuQja4xSwX7YZXr8M5kYtIAEBlIdxfZLXjtjhyboC5JdyL1WGOtSb/s1600/axebound.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Axebound&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/MaikelOrtega_&quot;&gt;MaikelOrtega&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
An unfished prototype of a warrior throwing bounding axes to cephalopods. There is a color version available too, and it has bg music!&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyn4ka271qiFP1FSrYIcOdFLBzE8U4_7p-2HLz-ReGigsbm3EYQDxu1Nmv3ZMn3I0Aci-gr3ocOa1dogvCd1q-MRupnD0bYV8iyMW5YGPMc22dJ1s_OcgHHTVsbOqrlLDPqf8E/s1600/dungeonball.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyn4ka271qiFP1FSrYIcOdFLBzE8U4_7p-2HLz-ReGigsbm3EYQDxu1Nmv3ZMn3I0Aci-gr3ocOa1dogvCd1q-MRupnD0bYV8iyMW5YGPMc22dJ1s_OcgHHTVsbOqrlLDPqf8E/s1600/dungeonball.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Dungeon Ball&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/sergiodeprado&quot;&gt;sergeeo&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A platform game where you have to guide your bouncing ball to the end of the level avoiding spikes. The music is great!&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlc0zgM9E8_Ej3CyehMcIbE2NG56ic-P_kA6KN71OtuNo5Rog1NigOrXYjgaZXvqDlhmv-gpMsFkIUBAwEMbLL-NtDD-2xCFdlwhb4fyQ5v0TWgd-XcMl0hQdGv3LRgb-9Y0u/s1600/deckbouncer.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlc0zgM9E8_Ej3CyehMcIbE2NG56ic-P_kA6KN71OtuNo5Rog1NigOrXYjgaZXvqDlhmv-gpMsFkIUBAwEMbLL-NtDD-2xCFdlwhb4fyQ5v0TWgd-XcMl0hQdGv3LRgb-9Y0u/s1600/deckbouncer.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Deck Bouncer&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/ulisesfronze&quot;&gt;Fronze&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Guide the ball to the end of the level changing its direction with the proper card&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYWmJopEg0nVPphYOaEwRjJsRTQ6cm9LZxjV3lwQ9vFeQLsXaCWFxntOdCtKqek04VnsyMTibHLCKiD1GyYPsDfLAXGyZg_X7D60oSVGToKrtSzlzCz2NOuyh3PPeQIJ8cu1ye/s1600/shieldbouncer.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYWmJopEg0nVPphYOaEwRjJsRTQ6cm9LZxjV3lwQ9vFeQLsXaCWFxntOdCtKqek04VnsyMTibHLCKiD1GyYPsDfLAXGyZg_X7D60oSVGToKrtSzlzCz2NOuyh3PPeQIJ8cu1ye/s1600/shieldbouncer.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Shield Bouncer&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/Zal0&quot;&gt;me&lt;/a&gt;!&lt;br /&gt;
&lt;br /&gt;
You need to guide a bouncing ball with your shield to the end of the level. After this 2 years this is the first Game Boy game I had worked on alone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOoBlpckKZOP6FdkRLG67dNRAVsDyvqN7ouM4RZ18tK1ZD9Uy75dRDsmOQZDDl4fm4c9CJmULhHroQYbkscWZpLKZd7IyANm_LismKPeti4ASsMDr1tg-IMyX79XVdckU7EtL9/s1600/basketcaseboy.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOoBlpckKZOP6FdkRLG67dNRAVsDyvqN7ouM4RZ18tK1ZD9Uy75dRDsmOQZDDl4fm4c9CJmULhHroQYbkscWZpLKZd7IyANm_LismKPeti4ASsMDr1tg-IMyX79XVdckU7EtL9/s1600/basketcaseboy.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Basket Case Boy&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/david_erosa&quot;&gt;David Erosa&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You have to place the proper platform to make the ball enter the basket&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitPZjys5OL5H-ElqYJ7QVh4LRfW2-UzSVNO9fxTI8yDvUpjtUyJ-kYKGL9aeG6b_FNB2uMlIMDjNwd231vSGL7hZ3Rm2zRS69r9TwB-NOcbSvYZ81w7SAR9zKgd3sCl9MEwE3R/s1600/buggytrollminigolf.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitPZjys5OL5H-ElqYJ7QVh4LRfW2-UzSVNO9fxTI8yDvUpjtUyJ-kYKGL9aeG6b_FNB2uMlIMDjNwd231vSGL7hZ3Rm2zRS69r9TwB-NOcbSvYZ81w7SAR9zKgd3sCl9MEwE3R/s1600/buggytrollminigolf.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Buggy Troll Minigolf&lt;/b&gt; by &lt;a href=&quot;https://twitter.com/dani_mrquez&quot;&gt;Daniel Márquez&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A minigolf with an amazing power bar&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
All the games are playable on emulators and also on real hardware (a couple of them can be playable directly on your browser too). If you want to take a look at how the jam was taking place take a look at &lt;a href=&quot;https://twitter.com/hashtag/zgbjam?f=tweets&amp;amp;vertical=default&amp;amp;src=hash&amp;amp;lang=en&quot;&gt;this link on twitter&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This jam was the first time where I was able to see people using ZGB in person for the first time and thanks to that I fixed a few things that were causing a lot of issues:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ZGB&amp;nbsp;&lt;a href=&quot;https://github.com/Zal0/ZGB/wiki/Installation&quot;&gt;installation process&lt;/a&gt;&amp;nbsp;has become way simpler that it was. Instead of a lot of links to download the files I had prepared a package that contains everything and from now on you just need that package and set the ZGB_PATH&lt;/li&gt;
&lt;li&gt;Backslashes on ZGB_PATH were causing a lot of headaches since msys requires slashes on paths. This has also been automatized&lt;/li&gt;
&lt;li&gt;Fixed file header dependencies. A lot of bugs were caused when changing a header file (exporting sprites or bitmaps for example) but not recompiling the sources using it. This is now integrated in the makefile. Build times are a bit longer now but you no longer need to rebuild the whole project all the time&lt;/li&gt;
&lt;li&gt;The number of steps required to add a new sprite have been reduced a lot:&lt;br /&gt;- By using C &lt;a href=&quot;http://coding-scars.com/x-macros/&quot;&gt;X-macros&lt;/a&gt;&amp;nbsp;(thanks &lt;a href=&quot;https://twitter.com/MetanoKid&quot;&gt;Carlos&lt;/a&gt; for your great post!) now all sprite and map info is declared on ZGBMain.h&lt;br /&gt;- Headers for sprites and states are no longer needed (you can still declare them if you want)&lt;/li&gt;
&lt;li&gt;Fixed Game Boy Color sprites palettes isue&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The &lt;a href=&quot;https://github.com/Zal0/ZGB/wiki&quot;&gt;tutorials&lt;/a&gt;&amp;nbsp;have also been updated with all these changes&lt;br /&gt;
&lt;br /&gt;
Sadly there are some other stuff I can&#39;t do much about. The Game Boy is an 8-bit machine with lots of limitations and this is the first thing to consider when developing for it. It doesn&#39;t have float points so fixed point 8:8 is your only choice here, understanding how it works and using the &lt;a href=&quot;https://github.com/hschmitt/gbdk/blob/master/include-gb/types.h&quot;&gt;fixed&lt;/a&gt; type declared in GBDK is the way to go. Because the theme of the jam was bouncing using fixed was almost mandatory.&lt;br /&gt;
&lt;br /&gt;
Will there be a ZGBJAM 2? If people are interested on it, of course. We also hope this new year 2019 that there will be a new edition of the &lt;a href=&quot;http://bitbitjam.com/&quot;&gt;bitbitjam&lt;/a&gt;, we were really missing it last year!</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/8142078689050980492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/8142078689050980492' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8142078689050980492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8142078689050980492'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2019/01/zgbjam.html' title='ZGBJAM'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPlECLLQB1scb0k2m4AkLZyCZiR9AtjHTU_eo15eFnMmF4UXdbA_1bUbVZWnSBqchfgwpkpj6TZ7bUxjl9qAgdC5vDfGuYY1bmNfe7mscxqKSa9OGgmh9PCcM9zsA1usmFrXrl/s72-c/downwel.gif" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-2114393555632866497</id><published>2018-11-01T19:52:00.002+01:00</published><updated>2019-11-30T13:01:45.992+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="animator"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="FSM"/><category scheme="http://www.blogger.com/atom/ns#" term="gaphs"/><category scheme="http://www.blogger.com/atom/ns#" term="machines"/><category scheme="http://www.blogger.com/atom/ns#" term="state"/><category scheme="http://www.blogger.com/atom/ns#" term="Unity"/><category scheme="http://www.blogger.com/atom/ns#" term="unity3d"/><title type='text'>Simple yet powerful FSM implementation</title><content type='html'>There is one thing common to all the games I have worked on and all the languages I have used: state machines, or how they are called nowadays: FSMs (finite state machines). You don&#39;t really need to learn anything before starting to use them and probably you have already used them without even knowing it. As seen in the &lt;a href=&quot;http://gameprogrammingpatterns.com/state.html#we&#39;ve-all-been-there&quot;&gt;Game Programming Patterns&lt;/a&gt; at some point you end up using them naturally.&lt;br /&gt;
&lt;br /&gt;
But, event though the idea is pretty simple and intuitive, iterating it and creating something that really makes your life easier it&#39;s a bit more complicated than it seems. I&#39;d like to show you how I have been iterating my FSM over the years and what are the main problems that I have seen in other approaches&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;h2&gt;
1. The initial approach: using enums&lt;/h2&gt;
&lt;div&gt;
Before starting to code anything it will be good to review what exactly an FSM is. I am going to copy the definition from the &lt;a href=&quot;http://gameprogrammingpatterns.com/state.html#finite-state-machines-to-the-rescue&quot;&gt;Game Programming Patterns&lt;/a&gt; book:&lt;/div&gt;
&lt;div&gt;
- You have a set of states that the machine can be in&lt;/div&gt;
&lt;div&gt;
- The machine can only be in one state at a time&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
- Each state has a set of transitions that causes the machine to change from one state to another&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Do you see how I have skipped the part where the author is assuming input or events are tied to state changes? That was on purpose. I&#39;ll talk about it later but in my opinion FSMs become really complicated because of that assumption. State changes should happen whenever we directly tell the FSM to change its state.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Using enums we can create an state machine very similar to the one we have in the &lt;a href=&quot;http://gameprogrammingpatterns.com/state.html#enums-and-switches&quot;&gt;Game Programming Patterns&lt;/a&gt; book (I am going to use C# and Unity on this post):&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ObjectWithFSM&lt;/span&gt; : MonoBehaviour {
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;enum&lt;/span&gt; State {
  STATE_0,
  STATE_1,
  STATE_2
 };
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; State currentState;

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;void&lt;/span&gt; SetState(State newState) {
  &lt;span style=&quot;color: blue;&quot;&gt;switch&lt;/span&gt;(currentState) {
   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_0:
    &lt;span style=&quot;color: green;&quot;&gt;//State 0 exit&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;

   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_1:
    &lt;span style=&quot;color: green;&quot;&gt;//State 1 exit&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;

   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_2:
    &lt;span style=&quot;color: green;&quot;&gt;//State 2 exit&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;
  }

  currentState = newState;

  &lt;span style=&quot;color: blue;&quot;&gt;switch&lt;/span&gt; (currentState)  {
   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_0:
    &lt;span style=&quot;color: green;&quot;&gt;//State 0 enter&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;

   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_1:
    &lt;span style=&quot;color: green;&quot;&gt;//State 1 enter&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;

   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_2:
    &lt;span style=&quot;color: green;&quot;&gt;//State 2 enter&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;
  }
 }
 
 &lt;span style=&quot;color: #2b91af;&quot;&gt;void&lt;/span&gt; Update() {
  &lt;span style=&quot;color: blue;&quot;&gt;switch&lt;/span&gt; (currentState)  {
   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_0:
    &lt;span style=&quot;color: green;&quot;&gt;//State 0 update&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;

   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_1:
    &lt;span style=&quot;color: green;&quot;&gt;//State 1 update&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;

   &lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; State.STATE_2:
    &lt;span style=&quot;color: green;&quot;&gt;//State 2 update&lt;/span&gt;
    &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;
  }
 }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
The update of this class is managed by an internal FSM that processes one of the states only. If at any point I want to change to a new state I just need to call SetState passing the new State. Adding new states is as simple as adding new enums and creating new cases for them.&lt;br /&gt;
&lt;br /&gt;
This approach is pretty simple and it works, I used it a lot back in the days of J2ME and still use it a lot when I want to write some quick code. I have actually being using this approach for my recent Game Boy games wit ZGB (like in &lt;a href=&quot;https://github.com/Zal0/bitbitjam2017/blob/master/src/SpritePlayer.c&quot;&gt;polka sheep&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
The main problem with this approach is that anytime you want to use this FSM you need to copy this template from scratch, no OOP is used. There is actually a good reason for this, back on the days of J2ME a new empty class added 130 bytes to your final build so we tried to avoid it at all cost (we had a limit of 64kb). But, it is 2018 and just an empty Unity project is around 20mb so we no longer need to worry about that (thank good!)&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
2. Using Object Oriented Programming&lt;/h2&gt;
Let&#39;s try to define an FSM class that we can reuse. This is the simplest thing I came up with:&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;FSM&lt;/span&gt; : MonoBehaviour {
 &lt;span style=&quot;color: green;&quot;&gt;//Base class for all states, only the required methods need to be overriden &lt;/span&gt;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;State&lt;/span&gt; {
  [HideInInspector]&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; FSM fsm;

  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter() {}
  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Update(){}
  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Exit()  {}
 };

 &lt;span style=&quot;color: green;&quot;&gt;//Current state being handled in this FSM&lt;/span&gt;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; State currentState { &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;;}

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ChangeState(State newState) {
  &lt;span style=&quot;color: green;&quot;&gt;//Exit the current state&lt;/span&gt;
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(currentState != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)
   currentState.Exit();

  &lt;span style=&quot;color: green;&quot;&gt;//Change to the new state&lt;/span&gt;
  currentState = newState;

  &lt;span style=&quot;color: green;&quot;&gt;//Enter the new state&lt;/span&gt;
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(newState != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;) {
   newState.fsm = &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;;
   newState.Enter();
  }
 }

 &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Update() {
  &lt;span style=&quot;color: green;&quot;&gt;//Update the currentState&lt;/span&gt;
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(currentState != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)
   currentState.Update();
 }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
This class keeps a reference to a single State that is set using the ChangeState function, and updates it (I am using the Update function available in Unity). In case we want to change to another State we just need to call ChangeState passing this new state as argument. Here is an example of how to use it:&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ObjectWithFSM2&lt;/span&gt; : MonoBehaviour {
 [System.Serializable]
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;State0&lt;/span&gt; : FSM.State {
  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(){
   Debug.Log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Entering state 0&quot;&lt;/span&gt;);
  }

  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Update(){
   Debug.Log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Updating state 0&quot;&lt;/span&gt;);
  }

  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Exit(){
   Debug.Log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Exit state 0&quot;&lt;/span&gt;);
  }
 };

 [System.Serializable]
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;State1&lt;/span&gt; : FSM.State {
  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Update(){
   Debug.Log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Updating state 1&quot;&lt;/span&gt;);
  }
 };

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; State0 state0;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; State1 state1;
 FSM fsm;

 &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Start() {
  fsm = gameObject.AddComponent&amp;lt; FSM &amp;gt;();
  fsm.ChangeState(state0);
 }

 &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Update() {
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(Input.GetKeyDown(KeyCode.A)) {
   &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(fsm.currentState == state0)
    fsm.ChangeState(state1);
   &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt;
    fsm.ChangeState(state0);
  }
 }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
This is just a class with two states that uses an internal FSM to process them. Pressing the key A it changes between the two of them, A few things that it s worth commenting in this code.&lt;br /&gt;
&lt;br /&gt;
- I have defined State0 and State1 as &lt;b&gt;System.Serialiable&lt;/b&gt; for 2 reasons:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Unity will automatically create and instance of them in the editor (so we don&#39;t have to allocate them manually)&lt;/li&gt;
&lt;li&gt;Public vars will appear in the inspector so you can assing them in the editor (this also answers the question in the Game Programming Patterns &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;book: &lt;a href=&quot;http://gameprogrammingpatterns.com/state.html#where-are-the-state-objects&quot;&gt;Where are the State Objects&lt;/a&gt;? Based on my experinece this is the best place to put them, you don&#39;t need to constanlty destroy them when changing from one to another and you don&#39;t need static allocations, every instance has its own states)&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8va2wc4BjQLouyIG06opPXie5mobUMbzR3BZeXQegA-J3QEafEimwHB0QGq0XgHkGwcTN56jVDhgOekC3YwlRSzYi76HKnuOIm_TWwUNfoPhcjHNKWMPpKvdmoTFdc-_Rre0B/s1600/statesOnEditor.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;124&quot; data-original-width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8va2wc4BjQLouyIG06opPXie5mobUMbzR3BZeXQegA-J3QEafEimwHB0QGq0XgHkGwcTN56jVDhgOekC3YwlRSzYi76HKnuOIm_TWwUNfoPhcjHNKWMPpKvdmoTFdc-_Rre0B/s1600/statesOnEditor.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
- State0 overrides the 3 methods: Enter, Update and Exit but State1 only implements Update. The more states you create the more you realize that not all states do stuff entering or exiting, so it is a good idea to leave the implementation empty on the base class.&lt;br /&gt;
&lt;br /&gt;
- All states keep a reference to the fsm after Enter has been called. This is useful to access the GameObject containing the FSM and from there the Monobehaviour containing the states (using fsm.GetComponent&amp;lt; ObjectWithFSM &amp;gt;()) that is not directly accessible from internal classes&lt;br /&gt;
&lt;br /&gt;
This new FSM is much better than the previous one. We can reuse it, just need to add an FSM to our Objects and all the set of States we need... but it has a big problem that sooner or later arises. Let me show it to you with an example.&lt;br /&gt;
&lt;br /&gt;
I used this FSM on &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.marvelousgames.touchracing2&amp;amp;hl=en&quot;&gt;Touch Racing 2&lt;/a&gt;. The FSM of the Main Menu was something like this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqeWOEXZLl3pZ0LC7BQxZ1YjUBH7GfJS7WpFvx2JSkHUiFMEqpajqPeF8HFkBmTjUbEihOFkeU4v-Ip4Ap7Y7p0T5Qmtn6mbfiOi1gCM45CWT9bERSIAVR7kFxqenet_AjBFIa/s1600/TRN2Flow.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;407&quot; data-original-width=&quot;1059&quot; height=&quot;245&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqeWOEXZLl3pZ0LC7BQxZ1YjUBH7GfJS7WpFvx2JSkHUiFMEqpajqPeF8HFkBmTjUbEihOFkeU4v-Ip4Ap7Y7p0T5Qmtn6mbfiOi1gCM45CWT9bERSIAVR7kFxqenet_AjBFIa/s640/TRN2Flow.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
The game starts on the &lt;i&gt;&lt;b&gt;Main Menu&lt;/b&gt;&lt;/i&gt; showing the three vehicles, from there you either go to the &lt;b&gt;&lt;i&gt;Options menu&lt;/i&gt;&lt;/b&gt; or select a car and go to the &lt;b&gt;&lt;i&gt;Car Menu&lt;/i&gt;&lt;/b&gt;. In the &lt;b&gt;&lt;i&gt;Car Menu&lt;/i&gt;&lt;/b&gt; a list of pieces is displayed: the chasis, the wheels, the engine and so on. If the user clicks on any of them then he&#39;s tken to the &lt;b&gt;&lt;i&gt;Pieces menu&lt;/i&gt;&lt;/b&gt; where he can select any of the different car pieces. The back option is always there to go back to the previous menu too.&lt;br /&gt;
&lt;br /&gt;
Both the &lt;b&gt;&lt;i&gt;Car Menu&lt;/i&gt;&lt;/b&gt; and the &lt;b&gt;&lt;i&gt;Car Piece&lt;/i&gt;&lt;/b&gt; display different things depending on which option was selected on the previous menu. If the user selects the boat on the &lt;b&gt;&lt;i&gt;Main Menu&lt;/i&gt;&lt;/b&gt; then the &lt;i&gt;&lt;b&gt;Car Menu&lt;/b&gt;&lt;/i&gt; will center the View on the boat but if he chooses the Offroad the &lt;b&gt;&lt;i&gt;Car Menu&lt;/i&gt;&lt;/b&gt; will do the same with that car. We need to store which car was selected in a variable when exiting the &lt;b&gt;&lt;i&gt;Main Menu&lt;/i&gt;&lt;/b&gt;. Things get more complicated in the &lt;b&gt;&lt;i&gt;Car Piece&lt;/i&gt;&lt;/b&gt;&amp;nbsp;menu, because it depends in both the selected vehicle and the selected piece, but no problem: we can just add another varible for the selected piece and properly set it when exiting the &lt;b&gt;&lt;i&gt;Car Menu&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
So the flow is like this: the user selects a vehicle and we store the selection on the var &lt;i&gt;selectedVehicle&lt;/i&gt;. Then he selects a part and we store that on the var &lt;i&gt;selectedPart&lt;/i&gt;. Great! This all fits perfectly!&lt;br /&gt;
&lt;br /&gt;
Soon things start to get a bit more complicated. In TRN2 when you buy a vehicle piece it takes some time until it arrives, if that happens when the game is in the background a local notification is thrown informing&amp;nbsp; the user the new piece has arrived. When the user enters after this the game must show a popup and then go directly to the &lt;b&gt;&lt;i&gt;Car Piece&lt;/i&gt;&lt;/b&gt; state and show this piece. The problem is that because we haven&#39;t gone through &lt;b&gt;&lt;i&gt;Main Menu&lt;/i&gt;&lt;/b&gt; and &lt;b&gt;&lt;i&gt;Car Menu&lt;/i&gt;&lt;/b&gt; neither &lt;i&gt;selectedVehicle&lt;/i&gt; nor &lt;i&gt;selectedPart&lt;/i&gt; has been assigned, and the game will&amp;nbsp; likely crash&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIrmZ3hNPpDtUDU7cFyA-VVu6IG_r8HlEaGXTVwVKleJZDmAcZ0uZDW8BuFMVnIUYm9YpdA1V1Dz7rEWHDLWB0tqo3BH7CtiMjAonD_P7WqLtBCiY0lflAlv8wRQbmP8wzjVRn/s1600/Piece+Arrived.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;609&quot; data-original-width=&quot;1083&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIrmZ3hNPpDtUDU7cFyA-VVu6IG_r8HlEaGXTVwVKleJZDmAcZ0uZDW8BuFMVnIUYm9YpdA1V1Dz7rEWHDLWB0tqo3BH7CtiMjAonD_P7WqLtBCiY0lflAlv8wRQbmP8wzjVRn/s400/Piece+Arrived.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This is really easy to fix, just assign the variables before entering the Car Piece state and everything will just work. Yes, but the problem is: you can still enter the car piece from any other part of the code where these vars hasn&#39;t been assigned. For example when the user has &lt;b&gt;enough money&amp;nbsp; to buy one of the pieces&lt;/b&gt; a popup appears informing him: &quot;Hey you can now purchase a new part. Do you want me to show it?&quot;, if the user click yes then the game changes to the &lt;i&gt;&lt;b&gt;Car Piece&lt;/b&gt;&lt;/i&gt; state and again we need to remember to assign the variables or it won&#39;t display the right info! Oh, and don&#39;t forget the &lt;b&gt;gacha machine&lt;/b&gt;: when the user wins a new prize the menu also changes to &lt;b&gt;&lt;i&gt;Car Piece&lt;/i&gt;&lt;/b&gt; to show the new adquisition&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQbp1gGpjEHD6Pq2U4uVd1MM16wc1ofvdlPUvWjtBd-8FTo93toiXBx-us8UwPeYatlmuZvhBIoY-gjlj1SB_QcBsDuKPTS-pFu7g7tKb34mmiubfZUBjUB1UIOL2aHMuXFpYU/s1600/EnoughMoney.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;609&quot; data-original-width=&quot;1083&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQbp1gGpjEHD6Pq2U4uVd1MM16wc1ofvdlPUvWjtBd-8FTo93toiXBx-us8UwPeYatlmuZvhBIoY-gjlj1SB_QcBsDuKPTS-pFu7g7tKb34mmiubfZUBjUB1UIOL2aHMuXFpYU/s400/EnoughMoney.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnreX5vdXSe2HtimTt48IJxS2_Rd23yT3Ud0BbilD-MRCMOQAq6lfokUbPNzoC7s6jgOdpilTU3oG1bcqVUXSxnWxJX8PJFFJCr2qml1_o-GJ2jLTO4540kQJuZ6O7Mx0X2Vdb/s1600/GachaPiece.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;609&quot; data-original-width=&quot;1083&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnreX5vdXSe2HtimTt48IJxS2_Rd23yT3Ud0BbilD-MRCMOQAq6lfokUbPNzoC7s6jgOdpilTU3oG1bcqVUXSxnWxJX8PJFFJCr2qml1_o-GJ2jLTO4540kQJuZ6O7Mx0X2Vdb/s400/GachaPiece.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We have also forgotten one thing, the &lt;b&gt;&lt;i&gt;Car Piece&lt;/i&gt;&lt;/b&gt; state automatically selects the next piece the user should buy to progress in the game (by design). But in all these cases we also need another variable to tell the state which piece we want to be selected instead. In at least three parts of the code I needed to write&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt; vehicleIdx = _vehicleIdx;
 pieceSelected = _piece;
 defaultPieceIndex = _defaultIndex;
 fsm.ChangeState(carPieceState);
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
And because code duplication must be avoided In the end I ended up with a special function to move to the Car Piece State&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ChangetoStateCarPiece(&lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; _vehicleIdx, PieceSelected _piece, &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; _defaultIndex) {
 vehicleIdx = _vehicleIdx;
 pieceSelected = _piece;
 defaultPieceIndex = _defaultIndex;
 fsm.ChangeState(carPieceState);&lt;/pre&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
This function was handy but still someone could easily call fsm.ChangeState(carPieceState) without setting the required vars because nothing was forcing him to do so.&lt;br /&gt;
&lt;br /&gt;
This was just an example of how something very simple can become a horror to maintain. I saw the same pattern repeated several times in other usages of this FSM clearly indicating that it had a serious problem and was far from perfect.&lt;br /&gt;
&lt;h2&gt;
3. State enter parameters&lt;/h2&gt;
If we could pass some parameters to the Enter funcions of the State class we will force the programmers to pass these arguments always before entering certain states. The problem is that each state requires a &lt;i&gt;&lt;b&gt;different number&lt;/b&gt;&lt;/i&gt; of parameters and of &lt;b&gt;&lt;i&gt;different types&lt;/i&gt;&lt;/b&gt;. A naive approach to fix this will be passing an object[] or a HashTable or event a List&amp;lt; object&amp;nbsp; &amp;gt;. But certainly this&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;Hashtable t = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; Hashtable();
t.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;vehicleIdx&quot;&lt;/span&gt;, _vehicleIdx);
t.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;pieceSelected&quot;&lt;/span&gt;, _piece);
t.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;defaultPieceIndex&quot;&lt;/span&gt;, _defaultIndex);&lt;/pre&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;fsm.ChangeState(carPieces, t);&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
not only doesn&#39;t solve anything because any programmer could easily forget to add any of the required parameters (or all of them) but also this code is allocating a HashTable before entering the state and when entering we need to search the parameters. Instead of solving the problem we have created two new ones&lt;br /&gt;
&lt;br /&gt;
In C++ whenever you need to create a function that could work with parameters of different types you end up using &lt;a href=&quot;https://docs.microsoft.com/en-us/cpp/cpp/templates-cpp?view=vs-2017&quot;&gt;templates&lt;/a&gt; (or void* if you want to irritate everyone :D). In C# there are &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/ms379564(v=vs.80).aspx&quot;&gt;generics&lt;/a&gt;, which work in a similar way. Templates and generics will fix the problem with having &lt;b&gt;different types of parameters&lt;/b&gt; but not the &lt;b&gt;number&lt;/b&gt;. Again, based on my experience, I have never passed more than 3 parameters so we could do something like this:&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;FSM2&lt;/span&gt; : MonoBehaviour {
 &lt;span style=&quot;color: green;&quot;&gt;//Base class for all states, only the required methods need to be overriden &lt;/span&gt;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;StateBase&lt;/span&gt; {
  [HideInInspector]&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; FSM2 fsm;

  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Update(){}
  &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Exit()  {}
 };

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;State&lt;/span&gt; : StateBase { &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter() {} }
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;abstract&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;State1Param&lt;/span&gt;  &amp;lt; T &amp;gt;         : StateBase { &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;abstract&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(T p); }
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;abstract&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;State2Params&lt;/span&gt; &amp;lt; T0, T1 &amp;gt;    : StateBase { &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;abstract&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(T0 p0, T1 p1); }
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;abstract&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;State3Params&lt;/span&gt; &amp;lt; T0, T1, T2 &amp;gt;: StateBase { &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;abstract&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(T0 p0, T1 p1, T2 p2); }

 &lt;span style=&quot;color: green;&quot;&gt;//Current state being handled in this FSM&lt;/span&gt;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; StateBase currentState { &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;; &lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;;}

 &lt;span style=&quot;color: #2b91af;&quot;&gt;bool&lt;/span&gt; ChangeStateBase(StateBase _newState) {
  &lt;span style=&quot;color: green;&quot;&gt;//Exit the current state&lt;/span&gt;
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(currentState != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)
   currentState.Exit();

  &lt;span style=&quot;color: green;&quot;&gt;//Change to the new state&lt;/span&gt;
  currentState = _newState;

  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(_newState != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;) {
   _newState.fsm = &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;;
   &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;
  }
  &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;;
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ChangeState(State _newState) {
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(ChangeStateBase(_newState)) _newState.Enter();
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ChangeState&amp;lt; T &amp;gt;(State1Param&amp;lt; T &amp;gt; _newState, T p) {
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(ChangeStateBase(_newState)) _newState.Enter(p);
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ChangeState&amp;lt; T0, T1 &amp;gt;(State2Params&amp;lt; T0, T1 &amp;gt; _newState, T0 p0, T1 p1) {
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(ChangeStateBase(_newState)) _newState.Enter(p0, p1);
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ChangeState&amp;lt; T0, T1, T2 &amp;gt;(State3Params&amp;lt; T0, T1, T2 &amp;gt; _newState, T0 p0, T1 p1, T2 p2) {
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(ChangeStateBase(_newState)) _newState.Enter(p0, p1, p2);
 }

 &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Update() {
  &lt;span style=&quot;color: green;&quot;&gt;//Update the currentState&lt;/span&gt;
  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(currentState != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)
   currentState.Update();
 }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Notice how I have declared the Enter functions as abstract this time because it doesn&#39;t make sense to have any of the states with parameters without the Enter function required. Using this new FSM we could now declare the &lt;b&gt;&lt;i&gt;Car Piece&lt;/i&gt;&lt;/b&gt; state like this:&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;[System.Serializable]
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;CarPieceState&lt;/span&gt; : FSM2.State3Params&amp;lt; &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt;, PieceSelected, &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt;&amp;gt; {
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(&lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; _vehicleIdx, PieceSelected _piece, &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; _defaultIndex) {
  &lt;span style=&quot;color: green;&quot;&gt;//Select _defaultIndex of piece _piece and vehicle _vehicleIdx&lt;/span&gt;
 }
};
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
and then in order to enter this state we should call ChangeState like this&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//-1 in this case indicates the default selection (selecting the next piece the user needs to purchase)&lt;/span&gt;
fsm.ChangeState(carPieceState, 0, PieceSelected.Piece0, -1);
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
or the code won&#39;t compile. There is no need to specify the template arguments in ChangeState since the compiler is capable of&amp;nbsp; &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/generic-methods&quot;&gt;infer them&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
We can finally sleep happily knowing that no one could break the behaviour we wanted to have! I wish I had had this piece of code when I was coding TRN2!&lt;br /&gt;
&lt;br /&gt;
Ok, this is the FSM I wanted to show you. But we are far from done. Let&#39;s see why adding some new features to our class may always not be such a good idea...&lt;br /&gt;
&lt;h2&gt;
4. Using graphs&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I am gonna be honest with you: I hate graphs. I don&#39;t like Playmaker, or the Animator State Machine and neither the new shaderGraph feature available in Unity. Using graphs as replacement of regular programming is a big mistake. People end up making noob mistakes, code duplication (hyper duplication) being the worst of them. Sadly this kind of &lt;a href=&quot;https://blueprintsfromhell.tumblr.com/&quot;&gt;stuff&lt;/a&gt;&amp;nbsp; is very common:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6gOWJ_WRDltet8sQT5LIZ9UqfH-Bm-4XAsVgQUXaYJ64l5PteoKjjX89vJGwW8lzSZXUFFzP7za-lnHdtXthKsM6ulFGPnN-Y2686J1X5bbyj1QyCxyPv2-2l82GnMufyjQt6/s1600/tumblr_p6xysvDKag1wp4jg6o1_1280.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;703&quot; data-original-width=&quot;1280&quot; height=&quot;351&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6gOWJ_WRDltet8sQT5LIZ9UqfH-Bm-4XAsVgQUXaYJ64l5PteoKjjX89vJGwW8lzSZXUFFzP7za-lnHdtXthKsM6ulFGPnN-Y2686J1X5bbyj1QyCxyPv2-2l82GnMufyjQt6/s640/tumblr_p6xysvDKag1wp4jg6o1_1280.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
It is funny, until you are the one&amp;nbsp; who has to fix all that mess in order to continue adding content to a project you have been assigned to.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: #f8f9fa; text-align: -webkit-center;&quot;&gt;&quot;Any fool can write code that a computer can understand. Good programmers write code that humans can understand.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;background-color: #f8f9fa; text-align: -webkit-center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;Martin Fowler, 2008.&quot;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Having said that I think a post talking about FSMs would be incomplete without talking about&lt;a href=&quot;https://docs.unity3d.com/Manual/StateMachineBehaviours.html&quot;&gt; State Machine Behaviours&lt;/a&gt;&amp;nbsp;in Unity. These are basically scripts that you can attach to states in the animation machine state and then you just need to override the desired functions &lt;b&gt;&lt;i&gt;OnStateEnter&lt;/i&gt;&lt;/b&gt;, &lt;b&gt;&lt;i&gt;OnStateExit&lt;/i&gt;&lt;/b&gt; or &lt;b&gt;&lt;i&gt;OnStateUpdate&lt;/i&gt;&lt;/b&gt; (sounds familiar?). If you are interested on State Machine Behaviours&amp;nbsp; and how to use the Animator as an FSM take a look at this &lt;a href=&quot;https://medium.com/the-unity-developers-handbook/dont-re-invent-finite-state-machines-how-to-repurpose-unity-s-animator-7c6c421e5785&quot;&gt;post&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Using State Machine Behaviours we could recreate the TRN2 menu FSM like this&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-nSXz_HxIaZ1XpFnFpbVNG4opMGJZnsDbxomMwplJvmt00kcN_0-PF9G_9W-oLcnXQUKIp2ffFVcDGj-xWTCuv9E1-iXDkTUvdGzjtYSZ7Gy_qTmLuNzjeerjdmj7lKtj65p_/s1600/AnimatorFSM.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;489&quot; data-original-width=&quot;747&quot; height=&quot;417&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-nSXz_HxIaZ1XpFnFpbVNG4opMGJZnsDbxomMwplJvmt00kcN_0-PF9G_9W-oLcnXQUKIp2ffFVcDGj-xWTCuv9E1-iXDkTUvdGzjtYSZ7Gy_qTmLuNzjeerjdmj7lKtj65p_/s640/AnimatorFSM.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Some people love this because with a single peek they can easily get an idea of how the FSM of the main menu works. And I agree, this is similar to the graph I draw at the beginning of this post to show you the FSM I had. The problem is that &lt;b&gt;&lt;i&gt;this representation is not true&lt;/i&gt;&lt;/b&gt;, you can still navigate to any state you want, just call Animator.Play and you can navigate from the Options menu to Car Piece even thought they are not linked. In other words the graph you see in the Animator is not the graph you have. This is the real graph:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw5YWWZgyq3StJB05F7HVLLCDV7FC019f2KH4FMurD8g1u89UC4b6X-Ty9H1XaW7qhxx36Eu-AWHu8YjJrUEZVbR9Z6K6zr_F8fNcZAK9KrQZu-4RxacXNDLpV5jwMAbeeiJeY/s1600/realStatesOnEditor.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;472&quot; data-original-width=&quot;733&quot; height=&quot;412&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw5YWWZgyq3StJB05F7HVLLCDV7FC019f2KH4FMurD8g1u89UC4b6X-Ty9H1XaW7qhxx36Eu-AWHu8YjJrUEZVbR9Z6K6zr_F8fNcZAK9KrQZu-4RxacXNDLpV5jwMAbeeiJeY/s640/realStatesOnEditor.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The main problems that I&#39;ve seen with FSMs is how &lt;b&gt;state entering restrictions&lt;/b&gt; are undesrstood. Even the &lt;a href=&quot;http://gameprogrammingpatterns.com/state.html#finite-state-machines-to-the-rescue&quot;&gt;Game Programming Patterns&lt;/a&gt; book seems to indicate that you can only enter an specific state if you have a &lt;b&gt;transition coming from another specific state&lt;/b&gt; (with an arrow linking them). According to this the restriction to get into the Car Piece state is to pass first through the Car Menu State and properly assign the required variables there.&lt;br /&gt;
&lt;br /&gt;
But what happens if we need to enter the Car Piece state when a new part has arrived, a new prize is given on the gacha machine or the game encourages you to buy a new piece? It doesn&#39;t seem like this code is capable of adapt to changes like these easily&lt;br /&gt;
&lt;br /&gt;
In my opinion (and this has worked like a charm for me) &lt;b&gt;the restriction to enter an specific state is to pass the required enter parameters&lt;/b&gt;. You should design states that work perfectly if they receive all the required enter parameters, with zero dependencies to the other states&lt;br /&gt;
&lt;br /&gt;
So, again, what benefits do we get from using the Animator state machine and State Machine Behaviours?:&lt;br /&gt;
- A graph that doesn&#39;t represent the real transitions we have&lt;br /&gt;
- We can&#39;t pass enter parameters which solved one of the main problems of our FSM&lt;br /&gt;
- Plus, we lose the ability to assign scene objects since Animator Controllers are not instantiated on the scene&lt;br /&gt;
&lt;br /&gt;
I am sorry, get your own conclusions, but I totally discourage the use of Animators as FSMs (and totally encourage you to reinvent the wheel sometimes, because that&#39;s the only way to improve it)&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
5. The Back Queue&lt;/h2&gt;
One of the things everyone implementing FSMs tend to do sooner or later is to add a stack of states to keep a history of the states it has been through and easily navigate back (this is what the Game Programming Patterns book refers to as a &lt;a href=&quot;http://gameprogrammingpatterns.com/state.html#pushdown-automata&quot;&gt;Pushdown Automata&lt;/a&gt;). Before entering a new state the current one is pushed into the stack and then when going back it is popped from there automatically.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s get back to TRN2 Menu. All its states except the &lt;i&gt;&lt;b&gt;Main Menu&lt;/b&gt;&lt;/i&gt; have a back functionality. If we are on the &lt;b&gt;&lt;i&gt;Main Menu&lt;/i&gt;&lt;/b&gt; and then move to the &lt;b&gt;&lt;i&gt;Car Menu&lt;/i&gt;&lt;/b&gt; we could automatically go back by just popping the state from the stack. The same way if we reach the &lt;b&gt;&lt;i&gt;Car Piece&lt;/i&gt;&lt;/b&gt; state we could go back twice since we passed through &lt;b&gt;&lt;i&gt;Main Menu&lt;/i&gt;&lt;/b&gt; and &lt;b&gt;&lt;i&gt;Car Menu.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;first problem&lt;/b&gt; appears when we enter the Car Piece state directly (when a new part arrives, a prize is given in the gacha machine or the game suggest the user a new part to purchase). We won&#39;t have a back stack there unless we create a fake one (manually adding states) or add some ugly conditions saying that, if the stack is empty, then move the Car Menu.&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;second problem&lt;/b&gt; is even worse. Imagine you use a stack for an FSM like the one in the Game Programming Patterns&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://gameprogrammingpatterns.com/images/state-flowchart.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;513&quot; data-original-width=&quot;800&quot; height=&quot;256&quot; src=&quot;https://gameprogrammingpatterns.com/images/state-flowchart.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
the stack will constantly grow because you never go back to the previous state in FSMs like this. You need to make sure that you &lt;b&gt;clear the stack&lt;/b&gt; before changing to a new state or &lt;b&gt;add a boolean&lt;/b&gt; to your FSM indicating if you want to use the stack or not.&lt;br /&gt;
&lt;br /&gt;
What if instead of using a stack we add a new enter parameter to some states to indicate &lt;b&gt;which state they should go&lt;/b&gt; in case the back button is pressed? This is actually not very helpful in TRN2 because the back button in &lt;b&gt;Car Pieces&lt;/b&gt; always goes to &lt;b&gt;Car Menu&lt;/b&gt; (by design), so we don&#39;t need the stack or the extra return parameter, but imagine we could enter the options menu from any of the other states. Then it will make sense to do something like this:&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;[System.Serializable]
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;OptionsState&lt;/span&gt; : FSM2.State1Param&amp;lt; FSM2.State &amp;gt; {
 &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; FSM2.State stateBack;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(FSM2.State _stateBack) {
  stateBack = _stateBack;
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; OnBackClicked() {
  fsm.ChangeState(stateBack);
 }
};
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
and then when the back button is pressed, OnBackClicked is called and will return to the state passed as paramater. You may have already realized that there is a problem with this... We can safely do this in the Main Menu&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;fsm.ChangeState(optionsState, stateMainMenu);
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
but if we try to pass the stateCarMenu or the stateCarPieces it won&#39;t even compile because these states need enter parameters. Notice also how this is another reason why the back stack is incompatible with an FSM with States with enter parameters. Luckily there is a solution for this. Instead of passing an State to go back, we could &lt;b&gt;pass a function callback&lt;/b&gt;&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;[System.Serializable]
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;OptionsState&lt;/span&gt; : FSM2.State1Param&amp;lt; System.Action &amp;gt; {
 &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; System.Action onBack;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(System.Action _onBack) {
  onBack = _onBack;
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; OnBackClicked() {
  onBack();
 }
};
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
and then we can enter the OptionsState from either the CarMenu state&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;[System.Serializable]
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;CarMenuState&lt;/span&gt; : FSM2.State1Param&amp;lt; &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; &amp;gt; {
 &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; vehicleIdx;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(&lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; _vehicleIdx) {
  vehicleIdx = _vehicleIdx;
  
  &lt;span style=&quot;color: green;&quot;&gt;//some other stuff&lt;/span&gt;
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; OnBack() {
  OptionsState optionsState = fsm.GetComponent&amp;lt; TRN2Menu &amp;gt;().optionsState;
  fsm.ChangeState(optionsState, () =&amp;gt; { fsm.ChangeState(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, vehicleIdx); });
 }
};
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
or the CarPieces state:&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;[System.Serializable]
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;CarPieceState&lt;/span&gt; : FSM2.State3Params&amp;lt; &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt;, PieceSelected, &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt;&amp;gt; {
 &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; vehicleIdx;
 PieceSelected piece;
 &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; defaultIndex;
 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; Enter(&lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; _vehicleIdx, PieceSelected _piece, &lt;span style=&quot;color: #2b91af;&quot;&gt;int&lt;/span&gt; _defaultIndex) {
  &lt;span style=&quot;color: green;&quot;&gt;//Select _defaultIndex of piece _piece and vehicle _vehicleIdx&lt;/span&gt;
 }

 &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; OnBack() {
  OptionsState optionsState = fsm.GetComponent&amp;lt; TRN2Menu &amp;gt;().optionsState;
  fsm.ChangeState(optionsState, () =&amp;gt; { fsm.ChangeState(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;, vehicleIdx, piece, defaultIndex); });
 }
};&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;
That&#39;s it&lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
I have been iterating this FSM a lot during the past years. Even though it is just 60 lines of code that doesn&#39;t mean there isn&#39;t a lot of work behind it&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I have actually iterated it a bit more. You may be wondering how you could create States that are Monobehaviours at the same time (I&#39;ll leave it to you, but if you need help just let me know)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There is also a problem that I haven&#39;t been able to solve happily: when you call fsm.ChangeState() during the Update function of any of the States the rest of the lines of code in that Update will continue to execute even though it is no longer the current state. Throwing an exception and catching it on the FSM could work but I don&#39;t think using exceptions for this would be a good idea... If you have a solution for it I&#39;ll be happy to hear it&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Also if you are interested on a C++ implementation you can take a look at it here (&lt;a href=&quot;https://gist.github.com/Zal0/366fd44f99583fcaffcdee038650eb83&quot;&gt;FSM.h&lt;/a&gt; &lt;a href=&quot;https://gist.github.com/Zal0/925bbfaaf2af70be4664d2656b2b89bc&quot;&gt;FSM.cpp&lt;/a&gt;) It is a bit different and it uses some specific engine functions but you can get the idea&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/2114393555632866497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/2114393555632866497' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2114393555632866497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2114393555632866497'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2018/11/simple-yet-powerful-fsm-implementation.html' title='Simple yet powerful FSM implementation'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8va2wc4BjQLouyIG06opPXie5mobUMbzR3BZeXQegA-J3QEafEimwHB0QGq0XgHkGwcTN56jVDhgOekC3YwlRSzYi76HKnuOIm_TWwUNfoPhcjHNKWMPpKvdmoTFdc-_Rre0B/s72-c/statesOnEditor.PNG" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-5687256588992864435</id><published>2017-08-14T07:21:00.000+02:00</published><updated>2017-08-14T11:05:07.901+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cameras"/><category scheme="http://www.blogger.com/atom/ns#" term="interpolation"/><category scheme="http://www.blogger.com/atom/ns#" term="unity3d"/><title type='text'>Properly doing cameras interpolation through a target (II)</title><content type='html'>&lt;head&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.4/gist-embed.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;h3&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;This is the 2nd post on the series&amp;nbsp;Properly doing cameras interpolation through a target:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;- &lt;a href=&quot;http://zalods.blogspot.com.es/2017/08/properly-doing-cameras-interpolation.html&quot;&gt;Properly doing cameras interpolation through a target (I)&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;- &lt;a href=&quot;http://zalods.blogspot.com.es/2017/08/properly-doing-cameras-interpolation_14.html&quot;&gt;Properly doing cameras interpolation through a target (II)&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Having fun interpolating cameras? Let&#39;s take a look at some issues of the Camera interpolator we started on the previous post and fix them&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/h3&gt;
&lt;h3&gt;
The Rotation issue&lt;/h3&gt;
&lt;div&gt;
If you test the interpolator a little bit you&#39;ll see it behaves very well even with moving objects. Because it focuses on the target it doesn&#39;t matter if it is moving or not, on any step of the interpolation it places itself on the target position and then interpolates from there.&lt;br /&gt;
&lt;br /&gt;
But there is an issue interpolating between rotating cameras. Make the target rotate by adding the next script to it&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/Zal0/ea78e0a039b3e229f2d20cb5cddfb519.js&quot;&gt;&lt;/script&gt;

and then set any of your cameras as children of the target so they rotate with them. Now pay attention to what happens when you interpolate from this camera to itself:
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH8ZTXbmTKN_WEVFX6TldmTFvzEBXpel0TPleP6Gw6UAu0NIMQNJCxzWKNQhgeenTSbfNKFh3GJ0W7nPw-4Y3L4qjJlt_2lQm2BCifffu6gfq8XgLPUuDPtXHrpDO07AMFr2ZL/s1600/rotIssue.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; height=&quot;195&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH8ZTXbmTKN_WEVFX6TldmTFvzEBXpel0TPleP6Gw6UAu0NIMQNJCxzWKNQhgeenTSbfNKFh3GJ0W7nPw-4Y3L4qjJlt_2lQm2BCifffu6gfq8XgLPUuDPtXHrpDO07AMFr2ZL/s320/rotIssue.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
instead of staying still it does a little annoying movement. This doesn&#39;t happen if you stop the rotation. The reason why this is happening is because we are interpolating the rotation in world space, and because the target is rotating this value is changing every frame and so an interpolation appears. So how should we store the rotation then? There are 3 possibilities:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Relative to cameraFrom&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Relative to the target (same as the position)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Relative to the cameraTo&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
we have already seen why it is not a good idea to keep things relative to cameraFrom, so let&#39;s focus on the other two. At first one could think that since we are already keeping the position relative to the target then it would be a good idea &amp;nbsp;to do the same with the rotation, but no. In a few cases where I have tested cameras interpolation, the target tends to continue rotating after changing its camera (a car on a curve for example) and that gives a weird sensation because everything rotates around it if we attach a camera directly. Instead the camera we are interpolating to is a camera that is prepared to handle the movement of the target (it will continue being the main camera after the interpolation) so it looks like a much better candidate. This is mostly based on experience so if I don&#39;t convince you then you should experience it by yourself (and let me know your thoughts).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So, yeah, we are gonna keep the rotation relative to the camera target. The good thing about this is that the end rotation will always be the identity (since the identity rotation relative to the camera target is the rotation of the camera itself). And the way to calculate one rotation in Unity relative to another is by doing&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;&lt;b&gt;relativeRot = Quaternion.Inverse(referenceRotation) * worldRotation&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
changin just lines 56 and 83 we have the problem solved&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;code data-gist-highlight-line=&quot;56,83&quot; data-gist-id=&quot;dc8fc942f2c6ad863a627c73852e1720&quot;&gt;&lt;/code&gt;

&lt;br /&gt;
&lt;h3&gt;
The Fov interpolation issue&lt;/h3&gt;
The current interpolator not only interpolates position and rotation, but also the parameters of the camera: fov, near and far. There is an interesting issue with the way we are interpolating the fov. In order to see it, place two cameras with different fovs in the same position and displace them in their local z so that they render the target in a similar screen position. This is what happens when you interpolate between them:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibyqdG0-D8Iq7Bfhp8fKs_7ExD-NrVQ5z_oNZymeb83wuCJaRRE7SVNqeKA_WFjETQltAdazhY_J_mwzkq_x2lghU8yqLy-QA3zOPqrmcVYAOrJR7IhOc0riev28LzZnKm2ao4/s1600/fovIssue.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibyqdG0-D8Iq7Bfhp8fKs_7ExD-NrVQ5z_oNZymeb83wuCJaRRE7SVNqeKA_WFjETQltAdazhY_J_mwzkq_x2lghU8yqLy-QA3zOPqrmcVYAOrJR7IhOc0riev28LzZnKm2ao4/s1600/fovIssue.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
It actually seems as if the camera were moving forwards and then backwards. Why is this happening? Take a look at how the height of the camera on the target position (marked in red) is currently being interpolated:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPb4LCyno_F8bL3UDJQ_pZmWBHF7ZP2jUVmAxwP7KPRrGzWaV9Z7XaDGddGYguKagiIwP7IR3TOs6NOY2xFfVu_bPbXgDSbsvEcoxppYGKXOUhLNub1UKQ8Cnyz5C6DEDKzxr6/s1600/fovIssue2.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;426&quot; height=&quot;137&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPb4LCyno_F8bL3UDJQ_pZmWBHF7ZP2jUVmAxwP7KPRrGzWaV9Z7XaDGddGYguKagiIwP7IR3TOs6NOY2xFfVu_bPbXgDSbsvEcoxppYGKXOUhLNub1UKQ8Cnyz5C6DEDKzxr6/s320/fovIssue2.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The height is actually growing and then shrinking instead of being kept constant. This happens because interpolating the fov linearly doesn&#39;t actually make the height being interpolated linearly too (If one of the angles of a triangle grows 50% that doesn&#39;t make the opposite side grow by 50%)&lt;br /&gt;
&lt;br /&gt;
There are two ways to solve this: we have to interpolate the height first and then we could either interpolate the fov and then calculate the local z or we could interpolate the local z and then calculate the fov. In my experience interpolating the fov looks smoother and is bit more friendly to the eye, so we&#39;ll go for that option. The three parameters (fov, height and local z) are connected like this&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi36KMiSOHWRxxTA-2OrOz0TadocEFnOf3fNGSD9eioc0OCQ6B4M_vWVlQxXFy7_CqUhQwz1lpzOUScC6QpDku8PJ7BjVpXSBfB-GgpBTVUZgTsLaeAgHxDBHJaN6fa6xmuaFF4/s1600/fov3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;181&quot; data-original-width=&quot;415&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi36KMiSOHWRxxTA-2OrOz0TadocEFnOf3fNGSD9eioc0OCQ6B4M_vWVlQxXFy7_CqUhQwz1lpzOUScC6QpDku8PJ7BjVpXSBfB-GgpBTVUZgTsLaeAgHxDBHJaN6fa6xmuaFF4/s320/fov3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
This is what happens if you just interpolate the fov and then calculate the local z:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi97rjqfRE2gSWaS_ByXmmKfIEwOs9j5EP3E_o8ay_sATjTEKvjd1A6aW875waFPm0hyphenhyphenfbdD5814dSnOnD-_eSSKu2Ol0URf08jgdJom0xT9fcNijE22GAuDwPNHpXnGAd8zW_f/s1600/fovWrongNearFar.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;260&quot; data-original-width=&quot;403&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi97rjqfRE2gSWaS_ByXmmKfIEwOs9j5EP3E_o8ay_sATjTEKvjd1A6aW875waFPm0hyphenhyphenfbdD5814dSnOnD-_eSSKu2Ol0URf08jgdJom0xT9fcNijE22GAuDwPNHpXnGAd8zW_f/s320/fovWrongNearFar.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
as you can see the height is kept constant (marked with the red line) but now the &lt;b&gt;near&lt;/b&gt; and &lt;b&gt;far&lt;/b&gt; values are the ones moving (in this case there is an instant where the target is actually not being rendered). This is because the &lt;b&gt;z&lt;/b&gt; now is not moving linearly and because the &lt;b&gt;near&lt;/b&gt; and &lt;b&gt;far&lt;/b&gt; values are relative to this &lt;b&gt;z&lt;/b&gt; they are displaced. We need to interpolate the &lt;b&gt;near&lt;/b&gt; and &lt;b&gt;far&lt;/b&gt; values with the same &lt;b&gt;t&lt;/b&gt; used for the &lt;b&gt;z&lt;/b&gt;. The way to calculate this &lt;b&gt;t&lt;/b&gt; is&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;i&gt;float tZ = (z - z0) / (z1 - z0);&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
where &lt;b&gt;z&lt;/b&gt; was calculated based on the &lt;b&gt;fov&lt;/b&gt; interpolation and &lt;b&gt;z0&lt;/b&gt;, &lt;b&gt;z1&lt;/b&gt; the initial and final values. Also we need to make sure that &lt;b&gt;z1&lt;/b&gt; and &lt;b&gt;z0&lt;/b&gt; are different to avoid a divission by zero, if that happens we just need to use the same &lt;b&gt;t&lt;/b&gt; used for the &lt;b&gt;fov&lt;/b&gt; interpolation (there is no displacement on &lt;b&gt;z&lt;/b&gt;, so &lt;b&gt;near&lt;/b&gt; and &lt;b&gt;far&lt;/b&gt; won&#39;t be displaced). Now if we used this tZ to interpole near and far we get this:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivU2gDlhiHIHNyukjhncDnCVUtQM-EAx4xD58NyIO4LX_RsEvKeyaA0ZauCG7IhnNBcOKsNPF_uWDBbxzaJkjDbHp2YZnTJNMow3LmYobsw4gwiD5TKaUeOLO_Kui-nvgOHS9o/s1600/fovCorrectNearFar.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;260&quot; data-original-width=&quot;403&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivU2gDlhiHIHNyukjhncDnCVUtQM-EAx4xD58NyIO4LX_RsEvKeyaA0ZauCG7IhnNBcOKsNPF_uWDBbxzaJkjDbHp2YZnTJNMow3LmYobsw4gwiD5TKaUeOLO_Kui-nvgOHS9o/s320/fovCorrectNearFar.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEFxa9j2_hKsFDR1Z8FsXB-qp6YxNtVIxSCkSFK5SfO2l0B-rb1oDw6dOUHH0gwiydEAWEbAnagW29H6q1j7dv4kANdDmKpQvAQy7gKivHzEtuUnnrvP9FMh8H47yPpUUN9JF-/s1600/fovIssuefixed2.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEFxa9j2_hKsFDR1Z8FsXB-qp6YxNtVIxSCkSFK5SfO2l0B-rb1oDw6dOUHH0gwiydEAWEbAnagW29H6q1j7dv4kANdDmKpQvAQy7gKivHzEtuUnnrvP9FMh8H47yPpUUN9JF-/s1600/fovIssuefixed2.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
And this is how the Refresh function should look like:&lt;/div&gt;
&lt;code data-gist-highlight-line=&quot;16-24&quot; data-gist-id=&quot;20800cea63e339c8ae8a7359a6283595&quot;&gt;&lt;/code&gt;

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;h3&gt;
Orthographic Cameras&lt;/h3&gt;
&lt;div&gt;
So far we have been interpolating between cameras using perspective. But there is another type of cameras available in Unity by default (and is also a type of Cameras very common in videogames).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Instead of a fov, in Unity, orthographic cameras are defined by an orthographic size which according to the documentation represents half of the screen height. Also, orthographic cameras have their projection lines parallel between them. Although they look very different at first it is posible to create a perspective camera that looks very similar to an orthographic one, and this is the trick we are gonna use to interpolate to and from them.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
On a perspective camera the lower the fov the more parallel the projection lines become. They will become parallel at infinity but we don&#39;t need to go that far to make an interpolation that looks good. We have already seen a way to keep the height constant &amp;nbsp;while interpolating the fov. Now take a look at what happens when we pick a perspective Camera and interpolate its fov to 0,1 (and then calculate its local z)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB7FS14Hd-rMRIZGuqoiXuxjaf6ncbIb5i6iAfETZp_41XoMcyt6MKBgfs0pTnALdczQfszVS8vLKZlzuDWsp7rELq_zHy1eJg3e4i_IgoT7IL6MO7mw2ox-WAGIVeLvHEjs5C/s1600/orthoWithPersp.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;602&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB7FS14Hd-rMRIZGuqoiXuxjaf6ncbIb5i6iAfETZp_41XoMcyt6MKBgfs0pTnALdczQfszVS8vLKZlzuDWsp7rELq_zHy1eJg3e4i_IgoT7IL6MO7mw2ox-WAGIVeLvHEjs5C/s1600/orthoWithPersp.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
It&#39;s not orthographic at the end, but close to, and good enough for an interpolation. We need to do this conversion in three different parts of the code:&lt;br /&gt;
&lt;br /&gt;
- At the beggining of the interpolation, if the previous one is finished, to retrieve the current values of the previous camera&lt;br /&gt;
- At the beginning of &amp;nbsp;the interpolation, on CameraFrom&lt;br /&gt;
- Every Frame, on CameraTo (since it could be moving)&lt;br /&gt;
&lt;br /&gt;
Because of this I ended up creating a small internal class CameraParams that stores all the info and also manages the conversion. The code with all the changes is the next one&lt;/div&gt;
&lt;code data-gist-highlight-line=&quot;11-33,35-36,67-75,84,100-122&quot; data-gist-id=&quot;43042e967b5b10ae864efefc457339b0&quot;&gt;&lt;/code&gt;

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7JH2rJSYIaDcbwjtS4cStO7EWzRhlHf9l9woeLAThUHh0cWoLCEap4Ny07w5c_0A5eXon2kAt4Rddn1sYOZTLR09yxQIPga9tI1qXZ1cneQBpkQVxPgYWrkj28njx1wTBPbXi/s1600/orthoWithPerspEditor.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;150&quot; data-original-width=&quot;359&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7JH2rJSYIaDcbwjtS4cStO7EWzRhlHf9l9woeLAThUHh0cWoLCEap4Ny07w5c_0A5eXon2kAt4Rddn1sYOZTLR09yxQIPga9tI1qXZ1cneQBpkQVxPgYWrkj28njx1wTBPbXi/s320/orthoWithPerspEditor.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh65uluxGvowOswcoOlezKl4rhjgChPe-PwiXD1I_n5sJzsKSL50tNlIl8sU6Zr75TSDp34ayiQFZ36uN9gGYIZ3eT-7j_1PiHI5MBEs1m9ZbfGnXhY2ik7YsOIv-zwF3Uvuloj/s1600/orthoWithPerspGame.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh65uluxGvowOswcoOlezKl4rhjgChPe-PwiXD1I_n5sJzsKSL50tNlIl8sU6Zr75TSDp34ayiQFZ36uN9gGYIZ3eT-7j_1PiHI5MBEs1m9ZbfGnXhY2ik7YsOIv-zwF3Uvuloj/s1600/orthoWithPerspGame.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
Avoid Linear interpolation&lt;/h3&gt;
&lt;div&gt;
We are almost done. Just a small tweak to improve the script a lot. So far we have been using a linear interpolation (getting t from interpolationTimeAccum / interpolationTime). Linear interpolations in videogames always look bad, you should avoid them at all cost in order to make things feel more natural.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Luckily in Unity it is very easy to add curves using the type AnimationCurve, and then we just need to change this&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;i&gt;float t = interpolationTimeAccum / interpolationTime;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
into this&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;i&gt;float t = interpolationCurve.Evaluate(interpolationTimeAccum / interpolationTime);&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
you can find the final script &lt;a href=&quot;https://gist.github.com/Zal0/b84ca842c730d29b81f0343d547e4405&quot;&gt;here&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOcJW9wCuE9XUfKZERywaq6ZZdXX4mYvTYbeWq-ouD72cKy1tFsjSZ97o5FzE1OIT-JWE-ncIcLdfyOvrnWXIFb3THB1Q5fmGIEeyOUkWisyNBcD8H52l3VOU_I3OSWgli5_O/s1600/final.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOcJW9wCuE9XUfKZERywaq6ZZdXX4mYvTYbeWq-ouD72cKy1tFsjSZ97o5FzE1OIT-JWE-ncIcLdfyOvrnWXIFb3THB1Q5fmGIEeyOUkWisyNBcD8H52l3VOU_I3OSWgli5_O/s1600/final.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Done&lt;/h3&gt;
&lt;div&gt;
Pfiuuu! We are finally done. This is something I wanted to do for a long time. I am pretty happy with the result. I have tried to explain all the issues I saw when I finally sat down and coded it (and also my memory is really bad so having all this written here will be very helpful for me in the future).&lt;br /&gt;
&lt;br /&gt;
You can of course skip it to the end and just grab the script and use it, it&#39;s up to you. I have shown you how to do this on Unity but if you understand it, it shouldn&#39;t be a problem to use it anywhere. As usual what really matters is the knowledge, not the language or the program you are using.&lt;br /&gt;
&lt;br /&gt;
Please drop me some comments with your doubts of your opinion about the post, it makes me happy to read them :)&lt;br /&gt;
&lt;br /&gt;
Happy camera coding!&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/5687256588992864435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/5687256588992864435' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/5687256588992864435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/5687256588992864435'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2017/08/properly-doing-cameras-interpolation_14.html' title='Properly doing cameras interpolation through a target (II)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH8ZTXbmTKN_WEVFX6TldmTFvzEBXpel0TPleP6Gw6UAu0NIMQNJCxzWKNQhgeenTSbfNKFh3GJ0W7nPw-4Y3L4qjJlt_2lQm2BCifffu6gfq8XgLPUuDPtXHrpDO07AMFr2ZL/s72-c/rotIssue.gif" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-3425005410101408072</id><published>2017-08-08T18:33:00.000+02:00</published><updated>2017-08-14T07:22:55.718+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cameras"/><category scheme="http://www.blogger.com/atom/ns#" term="interpolation"/><category scheme="http://www.blogger.com/atom/ns#" term="unity3d"/><title type='text'>Properly doing cameras interpolation through a target (I)</title><content type='html'>&lt;span style=&quot;font-size: x-small;&quot;&gt;This is the 1st post on the series&amp;nbsp;Properly doing cameras interpolation through a target:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;- &lt;a href=&quot;http://zalods.blogspot.com.es/2017/08/properly-doing-cameras-interpolation.html&quot;&gt;Properly doing cameras interpolation through a target (I)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;- &lt;a href=&quot;http://zalods.blogspot.com.es/2017/08/properly-doing-cameras-interpolation_14.html&quot;&gt;Properly doing cameras interpolation through a target (II)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;head&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.4/gist-embed.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
Not sure everyone knows, but I am the kind of player that one day is enjoying the latest Zelda and the next day can be playing a Nintendo64 game on my favourite emulator. I don&#39;t play too many games (not that I ever had, usually when I was a kid I could get 5-6 different games a year, so I am fine with this) but the few ones I do I like to get to at least one of the endings.&lt;br /&gt;
&lt;br /&gt;
Jumping from Banjo Kazooie to Zelda Breath of The Wild I could appreciate an evolution on the cameras Interpolation both games were doing. This is something that I wanted to work on for a long time, so after seeing it every night in Zelda BOTW I decided to implement it once and for all.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPR2Hi-9KbVGg3cY4apBC_c8TT59JwF7xmEvSO9DvAgW5OOMLCRKvAmlW9nxCbqCM64ttEg6CEqc7BLe-_ktMt4RlfbRkYoplrZFWGWGxn5-RyYupOGtU-x5iqXYz3diltVm8S/s1600/banjo.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;222&quot; data-original-width=&quot;332&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPR2Hi-9KbVGg3cY4apBC_c8TT59JwF7xmEvSO9DvAgW5OOMLCRKvAmlW9nxCbqCM64ttEg6CEqc7BLe-_ktMt4RlfbRkYoplrZFWGWGxn5-RyYupOGtU-x5iqXYz3diltVm8S/s320/banjo.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8pRTncFVUHCR43CAYTw1QaPzCDJjJ_S_CwZfVGgYUvLDZl1GcpcAr_SYRwiBbhpR_GBK-79eH0h4dzETQaMYPT7d2agYcy41p-nDWUl0J31t7UEnT2NQ2p1jLoBvBFAh8xljR/s1600/zelda.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;222&quot; data-original-width=&quot;332&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8pRTncFVUHCR43CAYTw1QaPzCDJjJ_S_CwZfVGgYUvLDZl1GcpcAr_SYRwiBbhpR_GBK-79eH0h4dzETQaMYPT7d2agYcy41p-nDWUl0J31t7UEnT2NQ2p1jLoBvBFAh8xljR/s320/zelda.gif&quot; style=&quot;cursor: move;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
When Banjo crosses the bridge there is an interpolation between two cameras, but while it&#39;s happening the character moves from side to side of the screen giving a weird sensation&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In Zelda Breath Of The Wild a cameras interpolation happens when you use the teleport. The gameplay camera changes to a new one that shows Link from a closest angle. Link always stays in the middle of the screen&lt;/div&gt;
&lt;br /&gt;
By cameras interpolation I refer to the animation that happens when changing between two different cameras, moving from the first one to the second. Bear in mind this is not always necessary, the change could be inmmediate&lt;br /&gt;
&lt;h3&gt;
A very basic Camera Interpolator&lt;/h3&gt;
Ok, let&#39;s start from a simple Camera interpolator. I&#39;ll be using Unity this time. Basically we want an script that given two cameras, disables both of them and activates a new one that moves from the first one to the second, and when it finishes it disables this new camera and enables the second one. When moving from the first one to the second we want to interpolate: position, rotation, fov, near clip plane and far clip plane. Something like this will do&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/Zal0/fa63a76e03c65a621fd3ec25ac2430fa.js&quot;&gt;&lt;/script&gt;

Any time that we want to interpolate we should call&amp;nbsp;&lt;span style=&quot;background-color: white; color: #6f42c1; font-family: inherit; font-size: 12px; white-space: pre;&quot;&gt;InterpolateTo&lt;/span&gt;&amp;nbsp;passing the two cameras and the time we want it to last. The var&amp;nbsp;&lt;span style=&quot;background-color: white; color: #24292e; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; white-space: pre;&quot;&gt;interpolationTimeAccum &lt;/span&gt;will be incremented during every call to&amp;nbsp;&lt;span style=&quot;background-color: white; color: #6f42c1; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; white-space: pre;&quot;&gt;LateUpdate&lt;/span&gt;&amp;nbsp;and all the camera parameters will be interpolated until it reaches&amp;nbsp;&lt;span style=&quot;background-color: white; color: #24292e; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; white-space: pre;&quot;&gt;interpolationTime&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Now in order to test this script let&#39;s create a new script that allows us to easily select the cameras we want to select for the interpolation. The first thing that comes to my mind is an object that keeps a list of cameras and every time we press a number in our keyboard it interpolates to the camera in that index. Something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/Zal0/c97278c56d85b32bbd09776aa4cf3350.js&quot;&gt;&lt;/script&gt;

I am also disabling every single camera except the first one because we only want one of them to be active at a time. In order to test these new scripts let&#39;s create a new scene with a cube and some cameras around it (on its front, bottom, left, right, front and back, for example). We also need an extra camera that will contain the CameraManager.cs script and an extra GameObject containing the Cameras.cs with all the cameras and the reference to the CameraManager. This is how it should look:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLdzwQtYwuVR7rkI-KMmE61S06pzm4cW4MO4h5k0yCdEB6Mwk34dEcFxkNDMmyUegUdZAnN-5fSK4hm6MIVB4Vt_Mt4wdUZFWkcHhvnvgYunZvaBIVeFPrx3YoJLYB6aFB1MAm/s1600/sceneSetup.PNG&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;634&quot; data-original-width=&quot;687&quot; height=&quot;295&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLdzwQtYwuVR7rkI-KMmE61S06pzm4cW4MO4h5k0yCdEB6Mwk34dEcFxkNDMmyUegUdZAnN-5fSK4hm6MIVB4Vt_Mt4wdUZFWkcHhvnvgYunZvaBIVeFPrx3YoJLYB6aFB1MAm/s320/sceneSetup.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikmH79wVm9Y5QMOST0KMxRhSRSnUL2CJ7BFNcL3HEPIL3yKwGr5UjkigwDfD1Q3_pSTCWoiYs-1kmpQAhBPZvwTUKK4OsGM4xXuvsIq9AexWlk_nC_UVXMJWqp_emsYwNx4cLK/s1600/interpolator.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;137&quot; data-original-width=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikmH79wVm9Y5QMOST0KMxRhSRSnUL2CJ7BFNcL3HEPIL3yKwGr5UjkigwDfD1Q3_pSTCWoiYs-1kmpQAhBPZvwTUKK4OsGM4xXuvsIq9AexWlk_nC_UVXMJWqp_emsYwNx4cLK/s1600/interpolator.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
This script really interpolates through all the cameras but it has some issues:&lt;br /&gt;
- The cube is not on screen all the time even though we are just rotating around it&lt;br /&gt;
- The interpolation cannot be interrupted, you need to wait until it finishes before interpolating again&lt;br /&gt;
- InterpolateTo doesn&#39;t really need the fromCamera, we could assume this camera is the last one we were interpolating to&lt;br /&gt;
- All the cameras have AudioListeners and this causes a lot of warnings (this is a Unity related issue but since it is the engine we are using we&#39;ll take care of it)&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
A little improvement&lt;/h3&gt;
Let&#39;s focus for now on fixing the three last issues that are actually not related to the interpolation itself but have more to do with the usability of the script.&lt;br /&gt;
&lt;br /&gt;
The first two issues are easy to solve if instead of storing the fromCamera we keep a record of its position, rotation, fov, near and far. If the interpolation is interrupted then the current values of these variables will be the new interpolation sources.&lt;br /&gt;
&lt;br /&gt;
The AudioListener issue can also be fixed disabling the AudioListeners instead of just the Camera components (this is much better than fully disabling the GameObject since there might be other script that need to continue running). Since we are going to use this in several points of the script, let&#39;s create a function fort his purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;code data-gist-highlight-line=&quot;6-10,23-30,35-43,48-52,56&quot; data-gist-id=&quot;b133698179b2a1185557de7b70c65d1a&quot;&gt;&lt;/code&gt;

You might be worried that we are no longer keeping track of the source camera. But actually it is much better if we forget about it, for several reasons:&lt;br /&gt;
- It could be destroyed at any time during the interpolation (giving us a NullPointerException that will cause a crash)&lt;br /&gt;
- It doesn&#39;t look ok to interpolate from a Camera that is still moving, you can test this a little bit with the previous script if you don&#39;t trust me&lt;br /&gt;
- We are not really interpolating from a camera, same that a moving object moving from A to B could change its target to C any time and won&#39;t be interpolating from A or B just a point in the middle.&lt;br /&gt;
&lt;br /&gt;
We also need to update the Cameras.cs script&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/Zal0/9f3a435a3147ad82ed57fd57ac2b0ff4.js&quot;&gt;&lt;/script&gt;

You can now interrupt the interpolation any time and all the AudioSources issues will no longer be happening, but still when interpolating between some cameras the box gets offscreen, this is easy to see interpolating between the front and back cameras
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtMD1E0vmh408NyxbmAGU-GCUjO4fOjzhlJPHsgj8-gD_HsbmfTie3vDXnZVKT-099UeiCb-QoaM3d_430oiAaRA4jTgz38-ZhPCu8bPVPLByLAq75WtlXAeXJHBMi8sD3X_8q/s1600/interpolator1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtMD1E0vmh408NyxbmAGU-GCUjO4fOjzhlJPHsgj8-gD_HsbmfTie3vDXnZVKT-099UeiCb-QoaM3d_430oiAaRA4jTgz38-ZhPCu8bPVPLByLAq75WtlXAeXJHBMi8sD3X_8q/s1600/interpolator1.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;
Interpolating through a target&lt;/h3&gt;
&lt;div&gt;
So what we want is to keep the box inside the boundaries of the screen at all times. Let&#39;s start by thinking if this is possible or not. Could we always have the box visible? If it is visible from cameraFrom and it is visible from cameraTo then I can think of an interpolation on screen coordinates were the box moves from the left of the screen to the right at the same time that is interpolating its rotation. Let me help you to visualize it, this is what we are looking for:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdR0AsREr4W6nQClWfWMJHV4h_gaqWLJZ4SqOkeBmaLeF2UtG87ipIM09Ia31fDQoLcINRXhCyvnFviJ5il8CBLdS_fjLN31YibAxWczkSIfqm5CdZo9_ebUU_S6FdXUgexUdY/s1600/interpolator2.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdR0AsREr4W6nQClWfWMJHV4h_gaqWLJZ4SqOkeBmaLeF2UtG87ipIM09Ia31fDQoLcINRXhCyvnFviJ5il8CBLdS_fjLN31YibAxWczkSIfqm5CdZo9_ebUU_S6FdXUgexUdY/s1600/interpolator2.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If you think on screen coordinates instead of world coordinates it seems a little bit more obvious. Now, how could we implement this?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Maybe you are thinking that you could use the lookAt function from the Quaternion class. You could just interpolate the positions between the two cameras while always looking at the target. This will work in some situations but not in all of them, because the lookAt function always keeps the target in the center of the screen. If you pay attention to the screenshots you&#39;ll see that I have on purpose placed the target on the screen sides.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
What if we create a camera that allows us to point to a target but not necessarily in the middle of the screen? The next script does exactly this:&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/Zal0/ddb2f99773e0b016389012ebdfc2e106.js&quot;&gt;&lt;/script&gt;

If you add this to a camera and assign a target and an offset, then rotating the camera (manually in the editor) will rotate around the target but will not be centered on the screen&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAtSa-7VleOmZqEdiXosuK4cVMHwWc4VQcbUk0o3ozTR9fqV82Y0OleA_H1Tm3rRz4IfsdXqFRuC0-asMF_P6Bg8Y16rDAW23WOgiXPjutdh8W0uQZZlvYd1YEqZQ5rYqjKkjd/s1600/cameraOffset.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAtSa-7VleOmZqEdiXosuK4cVMHwWc4VQcbUk0o3ozTR9fqV82Y0OleA_H1Tm3rRz4IfsdXqFRuC0-asMF_P6Bg8Y16rDAW23WOgiXPjutdh8W0uQZZlvYd1YEqZQ5rYqjKkjd/s1600/cameraOffset.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
How does this script achieve it?&lt;br /&gt;
- It keeps the current rotation&lt;br /&gt;
- Then it resets its position and is placed on the target position&lt;br /&gt;
- From there it applies a (local) translation with the given offset&lt;br /&gt;
&lt;br /&gt;
If we could represent the position of our cameras with a target, a rotation and an offset from it then interpolating the rotations first and then the offsets would give us the intepolation we are looking for.&lt;br /&gt;
&lt;br /&gt;
Given a target position &lt;b&gt;P&lt;/b&gt; and a Transform &lt;b&gt;T&lt;/b&gt; the offset that &lt;b&gt;T&lt;/b&gt; needs to move from its position to &lt;b&gt;P&lt;/b&gt; is the position of&amp;nbsp;&lt;b&gt;P&lt;/b&gt; relative to &lt;b&gt;T&lt;/b&gt;. The inverse of this value is what is needed to move from &lt;b&gt;P&lt;/b&gt; to &lt;b&gt;T&lt;/b&gt;.position. In Unity this is expressed as&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;i&gt;Vector3 offset = -T.worldToLocalMatrix.MultiplyPoint(P);&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The reason why we are using &lt;b&gt;P&lt;/b&gt; relative to &lt;b&gt;T&lt;/b&gt; instead of just &lt;b&gt;P&lt;/b&gt; is because we need to Translate the camera in local space. Now putting all the pieces together, we can improve our CameraManager like this:&lt;/div&gt;
&lt;code data-gist-highlight-line=&quot;34-36,57,86-89&quot; data-gist-id=&quot;f2232da09b629ba9334b154f4e370fed&quot;&gt;&lt;/code&gt;

pay special attention to lines 57 and 88, that is where the magic happens. Also it is important to interpolate the rotation first and then do the translation so this last one happens in the right direction. You might have also noticed that InterpolateTo now has an extra param: the target. If you want to use the interpolation without a target then you should assing cameraTo as target (lines 34,36), and then the interpolation will look like the old one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ok, we are gonna leave it here for now. This interpolator is much better than the one we started with. You can play with it a little bit if you want, but bear in mind that is not final. It has a few issues that I will solve in the next post. In the meantime if you find there is something that doesn&#39;t make sense or you have a question, please let me know in the comnents ;)</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/3425005410101408072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/3425005410101408072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/3425005410101408072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/3425005410101408072'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2017/08/properly-doing-cameras-interpolation.html' title='Properly doing cameras interpolation through a target (I)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPR2Hi-9KbVGg3cY4apBC_c8TT59JwF7xmEvSO9DvAgW5OOMLCRKvAmlW9nxCbqCM64ttEg6CEqc7BLe-_ktMt4RlfbRkYoplrZFWGWGxn5-RyYupOGtU-x5iqXYz3diltVm8S/s72-c/banjo.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-2456226705381578900</id><published>2017-07-31T20:45:00.004+02:00</published><updated>2017-08-08T18:35:10.925+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bitbitjam"/><category scheme="http://www.blogger.com/atom/ns#" term="boy"/><category scheme="http://www.blogger.com/atom/ns#" term="game"/><category scheme="http://www.blogger.com/atom/ns#" term="gameboy"/><category scheme="http://www.blogger.com/atom/ns#" term="gbdk"/><category scheme="http://www.blogger.com/atom/ns#" term="sdcc"/><category scheme="http://www.blogger.com/atom/ns#" term="zgb"/><title type='text'>BitBitJam 4 - Polka Sheep</title><content type='html'>It&#39;s hard to believe it&#39;s been a year already. I started doing some coding stuff for the Game Boy the past year for the &lt;a href=&quot;http://bitbitjam.com/portfolio-item/bbj3/&quot;&gt;bitbitJam 3&lt;/a&gt;. Me and &lt;a href=&quot;https://twitter.com/sergiodeprado&quot;&gt;sergeeo&lt;/a&gt;&amp;nbsp;came up with &lt;a href=&quot;http://gamejolt.com/games/pretty-princess-castle-escape/161880&quot;&gt;Pretty Princess&#39; Castle Escape&lt;/a&gt;&amp;nbsp;and that was the begginning of &lt;a href=&quot;https://github.com/Zal0/ZGB&quot;&gt;ZGB&lt;/a&gt;&amp;nbsp;a little engine for making games on this now 27th years old console.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I have been improving the engine a lot during the past year, but for this bitbitJam I wanted to work on something that&#39;s been annoying me the whole time: the compiler (&lt;a href=&quot;http://zalods.blogspot.com.es/2016/12/game-boy-development-tips-and-tricks-iii.html&quot;&gt;see this post&lt;/a&gt;). If you&#39;ve been following the scene you might already know that the current version of the &lt;a href=&quot;http://gbdk.sourceforge.net/&quot;&gt;GDDK&lt;/a&gt; is using an obsolete version of &lt;a href=&quot;http://sdcc.sourceforge.net/&quot;&gt;SDCC&lt;/a&gt;. I decided to sit down for a while and see if I could evolve it to use the latest one. The first thing I found was &lt;a href=&quot;https://github.com/andreasjhkarlsson/gbdk-n&quot;&gt;gbdk-n&lt;/a&gt;&amp;nbsp;and interesting update to the library that uses the latest version of the compiler but it lacks one fundamental feature: &lt;a href=&quot;https://github.com/andreasjhkarlsson/gbdk-n/issues/5&quot;&gt;banks support&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A further investigation actually leaded me to this &lt;a href=&quot;http://gbdev.gg8.se/forums/viewtopic.php?id=309&quot;&gt;post&lt;/a&gt; in the &lt;a href=&quot;http://gbdev.gg8.se/forums/viewtopic.php?id=309&quot;&gt;Game Boy Development Forum&lt;/a&gt;. From there I managed to create a Makefile and see what the problem was exactly. The &lt;a href=&quot;https://github.com/darconeous/sdcc/blob/master/support/makebin/makebin.c&quot;&gt;makebin&lt;/a&gt; tool that comes with SDCC doesn&#39;t support roms bigger than 32k (in other words, it doesn&#39;t support banks) that&#39;s correct, but taking a better look at the generated &lt;a href=&quot;https://en.wikipedia.org/wiki/Intel_HEX&quot;&gt;ihx&lt;/a&gt; file I realized I couldn&#39;t actually do much because no offsets (code 04, extended linear address) were actually present at all on the file. So basically, both the linker and the Makefile had problems...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
From there I could have started taking a look at the linker that comes with SDCC which seems to be an updated version of the old one. That&#39;s when I realized... maybe the old linker was still working fine? So I did a quick test and created a new Makefile that was using the new compiler and the old linker and voila!: &lt;a href=&quot;https://sourceforge.net/projects/sdcc/files/sdcc-win64/3.6.0/sdcc-3.6.0-x64-setup.exe/download&quot;&gt;SDCC 3.6.0&lt;/a&gt;&amp;nbsp;is now the compiler supported for ZGB. Take a look at my &lt;a href=&quot;https://github.com/Zal0/ZGB/blob/master/common/src/MakefileCommon&quot;&gt;Makefile&lt;/a&gt; to see how I am doing it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Of course this is just an intermediate solution, someone should take a look at the linker used by SDCC and fix it and also the makebin should be fixed too. In the meantime it would be good if someone could update the current gbdk to use this intermediate solution.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy with this advance I was ready for the BitBitJam 4! The theme of the jam this year was Velcro Sheep and there was an extra limitation this year: One Key.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/1R2phnef_sk/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/1R2phnef_sk?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I must admit at first I didn&#39;t like the theme or the limitation. I was planning to do a Zelda game this time, and it was impossible to fit it with these limitations. I am not really a fan of &lt;a href=&quot;http://zalods.blogspot.com.es/2007/09/campus-party-2007-gea-vs-codos-and.html&quot;&gt;one key games&lt;/a&gt; (and by key they clearly &lt;a href=&quot;https://twitter.com/bitbitjam/status/880833600345829376&quot;&gt;stated&lt;/a&gt; an input key so no keys to open a door or giving clues or other ways to skip the limitation LOL). This whole situation just forced all us to follow the rules, which is not bad at all. This is a Jam, and that&#39;s part of the funny thing. If you want to create an specific game, no one is forbidding you to do it today...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Once again I teamed up with&lt;a href=&quot;https://twitter.com/sergiodeprado&quot;&gt; Sergeeo&lt;/a&gt;&amp;nbsp;(music + art)&amp;nbsp;and this time we also were joining forces with &lt;a href=&quot;https://twitter.com/Kirblue&quot;&gt;Kirblue&lt;/a&gt;&amp;nbsp;(level design), because we already realized we needed someone who could create some great levels and the game will be much better if we did that. This was the state of our game on Saturday evening (if you want to know more about the bg music just read &lt;a href=&quot;http://vausspaceship.blogspot.com.es/2017/07/polka-sheep-post-mortem-game-boy-game.html&quot;&gt;Sergeeo&#39;s postmortem&lt;/a&gt;)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/HCZBlZqWaAc/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/HCZBlZqWaAc?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Along the week we were polishing it a little bit more and at the end we came up with Polka Sheep: a game where you need to help the main character to rescue his friends who had been captured into mysterious giant bubbles using his velcro power!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/3A6Qpf3jKG0/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/3A6Qpf3jKG0?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The game can be downloaded &lt;a href=&quot;https://gamejolt.com/games/PolkaSheeep/267409&quot;&gt;here&lt;/a&gt;&amp;nbsp;.Leave us some comments with your feedback, we always like to read them. Source code is also available &lt;a href=&quot;https://github.com/Zal0/bitbitjam2017&quot;&gt;here&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
A week after the jam the voting started and hey... &lt;a href=&quot;http://jams.gamejolt.io/bitbitjam4/games&quot;&gt;we were ranked #1&lt;/a&gt;&amp;nbsp;I&#39;d like to thank everyone for voting us, it really made us very happy. But since there are a lot of really cool games there, I encourage you to take a look at all of them, it is totally worth it!&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
There is also something else that made me happy. Two other games of the jam were built using ZGB: &lt;a href=&quot;http://gamejolt.com/games/TempleOfVelcro/267320&quot;&gt;Sticky Hooves In The Temple Of Vel-Cro&lt;/a&gt; and &lt;a href=&quot;http://gamejolt.com/games/velcroid/267481&quot;&gt;Velcroid&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/xpyB1YcVeKs/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/xpyB1YcVeKs?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjymKgOFCOyWD4inwVpDXUnIfSDwbTXUnlaGNshDGIYswc8RiI1-BygIdoge6eIkfugDvJ8RGQ8bFQHjc02PRzIHm0qYVBNISIHuj8uhqpI0h4tNLs4c6FDsMSmuZrRgPk-OXfK/s1600/ezgif-4-62cb049e79.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;215&quot; data-original-width=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjymKgOFCOyWD4inwVpDXUnIfSDwbTXUnlaGNshDGIYswc8RiI1-BygIdoge6eIkfugDvJ8RGQ8bFQHjc02PRzIHm0qYVBNISIHuj8uhqpI0h4tNLs4c6FDsMSmuZrRgPk-OXfK/s1600/ezgif-4-62cb049e79.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The fact that some people are starting to use ZGB means all the effort I put on it was worth the effort. There was also another game made with ZGB: &lt;a href=&quot;https://github.com/brovador/velcro-golf-with-sheeps&quot;&gt;Velcro Golf&lt;/a&gt; by &lt;a href=&quot;https://twitter.com/brovador&quot;&gt;brovador&lt;/a&gt;&amp;nbsp;that sadly wasn&#39;t finished in time for the jam&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://camo.githubusercontent.com/064a379e10ddda6d3bfe1b4997553577f218aa70/687474703a2f2f62726f7661646f722e6769746875622e696f2f76656c63726f2d676f6c662d776974682d7368656570732f67616d652d707265766965772e676966&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;285&quot; data-original-width=&quot;320&quot; src=&quot;https://camo.githubusercontent.com/064a379e10ddda6d3bfe1b4997553577f218aa70/687474703a2f2f62726f7661646f722e6769746875622e696f2f76656c63726f2d676f6c662d776974682d7368656570732f67616d652d707265766965772e676966&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Also if you are interested on Game Boy development I would like to recommend you to take a look at &lt;a href=&quot;https://twitter.com/Imanolea&quot;&gt;Imanolea&lt;/a&gt;&#39;s &lt;a href=&quot;https://www.youtube.com/watch?v=a8ZmxeT_1AQ&quot;&gt;timelapse&lt;/a&gt;&amp;nbsp;(the bg music is from Jet Set Radio!!) of his game &lt;a href=&quot;http://gamejolt.com/games/Sheep-Kaboom/267428&quot;&gt;Sheep Kaboom&lt;/a&gt;&amp;nbsp;and if you understand spanish then you also have the &lt;a href=&quot;https://www.youtube.com/watch?v=ytdvvb0rmF8&amp;amp;t=12612s&quot;&gt;video&lt;/a&gt; of the full development process.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/ytdvvb0rmF8/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/ytdvvb0rmF8?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
After the jam I also added a few improvements to ZGB:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Started to optimize a few core parts in assembly (since the latest SDCC allows me to mix C and asm I can now do this)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Implemented double OAM buffer (this fixes flickering with sprites and they will no longer be splitted into two, so now you can use big sprites safely)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Fixed the &lt;a href=&quot;https://github.com/Zal0/ZGB/issues/1&quot;&gt;bug&lt;/a&gt;&amp;nbsp;that was causing a random tile in the background to not be properly updated sometimes&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I will continue the development of ZGB during this year, so get ready for the BitBit Jam 5!!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/2456226705381578900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/2456226705381578900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2456226705381578900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2456226705381578900'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2017/07/bitbitjam-4-velcro-sheep.html' title='BitBitJam 4 - Polka Sheep'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/1R2phnef_sk/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-8263127841851120226</id><published>2017-01-03T13:03:00.002+01:00</published><updated>2017-08-08T18:35:43.205+02:00</updated><title type='text'>ZGB, a little engine for the Game Boy</title><content type='html'>2016 has been an interesting year for the Game Boy scene. I remember back in 2015 talking with people developing for the Game Boy saying lots of docs with important info had been lost over the years and that the scene was dying... Well, I am not sure what happened, but in this past year I&#39;ve seen some really cool games like:&amp;nbsp;&lt;a href=&quot;http://gamejolt.com/games/carazu/184403&quot;&gt;carazu&lt;/a&gt;, &lt;a href=&quot;https://imanoleasgames.blogspot.com.es/2016/06/rocket-man-demo.html&quot;&gt;Rocket Man&lt;/a&gt;, &lt;a href=&quot;http://gamejolt.com/games/where-s-my-cake-gbc/161802&quot;&gt;Where&#39;s my cake?&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;https://teamkwakwa.itch.io/soup-raiders-jailbreak&quot;&gt;Soup Raiders: Jailbreak&lt;/a&gt;, &lt;a href=&quot;https://refreshgames.itch.io/biotic-limit&quot;&gt;Biotic Limit&lt;/a&gt;, &lt;a href=&quot;https://fb1.itch.io/snakebirdgb&quot;&gt;Snake Bird&lt;/a&gt;, &lt;a href=&quot;http://gamejolt.com/games/akaru-hime-the-red-princess/162393&quot;&gt;Araku Hime: The Red Princess&lt;/a&gt;, &lt;a href=&quot;http://www.romhacking.net/homebrew/74/&quot;&gt;Guns &amp;amp; Riders&lt;/a&gt;... it seems that the game boy scene has revived!!&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIN55J884jQ3oVKS8tztKK05jXjsjU4DZ7jif6Bl5h8mvOV81ftAGP-1Ipb-8vx1PtsyUuToId31LPrpoQtIb5WZdR5WgbBXnOYEPMQN8Hs33cePbK9Fz_Aa2weVnCYmMZrLhE/s1600/bgb00002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 0em; margin-right: 0em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIN55J884jQ3oVKS8tztKK05jXjsjU4DZ7jif6Bl5h8mvOV81ftAGP-1Ipb-8vx1PtsyUuToId31LPrpoQtIb5WZdR5WgbBXnOYEPMQN8Hs33cePbK9Fz_Aa2weVnCYmMZrLhE/s1600/bgb00002.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXo95Tnhl5AZ_EHauOoQhoQCGOGVaSFdT4urd0Z6h9-4MFhs2qdZCWZ3P3S-wBiSRkJLtWmNo_s3CECFS831o2mQ5NXNFZDAEzgUa6ass05w-6f9ukakIBd63HgOJKGbGAPMEc/s1600/bgb00003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 0em; margin-right: 0em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXo95Tnhl5AZ_EHauOoQhoQCGOGVaSFdT4urd0Z6h9-4MFhs2qdZCWZ3P3S-wBiSRkJLtWmNo_s3CECFS831o2mQ5NXNFZDAEzgUa6ass05w-6f9ukakIBd63HgOJKGbGAPMEc/s1600/bgb00003.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDzrzDCFE3t9TpaBhlgcUf_LzUgnu3NKx8BN-UTuLXLzHwCT_-xTOF-ET8WFWhTVnYkXgcsjAHtut8Q6ApMCxLaHQUjWqoxUx3RnXwBU-NVaB-F08UjvajVFTbc3WXHnZvxULr/s1600/bgb00004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 0em; margin-right: 0em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDzrzDCFE3t9TpaBhlgcUf_LzUgnu3NKx8BN-UTuLXLzHwCT_-xTOF-ET8WFWhTVnYkXgcsjAHtut8Q6ApMCxLaHQUjWqoxUx3RnXwBU-NVaB-F08UjvajVFTbc3WXHnZvxULr/s1600/bgb00004.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ondyiEyyQE-RJyvxk-_lvS7dw1Vq4CPuFCXpDWWAlxK_hqjTOJf4Ghu6V19TqTyYbvp8wM9dlNXRdNNYXsTAGBISYPkh0t93JuOBCzItbQlwc4jTeEPpxmZwtdk2i2sZVExm/s1600/bgb00005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 0em; margin-right: 0em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ondyiEyyQE-RJyvxk-_lvS7dw1Vq4CPuFCXpDWWAlxK_hqjTOJf4Ghu6V19TqTyYbvp8wM9dlNXRdNNYXsTAGBISYPkh0t93JuOBCzItbQlwc4jTeEPpxmZwtdk2i2sZVExm/s1600/bgb00005.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2s1hQYCaZPSpwPxcpyiVzwLNWYgN1urTCKkK-36EIJsWN3qF52jyMs_UuP4ypnUFHJOHQ3648KBJTIEh8To1fo9drkmPYbsoZZdurvniUywMQ9iy1Aa8Qn6LZdHomttwpA3qk/s1600/bgb00006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 0em; margin-right: 0em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2s1hQYCaZPSpwPxcpyiVzwLNWYgN1urTCKkK-36EIJsWN3qF52jyMs_UuP4ypnUFHJOHQ3648KBJTIEh8To1fo9drkmPYbsoZZdurvniUywMQ9iy1Aa8Qn6LZdHomttwpA3qk/s1600/bgb00006.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixxDeXwVYd_x0gQ9OyV5FbmklZS6GfznbksceTAUI1Gfro0eZ8cyNOhuQ8wzSYf9MDMrNRQN2g9I-yQIMi7VmtCaStIYsE0GFioosNZcMQj063rev-kHEj7-HEZcBTRT1q_96z/s1600/bgb00007.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 0em; margin-right: 0em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixxDeXwVYd_x0gQ9OyV5FbmklZS6GfznbksceTAUI1Gfro0eZ8cyNOhuQ8wzSYf9MDMrNRQN2g9I-yQIMi7VmtCaStIYsE0GFioosNZcMQj063rev-kHEj7-HEZcBTRT1q_96z/s1600/bgb00007.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZEZiTSXMZHXFTbp5L0oOE-GxAtMuoGbnP25uQj9R78ChFXd8wc0hgZOgmOk1ysE3olHBUnuo_UZTE62YUxqe40AqLA6QaHN09ZJblj4osnQS3zn7QKPbC_pzsmz0ZJmmF3rQ4/s1600/bgb00008.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 0em; margin-right: 0em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZEZiTSXMZHXFTbp5L0oOE-GxAtMuoGbnP25uQj9R78ChFXd8wc0hgZOgmOk1ysE3olHBUnuo_UZTE62YUxqe40AqLA6QaHN09ZJblj4osnQS3zn7QKPbC_pzsmz0ZJmmF3rQ4/s1600/bgb00008.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Besides &lt;a href=&quot;https://github.com/Zal0/bitbitjam2016&quot;&gt;Pretty Princess&#39; Castle Escape&lt;/a&gt; and &lt;a href=&quot;https://github.com/Zal0/gbjam2016&quot;&gt;Super Princess&#39; 2092 Exodus&lt;/a&gt; I have been working on an engine that at some point I decided to name ZGB. This is the engine that both games are using. Some of its features:&lt;br /&gt;
&lt;br /&gt;
- &lt;b&gt;4 directional scroll&lt;/b&gt; that allows maps bigger than 32x32. This is done updating the current row and column as the scroll moves.&lt;br /&gt;
- &lt;b&gt;Sprites pool&lt;/b&gt;, that will help you manage everything that is moving on screen. It will also handle the creation and destruction of new sprites on screen&lt;br /&gt;
- &lt;b&gt;Animations&lt;/b&gt;&lt;br /&gt;
- &lt;b&gt;Collisions&lt;/b&gt;, sprite vs sprite and sprite vs background&lt;br /&gt;
- &lt;b&gt;Automatized build support&lt;/b&gt;. Just 3 lines of code&lt;br /&gt;
- &lt;b&gt;Bank management&lt;/b&gt;. Easy to select the bank for every file on the project and transparent bank switching in most cases&lt;br /&gt;
- &lt;b&gt;Fonts and printing&lt;/b&gt;, and also some tools that will help to debug some values&lt;br /&gt;
- &lt;b&gt;Music&lt;/b&gt;, using the legacy version of &lt;a href=&quot;https://github.com/AntonioND/gbt-player&quot;&gt;gbt-player&lt;/a&gt;&lt;br /&gt;
- &lt;b&gt;Sound effects&lt;/b&gt;, using the &lt;a href=&quot;https://github.com/Zal0/GBSoundDemo&quot;&gt;fixed version of the sound sample&lt;/a&gt; that comes with the gbdk&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://github.com/Zal0/ZGB&quot;&gt;ZGB is available on github&lt;/a&gt;. You can take a look at all the things you can do with it and there is a tutorial showing you how to create a game step by step. You can also download the source code from &lt;a href=&quot;https://github.com/Zal0/bitbitjam2016&quot;&gt;Pretty Princess&#39; Castle Escape&lt;/a&gt; and &lt;a href=&quot;https://github.com/Zal0/gbjam2016&quot;&gt;Super Princess&#39; 2092 Exodus&lt;/a&gt; and see how they do their stuff (or even create some rom hacks if you want :P)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;-webkit-text-stroke-width: 0px; font-family: &amp;quot;Times New Roman&amp;quot;; letter-spacing: normal; margin-bottom: 0.5em; margin-left: auto; margin-right: auto; orphans: 2; padding: 6px; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;a href=&quot;https://raw.githubusercontent.com/Zal0/ZGB/master/doc%20files/tuto.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://raw.githubusercontent.com/Zal0/ZGB/master/doc%20files/tuto.gif&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 12.8px; padding-top: 4px; text-align: center;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;
There is a&amp;nbsp;&lt;a href=&quot;https://github.com/Zal0/ZGB#tutorial&quot;&gt;tutorial&lt;/a&gt;&amp;nbsp;showing you how to code this&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Just for clarification: this is not the definitive engine for the Game Boy. It is written in C using gbdk and that adds a lot of extra garbage on the code . Also there are some parts that still could be optimized a lot. But I think it is good for people who want to do something relatively fast (You know what other options you have if you really want to squeeze the machine). I think it perfectly fits on a game jam.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There will be more game jams in 2017. I&#39;d like to ask you to give ZGB a try. You&#39;ll make me very happy if you create something fun with it (I might even cry). I have already fulfilled one of my childhood&#39;s dreams and would like to see you doing it too: create a videogame for the Game Boy.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy coding!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;a href=&quot;https://github.com/Zal0/ZGB&quot;&gt;ZGB on github&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/8263127841851120226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/8263127841851120226' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8263127841851120226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8263127841851120226'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2017/01/zgb-little-engine-for-game-boy.html' title='ZGB, a little engine for the Game Boy'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIN55J884jQ3oVKS8tztKK05jXjsjU4DZ7jif6Bl5h8mvOV81ftAGP-1Ipb-8vx1PtsyUuToId31LPrpoQtIb5WZdR5WgbBXnOYEPMQN8Hs33cePbK9Fz_Aa2weVnCYmMZrLhE/s72-c/bgb00002.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-8121648270360226921</id><published>2017-01-02T13:23:00.000+01:00</published><updated>2017-08-08T18:36:17.569+02:00</updated><title type='text'>Super Princess&#39; 2092 Exodus</title><content type='html'>Initially developed for the &lt;a href=&quot;https://itch.io/jam/gbjam-5&quot;&gt;gbjam5&lt;/a&gt; this is the second game I develop for the Game Boy and also together with &lt;a href=&quot;https://twitter.com/vaus_spaceship&quot;&gt;sergeeo&lt;/a&gt;&amp;nbsp;doing the art and music.&lt;br /&gt;
&lt;br /&gt;
The &lt;a href=&quot;https://itch.io/jam/gbjam-5&quot;&gt;gbjam5&lt;/a&gt; ran from&amp;nbsp;October 1st 2016 at 7:00 AM to October 10th 2016 at 7:00 AM. 399 games were entered, wow! Contrary to the &lt;a href=&quot;http://bitbitjam.com/&quot;&gt;bitbitJAM&lt;/a&gt;&amp;nbsp;the games were not required to work on real hardware, actually the games just needed to be thematized as Game Boy games. I already had the engine I created for &lt;a href=&quot;http://zalods.blogspot.com.es/2016/07/bitbitjam-3-pretty-princess-castle.html&quot;&gt;Pretty Princess&#39; Castle Escape&lt;/a&gt;&amp;nbsp;and I wanted to give it another try. Most of the time I spent on the bitbitJam was actually on the engine and not the game itself, so I knew we could do something better.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhThpre3w1CVTuXdd_CE10Au-sbd7V55FRCDvccTknDw_GTqzuVTfGSFCFO0V4nZlFL1n3vGb8wXtxP2cQrSSDE7oRG8h4r8wIwXvauxaYZTUWkwP_P2HEJRqiXW6M8IAajg9vh/s1600/bgb00009.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhThpre3w1CVTuXdd_CE10Au-sbd7V55FRCDvccTknDw_GTqzuVTfGSFCFO0V4nZlFL1n3vGb8wXtxP2cQrSSDE7oRG8h4r8wIwXvauxaYZTUWkwP_P2HEJRqiXW6M8IAajg9vh/s1600/bgb00009.png&quot; imageanchor=&quot;1&quot; style=&quot;display: inline; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhThpre3w1CVTuXdd_CE10Au-sbd7V55FRCDvccTknDw_GTqzuVTfGSFCFO0V4nZlFL1n3vGb8wXtxP2cQrSSDE7oRG8h4r8wIwXvauxaYZTUWkwP_P2HEJRqiXW6M8IAajg9vh/s1600/bgb00009.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKkn-RB6SdyrAyh_Y-zJxeoqIc04HSyU8hkzI3_eQt36BqzFUgObncE8uSCY0sIpNMnJ0-rgBXcbRiWR0xgqUBpeReovdmU9HPULAZdHr7lzbBbs17AcxvltRrogmQP4Z6bwAi/s1600/bgb00006.png&quot; imageanchor=&quot;1&quot; style=&quot;display: inline; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKkn-RB6SdyrAyh_Y-zJxeoqIc04HSyU8hkzI3_eQt36BqzFUgObncE8uSCY0sIpNMnJ0-rgBXcbRiWR0xgqUBpeReovdmU9HPULAZdHr7lzbBbs17AcxvltRrogmQP4Z6bwAi/s1600/bgb00006.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg518FgIe54jboTqsDFg2VfoKUl9M1uNVZ2rjmqCOMAgOC9kekqZo7UdqSdpNuYDoEqi8GcQqxeVECE0w6dOvGIHxi3sTOWjcSLMldOnQM7tutbxlwmJ7HBh5FxpSGkm1XEOKA7/s1600/bgb00004.png&quot; imageanchor=&quot;1&quot; style=&quot;display: inline; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg518FgIe54jboTqsDFg2VfoKUl9M1uNVZ2rjmqCOMAgOC9kekqZo7UdqSdpNuYDoEqi8GcQqxeVECE0w6dOvGIHxi3sTOWjcSLMldOnQM7tutbxlwmJ7HBh5FxpSGkm1XEOKA7/s1600/bgb00004.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
The first version of Super Princess&#39; 2092 Exodus was developed in 48 hours. It only contained one level (7 screens) but it was more complete than Pretty Princess. I saw there was still a lot of improvements that could be done on the engine so I decided to continue working on it for a while. At the same time we also wanted to improve the game after the jam, so since them we have:&lt;br /&gt;
&lt;br /&gt;
- Improved the jump (that was the main complain from people)&lt;br /&gt;
- Added 2 new levels, with their music, tileset and maps&lt;br /&gt;
- Added the screen transition similiar to the one you see in Megaman Games&lt;br /&gt;
- Moving Platforms&lt;br /&gt;
- 5 new enemies&lt;br /&gt;
- Better menus&lt;br /&gt;
- Sound effects&lt;br /&gt;
- An ending!&lt;br /&gt;
&lt;br /&gt;
The game is not hard but it isn&#39;t easy either... in other words you won&#39;t finish it on your first try, just like videogames used to be. If you get killed, just try again&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLr1PwarmHxAtyQQqkf5R7x2OiUNyBhC1GK43tkIkxq_xtuC7WNNJV6ZaiWm7eUOHf1ixOfN3BKg7ESXT_HCUPMDI-fqYvjSWb2oDK00rN0HSTyjy9XX3nSid2fj4lXHIG0f2C/s1600/ufos.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLr1PwarmHxAtyQQqkf5R7x2OiUNyBhC1GK43tkIkxq_xtuC7WNNJV6ZaiWm7eUOHf1ixOfN3BKg7ESXT_HCUPMDI-fqYvjSWb2oDK00rN0HSTyjy9XX3nSid2fj4lXHIG0f2C/s1600/ufos.gif&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdyyfTs6Km5_Ywb_lTUvGhySBJJZmK7x9CEHlwtuGTtXZAYTJ4v5Xw2_3Y7LcUBP72I-cdLb7gUvvUKTJLl9b7zAifVzA07zZxaFUA-mEfxwbtkunbD5pcmq1TiMEnal7Wy_1O/s1600/ufo2.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdyyfTs6Km5_Ywb_lTUvGhySBJJZmK7x9CEHlwtuGTtXZAYTJ4v5Xw2_3Y7LcUBP72I-cdLb7gUvvUKTJLl9b7zAifVzA07zZxaFUA-mEfxwbtkunbD5pcmq1TiMEnal7Wy_1O/s1600/ufo2.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
We are very happy with the result and hope you all enjoy it. You can play it &lt;a href=&quot;http://bit.ly/prin2092&quot;&gt;here&lt;/a&gt;&amp;nbsp;(just remember the experience is much better if you download the rom and play it on an emulator, or even better on real hardware)&lt;br /&gt;
&lt;br /&gt;
Source code is also available on &lt;a href=&quot;https://github.com/Zal0/gbjam2016&quot;&gt;github&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/8121648270360226921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/8121648270360226921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8121648270360226921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8121648270360226921'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2017/01/super-princess-2092-exodus.html' title='Super Princess&#39; 2092 Exodus'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhThpre3w1CVTuXdd_CE10Au-sbd7V55FRCDvccTknDw_GTqzuVTfGSFCFO0V4nZlFL1n3vGb8wXtxP2cQrSSDE7oRG8h4r8wIwXvauxaYZTUWkwP_P2HEJRqiXW6M8IAajg9vh/s72-c/bgb00009.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-2399395231693063855</id><published>2016-12-04T12:18:00.000+01:00</published><updated>2017-08-08T18:36:52.947+02:00</updated><title type='text'>Game Boy Development - Tips and Tricks (III)</title><content type='html'>&lt;h2&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;This is the 3rd post on the series Game Boy Development - Tips and Tricks&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/07/game-boy-development-tips-and-tricks-i.html&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (I)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/07/game-boy-development-tips-and-tricks-ii.html&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (II)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small; font-weight: normal;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/12/game-boy-development-tips-and-tricks-iii.html&quot; style=&quot;font-size: small;&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (III)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/h2&gt;
&lt;h2&gt;
7. SDCC Issues&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
No matter how you look at it, the SDCC that comes with the GBDK has some serious issues. Here I am going to talk a little bit about some of them that I have been able to isolate an reproduce 100% and the workarounds I was forced to use.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
1. Minus unary operator (-) doesn&#39;t work with numbers bigger than 130&lt;/h3&gt;
&lt;div&gt;
The minus operator used for negating a number either gives you a random value or crashes. You can easily test this with the next code:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test0() &amp;nbsp;{&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INT16 n &amp;nbsp; = 1000;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INT16 tmp = -n;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Printing -n crashes&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d neg: %d&quot;, n, tmp);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For some reason it only fails with numbers bigger than 130, so you can safely use if with 8 bits values (because the biggest 8 bit signed is 127). You shouldn&#39;t use it with unsigned values for obvious reasons.&lt;/div&gt;
&lt;div&gt;
The workaround is simple but annoying, use the next macro that negates a two&#39;s complement number&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;#define NEG(A) (0xFFFF - A + 1)&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test0() &amp;nbsp;{&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INT16 n &amp;nbsp; = 1000;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INT16 tmp = -n;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Workaround&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d neg: %d\n&quot;, n, NEG(n));&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
2. Extra cast is required for adding &amp;nbsp;an 8-bit value to an unsigned 16-bit value&lt;/h3&gt;
&lt;div&gt;
I have to admit I wasn&#39;t sure at first it this was a bug or not. Mixing signed and unsigned values is always complicated but when you start using unsigned values is going to happen sooner or later. I just wrote a similar code on Visual Studio using shorts and ints and it seem to be a bug according to that.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Calling the next function with v0=100 and v1=-50 outputs 306 instead of 50&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test1(UINT16 v0, INT8 v1) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d &quot;, v0 + v1);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
At least for this one there is an explanation. The compiler is converting v1 &amp;nbsp;to unsigned (256 - 50 = 206) and adding that value wich gives that result.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If Instead of writing the test as a function with two parameters we declare the vars as local:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test1() {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;color: blue;&quot;&gt;UINT16 v0 = 100;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i style=&quot;color: blue;&quot;&gt;INT8 v1 = -50;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d &quot;, v0 + v1);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
then it outputs 50. This is probably resolved by the compiler but because of the lack of consistency there is definitely something wrong going on here&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
The workaround is simple (but once again annoying), you just have to force a cast like this:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test1(UINT16 v0, INT8 v1) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d&quot;, v0 + (INT16)v1);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
3. Right Shift operator (&amp;gt;&amp;gt;) doesn&#39;t work with 16-bit values&lt;/h3&gt;
&lt;div&gt;
Similar to the unary minus, the &amp;gt;&amp;gt; operator either crashes or gives you a random value. The next code crashes:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;void Test2() {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;UINT16 v16 = 50;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;UINT16 n = 2;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d &quot;, v16 &amp;gt;&amp;gt; n);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
Also 50 &amp;gt;&amp;gt; n or v16 &amp;gt;&amp;gt; 2 will crash but if you write 50 &amp;gt;&amp;gt; 2 that works, I think the compiler is resolving that on compilation time. The workaroud I found here is a big surprising since it uses the operator itself. You just need to use the next function:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;INT16 DespRight(INT16 a, INT8 b) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return a &amp;gt;&amp;gt; b;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test2() {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;UINT16 v16 = 50;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;UINT16 n = 2;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d \n&quot;, DespRight(v16, n));&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
that seems to stop some kind of optimization that at the end is breaking up everything... strange&lt;/div&gt;
&lt;div&gt;
The Left Shift operator (&amp;lt;&amp;lt;) seems to work without problems&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
4. Comparing 8 bit value from struct with another 8 bit value fails&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This one was causing a very odd behaviour on my engine making some sprites not properly being spawned. Calling Test3 here with a value of 5 will output 1 (TRUE)&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;struct StructTest {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;UINT8 v8;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;};&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test3(UINT8 v8_0) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;struct StructTest test = {0};&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d &quot;, (UINT16)(test.v8 == v8_0));&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
This won&#39;t happen if you use 16-bit values instead. I found a couple of workarounds here, you can either change the order of the comparison:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test3_fix(UINT8 v8_0) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;struct StructTest test = {0};&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d &quot;, (UINT16)(v8_0 == test.v8));&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
or cast the values to 16-bit&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test3_fix(UINT8 v8_0) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;struct StructTest test = {0};&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d\n&quot;, ((UINT16)v8_0 == (UINT16)test.v8));&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Something interesting is that if you write the code followed by the workarounds like this:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;void Test3(UINT8 v8_0) {&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;struct StructTest test = {0};&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d &quot;, (UINT16)(test.v8 == v8_0));&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;%d &quot;, (UINT16)(v8_0 == test.v8));&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;printf(&quot;%d\n&quot;, ((UINT16)v8_0 == (UINT16)test.v8));&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
then it outputs the right value (¿?¿?) in the 3 cases&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That&#39;s all for now. I have created a public repository wit the tests &lt;a href=&quot;https://github.com/Zal0/gbdk_bugs&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, feel free to contribute and if you find any mistake on anything I said please let me know. I have tried to compile all this using &lt;a href=&quot;https://github.com/andreasjhkarlsson/gbdk-n&quot; target=&quot;_blank&quot;&gt;gbdk-n&lt;/a&gt;&amp;nbsp;which works with the latest version of &lt;a href=&quot;http://sdcc.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;sdcc&lt;/a&gt;&amp;nbsp;but since it doesn&#39;t support printf I haven&#39;t been able to test it. Also gbdk-n doesn&#39;t have proper support for banks yet and that is a big problem.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/2399395231693063855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/2399395231693063855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2399395231693063855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2399395231693063855'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2016/12/game-boy-development-tips-and-tricks-iii.html' title='Game Boy Development - Tips and Tricks (III)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-3229498793437412533</id><published>2016-09-11T19:32:00.001+02:00</published><updated>2017-08-08T18:37:44.453+02:00</updated><title type='text'>Getting the Wii core back</title><content type='html'>One of the things that has been bothering me over the past 4 years is not being able to compile for the Wii. I had support for it a few years back, but then I introduced several improvements and never found the time to work on them for the Wii.&lt;br /&gt;
&lt;br /&gt;
Recently with the 3ds port a bit more stable I decided to get it back. There are other platforms I want to support in the future but before that it is important to get all my cores up to date. Taking advantage of all the things I did for the 3ds and all the improvements that had been added to &lt;a href=&quot;https://es.dolphin-emu.org/&quot; target=&quot;_blank&quot;&gt;Dolphin&lt;/a&gt; during all these years I had finally updated it!&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
And of course I had compiled a version of&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/uc?export=download&amp;amp;id=0ByakbigmkUpsc3Q2T3lya25iOW8&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Rokoban&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnRqyIM47qyUA09VwHtpQxVCA5CcDryGYare9TuV80VFF9WuuwjdBgY0aOcoQDPxwmUQ_-CZ4bmd_fvvfrfkMdrhI-GDDn9VLTa4V9J8LPj_vaZ88uAEmTWte1E6DGQIJICjCG/s1600/00000000-4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnRqyIM47qyUA09VwHtpQxVCA5CcDryGYare9TuV80VFF9WuuwjdBgY0aOcoQDPxwmUQ_-CZ4bmd_fvvfrfkMdrhI-GDDn9VLTa4V9J8LPj_vaZ88uAEmTWte1E6DGQIJICjCG/s200/00000000-4.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6FRWk8wsM_IJARBTlErmNzOKqIiR2pQdXJleC4hqjRJNBTzOS6P4loaErFtszOvS0U1nky0a_XuYjkdarqZYA1A_cBbiq9XZPI5e6YJir0SL2ZtTu4bqIYW4jipVUeySapWgT/s1600/00000000-5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6FRWk8wsM_IJARBTlErmNzOKqIiR2pQdXJleC4hqjRJNBTzOS6P4loaErFtszOvS0U1nky0a_XuYjkdarqZYA1A_cBbiq9XZPI5e6YJir0SL2ZtTu4bqIYW4jipVUeySapWgT/s200/00000000-5.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHTCxvs5ysfgEFhbK8lg2Z7Vk2Pco_Q5WehfGW52-lLHnb08yhBvcVriGLWWA6PznDNMfuDyJDTGap_BVjifEwGOlugM-HP6STDl1FLZfBYhfiJE7IsPouwiQp1JWlBab8bh55/s1600/00000000-6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHTCxvs5ysfgEFhbK8lg2Z7Vk2Pco_Q5WehfGW52-lLHnb08yhBvcVriGLWWA6PznDNMfuDyJDTGap_BVjifEwGOlugM-HP6STDl1FLZfBYhfiJE7IsPouwiQp1JWlBab8bh55/s200/00000000-6.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUNHWsxag8gWjEvKg9Si8CrpGTScXxbaPLv5JdLG1spWWqvbgXu1hhNCBNZTy6ayieSewT1Hy00tDGdNQmBS2xYrFj7QTDUSS8JnI9BYj_ZfopciowZyWLHTlvJQhR3wtDuNqj/s1600/00000000-7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUNHWsxag8gWjEvKg9Si8CrpGTScXxbaPLv5JdLG1spWWqvbgXu1hhNCBNZTy6ayieSewT1Hy00tDGdNQmBS2xYrFj7QTDUSS8JnI9BYj_ZfopciowZyWLHTlvJQhR3wtDuNqj/s200/00000000-7.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and &lt;a href=&quot;https://drive.google.com/uc?export=download&amp;amp;id=0ByakbigmkUpsZWJpNEV4SmZ4QzA&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Whack Mania&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtT_hrSfzs7Ub6XIP6TbDRUAtXjmbNTbUs0HxVn3k2cN7BO6LRE8wl4FjpI0dEr5LJplXruURKXmfEJ8sJApFyw1-eX10MGqerkGrf_6p_E-RYRUeDPH-1xUjF41nQu943V_Rh/s1600/00000000-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtT_hrSfzs7Ub6XIP6TbDRUAtXjmbNTbUs0HxVn3k2cN7BO6LRE8wl4FjpI0dEr5LJplXruURKXmfEJ8sJApFyw1-eX10MGqerkGrf_6p_E-RYRUeDPH-1xUjF41nQu943V_Rh/s200/00000000-1.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKJ9hU8ILmtlSNbZXEYe8txBnBjHzhVv7bdd4TfShXRM0l26R-87_rR0Ok3rZKLZ2mFdvrbxz8zWYu27QbVFsKY3mIsijCxn5MJ3FFw8X_L0hoA76HFdZC3teqEIRjWUDb0mPW/s1600/00000000-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKJ9hU8ILmtlSNbZXEYe8txBnBjHzhVv7bdd4TfShXRM0l26R-87_rR0Ok3rZKLZ2mFdvrbxz8zWYu27QbVFsKY3mIsijCxn5MJ3FFw8X_L0hoA76HFdZC3teqEIRjWUDb0mPW/s200/00000000-2.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim9_RdynZVIgzsdWG6D6qmCxjHkRbHrHRs8HgSLSj_DFqQ2TKL-ZYtwZbYIOWad94sCS6fPPHcl1puj7HZ0bQjfHHRLrACFzZ8vVMe7jd24xlSVhNbLdHUhvIJPFISGcgoj-xP/s1600/00000000-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim9_RdynZVIgzsdWG6D6qmCxjHkRbHrHRs8HgSLSj_DFqQ2TKL-ZYtwZbYIOWad94sCS6fPPHcl1puj7HZ0bQjfHHRLrACFzZ8vVMe7jd24xlSVhNbLdHUhvIJPFISGcgoj-xP/s200/00000000-3.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If anyone is still playing Wii homebrew games out there, please let me know your thoughts!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/3229498793437412533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/3229498793437412533' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/3229498793437412533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/3229498793437412533'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2016/09/getting-wii-core-back.html' title='Getting the Wii core back'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnRqyIM47qyUA09VwHtpQxVCA5CcDryGYare9TuV80VFF9WuuwjdBgY0aOcoQDPxwmUQ_-CZ4bmd_fvvfrfkMdrhI-GDDn9VLTa4V9J8LPj_vaZ88uAEmTWte1E6DGQIJICjCG/s72-c/00000000-4.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-3799162023034070203</id><published>2016-07-31T17:17:00.001+02:00</published><updated>2017-08-08T18:38:19.463+02:00</updated><title type='text'>Game Boy Development - Tips and Tricks (II)</title><content type='html'>&lt;h2&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;div style=&quot;font-size: medium;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;This is the 2nd post on the series Game Boy Development - Tips and Tricks&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/07/game-boy-development-tips-and-tricks-i.html&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (I)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/07/game-boy-development-tips-and-tricks-ii.html&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (II)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small; font-weight: normal;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/12/game-boy-development-tips-and-tricks-iii.html&quot; style=&quot;font-size: small;&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (III)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/h2&gt;
&lt;h2&gt;
5. The game loop&lt;/h2&gt;
Most of the examples I&#39;ve seen contain a main loop similar to this&lt;br /&gt;
&lt;br /&gt;
void main() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;game initializations&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while(1) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;wait_vbl_done();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;...&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;process input&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;your frame update&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
this is a good starting point. Waiting for the vblank interruption prevents your game from running faster than it &amp;nbsp;should. If you start with this and keep coding you&#39;ll eventually notice a frame rate slowdown. A high slowdown actually, and that is because your frame update at some point takes more time than what is available between 2 vblanks, but you are still waiting an extra vblank.&lt;br /&gt;
&lt;h3&gt;
1. Skipping vblank wait when we don&#39;t need it&lt;/h3&gt;
One way to improve the previous code will be:&lt;br /&gt;
&lt;br /&gt;
void vbl_update() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;vbl_count ++;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main() {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Subscribe vbl_update to vblank interruption&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;disable_interrupts();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add_VBL(vbl_update);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set_interrupts(VBL_IFLAG);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;enable_interrupts();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;game initialization=&quot;&quot;&gt;&lt;/game&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while(1) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(vbl_count == 0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;wait_vbl_done();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;vbl_count = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;...&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;process input=&quot;&quot;&gt;&lt;/process&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;your frame=&quot;&quot; update=&quot;&quot;&gt;&lt;/your&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
in this new code we have declared an interruption that will store in a var the number of vblanks that have happened during the current frame. If there are more than one we no longer need to wait to the vblank and we can continue processing. Bear in mind this can duplicate your framerate up to x2 specially in situations where your processing takes more than one vblank just for a few instructions&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
2. Frame skipping&lt;/h3&gt;
&lt;div&gt;
This is a good improvement, but it can be improved even more by using frame skipping. As its name says it consists of skipping the painting of some frames to save processing time and this way keeping the game logic running without suffering an slow down. So let&#39;s say your game is running at 60Hz meaning your fixed update time is 0.016 secs aprox, in normal conditions you will update your logic 0.016 secs, paint, update 0.016 secs, paint... and so on. Then at some point you realize that updating your logic takes more than 0.16 secs and in order to prevent an slow down &amp;nbsp;you start dropping frames like: update 0.016 secs, update 0.016 secs, paint, update 0.016 secs, update 0.016 secs...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the Game Boy the painting happens automatically and it takes 0 processing time from your main loop. The only thing you need to do is prepare the OAM table and update the scroll coordinates and it will just happen. So just doing two consecutive updates during one frame iteration will not help up us at all&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Once thing we can do though is processing several updates together. Instead of updating 0.016 secs and then update 0.016 secs we can do one single update of 0.032 secs which basically means multiplying all your updating calculations by 2 (which is a very simple operation as we saw), like this:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
...&lt;br /&gt;
while(1) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(vbl_count == 0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;wait_vbl_done();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;delta_time = vbl_count ? 1 : 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;vbl_count = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;...&lt;br /&gt;
}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
so now we have a var called delta_time that is 1 or 0 depending on having to do frame skipping or not. If for example in some of your updates you were doing&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;sprite.x += 1;&lt;br /&gt;
you just need to change it to:&lt;br /&gt;
&amp;nbsp;sprite.x += 1 &amp;lt;&amp;lt; delta_time;&lt;br /&gt;
x &amp;lt;&amp;lt; &amp;nbsp;0 is the same as multiplying by 1 and x &amp;lt;&amp;lt; 1 is the same as multiplying by 2&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
On this implementation we are just skipping one frame, doing 2 will be complicated because that cannot be done with a shift operator. Skipping 3 will be posible but If you need to do that you should probably take a look at your calculations and try to optimize a little bit (I mean your update is taking 4 times what it should...)&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
3. Keeping the scroll movement smooth&lt;/h3&gt;
&lt;div&gt;
Even though your game is not running at 60Hz you can still do your scroll being updated at 60Hz if you update &amp;nbsp;the scroll position registers during the vblank interruption. In order to do this you should store your scroll position in a variable during your update process and then refresh the scroll position registers during vblank. But instead of doing&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SCX_REG = scroll_x;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
update them like this:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
if(old_scroll_x &amp;lt; scroll_x)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;old_scroll_x ++;&lt;br /&gt;
else if(old_scroll_x &amp;gt; scroll_x)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;old_scroll_x --;&lt;br /&gt;
SCX_REG = old_scroll_x;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
where scroll_x is the current x position of the scroll and old_scroll_x is the position in the previous frame. If your scroll was moving faster than one pixel per frame sometimes you can improve this with an small spring interpolation&lt;br /&gt;
&lt;br /&gt;
if(old_scroll_x &amp;lt; scroll_x)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;old_scroll_x += (scroll_x - old_scroll_x + 1) &amp;gt;&amp;gt; 1;&lt;br /&gt;
else if(old_scroll_x &amp;gt; scroll_x)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;old_scroll_x -= (old_scroll_x - scroll_x + 1) &amp;gt;&amp;gt; 1;&lt;br /&gt;
SCX_REG = old_scroll_x;&lt;br /&gt;
&lt;br /&gt;
And you should do the same for the y axis. You can check the full implementation &lt;a href=&quot;https://github.com/Zal0/bitbitjam2016/blob/master/common/src/main.c&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
6. Funny things in the world of 8 bits&lt;/h2&gt;
Here is a list of some of the things that made me waste some time because I am not very used to work with these kind of limitations&lt;br /&gt;
&lt;br /&gt;
- printf implementation only works with 16bits values. Funny when this is the only method you have to get some debug info and you realize you are printing all that info incorrectly. If you want to print the values of 8bits vars ensure you do a casting:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;signed:%d - unsigend %u&quot;, (INT16)signed_8_x, (UINT16)unsigned_8_x)&lt;br /&gt;
&lt;br /&gt;
- lcc optimizes array indexing using ints, which in 8bits limits array access to 128 as stated in the &lt;a href=&quot;http://gbdk.sourceforge.net/doc/html/c0202.html&quot; target=&quot;_blank&quot;&gt;documentation&lt;/a&gt;. It also says that for statically allocated arrays this doesn&#39;t apply. At some point of the implementation of the &lt;a href=&quot;https://github.com/Zal0/bitbitjam2016/blob/master/common/src/SpriteManager.c&quot; target=&quot;_blank&quot;&gt;SpriteManager &lt;/a&gt;I started seeing some weird behaviour and it took me a while to discover that actually when accessing sprite[10] the 10 was calculated as sizeof(struct sprite) * 10 instead of sizeof(struct sprite) * (UINT16)10 giving me te wrong address of sprite 10 and causing some weird behaviour&lt;br /&gt;
&lt;br /&gt;
- As seen above it is actually a very bad idea to randomly acess an element of an array of structs because it contains a multiplication. Instead it is a good idea to create an array of pointers to the elements of the array on startup and use this array instead&lt;br /&gt;
&lt;br /&gt;
- I&#39;ve read in lots of places that structs have a lot of problems and you shouldn&#39;t use them... as far as I have seen there are no problems using them (except for the array accessing issue which actually makes sense for optimization purposes)&lt;br /&gt;
&lt;br /&gt;
- Also, I&#39;ve read in lots of places that you cannot use pointers to functions. I have successfully used pointers to functions of 0 and 1 parameters. And the GDBK uses this for &lt;a href=&quot;http://gbdk.sourceforge.net/doc/html/c0302.html&quot; target=&quot;_blank&quot;&gt;interruption handler&lt;/a&gt;!&lt;br /&gt;
&lt;br /&gt;
- There are a lot of tutorials telling you how to do things... you&#39;ll be surprised to see some of them contain errors and you should use them as reference but never as the absolute truth. Once again check this &lt;a href=&quot;http://antoniond_blog.drunkencoders.com/?p=392&quot; target=&quot;_blank&quot;&gt;post &lt;/a&gt;from AntonioND&lt;br /&gt;
&lt;br /&gt;
- As a final conclussion... is the GBDK a mess like lots of people are saying on lots of forums and blogs? I have been using it for a month and I can tell you that is a lie. I am not gonna say working with it is easy but that&#39;s not the GBDK&#39;s fault alone. First there is the &lt;a href=&quot;http://sdcc.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;SDCC&lt;/a&gt; which is the compiler the GBDK is using and probably the one people should be blaming. There is a new version of the GDBK using the latest version of SDCC &lt;a href=&quot;https://github.com/rotmoset/gbdk-n&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, I didnt&#39; have the time to test it. But most of the things people seem to complain about are more related to a lack of C knowledge (and again, this is not a good enviroment for learning it) and the limitations of having to work with and 8-bit machine. The creators of the GBDk are perfectly aware of this as you can see &lt;a href=&quot;http://gbdk.sourceforge.net/doc/html/c02.html#I(GB-TARGET)C(1,SECT1)&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/3799162023034070203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/3799162023034070203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/3799162023034070203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/3799162023034070203'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2016/07/game-boy-development-tips-and-tricks-ii.html' title='Game Boy Development - Tips and Tricks (II)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-5820855358396684292</id><published>2016-07-28T07:43:00.001+02:00</published><updated>2017-03-10T07:13:39.117+01:00</updated><title type='text'>Game Boy Development - Tips and Tricks (I)</title><content type='html'>&lt;h2&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;This is the 1st post on the series Game Boy Development - Tips and Tricks&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/07/game-boy-development-tips-and-tricks-i.html&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (I)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://zalods.blogspot.com.es/2016/07/game-boy-development-tips-and-tricks-ii.html&quot; target=&quot;_blank&quot;&gt;Game Boy Development - Tips and Tricks (II)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2016/12/game-boy-development-tips-and-tricks-iii.html&quot; style=&quot;font-size: small;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Game Boy Development - Tips and Tricks (III)&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/h2&gt;
&lt;br /&gt;
As promised here is the first post with some advices based on my experience programming for the Game Boy during the Bit Bit Jam 3.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
1. Choosing your SDK&lt;/h2&gt;
The Gameboy has some different SDks you can choose to work with. The two main ones are the GBDK and the RGBDS. Choosing between any of them depends on what you want to accomplish and what skills you have. Check the next table with pros and cons of each one&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; style=&quot;width: 100%;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;th&gt;GBDK&lt;/th&gt;
    &lt;th&gt;RGBDS&lt;/th&gt; 
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;C and asm&lt;/td&gt;
    &lt;td&gt;asm (better than asm in GBDK*)&lt;/td&gt; 
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;Slower if you use C&lt;/td&gt;
    &lt;td&gt;Asm is always faster but requires experience&lt;/td&gt; 
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;Faster to write programs in C&lt;/td&gt;
    &lt;td&gt;Assembly is very low level, requires more time&lt;/td&gt; 
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;Reliable for a jam&lt;/td&gt;
    &lt;td&gt;If you are not an skilled programmer you might not finish your jam entry&lt;/td&gt; 
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;Horrible SDK for learning C because of the 8bits limitations, no debugger....&lt;/td&gt;
    &lt;td&gt;Perfect for learning asm. You can even use a debugger with the BGB emulator&amp;nbsp;&lt;/td&gt; 
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
With all these in mind, I chose GBDK because I have a lot of experience with C and C++ and I was feelling more confident to finish the game with it.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;*so I&#39;ve heard, because I didn&#39;t have the chance to try it&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
2. Getting your environment ready&lt;/h2&gt;
I will suggest spending some time doing this, it can save you from lot of problems that will happen that last hour before sending the game. Code completion, launching the emu after compiling and the ability to add or delete files from your project easily are the things you should focus to get before starting your project.&lt;br /&gt;
&lt;br /&gt;
A couple of weeks before the jam I started playing with GBDK and getting my development environment ready. Same as I did for the 3ds, Ds and the Wii I started configuring visual studio and some makefiles (&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-i.html&quot; target=&quot;_blank&quot;&gt;see this post for more info&lt;/a&gt;). Most of the tutorials I followed along the internet were using some dos .bat files but I was looking for something more general. I created a &lt;a href=&quot;https://github.com/Zal0/bitbitjam2016/blob/master/common/src/MakefileCommon&quot; target=&quot;_blank&quot;&gt;makefile &lt;/a&gt;that:&lt;br /&gt;
&lt;br /&gt;
- Compiles any source found under the folder src, so you don&#39;t have to specify the list of files to compile&lt;br /&gt;
&lt;br /&gt;
- Parse the extension of the file to select the bank (anything.c will be on bank0, anything.b1.c will be on bank1, anything.b2.c on bank 2 and so on...)&lt;br /&gt;
&lt;br /&gt;
- Automatically changes the unsigned char of the resources exported by GameBoy Map Builder and GameBoy Tile designed to const unsigned char&lt;br /&gt;
&lt;br /&gt;
And some other features that you can check &lt;a href=&quot;https://github.com/Zal0/bitbitjam2016/blob/master/common/src/MakefileCommon&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. The important thing is having a confortable environment so you only have to worry about coding the videogame&lt;br /&gt;
&lt;br /&gt;
If you are under Windows you will need a way to run makefiles. Since I have been using &lt;a href=&quot;https://sourceforge.net/projects/devkitpro/&quot; target=&quot;_blank&quot;&gt;devkitpro &lt;/a&gt;for a long time I already had &lt;a href=&quot;http://www.mingw.org/wiki/msys&quot; target=&quot;_blank&quot;&gt;msys &lt;/a&gt;installed. One funny thing that I noticed is that the version of make that comes with devkitpro doesn&#39;t display any compilation errors so I guess the stderr is not properly configured. If you have the same problem you just need to download the last version of make for windows &lt;a href=&quot;http://gnuwin32.sourceforge.net/packages/make.htm&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
3. Banks&lt;/h2&gt;
I would recommend reading the full &lt;a href=&quot;http://gbdk.sourceforge.net/doc/html/book01.html&quot; target=&quot;_blank&quot;&gt;documentation of the GBDK&lt;/a&gt; prior to any development. And specially trying to understand &lt;a href=&quot;http://gbdk.sourceforge.net/doc/html/c0303.html&quot; target=&quot;_blank&quot;&gt;banks&lt;/a&gt;, what they are and how they work. AntonioND explains it pretty well on this &lt;a href=&quot;http://antoniond_blog.drunkencoders.com/?p=392&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt;. The idea is very simple. If you take a look at the &lt;a href=&quot;http://gbdk.sourceforge.net/doc/html/c0202.html&quot; target=&quot;_blank&quot;&gt;size of variables&lt;/a&gt; of the GBDK you&#39;ll see that the size of a pointer is 2 bytes. The maximum address you can point to with 2 bytes is 65535 (2^16). In these addresses the gameboy needs to get access to everything, not only the rom. Basically it needs 32kb for internal registers: sound, video, power, etc (you can find the complete list &lt;a href=&quot;http://gbdev.gg8.se/wiki/articles/Memory_Map&quot; target=&quot;_blank&quot;&gt;here &lt;/a&gt;if you are curious) and then there are other 32 kb for rom access(the cartdridge data). These 32kb are splitted into two: a fixed part that is always accesible (called bank0) and a swapable part (by default set to bank1). You can change the starting address of bank1 and make it point to addresses beyond 65535. Each group of 16386 (16kb) is known as a bank&lt;br /&gt;
&lt;br /&gt;
So the idea is splitting your code along any of these banks and before excuting any part of it swapping the start address so the code can be reached. Take some time to understand this because it is extremely important. And also pay attention to the next things:&lt;br /&gt;
&lt;br /&gt;
- You can only swap banks from code that is stored in bank0. Actually you can swap banks from any bank if you dare but your program will crash and it has an easy explanation. In any computer no matter how big or small it is there is a register (usually known as &lt;a href=&quot;http://www.c-jump.com/CIS77/ASM/Instructions/I77_0040_instruction_pointer.htm&quot; target=&quot;_blank&quot;&gt;EIP&lt;/a&gt;) that contains the address of the next instruction to be executed. If no jump occurs then this register will automatically advance to the next register and execute the next instruction and basically that&#39;s how programs run. So, what will happen if you are in bank2 for example and swap to banks3? The EIP will execute the command to change the bank (in bank2) then it will advance to the next register and will try to execute the next command. The problem is that this comand that was supposed to belong to bank2 now belongs to bank3 and it can be literally anything. An easy solution to this is calling a function on bank0 (always accesible) that swaps banks, do the job on that new bank and then before returning swap banks back to bank2&lt;br /&gt;
&lt;br /&gt;
- Lcc errors. You will eventually find a message like this from the compiler &quot;&lt;i&gt;warning : possibly wrote twice at addr 407a (21&amp;gt;21)&lt;/i&gt;&quot;. This will happen everytime you write code larger than 16kb and part of it ends in addresses that belong to the next bank. When this happens you should start moving your code to another bank&lt;br /&gt;
&lt;br /&gt;
- Try to fill all banks with some info. If you have decided your game is gonna take 4 banks then the size of the game will be 64kb (16kb per bank) event if you don&#39;t fill them. Because of this it is a good idea to put some info in each bank from the beginning, otherwise you won&#39;t see the message I was telling you before when a bank gets full and your program will randomly crash at some point&lt;br /&gt;
&lt;br /&gt;
- A stack can be very helpful to deal with bank swapping. Implementing a stack is very simple, you can check my implementation &lt;a href=&quot;https://github.com/Zal0/ZGB/blob/master/common/src/Stack.c&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. Once you have a stack implemented you can use it to move between banks like I do &lt;a href=&quot;https://github.com/Zal0/ZGB/blob/master/common/include/BankManager.h&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. Everytime I want to change to a new bank I call&amp;nbsp;&lt;span style=&quot;background-color: white; color: #795da3; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 20px; white-space: pre;&quot;&gt;PUSH_BANK&lt;/span&gt;&amp;nbsp;and when I finish I just call&amp;nbsp;&lt;span class=&quot;pl-en&quot; style=&quot;background-color: white; box-sizing: border-box; color: #795da3; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 20px; white-space: pre;&quot;&gt;POP_BANK&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 20px; white-space: pre;&quot;&gt; &lt;/span&gt;so it automatically leaves me on the previous bank. Using this technique I was able to call gbt_update&amp;nbsp;that automatically changes the bank to bank1 on my vblank interruption and then return to the bank I was previously working on calling&amp;nbsp;&lt;span class=&quot;pl-en&quot; style=&quot;background-color: white; box-sizing: border-box; color: #795da3; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 12px; line-height: 20px; white-space: pre;&quot;&gt;REFRESH_BANK&lt;/span&gt;, fixing the issue AntonioND is stating on this &lt;a href=&quot;http://antoniond_blog.drunkencoders.com/?p=392&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
4. Basic Maths&lt;/h2&gt;
The Gameboy isn&#39;t very powerful and it can&#39;t even deal with multiplications or divisions, so you should avoid them at all cost (you can use them, but the performance will suffer). Most of these multiplications and divisions can be replaced by simpler operations, like:&lt;br /&gt;
&lt;br /&gt;
- instead of multiplying by any power of 2 use the shift left operator (&amp;lt;&amp;lt;). Specially for multiplying by 2 use x &amp;lt;&amp;lt; 1&lt;br /&gt;
&lt;br /&gt;
- instead of dividing by any power of 2 use the shirft right operator (&amp;gt;&amp;gt;). Specially for dividing by 2 use x &amp;gt;&amp;gt; 1&lt;br /&gt;
&lt;br /&gt;
- instead of the module operator (%) with any power of 2 you can do a mask. For example for getting the module 8 of a number do x &amp;amp; 0x7 (7 is 111 in binary so using &amp;amp; here turns everything except the last 3 digits into 0 which is what we want)&lt;br /&gt;
&lt;br /&gt;
- the gbdk manual encourages you to use &lt;a href=&quot;http://gbdk.sourceforge.net/guidelines.html&quot; target=&quot;_blank&quot;&gt;unsigned values&lt;/a&gt;. Take into account that these values are always bigger than 0. So doing something like 3 - 4 will result in an overflow giving you 255 (or 65535 if you are using 16bits) and checking if this is &amp;lt; 0 will unexpectecly return false. The best way I found to deal with this is masking against 0x8000 (1000 0000 0000 0000 in binary) and checking that the result is 0 (that 1 in the highest bit will only happen after an overflow)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/5820855358396684292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/5820855358396684292' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/5820855358396684292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/5820855358396684292'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2016/07/game-boy-development-tips-and-tricks-i.html' title='Game Boy Development - Tips and Tricks (I)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-7118694676310762179</id><published>2016-07-26T08:00:00.000+02:00</published><updated>2016-07-26T21:55:58.480+02:00</updated><title type='text'>BitBitJam 3 - Pretty Princess&#39; Castle Escape</title><content type='html'>The &lt;a href=&quot;http://bitbitjam.com/&quot; target=&quot;_blank&quot;&gt;bit bit jam&lt;/a&gt; is a retro jam based on old systems up to 16 bits. The jam lasts one week and you can use any technology you have developed before that week. The game must work in real hardware.&lt;br /&gt;
&lt;br /&gt;
Before the jam starts a theme is randomly selected and this year it was &quot;Red Hot Princess Carnage&quot;. A total of 20 games were presented. You can take a look at all of them &lt;a href=&quot;http://jams.gamejolt.io/bitbitjam3/games&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, and also you can check the winners on each different category: &lt;a href=&quot;http://jams.gamejolt.io/bitbitjam3/games?category=1265&quot; target=&quot;_blank&quot;&gt;best theme&lt;/a&gt;, &lt;a href=&quot;http://jams.gamejolt.io/bitbitjam3/games?category=1266&quot; target=&quot;_blank&quot;&gt;best platform usage&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;http://jams.gamejolt.io/bitbitjam3/games?category=1267&quot; target=&quot;_blank&quot;&gt;funniest game&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This year I ended up joininig forces with &lt;a href=&quot;https://twitter.com/vaus_spaceship&quot; target=&quot;_blank&quot;&gt;sergeeo&lt;/a&gt;. He was in charge of the music and graphics and I was working on all the coding stuff. Together we created Pretty Princess&#39; Castle Escape for the old nintendo &lt;a href=&quot;https://en.wikipedia.org/wiki/Game_Boy&quot; target=&quot;_blank&quot;&gt;Game Boy&lt;/a&gt;. Althought we finished the game on time we continued working on it after the jam and finally we have released a new version we consider final. &lt;a href=&quot;http://gamejolt.com/games/pretty-princess-castle-escape/161880&quot; target=&quot;_blank&quot;&gt;Check it out here&lt;/a&gt;!&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCN1DO4CTiR1xkk9AblNcdkeUywIV-AUpDdYq4Gh6H-1vIoCgZv91sskodwjb6R1hyphenhyphen5F8SMoV_qnpS0CqRGofIHNbH8d8ql-6ibWCkOssyU_cbv8WRyhSCkx_JI-qYdGmLt34x/s1600/bgb00003.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCN1DO4CTiR1xkk9AblNcdkeUywIV-AUpDdYq4Gh6H-1vIoCgZv91sskodwjb6R1hyphenhyphen5F8SMoV_qnpS0CqRGofIHNbH8d8ql-6ibWCkOssyU_cbv8WRyhSCkx_JI-qYdGmLt34x/s1600/bgb00003.bmp&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1t99j3Sw5AIhbN_6PnDnyOtsuWHe9YSy4Q3oO2p5TlA6U5asBiDE-fCxuwPS7UsXy8ZNjozaUL5HArUmp75J9FlvPzDJapeZEI_kQQ0KS506dlztO8J8GAq3HZV2fatXp1vZ_/s1600/bgb00002.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1t99j3Sw5AIhbN_6PnDnyOtsuWHe9YSy4Q3oO2p5TlA6U5asBiDE-fCxuwPS7UsXy8ZNjozaUL5HArUmp75J9FlvPzDJapeZEI_kQQ0KS506dlztO8J8GAq3HZV2fatXp1vZ_/s1600/bgb00002.bmp&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw7Dcvv7gMaQitKBU9TXFvQm-q7Ng4nLx6oIj4LfupLtYy7WdjJuBE_lp9Ukp84b0eph3SyBwx86g5h1UPienkQzd1SlmI2AQDFCywIeHHdI5_pnu9HsZ2JlPI6xBLlUcBjsfR/s1600/bgb00004.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw7Dcvv7gMaQitKBU9TXFvQm-q7Ng4nLx6oIj4LfupLtYy7WdjJuBE_lp9Ukp84b0eph3SyBwx86g5h1UPienkQzd1SlmI2AQDFCywIeHHdI5_pnu9HsZ2JlPI6xBLlUcBjsfR/s1600/bgb00004.bmp&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We&#39;d like to thank all &amp;nbsp;the guys playing it and specially the ones who have uploaded some videos:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/7h6Ft-QUmMM/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/7h6Ft-QUmMM?start=11916&amp;amp;feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/yLT9lGXRjxs/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/yLT9lGXRjxs?start=261&amp;amp;feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
Also special thanks to &lt;a href=&quot;http://david.dantoine.org/&quot; target=&quot;_blank&quot;&gt;David Colmenero&lt;/a&gt;&amp;nbsp;for organizing the jam and for convince me to participate&lt;br /&gt;
&lt;br /&gt;
During this week I&#39;ll be posting a few entries with my experience developing using the GBDK providing some info that I hope will be usefull for someone. Stay tuned!</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/7118694676310762179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/7118694676310762179' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/7118694676310762179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/7118694676310762179'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2016/07/bitbitjam-3-pretty-princess-castle.html' title='BitBitJam 3 - Pretty Princess&#39; Castle Escape'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCN1DO4CTiR1xkk9AblNcdkeUywIV-AUpDdYq4Gh6H-1vIoCgZv91sskodwjb6R1hyphenhyphen5F8SMoV_qnpS0CqRGofIHNbH8d8ql-6ibWCkOssyU_cbv8WRyhSCkx_JI-qYdGmLt34x/s72-c/bgb00003.bmp" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-2572977911649747763</id><published>2016-01-05T14:24:00.001+01:00</published><updated>2016-01-05T14:26:14.387+01:00</updated><title type='text'>Rokoban for Nintendo 3DS</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4TWo3ooNwtz926eNTzgXtsv629ivFMQzaax-yfcVk2kTrsnPkxh-cmwaURL9AxLfjwA_fIkLdOz8g07Mw9WKWE5sylPdT0mmbMdI4iRhzndxrbthzxfWcz00Xw7PdjnErLd35/s1600/00.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4TWo3ooNwtz926eNTzgXtsv629ivFMQzaax-yfcVk2kTrsnPkxh-cmwaURL9AxLfjwA_fIkLdOz8g07Mw9WKWE5sylPdT0mmbMdI4iRhzndxrbthzxfWcz00Xw7PdjnErLd35/s320/00.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Rokoban is not a new game. I already released it on &lt;a href=&quot;http://zalods.blogspot.com.es/2008/07/rokoban-sokoban-version-in-3d.html&quot; target=&quot;_blank&quot;&gt;Nds&lt;/a&gt; and later on the &lt;a href=&quot;http://zalods.blogspot.com.es/2010/03/rokoban-updated.html&quot; target=&quot;_blank&quot;&gt;Wii&lt;/a&gt; (and it won the 4th place on the &lt;a href=&quot;http://zalods.blogspot.com.es/2008/12/rokoban-wii-4th-place-in-tehskeen-wii.html&quot; target=&quot;_blank&quot;&gt;Wii Homebrew Competition&lt;/a&gt; organized by tehskeen in 2008). After that I was going to release a new version for IOS and Android about 4 years ago. Although very close to finishing it, I had to abandon it because back on those days I needed to start working on Whack Mania.&lt;br /&gt;
&lt;br /&gt;
Together with me working in this new version was Juanmi, making all the graphics. He actually finished all his work but I never got the time to put it all together. After the release of Whack Mania the engine had changed so much that making it work again was a bit complicated.&lt;br /&gt;
&lt;br /&gt;
That was until this past summer when I actually realeased &lt;a href=&quot;http://zalods.blogspot.com.es/2015/08/whack-mania-on-nintendo-3ds.html&quot; target=&quot;_blank&quot;&gt;Whack Mania for 3ds&lt;/a&gt;. I was thinking which other project I could work on after it when &lt;a href=&quot;http://gbatemp.net/posts/5626337/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;william341 in the gbatemp forums&lt;/a&gt; suggested me to work on Rokoban. There are other projects I was thinking of but then I did a quick test and in a couple of days (holidays, yeah!) it was running again. Althought making it work is just the first step I decided to focus on it, the good thing was I already had all the graphics and menus :)&lt;br /&gt;
&lt;br /&gt;
A few months have passed and finally I am going to release it hoping you will enjoy it and it will become a good contribution for the 3ds scene which as of today keeps growing and growing. Also I am going to finish what I started 4 years ago with poor Juanmi and he is gonna see his job finally released&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimcC-vzDYECf2uYYg-610H3MOu8VCizSjWgYg6FcpJP-hbKJmX-s5iYTFE_MT2VXW5Zvf9lWJvuAjsySixggF8o84YB6y9sAS3vlEJV9YxMfcwPn4XuvFiC2n4dS4ZLjwaw8vy/s1600/01.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimcC-vzDYECf2uYYg-610H3MOu8VCizSjWgYg6FcpJP-hbKJmX-s5iYTFE_MT2VXW5Zvf9lWJvuAjsySixggF8o84YB6y9sAS3vlEJV9YxMfcwPn4XuvFiC2n4dS4ZLjwaw8vy/s200/01.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi50O2093dZZcy23Pr5TWz-jvZ_zgl9a0CzH30rLhyphenhyphenjhk5d-O_YSzzp5cK_Zfr5y9bmUyCJ9sJGO325GvhqsMFGciO7UQuMKu64xWidyuoDPPbGC8fOzsyJ97KdfTvgcg_kVilz/s1600/04.png&quot; imageanchor=&quot;1&quot; style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi50O2093dZZcy23Pr5TWz-jvZ_zgl9a0CzH30rLhyphenhyphenjhk5d-O_YSzzp5cK_Zfr5y9bmUyCJ9sJGO325GvhqsMFGciO7UQuMKu64xWidyuoDPPbGC8fOzsyJ97KdfTvgcg_kVilz/s200/04.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Download it from the links below. The game is available in 3ds, cia and 3dsx format. There is also the Windows version if you wanna give a try on your PC. I also have an Android and IOS build but I don&#39;t really know what to do with them...&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://drive.google.com/uc?export=download&amp;amp;id=0ByakbigmkUpsVFdFMVJuSWtFZEk&quot; target=&quot;_blank&quot;&gt;Download: Rokoban 3DS&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/uc?export=download&amp;amp;id=0ByakbigmkUpsNnBCb0tvRXl1VzA&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Download: Rokoban Windows&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
As usual, please leave me your feedback in the comments. Thanks in advance!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiym7ous2Toa5Y2J4tPWIEhiiNLgOr7JfyzmrNBiRKnlntDrD-7r_s_ht9IpaCVJ4WGasF27UGbEngsCE6BZSYjUv8Bzf0ouH7SuWg7J18gurNMQsGetwdJmkIPo09_IcrNzH_z/s1600/03.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiym7ous2Toa5Y2J4tPWIEhiiNLgOr7JfyzmrNBiRKnlntDrD-7r_s_ht9IpaCVJ4WGasF27UGbEngsCE6BZSYjUv8Bzf0ouH7SuWg7J18gurNMQsGetwdJmkIPo09_IcrNzH_z/s200/03.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw08yamfFvYnXo4XwBWUUhahWGeRlhHMn-cVvdHXPLXysNIu30oNU7yWsrLM1jpE7-6GvaoRqs8sExRHpqvH9PD-JXSVBYTQBfqv31eiq1FvtITYUdzTCv08ORyAxwvL49e0Ab/s1600/05.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw08yamfFvYnXo4XwBWUUhahWGeRlhHMn-cVvdHXPLXysNIu30oNU7yWsrLM1jpE7-6GvaoRqs8sExRHpqvH9PD-JXSVBYTQBfqv31eiq1FvtITYUdzTCv08ORyAxwvL49e0Ab/s200/05.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/2572977911649747763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/2572977911649747763' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2572977911649747763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2572977911649747763'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2016/01/rokoban-for-nintendo-3ds.html' title='Rokoban for Nintendo 3DS'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4TWo3ooNwtz926eNTzgXtsv629ivFMQzaax-yfcVk2kTrsnPkxh-cmwaURL9AxLfjwA_fIkLdOz8g07Mw9WKWE5sylPdT0mmbMdI4iRhzndxrbthzxfWcz00Xw7PdjnErLd35/s72-c/00.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-8848642255977438722</id><published>2015-08-13T22:40:00.000+02:00</published><updated>2015-08-13T22:41:00.791+02:00</updated><title type='text'>Familiar Game Camp</title><content type='html'>The Familiar Game Camp was celebrated the past &amp;nbsp;August 1st-2nd at Málaga, in the south of Spain (sadly we didn&#39;t find the time for visiting the beach :_(... )&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://pbs.twimg.com/media/CLUY_-8WIAIPtC2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://pbs.twimg.com/media/CLUY_-8WIAIPtC2.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
It was a weekend for meeting nice people and sharing our experiences, and also meeting the new generations. There were workshops for chiptunes, pixel art and Gameboy development and talks about the Familiar Game Jam, Publishing on Steam, Game Art, AltGames and Not Games and what to do with your free time.&lt;br /&gt;
&lt;br /&gt;
This time I didn&#39;t want to talk about some technical stuff so my talk was a bit more related to what I do with my free time, based on my experience along all these years of videogames development.&lt;br /&gt;
Here are the slides of the presentation I offered&lt;br /&gt;
- &lt;a href=&quot;https://docs.google.com/presentation/d/1ytU6b0QmCOdBp-WhHPwz_qRViTSIWUX6N2ud1UkgXT8/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;Programar por Trabajo vs Ocio&lt;/a&gt;&amp;nbsp;(spanish)&lt;br /&gt;
- &lt;a href=&quot;https://docs.google.com/presentation/d/1HBoTJa6Jfxx206TM8dZwOXdK96Uj24zc5rQ0K11CH_M/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;Coding for Work vs Fun&lt;/a&gt;&amp;nbsp;(english)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://pbs.twimg.com/media/CLZVsowXAAAv0LD.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://pbs.twimg.com/media/CLZVsowXAAAv0LD.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can find some posts covering the event here:&lt;br /&gt;
- &lt;a href=&quot;https://sites.google.com/site/familiargamecamp/&quot; target=&quot;_blank&quot;&gt;Official website&lt;/a&gt;&amp;nbsp;(with links to all workshops and talks)&lt;br /&gt;
- &lt;a href=&quot;http://vausspaceship.blogspot.com.es/2015/08/familiar-game-camp-agradecimientos.html&quot; target=&quot;_blank&quot;&gt;Sergeeo&#39;s post&lt;/a&gt;&amp;nbsp;(he is the one organizing so you should take a look)&lt;br /&gt;
- &lt;a href=&quot;https://geekstorming.wordpress.com/2015/08/04/cronicas-de-familiargamecamp/&quot; target=&quot;_blank&quot;&gt;Crónicas de #FamiliarGameCamp&lt;/a&gt;&lt;br /&gt;
- Twitter &lt;a href=&quot;https://twitter.com/search?q=%23familiargamecamp&amp;amp;src=typd&quot; target=&quot;_blank&quot;&gt;#familiargamecamp&lt;/a&gt;&amp;nbsp;(I have stolen all the photos from there, yeah)&lt;br /&gt;
&lt;br /&gt;
Some of us were missing the Game Conga, but maybe next year it will happen... &amp;nbsp;:D&lt;br /&gt;
&lt;br /&gt;
I hope to see you again soon!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/8848642255977438722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/8848642255977438722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8848642255977438722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8848642255977438722'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/08/familiar-game-camp.html' title='Familiar Game Camp'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-8516133085560882731</id><published>2015-08-13T00:57:00.002+02:00</published><updated>2015-08-13T00:57:50.628+02:00</updated><title type='text'>Whack Mania on Nintendo 3DS</title><content type='html'>Remember &lt;a href=&quot;http://zalods.blogspot.com.es/2013/02/whack-mania.html&quot; target=&quot;_blank&quot;&gt;Whack Mania&lt;/a&gt;? You should if you know me, but just in case here is a video to refresh your memory&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/yAvM9_098v4/0.jpg&quot; src=&quot;https://www.youtube.com/embed/yAvM9_098v4?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
I have finished porting my little engine to the nintendo 3ds meaning the game is now working too. As you can see&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/s_vi/ADzzB__dfp4/default.jpg?sqp=COyYr64F&amp;rs=AOn4CLAi2kHzHD_i4DI6fnWfSvoMFJM2Gg&quot; src=&quot;https://www.youtube.com/embed/ADzzB__dfp4?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I needed to to a few changes before releasing it:&lt;br /&gt;
- Since the game was thought to use a touch screen I had to adapt the controls a little bit (I could have used the touchscreen but I wanted to have the 3d effect instead&lt;br /&gt;
- I have reviewed all the levels and kept only those that I considered fun enought (from 40 levels, there are only 14 here... you can take a look at my &lt;a href=&quot;http://zalods.blogspot.com.es/2013/03/whack-mania-post-mortem.html&quot; target=&quot;_blank&quot;&gt;postmortem &lt;/a&gt;to see why :P)&lt;br /&gt;
- I had made myself sure that the game doesn&#39;t have any memory issues and it is stable (and it is now). Also I needed to check it was working using the Homebrew Launcher, cia or 3ds formats&lt;br /&gt;
- Some other minor changes I don&#39;t remember right now. But the good thing is that the code is exactly the same that I used for the IOS or Android version&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the link if you wanna give it a try. The game looks awesome on the 3ds :)&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://drive.google.com/uc?export=download&amp;amp;id=0ByakbigmkUpsV3BoamQ5eUxqM28&quot; target=&quot;_blank&quot;&gt;Download: Whack Mania 3DS&lt;/a&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/8516133085560882731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/8516133085560882731' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8516133085560882731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/8516133085560882731'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/08/whack-mania-on-nintendo-3ds.html' title='Whack Mania on Nintendo 3DS'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/yAvM9_098v4/default.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-7920585947935065957</id><published>2015-07-19T14:04:00.001+02:00</published><updated>2015-07-19T14:08:10.490+02:00</updated><title type='text'>3DS Homebrew Tips and Tricks (III)</title><content type='html'>This is the 3rd post on the series 3DS Homebrew Tips and Tricks&lt;br /&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-i.html&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (I)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-ii.html&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (II)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-iii.html&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (III)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
6. Adding sound permissions to 3ds files&lt;/h2&gt;
&lt;div&gt;
Searching on the forums about sound you will find posts saying you cannot have sound using 3ds or 3dsx format (for example take a look af the F.A.Q in the &lt;a href=&quot;http://blargsnes.kuribo64.net/&quot; target=&quot;_blank&quot;&gt;blargsnes&lt;/a&gt; site or their &lt;a href=&quot;http://wiki.gbatemp.net/wiki/BlargSnes&quot; target=&quot;_blank&quot;&gt;wiki&lt;/a&gt;). So I spent a few days implementing my sound driver using the cia format that was supposed to be the only one supporting sound&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That was hell. Everytime I needed to change anything I had to create the cia, transfer that to the console somehow (&lt;a href=&quot;https://gbatemp.net/threads/microsd-management-on-homecreen-and-working-on-old3dss-too.383892/&quot; target=&quot;_blank&quot;&gt;microsd management&lt;/a&gt; turned out to be the best option), delete the previous cia and install the new one. There wasn&#39;t anyway that I was aware of to automatize the whole big process.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then I found this &lt;a href=&quot;https://gbatemp.net/threads/homebrew-development.360646/page-182#post-5480411&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt;&amp;nbsp;clearly stating that the only thing you needed for having sound support in 3ds files is adding&amp;nbsp;ns:s, am:u and csnd:SND service access on your rsf. Take a look &lt;a href=&quot;https://github.com/Rinnegatamante/lpp-3ds/blob/master/gw_workaround.rsf&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With the new ninjhax 2.0 released it seems that sound is also supported now on 3dsx files&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
7. Avoid GPU_TRIANGLE_FAN&lt;/h2&gt;
&lt;div&gt;
It took me a few weeks to catch a random crash (the best of them) on one of the tests I was doing. At the end it turned out it was caused by using&amp;nbsp;GPU_TRIANGLE_FAN somewhere on my code. After replacing that with just GPU_TRIANGLES it never happened again.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Talking about this on #3dsdev on the irc channel there seemed to be at least one other person having the same issue. Probably there is still something wrong on the ctrulib with them so I would recommend not using them if you can.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
8. Using RomFS&lt;/h2&gt;
&lt;div&gt;
RomFS is the file system used by 3ds and cia files to store resources inside the rom itselt. Although there are some tools available for extracting it from dumped roms and then putting it back, the ctrulib doesn&#39;t have support for it yet.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I thought it would be great if I could distribute my apps without any external dependencies so I took a look into it.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are two ways to include a romfs into your builds:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;- The first is creating it with an external tool (like &lt;a href=&quot;https://gbatemp.net/threads/release-romfs-builder.379330/&quot; target=&quot;_blank&quot;&gt;RomFS Builder&lt;/a&gt;) then using the -romfs option when calling makerom.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;- The second hasn&#39;t been fully implemented (according to &lt;a href=&quot;http://3dbrew.org/wiki/Makerom&quot; target=&quot;_blank&quot;&gt;3dbrew&lt;/a&gt;) but it worked for my particular case. On the rsf file you should add&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;RomFs:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; # Specifies the root path of the file system to include in the ROM.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; RootPath &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: &quot;../bin/romfs&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
The rootpath is relative to your makefile&#39;s location&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With any of these options you will have a rom that includes a file system with the resources. Now, how do you get access to them? Take a look at the code I posted on &lt;a href=&quot;https://gbatemp.net/threads/any-way-to-include-resources-inside-3ds-3dsx-or-cia-files.387616/page-2&quot; target=&quot;_blank&quot;&gt;this thread&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This code only gives you access to the romfs. Now because we don&#39;t have support for this filesystem we have two options:&lt;/div&gt;
&lt;div&gt;
- Implement it&lt;/div&gt;
&lt;div&gt;
- User another known Filesystem&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I went for the second one. Since I worked a lot with .zip files when I ported the engine to Android I decided to use the same thing here. So basically, my filesystem is a zip file containing all my resoures placed inside a romfs.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Since this zip is the only file available on my romfs I just do a search of the string &quot;PK&quot; from the beginning of the romfs and there is my zip file located. Hacky, but works pretty well&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
9.&amp;nbsp;Painting steps: clean, render, transfer and swap&lt;/h2&gt;
&lt;div&gt;
As I said before my starting point was the &lt;a href=&quot;https://github.com/smealum/ctrulib/tree/master/examples/gpu&quot; target=&quot;_blank&quot;&gt;gpu&lt;/a&gt;&amp;nbsp;example. If you spend some time trying to understand how it works you&#39;ll soon realize this is what happens after the&amp;nbsp;GPUCMD_Finalize() command:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
-&amp;nbsp;GPUCMD_FlushAndRun is called and the command list is processed making the rendering&lt;/div&gt;
&lt;div&gt;
-&amp;nbsp;GX_SetDisplayTransfer is called after that and the content of the framebuffer is trasnferred to the specified LCD framebuffer&lt;/div&gt;
&lt;div&gt;
-&amp;nbsp;GX_SetMemoryFill is called, cleaning the color and depth buffer&lt;/div&gt;
&lt;div&gt;
-&amp;nbsp;gfxSwapBuffersGpu is finally called, swapping buffers (because the ctrulib by default uses double buffer)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This process happens for a single render, if you are using the 3D effect it will happen twice, once for each screen (I am just simplifying it)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So basically: we render the current frame, transfer it to the proper LCD, clean the frame and then do the double buffer swap. Anything strange here? We are cleaning the screen for the next frame before the next frame actually happens, and that&#39;s a bad idea because:&lt;/div&gt;
&lt;div&gt;
- At some points on my code I was changing the clear color and that was delayed one frame.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
- At some points on my code I wasn&#39;t interested on cleaning the color buffer for a specific frame and it was being cleaned in advance&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is actually easy to fix if you move that call to GX_SetMemoryFill to the beginning (before calling&amp;nbsp;GPUCMD_FlushAndRun). Don&#39;t forget to move also the call to gspWaitForPSC0, and ensure that you actually want to clear the current color buffer or depth buffer.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
10. Improving the 3D steresocopic effect&lt;/h2&gt;
&lt;div&gt;
Another problem that I found with the &lt;a href=&quot;https://github.com/smealum/ctrulib/tree/master/examples/gpu&quot; target=&quot;_blank&quot;&gt;gpu example&lt;/a&gt;&amp;nbsp;is that no matter how you place the 3D slider on the console it is very hard to the get the feelling of 3d. Taking &amp;nbsp;a look at the code I found these calculations being done for each eye:&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;font-size: small;&quot;&gt;mtx44 m;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;loadIdentity44((float*)m);&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;translateMatrix((float*)m, interaxial*0.5f, 0.0f, 0.0f);&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;gsAdjustBufferMatrices(m);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
what this is doing is adding a translation to the whole render process for each eye. So basically moving the camera to the left for the left eye and to the right to the right eye. It just doesn&#39;t work well. I changed it into this&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;mtx44 m;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;loadIdentity44((float*)m);&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;rotateMatrixY((float*)m, -slider * 0.06f, false);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;gsAdjustBufferMatrices(m);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
which rotates the camera instead of displacing it for each eye. This works way more better :)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And that&#39;s it. I have concluded these series of posts. I just hope anything I had been writing these days will be useful for someone and I would like to see more homebrews released on this amazing console. Specially games.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy coding!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/7920585947935065957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/7920585947935065957' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/7920585947935065957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/7920585947935065957'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/07/3ds-homebrew-tips-and-tricks-iii.html' title='3DS Homebrew Tips and Tricks (III)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-4538138595431517867</id><published>2015-07-18T10:22:00.000+02:00</published><updated>2015-07-26T18:12:43.265+02:00</updated><title type='text'>3DS Homebrew Tips and Tricks (II)</title><content type='html'>&lt;h2&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #e0e0e0; color: #9371af; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot;&gt;This is the 2nd post on the series 3DS Homebrew Tips and Tricks&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-i.html&quot; style=&quot;background-color: #e0e0e0; color: #666699; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (I)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-ii.html&quot; style=&quot;background-color: #e0e0e0; color: #666699; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (II)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-iii.html&quot; style=&quot;background-color: #e0e0e0; color: #666699; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (III)&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h2&gt;
3.&amp;nbsp;Application Icon, banner and RSF&lt;/h2&gt;
If you are going to distribute your creations on cia or 3ds format then you are going to need a banner and an icon. For this I am using &lt;a href=&quot;https://github.com/Steveice10/bannertool&quot; target=&quot;_blank&quot;&gt;bannertool&amp;nbsp;&lt;/a&gt;&amp;nbsp;cerated by&amp;nbsp;Steveice10. You can find a compiled version of it on this &lt;a href=&quot;https://gbatemp.net/threads/does-someone-have-a-compiled-version-of-bannertool.386933/&quot; target=&quot;_blank&quot;&gt;thread&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;span style=&quot;font-size: large;&quot;&gt;Icons&lt;/span&gt;: you create icons using this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;bannertool makesmdh -s $(APP_TITLE) -l $(APP_DESCRIPTION) -p $(APP_AUTHOR) -i icon.png -o icon.smdh&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
where icon.png should be a 48x48 image. You can define AP_TITLE APP_DESCRIPTION and APP_AUTHOR somewhere else in your makefile, like this&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;APP_TITLE := &quot;Jumping Jack&quot;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;APP_AUTHOR&amp;nbsp;:=&amp;nbsp;&quot;Zalo&quot;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;APP_DESCRIPTION &amp;nbsp;:= &quot;My very first game for the 3DS&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
Icons should alse be distributed with your 3dsx file so the homebrew launcher can display information about your homebrew&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmpNtWwB6HaKBfMxRF1V9FdftGeSvphYvizLu7h0BJDuhcPxbzo9TziPkerNPM_AtktE0MpSUC2eun9A4eYiyaUa1zQdi74Z8kHdinfV9HZNKe_eG3mBNR4LddzzooNbX_EiSi/s1600/icon.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmpNtWwB6HaKBfMxRF1V9FdftGeSvphYvizLu7h0BJDuhcPxbzo9TziPkerNPM_AtktE0MpSUC2eun9A4eYiyaUa1zQdi74Z8kHdinfV9HZNKe_eG3mBNR4LddzzooNbX_EiSi/s320/icon.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
- &lt;span style=&quot;font-size: large;&quot;&gt;Banners&lt;/span&gt;&lt;b&gt;: &lt;/b&gt;you create banners using this&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;bannertool&amp;nbsp;&amp;nbsp;makebanner -i banner.png -a audio.wav -o banner.bin&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
where banner.png is a &amp;nbsp;256x128 image (you can use transparency) and audio.wav I am not sure but I am always using 16 bits, 44100 Hz and stereo for them&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-VtRsSl5XGGD8KUU_xmbUgbTW8Caa-wPxcfq8kH3vnhN8ZXYmtxDZRp2n_vkjkT1pEQN6kPhMVhyXNQt1_4DalrXie3CmchU9dTMOak4CnhsQWiVGIjXgW9b9NAy7bYPwY8KD/s1600/banner.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-VtRsSl5XGGD8KUU_xmbUgbTW8Caa-wPxcfq8kH3vnhN8ZXYmtxDZRp2n_vkjkT1pEQN6kPhMVhyXNQt1_4DalrXie3CmchU9dTMOak4CnhsQWiVGIjXgW9b9NAy7bYPwY8KD/s320/banner.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
- &lt;span style=&quot;font-size: large;&quot;&gt;RSF&lt;/span&gt;&lt;b&gt;: &lt;/b&gt;this files are configurations files for your project. You need a different one depending if you are going to build a cia or a 3ds. There are two good examples on&amp;nbsp;Rinnegatamante&#39;s&amp;nbsp;&lt;a href=&quot;https://github.com/Rinnegatamante/lpp-3ds&quot; target=&quot;_blank&quot;&gt;Lua Player Plus for 3DS&lt;/a&gt;. Here is the &lt;a href=&quot;https://github.com/Rinnegatamante/lpp-3ds/blob/master/gw_workaround.rsf&quot; target=&quot;_blank&quot;&gt;rsf for 3ds&lt;/a&gt; with audio support (see point 6) and the &lt;a href=&quot;https://github.com/Rinnegatamante/lpp-3ds/blob/master/cia_workaround.rsf&quot; target=&quot;_blank&quot;&gt;rsf for cia&lt;/a&gt; files. You only need to edit the BasicInfo and TitleInfo usually. For the TitleInfo you are gonna need a UniqueId. It is recommented to use and ID between&amp;nbsp;0xF8000 -0xFFFFF or&amp;nbsp;0xFF000 - 0xFF3FF which is used for Evaulations and Prototypes, ensuring you won&#39;t have a collision with a released app. To ensure you don&#39;t collide with another homebrew take a look at &lt;a href=&quot;http://gbatemp.net/threads/homebrew-cias-uniqueid-collection.379362/&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The banner, the icon and the rsf are required for makerom to create your 3ds using the command&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;makerom -f cci -o $(PROJECT_NAME).3ds -rsf gw_workaround.rsf -target d -exefslogo -elf $(PROJECT_NAME)_stripped.elf -icon icon.bin -banner banner.bin&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
or to create your cias using the next one&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;makerom -f cia -o $(PROJECT_NAME).cia -rsf cia.rsf -target t -exefslogo -elf $(PROJECT_NAME)_stripped.elf -icon icon.bin -banner banner.bin&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
[Update: take a look at the&amp;nbsp;&lt;a href=&quot;https://github.com/Steveice10/3DSHomebrewTemplate&quot; target=&quot;_blank&quot;&gt;3DSHomebrewTemplate&lt;/a&gt; created by Steveice10, those are probably the best makefiles around]&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;4. Pica Texture Format&lt;/b&gt;&lt;/h2&gt;
Textures are optimized on the 3DS GPU in a special format optimized for cache called Pica Texture Format. This means that in order to use it with the GPU_SetTexture &amp;nbsp;function, first you need to convert it (either on real time or preprocessing it first)&lt;br /&gt;
It took me a while to get the code working for this (as you can see on &lt;a href=&quot;http://gbatemp.net/threads/textures-block-format.383380/&quot; target=&quot;_blank&quot;&gt;this thread&lt;/a&gt;). But yeah, you just need to copy the code I posted there (actually I forgot to do it and I just did it now)&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
5. Sideways framebuffer&lt;/h2&gt;
The framebuffer on the 3ds screens is sideways. Meaning it really goes like this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF1Daa__HhecDWDyQMNdQMBe-FOOHbsWyfPaa4_g69RMsvgYiwLUmtbcvCsexrivqEINoRBo3N5xqCPMFHmbFVXRpJAgGKROft_fYfxcNE_NCsVGI9Pwfl1t_ASbUMFe2Rwd6H/s1600/framebuffer.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF1Daa__HhecDWDyQMNdQMBe-FOOHbsWyfPaa4_g69RMsvgYiwLUmtbcvCsexrivqEINoRBo3N5xqCPMFHmbFVXRpJAgGKROft_fYfxcNE_NCsVGI9Pwfl1t_ASbUMFe2Rwd6H/s320/framebuffer.jpg&quot; width=&quot;239&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In other words, what you really have is an screensize of 240x400, so if you don&#39;t do anything special this is what you&#39;ll get:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifYeVkHjc1627LYZP8ZpjfV_H1D77zcngKfOSPfh5p0J3FO4F_-d3zsJZdHTDFh6xtbIGgqThMXoVV-coBZ42_XqBeEEUOHVA7Ryu7sKiZ0xiwyh3_85kRjzLSC7kZTBNwZy7n/s1600/origianlframebuffer.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifYeVkHjc1627LYZP8ZpjfV_H1D77zcngKfOSPfh5p0J3FO4F_-d3zsJZdHTDFh6xtbIGgqThMXoVV-coBZ42_XqBeEEUOHVA7Ryu7sKiZ0xiwyh3_85kRjzLSC7kZTBNwZy7n/s400/origianlframebuffer.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Usually you don&#39;t want this (not in the 3DS specially, because if you rotate the console you cannot have the 3D effect working). You need to do three things&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Everywhere in your code where you need the screen size, use 400x240 (which is what we want)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- When you set the viewport size make sure you swap the params. In other words, call&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; GPU_SetViewport((u32*)osConvertVirtToPhys((u32)gpuDOut),(u32*)osConvertVirtToPhys((u32)gpuOut), y, x, h * 2, w);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
- You need to premultiply your projection matrix by this one&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; float mtx_projection_tmp0[16] =&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;0.0f,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;-1.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;0.0f,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;0.5f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;-0.5f,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;0.0f,&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;1.0f&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
which basically swaps the x and y axis and also converts z from [-1, 1] to [-1, 0] because those are the viewport coordinates for the 3DS.&lt;br /&gt;
&lt;br /&gt;
Now you can use the typical functions for creating a &lt;a href=&quot;http://projection%20matrix/&quot; target=&quot;_blank&quot;&gt;projection matrix&lt;/a&gt;, &lt;a href=&quot;http://earth.uni-muenster.de/~joergs/opengl/glOrtho.html&quot; target=&quot;_blank&quot;&gt;ortho&lt;/a&gt;, oblique... this is important if you are working on a cross platform environment. Creating a particlar case for a specific platform is a bit annoying and will cause you problems</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/4538138595431517867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/4538138595431517867' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/4538138595431517867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/4538138595431517867'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/07/3ds-homebrew-tips-and-tricks-ii.html' title='3DS Homebrew Tips and Tricks (II)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmpNtWwB6HaKBfMxRF1V9FdftGeSvphYvizLu7h0BJDuhcPxbzo9TziPkerNPM_AtktE0MpSUC2eun9A4eYiyaUa1zQdi74Z8kHdinfV9HZNKe_eG3mBNR4LddzzooNbX_EiSi/s72-c/icon.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-42374427346094505</id><published>2015-07-17T07:30:00.000+02:00</published><updated>2015-07-19T14:12:15.700+02:00</updated><title type='text'>3DS Homebrew Tips and Tricks (I)</title><content type='html'>So, as I said on my previous post I am gonna start a series of posts talking about some things that might be useful for those of you intereseted on developing for this machine. For me this is just a hobby and I cannot dedicate 100% of my time, just 1 hour a day and a little bit more during the weekends, so being stuck on something is a bit frustrating. &lt;br /&gt;
&lt;br /&gt;
I have spent much more time stuck on some stuff and searching on forums than actually coding. Hoping that this will help you I have made a compilation of the things that would had saved me a lot of time if I had knew how they were before.&lt;br /&gt;
&lt;h2&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;div style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;
&lt;span style=&quot;background-color: #e0e0e0; color: #9371af; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot;&gt;This is the 1st post on the series 3DS Homebrew Tips and Tricks&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-i.html&quot; style=&quot;background-color: #e0e0e0; color: #666699; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (I)&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-ii.html&quot; style=&quot;background-color: #e0e0e0; color: #666699; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (II)&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;
&lt;a href=&quot;http://zalods.blogspot.com.es/2015/07/3ds-homebrew-tips-and-tricks-iii.html&quot; style=&quot;background-color: #e0e0e0; color: #666699; font-family: Verdana, sans-serif; font-size: 10.3999996185303px; font-weight: normal; line-height: 12.4799995422363px; text-align: justify;&quot; target=&quot;_blank&quot;&gt;3DS Homebrew Tips and Tricks (III)&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h2&gt;
1. &lt;u&gt;3dsx, Cia and 3ds&lt;/u&gt;&lt;/h2&gt;
&lt;div&gt;
These are the 3 formats that you can compile your programs into.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
- &lt;u&gt;&lt;b&gt;3dsx&lt;/b&gt;&lt;/u&gt; this is the format that the ctrulib (which is the SDK for homebrew in 3DS) supports officially. If you are gonna release something you should distribute it under this format. You need to execute the Homebrew Launcher to use it. You need to execute &lt;a href=&quot;http://smealum.net/ninjhax/&quot; target=&quot;_blank&quot;&gt;ninjhax&lt;/a&gt;&amp;nbsp;for that. The problem is, some of us cannot do this, either because we don&#39;t have &lt;a href=&quot;https://en.wikipedia.org/wiki/Cubic_Ninja&quot; target=&quot;_blank&quot;&gt;Cubic Ninja&lt;/a&gt;&amp;nbsp;or because we have updated our emunands beyond 9.2 and now it doens&#39;t work anymore (&lt;a href=&quot;http://gbatemp.net/threads/can-i-get-ninjhax-to-work-on-later-firmwares.387445/&quot; target=&quot;_blank&quot;&gt;take a look at this post&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
- &lt;u style=&quot;font-weight: bold;&quot;&gt;Cia&lt;/u&gt;&amp;nbsp;this is the format that you use for stuff that needs to be installed in the console (as channels). Some people doesn&#39;t like it because it has been used a lot for piracy (way more than for homebrew). You need to use a CFW (Custom Firmware) and then a CFW installer in order to use it. You don&#39;t need a flaschcard for this but your console needs to be on 4.5 firmware&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
- &lt;b&gt;3ds&lt;/b&gt;&amp;nbsp;this file is the oficial format supported by nintendo. You need a flashcard for this and that&#39;s why some people doesn&#39;t like it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As I said the makefiles that come with the ctrulib only support building for 3dsx. If you want to create your own makefiles supporting those formats you can take a look at the ones used in &lt;a href=&quot;https://github.com/Drenn1/GameYob/blob/master/platform/3ds/Makefile&quot; target=&quot;_blank&quot;&gt;GameYob&lt;/a&gt;. You still need to take a look at how to create banners, icons and sounds but I will cover that on the 3rd point.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
2. &lt;u&gt;Setting up a good Developement environment&lt;/u&gt;&lt;/h2&gt;
&lt;div&gt;
I am not going to cover here how to get started with 3ds homebrew. You can take a look at my previous post &lt;a href=&quot;http://zalods.blogspot.com.es/2015/03/pixels-and-coffe-3ds-workshop.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. In sort you need to download &lt;a href=&quot;http://sourceforge.net/projects/devkitpro/files/&quot; target=&quot;_blank&quot;&gt;devkitpro&lt;/a&gt; and from there devkitARM. I don&#39;t recommend installing ctrulib from devkitpro. The version that comes with it doesn&#39;t include examples and it is hardly up to date. Your best option is getting ctrulib from &lt;a href=&quot;https://github.com/smealum/ctrulib&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;&amp;nbsp;and compiling it yourself. You need to be careful because then you are gonna be working with a library that is not stable but you can always take a look at the changes and see what&#39;s going on. I usually update it once a month unless there is an important update.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Take some time compiling and running the examples. If one of them doesn&#39;t work take a look at the last time it was updated and try again with a branch created on that day. If you are planing to do 3d games the best start point for you is the &lt;a href=&quot;https://github.com/smealum/ctrulib/tree/master/examples/gpu&quot; target=&quot;_blank&quot;&gt;gpu &lt;/a&gt;example.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
Once you reach the point when you have compiled and executed some examples and played with them a bit using programmers notepad (or any other text editor you want) you might start considering using another IDE a bit more powerful&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The one that I am using is Visual Studio 2010 but what I am gonna post here should be very similar in any other version.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;- &lt;b&gt;Create a makefile project&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhW1-MZxziLARL8nVHO4pYKshkyid97kkxdOKPKlIYghp7qxbEEuKIvrJsoCMDzcKXdQgJ_uGmvK_xyjIAjveYYflXsbS3kQ0H96hIbNO8LlSX_6KlCENmylCuvig7ZPHnaDuC/s1600/MakefileProject.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhW1-MZxziLARL8nVHO4pYKshkyid97kkxdOKPKlIYghp7qxbEEuKIvrJsoCMDzcKXdQgJ_uGmvK_xyjIAjveYYflXsbS3kQ0H96hIbNO8LlSX_6KlCENmylCuvig7ZPHnaDuC/s1600/MakefileProject.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;- &lt;b&gt;Linking it to our Makefile&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;Go to Project properties and configure it like this:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; - Build command line:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; - Clean commands:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make clean&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; - Rebuild command line:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make clean&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4zw7LPACfaADYAAhaGNjS_omAeXT8BnBwkToE_xxdyRtrmgjiugNPgnRqRNgKDnv-xLUdEitbFZAglnZ4TY2yCPrrgiokkEhePLixzPQY3-e57j-ubgJTo55KhAJwAIzKfNAj/s1600/project+config.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;151&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4zw7LPACfaADYAAhaGNjS_omAeXT8BnBwkToE_xxdyRtrmgjiugNPgnRqRNgKDnv-xLUdEitbFZAglnZ4TY2yCPrrgiokkEhePLixzPQY3-e57j-ubgJTo55KhAJwAIzKfNAj/s400/project+config.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
you can now close visual studio go where you have created this project and copy it into the folder of the example you want to compile. After that if you open it and compile, it will run the makefile and create a 3dsx as expected. Rebuild and clean will also be working as usual&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;- Adding intellisense&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Add the next paths into the Include Search Path&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp;- C:\devkitPro\devkitARM\arm-none-eabi\include&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp;- C:\devkitPro\devkitARM\include&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp;- C:\devkitPro\libctru_git\libctru\include&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
where C:\devkitPro is the folder in your harddrive where you have installed devkitpro&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBmr7I2Au2lPULkx8zZ0Lra6kos6iFaAEDFpcq6UTKdroIAroY8H4tTRq3Uo-1zuL2UYpHYg1YRZll4P4tng9pMwvF2-rqdv68wPc5zI-oz4PNKaQp7PhjHrnmWfWlkTw5WKJu/s1600/includes.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBmr7I2Au2lPULkx8zZ0Lra6kos6iFaAEDFpcq6UTKdroIAroY8H4tTRq3Uo-1zuL2UYpHYg1YRZll4P4tng9pMwvF2-rqdv68wPc5zI-oz4PNKaQp7PhjHrnmWfWlkTw5WKJu/s1600/includes.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now code completion should be working as well as going to function declaratinos.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp;- &lt;b&gt;Creating a external tool for copying contents into the console&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;- In yout makefile add a target called install similar to this:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;install:&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;     &lt;/span&gt;cp ../bin/$(PROJECT_NAME).3ds g:/&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@echo Done&amp;nbsp;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;- Go to Tools/External Tools&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;- Add a new Tool called Install like this&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTyNU_L4bQMYAfX9JeqUabrJwFshyphenhyphenIKoceYhoyinWba93Nk4P8nGf1Rq2br0iZ0kMYt2lctnkhdMgAIr13RMX6bC3ldivvtVPDB54kVLf8urdyYM6adtPx3UbX9m3gGOODnEeb/s1600/Install+Tool.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTyNU_L4bQMYAfX9JeqUabrJwFshyphenhyphenIKoceYhoyinWba93Nk4P8nGf1Rq2br0iZ0kMYt2lctnkhdMgAIr13RMX6bC3ldivvtVPDB54kVLf8urdyYM6adtPx3UbX9m3gGOODnEeb/s1600/Install+Tool.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;- Now Create a New Toolbar called Homebrew (Tools/Customize/New...)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY2C5-KAAiNOKFoREiDkzpkzYFIsAddMkPQ5fU8hMouHq9PiSCwqP6qBeYHiJ4FGF4Ve3Ubkh8g5-07V7tCVE1UxEMCJsAZI_mpvNgw8LgNAxVY3Lpxx5xxk0V8qtOc82LqUMP/s1600/New+Toolbar.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY2C5-KAAiNOKFoREiDkzpkzYFIsAddMkPQ5fU8hMouHq9PiSCwqP6qBeYHiJ4FGF4Ve3Ubkh8g5-07V7tCVE1UxEMCJsAZI_mpvNgw8LgNAxVY3Lpxx5xxk0V8qtOc82LqUMP/s1600/New+Toolbar.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;- Go the Commands tab and select the toolbar created. Press Add Command and in Tools search select External Command 7 (yeah.. this is a bit ughhh... but it works)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIrYYc6PFA2q0KHuVMVZuSsvaF81Zh6WHGYB7knTiCQjd__GY3AZx5Iij_yZnAsyypYWj3ccaJa_bCoQBSdHWUNvJm8653-AmvfqVGKFMoEFUgJLRhNYKpqOs_eZ5p16e-MIAl/s1600/external+tool.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIrYYc6PFA2q0KHuVMVZuSsvaF81Zh6WHGYB7knTiCQjd__GY3AZx5Iij_yZnAsyypYWj3ccaJa_bCoQBSdHWUNvJm8653-AmvfqVGKFMoEFUgJLRhNYKpqOs_eZ5p16e-MIAl/s1600/external+tool.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You should now see your new ToolBar located in the Toolbars and a the button Install on it&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoP-XHJfhR4YwTkoy_reUNCiiiv6WLPnJXvNylwhcy_fijeJfyK1kUxhC3V7LLD1tWzb6GME822JQSSlp2EUsCgDAt-rqd7utC_ruivCiDGb9bCEuWua5PU1L0RPlRrz1y1rgk/s1600/InstallButton.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoP-XHJfhR4YwTkoy_reUNCiiiv6WLPnJXvNylwhcy_fijeJfyK1kUxhC3V7LLD1tWzb6GME822JQSSlp2EUsCgDAt-rqd7utC_ruivCiDGb9bCEuWua5PU1L0RPlRrz1y1rgk/s1600/InstallButton.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now when you compile you just need to put the SD on your computer, press Install, wait for the message &quot;Done&quot; and put it back on your console to execute&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This is very useful if you have a flashcard and you work with the 3ds format. Actually this is the fastest way to work. Compilation times are big and you need to reduce it the maximum posible (bear in mind that sometimes you just change the value of one var and recompile and you need to see the results as soon as posible). This is how I usually work&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- I run the latest build on my 3ds and see that something doesn&#39;t work&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- I take a look at the code, detect what&#39;s happening and make some changes. Then press F7 to compile&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- While compiling I stop the build on the 3ds (by pressing the home menu and then closing the app)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- I take out the flashcard form the console, then the micro SD inside it and put it on my laptop&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- By that time the compilation has finished so I jsut press Install&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- I wait for the &quot;Done&quot; message, take out the micro SD from my laptop, and plug it in on the flashcard&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- I put the flashcard on the console, select the rom and run it&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This is usually about 20 seconds, which is not bad. And it is actually faster than sending the build via FTP (because you need to launch the client on the console for that, then send it form your computer, then close it... and it fails a lot).&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
It is even worst if you work with cias, because you need to install them on the internal SD and you cannot remove the SD while on emunad (the console freezes). You can again send the content via wifi (using the tool from nintendo is the best way, see &lt;a href=&quot;https://gbatemp.net/threads/microsd-management-on-homecreen-and-working-on-old3dss-too.383892/&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;) but it takes too much time.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Again, this is up to you, but for applications that are big I highly recommend getting a flashcard and working with 3ds files directly.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/42374427346094505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/42374427346094505' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/42374427346094505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/42374427346094505'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/07/3ds-homebrew-tips-and-tricks-i.html' title='3DS Homebrew Tips and Tricks (I)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhW1-MZxziLARL8nVHO4pYKshkyid97kkxdOKPKlIYghp7qxbEEuKIvrJsoCMDzcKXdQgJ_uGmvK_xyjIAjveYYflXsbS3kQ0H96hIbNO8LlSX_6KlCENmylCuvig7ZPHnaDuC/s72-c/MakefileProject.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-4500734543273087796</id><published>2015-07-15T19:00:00.000+02:00</published><updated>2015-07-25T01:47:55.011+02:00</updated><title type='text'>Jumping Jack for 3DS</title><content type='html'>Time for some releases!&lt;br /&gt;
&lt;br /&gt;
As some of you know I have spent the last few months doing &amp;nbsp;some coding for the 3DS. I have finally finished the porting of my little engine so it is now time for some posts talking about the experience and some things I wish I had knew before I started doing this. I am gonna be doing this during this week and the next one&lt;br /&gt;
&lt;br /&gt;
But first. I want to release my first homebrew on this console: Jumping Jack 3DS. This is basically a port of the same game I released a few years ago for the Wii&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/VT_-tQwCxN0/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/VT_-tQwCxN0?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
I already wrote a post about it &lt;a href=&quot;http://zalods.blogspot.com.es/2010/10/jumping-jack-in-3d.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
And here is the link if you wanna give it a try&lt;br /&gt;
&lt;h2&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0ByakbigmkUpsdEZmQUJqOEdhSWM/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;DOWNLOAD:&amp;nbsp;Jumping Jack 3DS&lt;/a&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
UPDATE: this is now working for ninjahx 2.0&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/4500734543273087796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/4500734543273087796' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/4500734543273087796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/4500734543273087796'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/07/jumping-jack-for-3ds.html' title='Jumping Jack for 3DS'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/VT_-tQwCxN0/default.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-5273784263560043761</id><published>2015-05-10T14:42:00.000+02:00</published><updated>2015-05-10T15:31:10.083+02:00</updated><title type='text'>Familiar Game Jam 4 - Dancing with wolves!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPAtHCU6zdvUBwjSmTWwIoO_0FSZknnyftsQJPgmo1-QimVBkbjXNp3_byrOL01YiPAusdXHk4dXMR1p4I8uAgHXa4XGfBZmmTlCktakiR-t5h-piytMj4TYn7isaISHofP4Kc/s1600/familiar4_cartel.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPAtHCU6zdvUBwjSmTWwIoO_0FSZknnyftsQJPgmo1-QimVBkbjXNp3_byrOL01YiPAusdXHk4dXMR1p4I8uAgHXa4XGfBZmmTlCktakiR-t5h-piytMj4TYn7isaISHofP4Kc/s400/familiar4_cartel.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So, yeah, one more time our favorite jam was celebrated in Seville during the weekend of 20-22 March 2015. This jam is just growing and getting better with every new edition, all thanks to &lt;a href=&quot;https://twitter.com/vaus_spaceship&quot; target=&quot;_blank&quot;&gt;sergeeo&lt;/a&gt;. This time it was celebrated on what we call the Enjoy room on my current company &lt;a href=&quot;http://www.generagames.com/&quot; target=&quot;_blank&quot;&gt;Genera Games&lt;/a&gt;. So, for some of us that meant staying at the office the whole weekend (just changing from one room to another). Totally worth it :)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiBoHCDViHQI6zVy5t7uReRXj0AtRZ4tE66DHxOGsHgSpGWSeytldQpdwE883MOplBpFcpeiTDahizJ9ilD5s1wXdRUhzAWNsAKJ3cLcdRS3wRLqV8Vpvrv1fVo56kfXwt_lEP/s1600/enjoy.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiBoHCDViHQI6zVy5t7uReRXj0AtRZ4tE66DHxOGsHgSpGWSeytldQpdwE883MOplBpFcpeiTDahizJ9ilD5s1wXdRUhzAWNsAKJ3cLcdRS3wRLqV8Vpvrv1fVo56kfXwt_lEP/s320/enjoy.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
There were 48 presential participants plus more teams working from their places, ending up with a total of 32 videogames. If you want to join the next one pay atention to the&amp;nbsp;&lt;a href=&quot;https://twitter.com/familiargamejam&quot; target=&quot;_blank&quot;&gt;twitter account&lt;/a&gt; because this last time the presential places flew away in a few hours. You can take a look at the games on the &lt;a href=&quot;http://jams.gamejolt.io/familiargamejamvol4/games&quot; target=&quot;_blank&quot;&gt;gamejolt &amp;nbsp;website&lt;/a&gt; (google chrome not recommended, because Google has recently stopped supporting the Unity player and most of the games use it)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/tTGvQQI3DUIREi9zHmZyVOs-kh77OnFzJ0_0xRDFGK8ePnaJ_EUHwc7ET7klXGHYPJU=w300&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://3.bp.blogspot.com/tTGvQQI3DUIREi9zHmZyVOs-kh77OnFzJ0_0xRDFGK8ePnaJ_EUHwc7ET7klXGHYPJU=w300&quot; width=&quot;222&quot; /&gt;&lt;/a&gt;The topic in this edition was movies from the nineties. So we had to chose a movie from that period and make a videogame based on that. And also the game had to cotain two different endings. You can imagine all of us searching on the internet the top charts from that time. We finally ended up chosing Dancing with Wolves, for several reasons. First, after all these years there aren&#39;t any videogames of that film. Second, we&#39;ve been talking about making a dancing videogame during a long time. And third, we were sure nobody else were going to pick the same one :D&lt;br /&gt;
&lt;br /&gt;
This time I was on a team with two of my workmates &lt;a href=&quot;https://twitter.com/pedmuitor&quot; target=&quot;_blank&quot;&gt;pedmuitor&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/brovador&quot; target=&quot;_blank&quot;&gt;brovador&lt;/a&gt;. I was in charge of the graphics (same thing happened on the First Familiar Game Jam, so I am kind of a senior jam artist ^_^U). During the first day we weren&#39;t sure if I should work on 3D or 2D. I finally went for 3D and started using 3ds max after all these years. I think it was a good decission because I could do lots of animations that in 2D would have been a pain (and less fun)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qhlWwapPn09xooalzi2pSzkZv1egi63QqhmOnX4AvMoOW3DUvqIcPB4OKnCV0vi9AEPRlyM-_AbkrdJqm6wc3itg7CKGFMPXFJf6IBOh-R2PTR8CmDRyulsaZibMr-ATMF8M/s1600/wolf.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qhlWwapPn09xooalzi2pSzkZv1egi63QqhmOnX4AvMoOW3DUvqIcPB4OKnCV0vi9AEPRlyM-_AbkrdJqm6wc3itg7CKGFMPXFJf6IBOh-R2PTR8CmDRyulsaZibMr-ATMF8M/s320/wolf.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I didn&#39;t code a single line of code this time. &lt;a href=&quot;https://twitter.com/pedmuitor&quot; target=&quot;_blank&quot;&gt;Pedmuitor&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/brovador&quot; target=&quot;_blank&quot;&gt;Brovador&lt;/a&gt; did all the job. And if you are asking who did those wonderful menus it turned out brovador is a secret graphic designer. So basically the three of us were able to do this videogame you can play &lt;a href=&quot;http://gamejolt.com/games/arcade/dance-dance-with-wolves/55409/#screenshot-106508&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&amp;nbsp;(remember, no chrome)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpRGPlu5ahKKmGQEsF_7Le2g4jf0ei-AabP_6y-AlQRgXgDfGgAM5SpvrKejfi4YzU2PE7StP3KishWRs-Rj4uWUPEX21DVmgf8ZGFhBgpwf5bv0WPBL9SfLPEIU-OuiLBYLRh/s1600/106510.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpRGPlu5ahKKmGQEsF_7Le2g4jf0ei-AabP_6y-AlQRgXgDfGgAM5SpvrKejfi4YzU2PE7StP3KishWRs-Rj4uWUPEX21DVmgf8ZGFhBgpwf5bv0WPBL9SfLPEIU-OuiLBYLRh/s400/106510.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSidOBuh2WOYHYYmsc33PH77j1gKNFd8ThIb-iKXfOWtcyn6hlCTVPOWfng0i0XoB0MxzKLE8BxzNDLD85obgIEIFxO64iFIVrzgjHr019hROtChfO182BoBGUtlWlvJDhYhdo/s1600/106512.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSidOBuh2WOYHYYmsc33PH77j1gKNFd8ThIb-iKXfOWtcyn6hlCTVPOWfng0i0XoB0MxzKLE8BxzNDLD85obgIEIFxO64iFIVrzgjHr019hROtChfO182BoBGUtlWlvJDhYhdo/s400/106512.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
It would be very unfair not to mention our music man. I never mentioned it before, but in the Familiar Game Jams there is a team of 3-4 guys doing the music for all the games. This time we were working with &lt;a href=&quot;https://soundcloud.com/carlos-d-vallejo&quot; target=&quot;_blank&quot;&gt;Carlos Vallejo&lt;/a&gt; who did a great job, you can listen to the music he did for us &lt;a href=&quot;https://soundcloud.com/carlos-d-vallejo/dance-dance-with-wolves-medley&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After the jam finished there was one week for meditating an voting. Our game received an overall score of 3.58 (over 5) and was ranked #9. Thanks everyone who voted us (except those who gave us low scores :D).&lt;br /&gt;
&lt;br /&gt;
Take a look at the &lt;a href=&quot;http://jams.gamejolt.io/familiargamejamvol4/games&quot; target=&quot;_blank&quot;&gt;games&lt;/a&gt; (you can sort them by&lt;a href=&quot;http://jams.gamejolt.io/familiargamejamvol4/games&quot; target=&quot;_blank&quot;&gt; ranking&lt;/a&gt;) and enjoy. I&#39;d like to finish this post with a video that was posted on youtube a few days after the jam took place showing you what a good time we had. See you on Familiar Game Jam 5!&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/dKk5Hvy2Kqc/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/dKk5Hvy2Kqc?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
PS: some links covering the event:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- &lt;a href=&quot;http://vausspaceship.blogspot.com.es/2015/03/premios-de-familiar-game-jam-4-e-indie.html&quot; target=&quot;_blank&quot;&gt;Prize ceremony on sergeeo&#39;s blog&lt;/a&gt;&amp;nbsp;(spanish)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- &lt;a href=&quot;http://www.latribugamer.es/all-video-list/entrevista-a-undead-aubergine-sobre-la-familiar-game-jam-4/&quot; target=&quot;_blank&quot;&gt;Undead Aubergine enterview&lt;/a&gt;&amp;nbsp;and their &lt;a href=&quot;http://undeadaubergine.tumblr.com/post/114537789045/familiar-game-jam-4-postmortem&quot; target=&quot;_blank&quot;&gt;postmortem&lt;/a&gt;&amp;nbsp;(spanish)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- &lt;a href=&quot;http://juegarpg.com/reportaje-sobre-la-familiar-game-jam-4/&quot; target=&quot;_blank&quot;&gt;JuegaRPG&lt;/a&gt;&amp;nbsp;(spanish)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- &lt;a href=&quot;https://gamecrimes.wordpress.com/2015/03/30/update-w-jam-awardsgames-familiar-game-jam-4-20-22-march-sevilleonline/&quot; target=&quot;_blank&quot;&gt;GameCrimes&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- &lt;a href=&quot;https://geekyjuegos.com/tag/familiargamejam4/&quot; target=&quot;_blank&quot;&gt;GeekyJuegos did some great articles about several games of the jam&lt;/a&gt;&amp;nbsp;(including ours) (spanish)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- &lt;a href=&quot;http://fireside.gamejolt.com/post/jam-favorites-familiar-game-jam-4-yumh9xib&quot; target=&quot;_blank&quot;&gt;Jupiter Hadley post&lt;/a&gt;&amp;nbsp;also take a look at her &lt;a href=&quot;https://www.youtube.com/watch?v=-84z7PFDEkU&amp;amp;list=PLYKU1lvSF85cTg4CJp2Yn5AonxWWbTRYI&quot; target=&quot;_blank&quot;&gt;video compilation series&lt;/a&gt;&amp;nbsp;covering all the games&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/5273784263560043761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/5273784263560043761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/5273784263560043761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/5273784263560043761'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/05/familiar-game-jam-4-dancing-with-wolves.html' title='Familiar Game Jam 4 - Dancing with wolves!'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPAtHCU6zdvUBwjSmTWwIoO_0FSZknnyftsQJPgmo1-QimVBkbjXNp3_byrOL01YiPAusdXHk4dXMR1p4I8uAgHXa4XGfBZmmTlCktakiR-t5h-piytMj4TYn7isaISHofP4Kc/s72-c/familiar4_cartel.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-4922796507033420074</id><published>2015-04-20T23:29:00.000+02:00</published><updated>2015-04-21T17:11:52.242+02:00</updated><title type='text'>Freakend 2015</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://pbs.twimg.com/media/B_gl4FfWQAEfChf.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://pbs.twimg.com/media/B_gl4FfWQAEfChf.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The Freakend 2015 took place during the past 6th,7th,8th of March in San Agustín de Guadalix (Madrid, Spain). What&#39;s the freakend you might be wondering. It is basically an event where some people from the industry in Spain gather, talk about videogames, drink and eat pizza. Don&#39;t let the name confuse you, in spanish the word freak is used instead of geek, so imagine an event called geekend about videogames and there you go.&lt;br /&gt;
&lt;br /&gt;
This has been the 4th one if I am not mistaken and my 2nd one. Also this has been the first year that the Freakend Android was celebrated, but that&#39;s another story. After the good experience of the last year I wanted to repeat again. I don&#39;t live in Madrid right now and this kind of events allow me to keep in touch with some old friends (it was good to meet &lt;a href=&quot;https://twitter.com/arturogdg&quot; target=&quot;_blank&quot;&gt;arturogdg&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/chrisghead&quot; target=&quot;_blank&quot;&gt;chrisghead&lt;/a&gt; after all these years and also &lt;a href=&quot;https://twitter.com/Diegobez&quot; target=&quot;_blank&quot;&gt;Diegobez&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/flipper83&quot; target=&quot;_blank&quot;&gt;flipper83&lt;/a&gt;) and follow the status of some companies and the games they are doing.&lt;br /&gt;
&lt;br /&gt;
Besides drinking and eating there are a series of very interesting talks along the whole weekend. On this event there were not only programmers, but also game designers, artists, producers, musicians... with such a mix it is hard that every speak was interesting for everyone, but we had the schedule from the beggining, so in case you were not interested in one of them you could always get along with people outside the main room. I actually attended all of them (I couldn&#39;t pay too much attention during saturday morning because I was finishing my own one)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://pbs.twimg.com/media/B_Zx9KiW8AE8lCx.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://pbs.twimg.com/media/B_Zx9KiW8AE8lCx.jpg&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In case you missed them, here are some links to the videos on youtube:&lt;br /&gt;
- Hernán y Mirella – GamesYouHear&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/4A54SVcHHZ4/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/4A54SVcHHZ4?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
- Rafael Muñoz – Testing automatico en videojuegos&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/2zpEMOa5qGw/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/2zpEMOa5qGw?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
-&amp;nbsp;Javier Cantón – “Como guardar 6 floats en 32bits”&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/j3juLU0yLxI/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/j3juLU0yLxI?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
-&amp;nbsp;Gonzalo de Santos – Desarrollo homebrew en nintendo 3DS: (it&#39;s-a me!!)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/F48p9YreUJY/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/F48p9YreUJY?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
- Nacho Lasheras – Anatomia de GUI:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/4ASH1VAFr_w/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/4ASH1VAFr_w?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
-&amp;nbsp;Cesar Monterde – Tutoriales:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/6yGsJykCN28/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/6yGsJykCN28?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
-&amp;nbsp;Kike – Postmortem de Heart &amp;amp; Slash:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/4fn10mYK2PY/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/4fn10mYK2PY?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I wanted to talk about the 3ds scene. Because I had already done an introduction here in Seville on February (see my previous post), this time I wanted to talk a bit about the exploit itself. How does some people gain control of a machine that from start has been secured to avoid launching any unsigned program? Also I introduced the current state of the 3DS homebrew scene. Besides the video here are the slides in bot spanish and english&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/presentation/d/1aXWvP8iE2xxxVMSvNKRoHThAw6lOxIEDKGRFaodxmhI/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;3DS Homebrew (Spanish) &lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/presentation/d/1h0KMcpyOYjbOGH4mH8nlK1FGcTZQNRuZtGhw6iS1ai4/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;3DS Homebrew (English)&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I&#39;d like to thank again Diegobez who was in charge this year and who did a great job, and flipper83 the creator of the event for insisting me during so many years on attending the event. And for teaching me that just being on a desk doing some stuff is not enought. You need to go out, meet some people, get some feedback, let others know you, etc. The freakend is a perfect opportunity for all this. See you next year!&lt;br /&gt;
&lt;br /&gt;
PS: here are some links to other blogs covering the event (in spanish)&lt;br /&gt;
&lt;a href=&quot;http://visualstudioex3.com/blog/gamedev/eventos/resumen-del-freakend-2015/&quot;&gt;http://visualstudioex3.com/blog/gamedev/eventos/resumen-del-freakend-2015/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.otogami.com/blog/freakend-2015/&quot;&gt;http://www.otogami.com/blog/freakend-2015/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://geeks.ms/blogs/aperez/archive/2015/03/10/evento-freakend-2015.aspx&quot;&gt;http://geeks.ms/blogs/aperez/archive/2015/03/10/evento-freakend-2015.aspx&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;a href=&quot;http://blog.kartones.net/post/Freakend-2015-and-my-Gameboy-Powerpoint-like-ROM&quot;&gt;http://blog.kartones.net/post/Freakend-2015-and-my-Gameboy-Powerpoint-like-ROM&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/4922796507033420074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/4922796507033420074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/4922796507033420074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/4922796507033420074'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/04/freakend-2015.html' title='Freakend 2015'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/4A54SVcHHZ4/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-7368727489105224234</id><published>2015-03-15T00:46:00.000+01:00</published><updated>2015-03-15T00:53:24.880+01:00</updated><title type='text'>Pixels and Coffe 3DS workshop</title><content type='html'>The past February 10th I was given the chance to offer a workshop introducing the homebrew development on the Nintendo 3DS. At first I was planning to actually talk about the DS but being a console that is becoming obsolete I decided to go for something more actual (I thought it&#39;ll be more interesting). This time it was organized by the guys from&lt;a href=&quot;http://www.pixelsandcoffee.es/&quot; target=&quot;_blank&quot;&gt; Pixels and Coffe&lt;/a&gt; (if you live in Seville and don&#39;t know what I am talking about you should take a look)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3WyIH5BtduBukEPXKJBkrYXn5lPujT08jz4o2We0E4Ehfy_mqfHJKW06fcCNdkYd6aAJ7K5-pq6YUsS6RRjxFTgZTy6haYdf_KrKBnSN4hfvSahSSOTA1kLuIy9i3dptA9gRi/s1600/3ds.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3WyIH5BtduBukEPXKJBkrYXn5lPujT08jz4o2We0E4Ehfy_mqfHJKW06fcCNdkYd6aAJ7K5-pq6YUsS6RRjxFTgZTy6haYdf_KrKBnSN4hfvSahSSOTA1kLuIy9i3dptA9gRi/s1600/3ds.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Lot of people came and I was happy to share with them one of my hobbies although there were some moments of chaos (ctrulib not compiling, emulators not launching...). I talked a bit about the history of the scene, the emulators, the exploits and we were compiling a Hello-world sample that I run on my 3DS using Ninjhax&lt;br /&gt;
&lt;br /&gt;
Now it would be great if someone will try and join the community but honestly I don&#39;t think that is gonna happen :D&lt;br /&gt;
&lt;br /&gt;
Anyways, thanks to everyone who came that day. I hope you had such a good time as I did and you actually learned something. Here are the slides in spanish and english if you want to take a look&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/presentation/d/10rt_tEMNSMXGD7jEWZ0TJ5Xtr37uxLvMkH7NzxOkeQY/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;3DS Homebrew&lt;/a&gt;&amp;nbsp;(spanish)&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/presentation/d/1-wbnX-_N_cvKfw54n9GFSyAZ5xvVEZ-iWdGPj1Krdhc/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;3DS Homebrew&lt;/a&gt; (english)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PS: I am always delayed with it but next post I will be talking about the &lt;a href=&quot;https://twitter.com/hashtag/Freakend?src=hash&quot; target=&quot;_blank&quot;&gt;freakend&lt;/a&gt;&amp;nbsp;and the other presentation I offered there&lt;br /&gt;
PS2: oh, and the new &lt;a href=&quot;http://jams.gamejolt.io/familiargamejamvol4&quot; target=&quot;_blank&quot;&gt;Familiar Game Jam&lt;/a&gt; is just around the corner!</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/7368727489105224234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/7368727489105224234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/7368727489105224234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/7368727489105224234'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2015/03/pixels-and-coffe-3ds-workshop.html' title='Pixels and Coffe 3DS workshop'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3WyIH5BtduBukEPXKJBkrYXn5lPujT08jz4o2We0E4Ehfy_mqfHJKW06fcCNdkYd6aAJ7K5-pq6YUsS6RRjxFTgZTy6haYdf_KrKBnSN4hfvSahSSOTA1kLuIy9i3dptA9gRi/s72-c/3ds.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37189295.post-2228959128178365776</id><published>2014-11-19T00:07:00.001+01:00</published><updated>2014-11-19T00:12:56.199+01:00</updated><title type='text'>Familiar Game Jam 3 (one month later, yippiee!)</title><content type='html'>&lt;br /&gt;
The third edition of the &lt;a href=&quot;http://gamejam.famfest.info/index.html&quot; target=&quot;_blank&quot;&gt;Familiar Game Jam&lt;/a&gt; took place the last October 17-18-19th. The Familiar Game Jam takes place in Seville (Spain) twice a year and the main purpose of the event is making a game in 48 hours based on the theme selected by the participants and surviving to tell your grandchildren&lt;br /&gt;
&lt;br /&gt;
In this edition the chosen theme was misanthropy and the surprise element was neon lights. &lt;a href=&quot;http://jams.gamejolt.io/familiargamejam3/games&quot; target=&quot;_blank&quot;&gt;27 games were presented&lt;/a&gt; on a jam that edition after edition grows in number of participants and quality of the games&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WeCrX75lPpgtFLztq3tVGsc_6ufp5ziCRL2kcUHY7LO0NeYefhbFeSrcOl0Bk-eYAzv_xuIVsrCwFgZ61aOF8zh4yTMdIhjKH7SR_OmkLEwQgK_NJNJy8JF0BoRfjiCr8Ps9/s1600/rodrigezs.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WeCrX75lPpgtFLztq3tVGsc_6ufp5ziCRL2kcUHY7LO0NeYefhbFeSrcOl0Bk-eYAzv_xuIVsrCwFgZ61aOF8zh4yTMdIhjKH7SR_OmkLEwQgK_NJNJy8JF0BoRfjiCr8Ps9/s1600/rodrigezs.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The Rodriguez Team. From left to right: Chetrut, Rafa, Jesús and me. &lt;br /&gt;
Missing here are Sergio (music) and Javi Zumer (sound effects)&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
It is a good opportunity to meet new people. I was on a team called The Rodriguez (don’t ask) and our product was called GameJamthropy, a Game Jam simulator were you try to code your great game but people talking doesn’t let you so you need to shut them up throwing beers into their heads&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwt58kzmxGOS8r4O6Hj35clyQO0wwio-7KHYSTbbg_rx2stIgWkzISGovWc2zaNlOjNobnyAFhJJP1NYOw5s3dBEt5r5Fu-NyJ6IETkBkwuPtMtxbTo-5Tg_knCSfQY6kVD5IL/s1600/intro.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwt58kzmxGOS8r4O6Hj35clyQO0wwio-7KHYSTbbg_rx2stIgWkzISGovWc2zaNlOjNobnyAFhJJP1NYOw5s3dBEt5r5Fu-NyJ6IETkBkwuPtMtxbTo-5Tg_knCSfQY6kVD5IL/s1600/intro.PNG&quot; height=&quot;125&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN7bXSAG1HLC5WQaZf_dc8I1vlqOSuIr5hIXSHj40aOH7RHoSz2mVQ2up4sfWE5XJLQ0qMj1JtHZUBdfZeNn2NSaH5yw-8huZkR1AORlENLB7PQS8WdKyH3WjLxJxetyjE-Glc/s1600/ingame.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN7bXSAG1HLC5WQaZf_dc8I1vlqOSuIr5hIXSHj40aOH7RHoSz2mVQ2up4sfWE5XJLQ0qMj1JtHZUBdfZeNn2NSaH5yw-8huZkR1AORlENLB7PQS8WdKyH3WjLxJxetyjE-Glc/s1600/ingame.PNG&quot; height=&quot;125&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzm0o0wIGCY2TEbN4ablnOI1RxKahyG7kwlbri5dsHQCAdg3gr3eKtDNJxJRNxslx_9EjY24AIHIRetH9zWyew-7qCPMj8Ncmfy3HJ652-jpsJEQa0l_iXrdnas-lhD0NYYn0u/s1600/highscores.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzm0o0wIGCY2TEbN4ablnOI1RxKahyG7kwlbri5dsHQCAdg3gr3eKtDNJxJRNxslx_9EjY24AIHIRetH9zWyew-7qCPMj8Ncmfy3HJ652-jpsJEQa0l_iXrdnas-lhD0NYYn0u/s1600/highscores.PNG&quot; height=&quot;124&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We really suffered the last two hours before finishing it, and at some point I was doubting we were going to have a working product, but at the end we manage to do it not without some errors (like that shader not compiling in windows causing all the game look completely pink)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbY6XqmvdfF03rK7jnDq3b4vi_Du4IFfuTnjqKJXWJmPuAT93nNjgYhXcycmSA2ilsv6-E3f3LGqYrI_x3MdWfq1tpsQCkZ3t_LrhjWiIe8ZF593xPp-TBg0MjdSYOErLYebX/s1600/reward.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbY6XqmvdfF03rK7jnDq3b4vi_Du4IFfuTnjqKJXWJmPuAT93nNjgYhXcycmSA2ilsv6-E3f3LGqYrI_x3MdWfq1tpsQCkZ3t_LrhjWiIe8ZF593xPp-TBg0MjdSYOErLYebX/s1600/reward.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Two weeks after the jam I went with Chetrut to the award’s ceremony and to our surprise the game was given the jury’s award. We would like to thank everyone again for this. Also we found a video on youtube of someone playing it and having some fun which is always very rewarding (and it has a lot of views!)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/eaUYddtnLc0?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Being happy with GameJamThropy we decided to continue working on it, fixing the errors and today I have uploaded the &lt;a href=&quot;http://challenges.gamejolt.io/games/arcade/gamejamthropy/36170/&quot; target=&quot;_blank&quot;&gt;final version&lt;/a&gt; so far. The code is available on &lt;a href=&quot;https://t.co/fxafswhye9&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt; (it is not a good code to learn anything from, so don’t get too excited ;)) Wanna give it a try and show the world how good your coding skills are? (or how bad :P?) We have implemented higscores for that!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://challenges.gamejolt.io/games/arcade/gamejamthropy/36170/&quot; target=&quot;_blank&quot;&gt;PLAY GAMEJAMTHROPY ON GAMEJOLT&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here are some other articles covering the event&lt;br /&gt;
-&amp;nbsp;&lt;a href=&quot;http://www.indiegamejams.com/tag/familiar-game-jam/&quot; target=&quot;_blank&quot;&gt;A playlist with videos of all the games that were presented&lt;/a&gt;&lt;br /&gt;
- &lt;a href=&quot;http://www.anaitgames.com/articulos/familiar-game-jam-3-participantes&quot; target=&quot;_blank&quot;&gt;Anait Games&lt;/a&gt; talking about it&lt;br /&gt;
- &lt;a href=&quot;http://www.juegonautas.com/articulos/familiar-game-jam-3/&quot; target=&quot;_blank&quot;&gt;Juegonautas&lt;/a&gt;&lt;br /&gt;
- &lt;a href=&quot;https://twitter.com/familiargamejam&quot; target=&quot;_blank&quot;&gt;Offical twitter&lt;/a&gt;&amp;nbsp;account&lt;br /&gt;
- &lt;a href=&quot;https://www.youtube.com/watch?v=CPfEMe4tEB4&quot; target=&quot;_blank&quot;&gt;The offical video that I cannot link properly becuase blogger is shit sometimes&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
See you on the fourth edition!&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://zalods.blogspot.com/feeds/2228959128178365776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/37189295/2228959128178365776' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2228959128178365776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37189295/posts/default/2228959128178365776'/><link rel='alternate' type='text/html' href='http://zalods.blogspot.com/2014/11/familiar-game-jam-3-one-month-later.html' title='Familiar Game Jam 3 (one month later, yippiee!)'/><author><name>Zalo</name><uri>http://www.blogger.com/profile/07374583543465613207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfqYaraiH-vaR1PW43M_wdJOTth6ujzz4k-h1OKKLjStptOQoCWnZIBAeTV3LmzOvFH-LUVEZF0oODk7eYWxGoHyQ3f7tPVhVECnVuCAhOWEpRkKFMtdU7WA-NxBRp2s/s82/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WeCrX75lPpgtFLztq3tVGsc_6ufp5ziCRL2kcUHY7LO0NeYefhbFeSrcOl0Bk-eYAzv_xuIVsrCwFgZ61aOF8zh4yTMdIhjKH7SR_OmkLEwQgK_NJNJy8JF0BoRfjiCr8Ps9/s72-c/rodrigezs.jpg" height="72" width="72"/><thr:total>1</thr:total></entry></feed>