Hello everyone! I’m mashpoe, and this is the first 4D Miner devlog update. The first thing you’ll probably notice about the new update is the lighting. Here’s a side-by-side comparison between the lighting in the latest version of the game, and what I showed off in my first video about 4D Miner! Lighting isn’t the only big change, but it’s the first thing I worked on for this update. If you become a 4D HyperSupporter on my Patreon, you’ll actually be able to vote on certain aspects of the game. A while ago, I created an exclusive poll for my wonderful patrons, And they voted on which feature I would add to the game first! Improved lighting was the most popular choice with 96 votes, followed by the addition of a new passive creature with 66 votes, and controller support with only 7 votes. I will still be adding new creatures and controller support to 4D Miner in the future, but the patrons decided that the game’s lighting was a higher priority for now. Now I’ll explain how the new lighting system actually works, and how it directly affects gameplay beyond making the world look nicer. Lighting calculations require a lot of processing power. Computers can process 2D lighting with relative ease, but 3D lighting is much more complicated, and requires a lot more processing power as a result. This forces game developers to work very hard at optimizing their lighting systems so their games can maintain stable frame rates. 4D lighting requires even more processing power, which means that even a basic lighting system for 4D Miner would be very slow and require a ton of optimizations for the game to still be playable. I chose to improve lighting in 4D Miner with a technique called “Ambient Occlusion,” or “AO” for short. Ambient Occlusion is one of Minecraft’s primary lighting techniques, but this wasn’t always the case. In early versions of Minecraft, the lighting was a lot more rough and unnatural looking. In october of 2010, a mod called “Ambient Occlusion” was released, and as the name implies, it introduced ambient occlusion to Minecraft. The mod was later renamed to “BetterLight,” and additional smoothing techniques were included. Ambient occlusion changes the lighting of different points based on their surroundings. Basically, the more “stuff” there is near a point, the less that point will be exposed to ambient lighting, and the darker that point will appear as a result. Ambient occlusion was fully added to Minecraft on february, 2011, in the 1.3 beta update. The creator of the BetterLight mod actually helped Mojang with the lighting in this update! Using a similar technique, I was able to add 4D ambient occlusion to 4D Miner. 4D Miner’s ambient occlusion causes blocks to cast a “shadow” Of sorts. Possibly the coolest thing about this is that you can see the shadows of blocks from outside of your current slice of the world! This means you can actually use the lighting system to your advantage and find nearby resources! In this clip, you can see the shadow of a tree trunk, But you can’t see the actual tree trunk because it’s not in the player’s slice of the world! When the player’s view is rotated in 4D, the tree trunk becomes visible! Ambient occlusion is considered to be a “fast” lighting technique, but I’ll explain why it’s still much slower in 4D. Before I get into any technical details, I want to briefly let everyone know how you can access these new features right now! Like I said earlier, lighting isn’t the only new thing in this update. There are actually two other major features that I added, and I will show them off later In the video! You can access these new features right now by joining my Patreon! All of my 4D HyperSupporters get to play the newest updates much earlier than everyone else, and by supporting me on Patreon, you will be helping me to continue the development of this Game. You will also get to provide early feedback, and your voice will be heard the loudest! Alright, now I’ll explain some of my struggles with implementing this new lighting system. In a 3D block game like Minecraft, each block has 6 faces. On each face, there are 4 vertices, And for each vertex, the lighting is determined by checking 3 neighboring blocks. That means for every block face, 12 checks are performed for neighboring blocks, and since a block can have up to 6 visible faces, there can be up to 72 of these checks per block. Computers are pretty fast, so doing that many checks per block isn’t too big of an issue. Things get a bit more complicated when you’re dealing with 4D blocks, which need 7 neighbor checks per vertex. Each 4D block face has 8 vertices, which means there are 56 checks per block face, and since 4D blocks can have up to 8 visible faces, there can be up to 448 neighbor checks per 4D block. Remember, there can only be up to 72 neighbor checks for a 3D block, which is a lot less than the 448 checks that a 4D block can have. You also have to take into account that each chunk in a 4D world has a lot more blocks to begin with, and whatever the player can see at any given moment is only a tiny slice of the visible chunks. All of this means that it takes a ton of processing power to generate lighting for a single chunk, and in order to make this run somewhat smoothly, I needed to do a ton of optimizing. I don’t have enough time to explain these optimizations in too much detail, But the gist of it is that I had to completely rearrange the way chunks are stored in memory, and I had to come up with a way for each chunk to cache information from neighboring chunks. This allowed for the mesh and lighting generation to be seamless without being too slow. There were a lot of other huge changes behind the scenes, and I would like to explain everything in more detail, but I need to show off the other two big features in this update! The second thing I added to 4D Miner in this update Is something many people will find more exciting than the new lighting! 4D Miner now has world seeds! Before this update, each world was identical, but now worlds generate with randomized seeds, and you can enter your own seeds which will generate the same world every time you use them. Seeds are very important for these types of sandbox games. Now every world you create will be unique! The final feature I want to talk about is the new world type. You can now create flat worlds, Which is very useful for building. 4D terrain can be difficult to work with, and if you want to be able to make structures on perfectly level ground, you can now do so by creating a flat world! Sadly, there isn’t a creative mode in the game yet, so you can’t get resources to build In your flat worlds without copying a save file from a different world. Luckily, this process is pretty straightforward. All you have to do is copy the “players.json” file from a world where you have building materials in your inventory, and use it to replace the “players.json” file in your flat world. In the future, I will probably add a bonus chest to flat worlds so players can have access to building materials. Now I want to highlight some new bugs that I haven’t been able to fix yet. The worst bug is actually caused by the game’s credits. I added the names of all of my Patreon supporters to the game’s credits, but for some reason, a bunch of textures can get overwritten by the patron’s names. This can be very amusing, but it makes the game unplayable. As long as you don’t open up the credits, this won’t be an issue. If you do open the credits, you can fix everything by restarting the game. The most annoying bug is that the clouds are no longer visible. I’m not sure why, but it probably has something to do with the fact that I had to rewrite a ton of the graphics code. Hopefully I will be able to fix this soon! Now I want to thank all of my Patrons! Without all of you, I wouldn’t be able to keep working on 4D Miner, so thank you all for believing in this project and providing support for its continued development! I have some cool stuff planned for the next update! Since so many of my patrons wanted me to add a passive mob to the game, that’s what I will be working on next. I will also be working on a video focusing around content from the 4D Miner community. I don’t know when I’ll be able to release it, but it will probably be my very next video! Thanks again to all of the patrons, and everyone else who helped out with the game and its community! I hope you all enjoy this new update! One thing I realized when optimizing the new lighting is that 4D chunks have a ton of surface area, and there are almost as many blocks bordering each chunk as there are blocks inside of each chunk. When lighting is being calculated for any given chunk, it’s much slower to check blocks from Neighboring chunks, and this was one of the biggest things slowing the game down. My solution was to store a copy of each chunk’s neighboring blocks alongside the If you want to be able to participate in future development polls, please consider supporting my patreon! If you become a 4D HyperSupporter, Not only will you get to vote in future polls, but you will also have exclusive access to the latest updates to 4D Miner before anyone else, which means you will get to experience the newest features and you will be able to provide early feedback! Video Information
This video, titled ‘4D Miner Devlog #1: New Lighting and World Generation!’, was uploaded by Mashpoe on 2022-06-15 14:00:42. It has garnered 92722 views and 8535 likes. The duration of the video is 00:09:19 or 559 seconds.
Access the latest features by becoming a 4D HyperSupporter on Patreon! https://www.patreon.com/Mashpoe
Official 4D Miner Discord: https://discord.gg/pMtZa6AVy2 Subreddit: https://reddit.com/r/4D_MinerOfficial Wiki: https://4d-miner.fandom.com Twitter: https://twitter.com/Mashpoe
Play the Demo: https://store.steampowered.com/app/1941640/4D_Miner/
Music in this video: Roving – Detritus Rich in the 80s – DivKid Digifunk – DivKid Cavemen of the Future – Joel Cummins, Andy Farag