Hello everyone! After several days of working on the base scripts for this task, today I finally was able to implement them into the chunk loading system. These scripts took quite a while to figure out, and I didn't post anything about them because I didn't deem them worthy enough for a dedicated post, hence why there were no posts in the last few days. If you want daily Crevis updates, make sure to follow me on Twitter.
In the gif, you can see that chunks are created, saved, and unloaded when the player leaves them. When the player re-enters those chunks, they are the same. Chunks in Crevis are stored in .grid files, which store block data for a specific chunk. I plan to utilize .grid files for randomly generated structures as well. I still need to figure out how to save instances within the world, and I think I have some ideas.
Until next time!
0 Comments
Hello everyone!
My friends, family and I have recently built a new computer, and during the past few days I have been getting settled with the new setup - installing all of my software, transferring files, and configuring various utilities. Development will proceed tomorrow. Until next time! Hello everybody! I have successfully finished the base terrain generation. Have a look! With the help of forum user NicoFIDI, we managed to get quadratic interpolation working! However, I have switched to cosine interpolation because it is a bit smoother. The procedural generation follows the steps I outlined in the previous post: points are generated, connected, and filled. I am now working on chunks and making sure that the generation smoothly transitions from chunk to chunk. I'm very happy with the result - everything can be customized, from the peak of the mountains to the rigidness of the terrain.
Until next time! Hello everyone! Instead of boring myself with the save and load chunk functions, I focused on procedural generation! A seed is selected in the beginning of the game, and it can be used to reproduce generation. Let's talk about how I plan for the generation to work, and what I have completed so far. The generation will be done by creating a set of random points within the chunk (figure 1). These points will then be connected by a formula (figure 2). I am currently using the line formula to interpolate the points, but in the future ease curve functions will be used (figure 3). As you can see in figure 1, 5 points have been generated. The first point generates roughly around sea level, while the other points rise above it. This can be set within the biome properties. The next few pics will show how these points can transform into beautiful procedural terrain. Lastly, here's are the ease curves I was talking about (smoother interpolation between the initial random points). This all may seem well and done when I write it and all, and I know that actions speak louder than words and that I tend to speak a lot about what I have planned. Here's a screenshot of it in action... the only thing I have done right now is the random point generation (still getting familiar with manipulating the grid). Until next time!
Hello everybody! It feels great to be back into a consistent development schedule after so long. Let's take a look at the schedule and see where we're at. When I paused development, we were around a month ahead of the development schedule. Sadly, we are now two months behind schedule, which puts the first release in December 2017. Now, many of the development 'phases' can be completed faster than what I had marked down, and hopefully the release can happen a bit earlier. Now that I'm back, let's look at where we left off: the world/chunk system. "we're two months behind schedule." The issues with the last version of Crevis mainly comprised of performance and lack of control over the world generation. There was no method of saving chunks or unloading a chunk, and therefore when a new chunk was created fps would tank. This quite literally broke the game along with the abysmal inventory system. On top of the fact that chunks could not be unloaded, instances were used as blocks. For those that don't know, instances are essentially interactive objects. Most of the blocks in Crevis are static images, making the use of instances quite redundant. The new chunk system boasts the use of tiles, which run much faster than instances. The new chunk system will also allow for complete control of saving and loading chunks, and much more power over how chunks are generated and how biomes are handled. "The new chunk system boasts the use of tiles, which run much faster than instances." In the old chunk system, biomes would be confined to a certain chunk. At the start of every chunk, there would be a rigid switch to the next biome, and it felt very unnatural. Now, biomes are confined within a randomly generated length. Generation can also be reproduced with a seed. Today, I created a single chunk with all of its block data stored to a grid. It randomly selects 0 or 1 for each cell of the grid (0 being no block and 1 being a block). Blocks are represented by green squares. In the gif, the script is ran every step of the game, generating a new set of blocks every tick. Block data can easily be saved and loaded. In the future, instead of just 1 representing a block, IDs of blocks can be used to draw the sprite of the block. All I have to do now is figure out how to load specific chunks when the player moves into them. I hope you enjoyed this fairly lengthy post.
Until next time! |
TaskFebruary's task is to improve the combat system and create a system for enemies and their AI.
AuthorThe author of the blog is Niften, or Sour Apple. He posts weekly, usually on the weekends on Saturday. CategoriesArchives
February 2019
|