Posted by on May 21st, 2015

Hey guys. This is Grim from NK here to tell you a little about how the voxel shapes in TUG are represented. This will get a little technical, so bear with me!

Many people try to think about voxels in terms of blocks. Blocks are easy to think about! Blocks can be either solid or air which are stored as 1’s or 0’s in data.

image

In TUG we have smooth voxel contouring that can represent a variety of shapes. Smooth shapes are hard to represent as blocks. Because there is no good way to tell if a block should be smoothed-over or not. We solve this issue by storing our voxel data as a signed distance field. A signed distance field is a grid of numbers that tells us the distance away from the nearest geometrical surface. A positive value means we are outside of the surface, and a negative value means we are inside the surface. Here’s an example in 2D for a circle:

image

Red values are negative (inside) and green values are positive (outside).

Each voxel is assigned a field value based on the distance to the center of the circle.

A signed distance field shape representation is convenient when it comes to adding and subtracting geometry from the world. To add another shape, we just have to take the smallest distance-field value from both shapes.

image

Notice how the field values outside the first circle have been replaced with the smaller field values of the second circle.

Removing geometry is also easy! All we have to do is negate the field values of the circle being removed so the inside (negative) field values become outside (positive) field values, and then take the largest field value. Adding and subtracting any shape is possible as long as a field function for the shape can be defined.

Now you might be wondering how a signed distance field is actually turned into triangles that can be rendered in-game. Remember that a surface sits where the field values change from positive to negative. We start by identifying the edges along voxels where there are sign changes.

image

After we have identified a surface edge, we have to find where the surface actually sits along the edge. Depending on the field values at the two edge end-points, we can place a point along the edge.

image

After these edges and points are identified, we use the surface-edge intersections to come up with a single vertex position for each voxel. We calculate a voxel vertex position by averaging together all of the intersection points.

image

There are more expensive techniques to place interior-voxel points more accurately (like Dual Contouring with QEFs), but we have opted for speed over accuracy.

Now that we have voxel points, we have to figure out how to connect them together into faces. This is done by connecting together points across edges that have sign changes.

image

You can see that the average points connected together do not perfectly represent the circle, but it is pretty close.

 

 

image

 

 

This process extends directly to 3D except that the squares are cubes, and that a cube edge has four voxel neighbors instead of two. Across these edges we connect all 4 voxel neighbor positions together to form two triangles.

image

I hope you have an idea about how geometry in TUG is represented underneath the hood. I hope you’ve enjoyed my overview!

If you have any questions, feel free to send me a message on twitter @NKGrim. 

Don’t forget to check out the latest “In The Works” video on Creative mode rework.

Leave a Comment

Posted by on May 14th, 2015

Hey guys, it’s John (@x_nekochu_x) and I have some game design news!

Today we’re going to take a look at some of the new tables and items that can be crafted.  As the game progresses, the seed will need new workstations to advance his crafts and make better stuff.  With this in mind we have created two new workstations for the seed to build, the artisan workbench and the loom.

image

The artisan workbench is a multi-purpose station that allows the seed to work with leather, jewelry and advanced methods of assembly.  It is one of our first table upgrades. This means that by adding an upgrade to an existing table, you can add more crafting options to that table.  By upgrading the crude workbench, the seed will still be able to craft all of the previous recipes, and it will also open up new recipes specific to the upgraded workbench.

image

The second new workstation is the loom.  The loom is the seed’s first foray into making clothes that are more than just bamboo shafts and leaves!  With the loom, the seed can begin to weave textiles from other materials to create patches that can be used in making clothes and other linen products. We are almost done with the concept and you should see the design next week!

These two new workstations also work together as several of the new crafts are created at one and then assembled at the other.  For example, linen textiles can be created at the loom and then used in assembling an outfit at the artisan workbench with some leather accents.  Likewise leather patches may be refined at the artisan workbench and then weaved into a pattern with other fabrics at the loom.

So let’s take a look at some of the new resources and crafted items we can expect to see with these new tables.

image

Leather patches and linen textiles.  These crucial components are for a lot of new crafts and will be used in clothes, armor pieces and in the future, crafting a saddle for mounts.

Bronze buckles and plates.  These items are crafted using the casting method that we have had at the stone furnace but with the new artisan workbench, they can be assembled with other resources to create new elements.

We are also working on a new set of clothes for the teen seed, complete with a new shirt, breeches, tunic and shoulder pads. @TheCamboRambo will share the 3D models soon as we have them done.

There are so many new recipes to discover and new gameplay systems coming soon! Our mount system is planned but will not be ready for our next update.  We’ll talk more about mounts and how to use your new tack items in a future blog post.  Until then, happy crafting!

Check out our latest “In The Works” video on body morphing.

Leave a Comment

Posted by on May 7th, 2015

Hey, Kingdom!

