<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Blogs by Ben Forge]]></title><description><![CDATA[Browse the discussions by the game developer, Ben Forge.]]></description><link>https://benforge0422.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 15:59:05 GMT</lastBuildDate><atom:link href="https://benforge0422.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[When We Have a Better Cross-Platform Plan for Minicraft+]]></title><description><![CDATA[Previously, I mentioned that we should not work on mobile support with Java in the current Java project, but lately, there has been a discussion that LWJGL could still work with mobile. Now, I am going to reemphasize that we should not, especially wh...]]></description><link>https://benforge0422.hashnode.dev/when-we-have-a-better-cross-platform-plan-for-minicraftplus</link><guid isPermaLink="true">https://benforge0422.hashnode.dev/when-we-have-a-better-cross-platform-plan-for-minicraftplus</guid><category><![CDATA[Minicraft]]></category><category><![CDATA[Java]]></category><category><![CDATA[Mobile Development]]></category><category><![CDATA[Game Development]]></category><category><![CDATA[Cross Platform App Development. ]]></category><category><![CDATA[minecraft]]></category><category><![CDATA[minicraftplus]]></category><dc:creator><![CDATA[Ben Forge]]></dc:creator><pubDate>Sun, 29 Sep 2024 10:36:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1727606159402/701beaa7-7d95-4721-a1b7-aa631184dcc5.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Previously, <a target="_blank" href="https://hashnode.com/post/cm1di1aya005909md9yssesbt">I mentioned that we should not work on mobile support with Java in the current Java project</a>, but lately, there has been a discussion that LWJGL could still work with mobile. Now, I am going to reemphasize that we should not, especially when we do not have much resources and effort.</p>
<blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727560870991/fac9c5c1-ff1c-4b21-ae1c-b47c9127dc72.png" alt class="image--center mx-auto" /></p>
<p><em>Natives options on the customized download page on</em> <a target="_blank" href="http://LWJGL.com"><em>LWJGL.com</em></a></p>
</blockquote>
<p>Well, if you refer to the <a target="_blank" href="https://www.lwjgl.org/">official LWJGL website</a>, it does say it could support "<em>Linux arm64</em>", which Android is based on. However, if you take a look into <a target="_blank" href="https://github.com/LWJGL/lwjgl3/issues/715">this issue</a>, you should be able to understand more: the support for Android is not fully integrated. It clearly shows that it is still not a working direction to support mobile platforms using Java and LWJGL. At the moment, it might not be a good idea to use Vulkan, as the development can be complex and problematic as well. <a target="_blank" href="https://www.reddit.com/r/vulkan/comments/zwqqo2/went_through_most_of_lwjgls_vulkan_book_and_here/?rdt=36867">LWJGL may also not work well on Android.</a> So, OpenGL would still be chosen in this sense while there is no need to use OpenGL ES.</p>
<blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727560854283/8effa6f9-2374-4087-9e35-c526aab50aa9.gif" alt class="image--center mx-auto" /></p>
<p><em>Java bytecode interactions with OS through JVM (</em><a target="_blank" href="https://www.javacoffeebreak.com/articles/inside_java/insidejava-jan99.html"><em>source</em></a><em>)</em></p>
</blockquote>
<p>You may think we can "<em>compile</em>" the code to platforms that do not support JVM by themselves, but I would still not suggest that. Certainly, it is not an optimal solution. JVM, or Java Virtual Machine, is literally a kind of <em>virtual machine</em>, coming with a runtime. Under such runtime, <a target="_blank" href="https://www.developer.com/java/java-virtual-machine/">it executes the Java <em>bytecodes</em> rather than machine codes or other things, and the runtime operates with the OS and other entities</a>. Hence, optimization and functionalities often rely on the runtime, while LWJGL is optimizing based on it. In this sense, compiling to platforms without JVM support is unable to guarantee Java program support (<a target="_blank" href="https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/packaging.html">packaging</a> is different from this), so <a target="_blank" href="https://www.codenameone.com/blog/why-we-dont-support-the-full-java-api.html">when there could be potential incompatibilities and potential stealthy bugs, why should we use this way for production?</a> Thus, it can just be adding vast amounts of work without great benefit blindly.</p>
<p>Then, for the library or framework choice, we would choose LWJGL mainly because Minecraft uses it. What about other libraries? I know there is GLFW, but I prefer not to use it instead of LWJGL since LWJGL already utilizes GLFW for OpenGL support. So, why use a library over a mature library using it? It renders it pointless. Anyway, LWJGL already made bindings to it, and we even make more use of other supported features from LWJGL like bindings, so we can just go with LWJGL. There is no more discussion about other platforms anymore. Thus, the choice is over.</p>
<blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727560834863/80e95f89-159e-4711-9a01-ca818eb81ffc.png" alt class="image--center mx-auto" /></p>
<p><em>JVM Architecture Diagram (</em><a target="_blank" href="https://www.guru99.com/java-virtual-machine-jvm.html"><em>source</em></a><em>)</em></p>
</blockquote>
<p>By the way, even when working on the Java project, we can still build a native library to make use of the language or runtime advantages. Like using Rust for computation-intensive tasks such as physics. As C/C++/Rust is not really object-oriented, the memory management can be optimized quite well without the garbage collection part, causing some potential performance issues. Here, the Java part could be reduced a bit while increasing performance.</p>
<p>In addition, if you say bindings to libraries are just as similar as binding other platform libraries, I would not say it is entirely wrong, but I would choose not to stick with it. It eventually falls to the question of how it is executed in production regardless of libraries. Native libraries are supposed to be supported, but not the JVM. For example, <a target="_blank" href="https://www.reddit.com/r/java/comments/17nlbar/when_is_graalvm_preferred_over_the_jvm/?rdt=64480">there is GraalVM, which can be considered to be used to compile native executables or images, but it is not generally a satisfactory direction for normal software, especially games</a>. It is not always clever to cross-compile anything to anything since not everything is truly compatible with each other, making it even harder to compile code from one architecture to another.</p>
<blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727560810862/68e76177-83e3-4b05-9c67-44486805c8cc.png" alt class="image--center mx-auto" /></p>
<p>Different plans for Minicraft+ Java and Cross-Platform projects</p>
</blockquote>
<p>Moreover, we plan to support both client and server for desktops but no server for other platforms. Indeed, servers are usually hosted on "servers" or computers, though there might be "<a target="_blank" href="https://minecraft.wiki/w/Tutorials/Setting_up_a_LAN_world">LAN servers</a>" locally like in Minecraft. Maybe it is still possible to standardize the protocols between different versions, but they may have minor differences in functionalities. For this Java project, we can then focus on both implementations for better workflows to get it done. Working on supporting other platforms is not what we should be doing now, as that is for much later.</p>
<p>Speaking of differences, there could still be differences between them; one of them is modding. Compared with desktops and JVM, modding in mobiles and consoles is not quite optimistic, except with APIs (like plugins, etc.), like some officially moddable games nowadays. It is also possible to have APIs like in Bedrock, which may not support "<em>modding</em>" (with mod loaders). I may discuss more about the topic of modding Minicraft+ later when it is the time.</p>
<p>Apart from platforms, we are planning to upgrade the Java version of the Java project. It is a big change and a must for our continuous development, though it could be a concern to some users. We will do it soon for our later 2.3 version progress, you may head over <a target="_blank" href="https://github.com/MinicraftPlus/minicraft-plus-revived/issues/696">here</a> for more information.</p>
<p>Currently, this project is still targeting desktops, and bare Java is not quite optimal (without Android API) with mobiles. While there are always ways to do tasks generally in every programming language theoretically, it is more vital to examine how easy/hard and how complex to implement in reality. Working in production does not like plane experimenting, where costs and efficiency are somehow not in high priority. There is no point in going for a tough path when we do not have much effort and a continuous amount of resources, but instead, a way more efficient and optimal (an expected way) method, which could be more productive and realizable.</p>
<hr />
<p>Cover asset credits:</p>
<ul>
<li><p><a target="_blank" href="https://github.com/MinicraftPlus/minicraft-plus-revived">https://github.com/MinicraftPlus/minicraft-plus-revived</a></p>
</li>
<li><p><a target="_blank" href="https://commons.wikimedia.org/wiki/File:LWJGL_logo.svg">https://commons.wikimedia.org/wiki/File:LWJGL_logo.svg</a></p>
</li>
<li><p><a target="_blank" href="https://www.freepik.com/icon/cross-platform_9872430">https://www.freepik.com/icon/cross-platform_9872430</a></p>
</li>
<li><p><a target="_blank" href="https://commons.wikimedia.org/wiki/File:Android_Robot_Head_2023.svg">https://commons.wikimedia.org/wiki/File:Android_Robot_Head_2023.svg</a></p>
</li>
<li><p><a target="_blank" href="https://commons.wikimedia.org/wiki/File:Apple_iPhone.svg">https://commons.wikimedia.org/wiki/File:Apple_iPhone.svg</a></p>
</li>
<li><p><a target="_blank" href="https://en.wikipedia.org/wiki/File:Java_programming_language_logo.svg">https://en.wikipedia.org/wiki/File:Java_programming_language_logo.svg</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[How We Should Do Mobile Port of Minicraft+]]></title><description><![CDATA[If you have noticed about the community, it is not uncommon to see someone asking for a mobile version or port of Minicraft or Minicraft+. There were some Android ports of Minicraft in the past, but nearly nothing more for the mobile ports. Thus, I h...]]></description><link>https://benforge0422.hashnode.dev/how-we-should-do-mobile-port-of-minicraftplus</link><guid isPermaLink="true">https://benforge0422.hashnode.dev/how-we-should-do-mobile-port-of-minicraftplus</guid><category><![CDATA[Minicraft]]></category><category><![CDATA[minicraftplus]]></category><category><![CDATA[Mobile Development]]></category><category><![CDATA[Java]]></category><category><![CDATA[Game Development]]></category><category><![CDATA[minecraft]]></category><dc:creator><![CDATA[Ben Forge]]></dc:creator><pubDate>Sun, 22 Sep 2024 11:32:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1727004424434/074c243e-38cb-402c-8c0e-c6624039238f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you have noticed about the community, it is not uncommon to see someone asking for a mobile version or port of Minicraft or Minicraft+. There were some Android ports of Minicraft in the past, but nearly nothing more for the mobile ports. Thus, I have also talked about this a few times in Discord that we could not do Minicraft+ mobile versions in this way, but there should be another way if it is something to do. Well, it is mostly about platforms.</p>
<p>Let us not talk about whether we should do it on iOS or Android first, which would make the issue more complicated. Taking an existing example of Minecraft, we all know quite a number of functions are unavailable on the Bedrock version or mobile, <a target="_blank" href="https://minecraft.wiki/w/Controls">including debugging (F3 keys) and some hotkeys</a>. When taking advantage of touch screens, the user should be able to interact with the world without being restricted to "fixed buttons" (only controlled by pressing them) to make the best use of equipment. This is, of course, something to consider, but it is not the main thing to talk about, as all the non-trivial features should still be implemented in real case. It is also not user-friendly to just add arrow buttons on the screen (a common way to do) as you can see in a lot of mobile ports but instead make use of and fit the touch screen. Obviously, the current way to handle menus is not touch screen-friendly, wherefore it is something to tackle first.</p>
<p>In addition, there is not only the compatibility of controls, but also issues of the devices. There are explicit differences between mobile devices and computers, notably the storage spaces. It is also why it is really hard to support both mobile and desktop simultaneously for libraries with native libraries as of maintenance complexity. Supporting Android requires its API in addition to JDK, so if there comes a library, it does not need to support Android API completely. We have already decided to go on LWJGL (LWJGL 3 does not support mobiles) on the coming major update, and in this manner it is very difficult to also support mobile. Moreover, it is not something really ideal for the current project structure, saying of project or code organization. Certainly, we must separate native parts and core engine parts, which can be much more complex. Furthermore, we really know we do not have much resources working on this project, whilst it could certainly skyrocket the amount of work. Despite the fact that Android is using Java (JVM actually) for its engine, the API is majorly different from what we do on a desktop. Therefore, we cannot do mobile support in this Java repository.</p>
<p>To not separate the mobile community and not discriminate against particular mobile users, both major platforms should be supported at once in my opinion. As just a general <em>software</em> developer, without a strong opinion about how people should choose platforms, both should be supported when doing software support. It is the case when Java is not the first option for programming personally. Well, there is indeed a game called <a target="_blank" href="https://github.com/Anuken/Mindustry">Mindustry</a> supporting desktops and Android without iOS, but however, it might generally not be a great practice when doing with general wide support. Users choose hardware, then software. When users have their reasons to choose, doing so can reduce the amount of market unless someone does not care a bit. It is not something to "compile" code for another platform that does not at all support Java, since <a target="_blank" href="https://qr.ae/p24KHe">it is not something intended</a>, and <a target="_blank" href="https://stackoverflow.com/a/71611139">how would one benefit from it nowadays?</a> Yes, we can compile the code to support iOS, but it is certainly not the most ideal and compatible way. Quality of life and code is important, as is quality of product compatibility. As, we would not like seeing bugs or, in general, something we do not expect or plan to happen, bugging out users.</p>
<p>As forementioned, we know in this Java repository that we would not support mobiles. Then, how should we do then? When we come to more resources, it can be something to consider, which is starting another project, but in another language. We know Minecraft has <a target="_blank" href="https://minecraft.wiki/w/Bedrock_Edition">Bedrock Edition</a>. Likewise, the project would be able to support more platforms, even desktops, when needed. It is a question whether to separate the protocols and structures for either project, but it is definitely something to consider only when it is the time. In tradition, it would be written in C/C++, but now we have Rust to come over this. Rust can be useful and safe when talking about memory and resource safety, so in general, fewer bugs, especially serious bugs, would be introduced, and which will be the focus. When it is compiled, it can also be used like a native library, and thus it can be ported to various subprojects aiming different platforms for best compatible supports, including native functions. Consequently, it is the core engine written in Rust and subprojects written in their respective best languages. Since Minicraft was already in Java, the "mother" Minicraft+ project should still be in Java, where we can still support mods flexibly and in its own type of economy, like the Minecraft one's. Right now, due to its complexity and our resource limitations, we cannot do it in the near future, but it would be absolutely a better way to do.</p>
<p>At the moment, this is all we should do with mobile porting. When we have the engine written in Rust, consoles that clearly do not support JVM can also be supported. We will not stop others from starting the project themselves, but I would hope it to be maintained. It is really hard to say how long it would take for rewriting it in Rust, but the project structure should still be well-planned, or else it would just be a mess again, like the circumstance before in this Java project. Along the way, I have been working on enhancing and planning the structure of the project and the standardized quality of the code. For a long-living project, continuous maintenance is obviously important, and hence, when you do not have much time and effort, even people and resources, just consider it seriously. We have already swapped the maintainer couples of times and continued expanding the project, and why not?</p>
<hr />
<p>Cover asset credits:</p>
<ul>
<li><p><a target="_blank" href="https://github.com/MinicraftPlus/minicraft-plus-revived">https://github.com/MinicraftPlus/minicraft-plus-revived</a></p>
</li>
<li><p><a target="_blank" href="https://commons.wikimedia.org/wiki/File:Mobile-Smartphone-icon.png">https://commons.wikimedia.org/wiki/File:Mobile-Smartphone-icon.png</a></p>
</li>
<li><p><a target="_blank" href="https://www.trustedreviews.com/reviews/google-pixel-7">https://www.trustedreviews.com/reviews/google-pixel-7</a></p>
</li>
</ul>
]]></content:encoded></item></channel></rss>