Today, I tweaked many of the biomes. I made most of their elevations in the world consistent so that biomes like deserts don't tower over mountains. I also made empty oceans to be later filled with water. I also finished the mangrove biome and made a few more items to be accommodated within various biomes (mud, etc.).
I have also been working on moving away from alarms, because there are several limitations. For those of you that don't know what alarms are, alarms are GameMaker's way of timing things. You can initiate an alarm and give it a value, and it will count down from that value in milliseconds and execute a script. In my case, it executes breaking blocks.
Alarms require a minimum of six milliseconds to be initiated, which makes it impossible for me to create pickaxes that break blocks quickly. As a solution, I'm making my own timing system, which consists of a variable that counts down - more on this tomorrow.
Until next time!
Today was a fairly productive day. I tackled trees, scriptable items, and a few inventory bugs.
I pretty much did trees the same way as vegetation - create them as tiles and give them special properties to have the player ignore them when checking for collisions.
I also created scriptable items! This means that when consuming an item I can run a script - eating, drinking, potions and various effects are now possible. I created a test item 'Nifedipin' that allows me to noclip in the world. This is pretty useful when taking screenshots and generally flying around. Back on track: I created scriptable item functionality without adding any more variables to the long list of existing variables for the items.
TL;DR - There are a ton of variables in the item array and I decided to reuse them.
Notice the variables block_tile, block_obj, and block_hard. These are all variables that aren't being used because the it's an item that can't be placed. Because they aren't being used, I can use them for the scriptable items.
Block_tile tells the engine that it's a scriptable item, and from that point the game recognizes that there's a script in the block_obj variable and a parameter in the block_hard variable. Then I simply plug these variables into something like this:
Until next time!
Today was extremely productive. I created the biome system... and it's much closer to being done than you'd think. When starting the biome system, I wanted them to be chosen based on temperature, so that deserts don't spawn next to tundras. As of right now, there are 19 different biomes, and they are ordered by their temperature.
As I said, these are a few basic biomes and there will be many to come.
You might've also noticed that there's vegetation! There was no system in place to deal with vegetation/decorative tiles, so I added different plants the same way that I added in blocks, and I modified their collisions to act as plants. I also added capability for multiple textures for blocks, but I'm not sure if the method I'm using is very efficient - so we'll just have to see how it works out.
Furthermore, I removed the chunk border lines and made it so that 5 chunks are always loaded around the player to make the experience more seamless. However, this took a huge toll on the fps, dropping it from a consistent 300 fps to 200 fps. I (obviously) still need to work on optimizing the game. Tomorrow, I'm going to work on adding trees and possibly caves.
Until next time!
Today was full of advancements within the engine. In the morning I decided to tackle fall damage, which of course led to some kind of health system. When working on fall damage, I also took it upon myself to improve the player physics, as I was a bit bothered while testing fall damage - I jumped off a tall pole of dirt and fell to the ground with no sort of acceleration. So, I decided to incorporate acceleration and terminal velocity (which is set at about ~70 blocks per second). I then incorporated the improved falling physics into the fall damage system, making it so that velocity affects damage. This makes it possible to add gliders with no damage at all, or dropping a measly two blocks to be instantly killed. (Completely unrelated, but I also added a small tag by the hotbar that shows which item you have selected in the color of its rarity).
However, after testing for a prolonged period of time, I found myself with negative health in many situations, which brought me to create a death screen. The death screen chooses from a number of different messages and displays them. I also created a player state machine so that I can set the player to be in different states - different states execute different scripts. Right now, the only two states are playerDead and playerActive.
Aside from all of that, I also managed to align chunks correctly, regardless of the generation settings. This is a big step for biomes, as it allows me to generate chunks with radically different settings and still have them be in line with each other.
Until next time, folks!
A ton of stuff was accomplished today. My goal today was to merge the inventory and the chunk systems and make them work flawlessly together. I'm happy to say that that plus a few more things were accomplished.
For some reason, when I opened the inventory project for the first time in several months, it was a bit bugged - some of the scripts were messed up. I'm not entirely sure how, but I fixed them. After not working on the inventory system for so long, I forgot how many of the components of the system worked, so I had to refresh my memory by looking at all of the scripts. Once the scripts were fixed I optimized the inventory system by stopping it from loading the inventory files every tick (which is very heavy on the performance). I still think that it can be optimized further, but it's fine for now.
After the optimizations, I imported all of the chunk scripts/objects into the inventory project. For any long-time readers, you may recall that in March I created an object-based block system. So, when I imported the chunk system, I had to program the inventory system to be able to handle the tile-based block system. It all works flawlessly now, with tiles having the same capabilities as the object-based blocks. The only object-blocks that cannot be converted to tiles are interfaces: chests, furnaces, etc. I still need to work on being able to save those.
I also noticed that checking for collisions with tiles can be very resource intensive, so I created a few scripts that can check collisions way faster but at the cost of accuracy. For example, items and the like don't need extremely precise collisions, so they can utilize the fast collision scripts. However, objects like the player need very precise collisions to move properly.
In addition to the merge, I also added rarity tiers for items. You can see the rarity of an item by hovering over it in the inventory. Check it out!
July Monthly Recap
February's task is to improve the combat system and create a system for enemies and their AI.
The author of the blog is Niften, or Sour Apple. He posts weekly, usually on the weekends on Saturday.