I tried making a falling sand game in TGA2D and it did not go as planed but I worked with/around my problems to get a some what ok working game at the end, I hope to improve on this as i have extra free time and make it better, in a better engine.
I attempted to create a game akin to a Falling Sand game utilizing the TGA2D game engine, which can be found in the TGA2D forum. I meticulously arranged a sand world to govern all aspects, implemented a sand manager to oversee the entirety of the sand, and astutely employed IMGUI to gracefully handle all of the user interface components. For the rendering of the sand, I employed a sprite batch rendering technique. Seeking to optimize performance, I employed a Grid system and ingeniously threaded the sand manager to ameliorate its speed. The user interface, situated at the bottom of the screen, elegantly displays various elements. These include the current amount of sand gracing the world, the currently selected sand type, the precise position of the mouse, an assortment of buttons depicting the diverse sand types and their respective hues, a slider to modulate the brush size, and lastly, an innovative button to activate or deactivate the walls' "Collider" to ensure no particle of sand escapes the designated screen. To enable the efficient spawning of sand, I dutifully crafted a brush that caters to various brush sizes. Adding yet another element of marvel, I ingeniously devised an image-to-sand converter. This ingenious feature allows users to import an image into the game window either via a line of code or through a drag-and-drop action. Once the image is assimilated, the converter deftly converts each pixel to the nearest sand type and subsequently spawns it within the sand world. Yet, it must be acknowledged that during the course of my endeavor, a misstep occurred. After the conclusion of the second week, when I encountered difficulties with batch rendering, a more prudent approach would have entailed a reassessment and reconfiguration of my plan. However, beset by strain and duress, I persisted relentlessly in my attempts to overcome the rendering obstacle and consequently squandered valuable time. Reflecting upon this experience, were I afforded the opportunity to embark upon this venture anew, I would, given an abundance of time, construct a rudimentary engine myself or alternatively select a more comprehensively documented engine. The elegant rendering of the sand was executed by employing a miniature 1 by 1 image while simultaneously tracking the mouse's position and adroitly generating the corresponding sand particles.