My name is Artie (@input_output_7) and I am writing this week’s blog. I’ll be providing an inside look behind the game design of transforming your seed’s body! It is currently in the works and is at its basic stage. So, grab yourself a sandwich, some fruit, or whatever pleases your hunger because you might get a little hungry while reading this, or it might influence some physical activity.

This is an early prototype of the system.  We don’t have all the features in for it that will show off body changes in muscle and definition but I think you’ll get the idea of where we’re headed!

In TUG, we want to provide our players visual representations for what type of actions and skills they’ve performed over time. One of these visual cues is your seed’s body type, which is dependent on your eating habits!  We’ll be tracking other items such as physical activities and skill based actions in the future but for this prototype, we’re only worried about your food consumption.

Stat wise, a particular seed’s body type projects its strength, agility, constitution, energy, and movement speed. By allowing the player the ability to adjust their body type via their eating habits, the character can increase/decrease its base health, stamina, energy, and movement speed over the course of gameplay. Be aware there are trade-offs (We’ll talk about those in a future blog).

The way we’re currently calculating the player’s potential of increasing or decreasing its body size is relative to the amount of time there is in a day and if you’ve exceeded the required amount of energy (that is, your energy bar) needed to stay replenished for THAT day. An example would be: if you’ve overeaten, around 3 times more than your max energy in a single day, expect to gain the max amount of points towards your body size. You can see the results in your arms and stomach after waking up from a deep sleep on your comfy crude bed.

It’s worth mentioning that edibles are the only consumables that are taken into account towards affecting your body size. So having a fuel potion each day is like drinking slim fast. You may be gaining your daily energy but you’re definitely not going to gain any weight, just lose it.

Here’s a collection of day-by-day pics I’ve taken of my body transformation:

Day 1
Started off fresh. I’m feeling 100 with a body type in between thin and large.

image

 

Day 2
Ohh man, am I hungry. I didn’t have any time to eat yesterday because I was busy gathering resources for clothing, tools, and weapons! My hips and arms are slightly thinner in size. Forget about that! Do you like my hide vest?

image

 

Day 4
Whoa, did those tools and weapons help! I was able to gather so much fruit and meat that I rewarded myself with large meals. I ate so much I gained the max weight for each day. I couldn’t help it. I was too hungry! What do you think about my hair?

image

 

Day 7
So, for the past 5 days I’ve been bulking up to prepare myself to survive in the freezing polar biome. I’ve also changed my hairdo! I look good, right? It’s pretty darn cold up here in the polar region. I think I’ll head back to the bamboo forest for some sunshine.

image

Day 9
Alright, I’ve reached the max size! My arms are thicker and my stomach is wider. I gotta tone it down a bit.

image

 

Day 18
I needed a new look, and yeap, it’s true what they say about the liquid diet – it works. 10 straight days of not eating a single thing … well I lied, I ate SOME fruit each day, but I was mainly on that fuel potion.

image

If you have questions, drop a comment below or tweet me @input_output_7 and @x_nekochu_x.

– Artie

Leave a Comment

Posted by on April 30th, 2015

Last week’s blog focused on our new skydome, which allows our artists to really push stylization with shape and color exploration. @NKDenthorn did a stellar job programming in the skydome feature because I, @TheCamboRambo, was able to pull off some slick color combinations for the environment and I am no artist. Really… check out my sweet “Seed” concept art if you think I am kidding.

Now that we have this feature, what’s next? More biomes of course! If you have been playing TUG since the old terrain generation tech, you’ll notice that there are a few biomes missing in our current build. The good news is that  @input_output_7 and @x_nekochu_x is working hard to get them all back in. They were temporarily removed because it required some rework for the new terrain generation tech.

Warning! The updated biomes will break game your games saves once we have it in. We tried our best to avoid this but the biome generation code has changed significantly.

With this new update we have reworked our generation system.  While a lot of these biomes will look familiar and others are being brought back from some of our older generations, the big change you will see is biomes of proper size! Gone are the tiny deserts or the smattering of trees from one biome in the middle of the other.  You will see vast plains, large arid sands and polar regions tucked away in the mountains.

This update also gives us much better control over the restrictions of biome regions.  What this means is that we are able to control which biome occurs next to another.  So no more snowy mounds in the middle of a desert!  Unless that’s your thing…

Finally one more little addition that will come out of this update is a one to one for material gathering.  We’re opening up the floodgates and now when you dig a particular rock pattern, you can expect to get resources of that rock to place back into the world.  There will still be cobblestone and other unique patterns but now you’ll be able to build with the cliff rocks and granite that has previously been unavailable in survival mode.

Now feast your eyes on some biomes!

Check out our latest ‘In The Works’ video of the new skydome tech and art revamp tease. The art update is still very early but we are moving towards that direction!

 

Cambo checking out

Leave a Comment

Posted by on April 23rd, 2015

Good afternoon everyone! @Cambo here to give you a quick brief on what’s happening in the studio.

