Powered by Create your own unique website with customizable templates.
CREVIS
  • Home
  • Devblog
  • Apply
  • About
  • Download
NIFTEN'S

Developer Blog

Saving, Loading, and Creating Chunks

7/21/2017

0 Comments

 
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.
Picture
At first, I wasn't sure how I was going to approach loading and unloading chunks. After thinking about it throughout the past few days, I came up with each chunk having its own object. Essentially, a chunk object is created when a specific chunk needs to be loaded. After the object is created, the chunk grid is loaded onto the object. To unload the chunk, the object is simply destroyed. This instance-based approach to the chunks gives a massive edge performance-wise and makes the entire chunk-loading/saving process modular and easy to work with. While the system still needs further optimizations, it is certainly coming along quite nicely. Now, I just need to figure out how to have consistent interpolation in the chunk generation across separate chunks. Here's a gif of the chunk system in action.
Picture
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

Getting Settled

7/16/2017

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!
0 Comments

Base Terrain Generation

7/13/2017

0 Comments

 
Hello everybody!

I have successfully finished the base terrain generation. Have a look!
Picture
Picture
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!
0 Comments

Random Generation

7/11/2017

0 Comments

 
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).

​
Picture
fig 1.
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.
Picture
Picture
Picture
Lastly, here's are the ease curves I was talking about (smoother interpolation between the initial random points).
Picture
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).
Picture
Until next time!
0 Comments

Back to daily blogs! + New Chunk System Progress

7/10/2017

0 Comments

 
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.
Picture
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!
0 Comments
Forward>>

    Task

    February's task is to improve the combat system and create a system for enemies and their AI.

    Author

    The author of the blog is Niften, or Sour Apple. He posts weekly, usually on the weekends on Saturday.

    Categories

    All
    Crevis
    Life
    Nesus
    Website

    Archives

    February 2019
    October 2018
    December 2017
    October 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016

Powered by Create your own unique website with customizable templates.
  • Home
  • Devblog
  • Apply
  • About
  • Download