Posts Tagged ‘d170’

D170

Let’s Do This:

I’m sitting here in a classroom, nearing the end of high school. I’m without any of my personal computers, and am currently using one that the school provides. We aren’t doing anything in any classes. I inhale, and realize that I have no excuse. It’s been two months. Let’s do this.

 

Let Me Explain:

I’ve been fairly busy recently. I’m currently in the beginning stages of some client work, which is taking up a good bit of time. Add school, which until recently has been a large time sink. More recently I’ve been scrabbling to get everything ready for my freshman year of college. In addition, I’ve been taking steps to get Creo on Greenlight before any radical shifts occur in the indie scene on Steam (more on this quest later). And finally, multiplayer is boring to write about. I’ve spent a lot of time working on the game server, replicating functionality already found within the client. There is, however, a light at the end of the tunnel. Now, let me take you back in time to two months ago.

 

Disclaimer:

Much of the information in the coming few posts could be wrong. I don’t remember entirely what I did in each of these versions as they all kind of blended together. These next devlogs should serve as more of an indicator as to what I have been up to in terms of Creo.

 

How Liquid Works:

Every liquid block checks all of the other blocks of that liquid type which are form a continuous, horizontal line. Then, the “weight” on each of these blocks is calculated (how much liquid is above them). If one of the blocks has less weight above it then the others, some liquid is moved on top of the stack above the liquid block with the least weight. This creates the illusion of pressure. I’ll put the link to a twitter GIF here after I get a chance to edit this post.

Liquid (The Good):

The main benefit of this system is that it works within the current, established CTag system which is ingrained in the server and the client. To review, each block can have one tag, which is a signed, 32 bit integer. For liquids, this is how “full” a block is (out of 16). For saplings, this is how many seconds the sapling has been growing for. This is why liquid blocks cannot be saplings (something that I’m not completely sold on as it restricts the creativity of the user; I might have to change this system up in the future).

 

Liquid (The Bad):

Well the first thing is that it is not exactly beautiful, especially next to this asset which I had originally planned to implement (but failed to as it wouldn’t work server side). Also, there is a lot of room for optimization within the algorithms. I haven’t run into any huge performance issues, however I suspect that things could get pretty crazy if some hooligan decided to make the “stone” material in biomes a liquid. The issue of performance can be sorted out over time, however this is not the end of this systems’ problems.

 

Liquid (The Ugly And The Solution):

It is buggy as hell and only half works. This has led to me disabling the spawning of water once again. I think that most of the bugs can be solved by isolating the liquid and running the pressure function on each liquid system independently. I have already written a script to create a map of all blocks of the same type which are touching each other (for checking the bounds on bushes).