The last patch focused primarily on adding content and on-going tech progress. We added magic spells, critter taming and breeding, and a nifty shield for blocking. However, we had to switch gears these past few weeks to focus on the big tech stuff so don’t expect much content for the next patch. Our artists are still slamming away creating assets but they won’t be in until we have the systems ready.

Oh yea, we had a group of students from RL Turner High School AMAT program visit us this week for a field trip. A few of our team gave them a presentation on the realities of working in a game studio. I wish we had this type of field trip back in my day. Instead, all I got was a trip to the rock museum *no offense to geologist*.

So whats in the haps? The dedicated server is progressing. We are also revamping our creative mode user interface to make it more user friendly with item filters and utilizing CEGUI. We started our modular tool system which will allow you to mix and match resources for crafting tools. There’s been a lot of progress on the terrain tech and hopefully we can bring back the older biomes in the next few iterations.

Today, I have an early look of our revamped SkyBox that @NKDenthorn is working on. It’s something some gamers might not appreciate. Just imagine playing Skyrim with static clouds that never move or change forms. You may as well just run around looking at your feet.

Our current SkyBox is rendering a static cloud image, placed on a moving plane above you. This gives you the illusion that the clouds are moving but the clouds are flat. The moving plane helps with the immersion but will look warped when you look at a distance.  This perspective issue is more noticeable when you are looking into the horizon.

 

 

 

 

Our revamped SkyBox now has generated clouds, a moon, and a sun that revolves around the player on a hemisphere. Possibly even planets too, yea? This will help with your perspective when you are looking into the distance. The best part is that our artists are able to customize pretty much anything in the sky.This will allow them to have creative freedom for the environment and fine tune things on the fly.

Disclaimer: @NKDenthorn wants to let you know he is no artist so forgive him for these poor examples.

@NKDenthorn will write a future tech blog once we get closer to releasing the new SkyBox.

The past few weeks have been extremely busy for me, so I did not have a chance to bring out some new “In The Works” footage for everyone.

Cheers!

Cambo Out~

Leave a Comment

Posted by on April 16th, 2015

It’s been awhile since we’ve done a tech blog, so I decided to write about what you can expect from our Phase 2 Multiplayer: Dedicated Server. I’ll even post some super high-definition renders of the advanced console interface that Josh (@JoshuaBrookover) has been working on!

So what do we mean when we say “Dedicated Server”? We already have the ability to host servers now, right? While we do have the ability to host servers now, the person hosting must be a player in the game and also be running the full version of the game in order to allow players to connect. This makes it very problematic to host a stand-alone server on a computer and just have clients connect at their leisure.

When we say “Dedicated Server” we are referring to the game running in a much reduced form (no graphics, gui, sounds, etc) than needed when actually playing the game as a seed in the world. The dedicated server is a stand-alone application that manages only what is necessary to maintain the state of the game, but does not process any systems that only a player would need. One of the biggest things we gain from this is that it will allow player count on a server to increase! This is the dedicated server:

image

(Figure 1: Server running and ready to be used, work in progress)

The dedicated server does not create a standard window like you’d expect with most of your programs, but runs as a console program. No graphics libraries are loaded or utilized; it doesn’t play any sounds, and there is no server player.

We use a console library called PDCurses to give us a clean-cut interactive console at runtime. It has an input area for the server owner to type commands, as well as some advanced stats across the top so at a glance you see what’s going on with your server. Each statistics box can be changed to show any other stat.

image

(Figure 2: Shows command input and statistic changes, work in progress)

This console will provide a lot of useful information, showing when a player joins/leaves, viewing the in-game chat, and seeing any useful debugging or warning information from the engine or Lua.

Logging is a large part of running your own server that you aren’t always keeping an eye on. Everything from system information to chat messages that pop up in the console will also be logged to a file that is specified by your configuration file. This log can provide very useful information to server owners allowing them to diagnose problems or view player’s chat logs.

So what does the dedicated server give us? With the dedicated server, a player can run a TUG server with their own hardware or service. This also gives hosting companies the ability to host game servers for the public. The dedicated server is completely configurable from a single file that allows whomever is hosting the TUG server to specify information such as number of players, maximum allowed view distance, networking ports and other useful configuration parameters as seen in the image below:

image

(Figure 3: Dedicated Server Configuration File, work in progress)

Our hope is that we can give any server host the ability to run TUG servers, and as we continue to improve on the Eternus Engine and TUG, be able to give them more and more capabilities with their game!

Keep in mind that we are still working on the dedicated server and we may choose to add or change some features that are seen here as we develop further. There is still a lot to do! Feel free to follow me on twitter @camfergusondfw or stop by our forums to ask any questions you may have about the dedicated server!

Thanks,

Ghost

Leave a Comment

« Previous PageNext Page »

Follow Us!

Stay up to date!

To get the latest updates on Nerd Kingdom tech sent right to your e-mail, fill out the form below