SteamShards

  • About
  • Gameplay
  • Images
  • Purchase

Tag Archives: subvoxels

Perfect Lighting?

Posted on June 26, 2015 by PixelWight

Sometimes, as developers, we let crash bugs live. They’re not worth the time to figure out. Most games (and other apps!) ship with tons of bugs. And glitches — things that don’t look right but generally don’t corrupt your data — those might be all over the place. Or they might not. Me, I’m not too happy about that. I really don’t want to have crash bugs hanging about. I’d rather get code working great first, then move on to the next feature. This is why some game and tech companies say “it’ll be done when it’s done.” It’s hard to put a date on when a conscientious developer will be happy with the stability of code — and this attitude is also at the heart of agile development.

Three light glitches (one fixed)

Three light glitches (one fixed)

I’ve got a glitch in my lighting algorithm. I’ve got several, actually. Here, take a look.

One of this glitches is fixed now…. so, uh, it’s a screenshot of two lighting glitches plus a bunch of stuff that works correctly. The heart-shaped area labelled B is a junction between four voxels: one outside corner, two inside corners, and then the full voxel (at the top). It used to look like the inset: the black triangular piece looks completely out of place! The problem was the wrong lighting levels set on that triangle, and the fixed involved going back into this code, cleaning it up, and identifying the bug — which was several things, and I won’t get into them here.

Most pro shops use a bug-tracking system; some track severity (crashes always vs sometimes glitches) and others track priority (FIX IT NOW vs meh ignore it). Some track both. For now, I’m just looking at severity. So there’s three types of coding bugs: crashes, glitches, and then everything in the middle (“bugs”).

My first preference is to make sure that the standard user experience is crash-free, bug-free, and glitch-free. But software development isn’t free or instant; and that’s why sometimes we let crash bugs live. If the bug is really obscure, isn’t in the main line of use, and sometimes just if it’s really hard to fix — those crash bugs stay in the code. As a coder, I’m not really happy with that. But as a business owner, it’s sometimes something you gotta live with. Ship a product with some truly obscure bugs? Or don’t ship a product? Eventually, we gotta eat. Smart project managers plan for the extra schedule time needed, and are also willing to change schedules if it means getting a better product.

Today, I’m at the glitch stage with what I have in the “production” build of the project. I want to make sure everything in there works and works well. I think this is especially important for visual bugs in a game, where many people will decide to buy a game or not depending on how it looks rather than how it plays. As a programmer this is sometimes grating (because making stuff pretty is often far easier than making stuff functional) but I definitely understand it as a player.

There are 39 different voxel shapes in SteamShards, and each one can be rotated in 24 different ways. They all have to look correct, be textured correctly, and be lit correctly. For the most part I don’t commit code until it works, but in this case there’s just too many combinations to exhaustively test. I’ve got unit tests that run through some parts of the computations, but (including occlusion) there’s like 27 thousand different cases that I’d need to look at — and some of those are actually judgement calls and not simple factual yes/no tests.

So that’s what I’m donig right now. De-glitching the code. I’d love to show off more subvoxel terrain, but I want to get it looking great first.

Oh, the other two glitches? Area A is a glitch caused where two cell boundaries abut. This is every 16 voxels. The result is an extra-bright voxel edge here & there. Area C is a side-effect of using subvoxels with a lighting system that’s voxel-based. I think the “correct” solution for C is to do occlusion sampling [no, that’s not a phrase that anyone else uses], and that’s a week-long task. I’m currently planning to work on that sometime in late July.

Posted in Uncategorized | Tags: lighting, subvoxels | Leave a comment |

Placement Preview

Posted on June 9, 2015 by PixelWight
ui_place_preview

UI Preview of an Outside Ramp Corner, before being placed

Placement preview is now working for all 38 shapes and 24 rotations! There’s a sample over there at the right.

So, yeah, like any sandboxy voxel world game, you can place voxels in the world. In the case of SteamShards, voxels aren’t just cubes, however; there’s 38 different shapes. Cubes, half-cube wedges, this angular shape you see in the screenshot — and 35 more. Each shape can be rotated in 24 different ways. This shape you see see, outlined in yellow, is called an “outside ramp corner”. Ramp corners let you join two ramps together smoothly.

Shapes like this can be rotated lots of ways. In this case, this corner has a clear bottom, which takes up a whole voxel face. The shape could be rotated so that the “bottom” face is actually any one of the six sides of a voxel. In the second image, you can see a brick post with 5 stone spikes at the top. Each of those spikes is the same “shape”, just rotated in different directions.

Stone spikes rotated to five different facings

Stone spikes rotated to five different facings

The engine treats these shapes as if they’re part of the terrain. They’re not “objects”. They can be placed and removed just like any other part of the terrain, and otherwise they just sit there, not consuming any processing power.

Creating detailed and cool-looking structures should be a lot easier with these new tools, although there will also be pre-built structures — as well as terrain, trees, and whatnot — built by game designers and the engine itself. I’m looking forward to seeing what players create using these tools!

Posted in Uncategorized | Tags: subvoxels, UI | Leave a comment |

Subvoxels, aka Partial Voxels

Posted on June 3, 2015 by PixelWight
20 of the different subvoxel shapes supported

20 of the different subvoxel shapes supported

I’m still working on fixing lighting for all of the subvoxel types. There’s 383 different types supported, and although we’ve got good code for reducing the amount of duplicate coding needs to support all of the combinations it’s still a lot of work. There’s still five more “categories” to go, which I think will take me a couple days.

Once the lighting is fixed, I’m going to upgrade the placement and mining tools to support these varied shapes. This should dramatically improve the appearance of buildings and landscape both, although modifying the terrain generators is gonna be a long task. It’s kinda annoying right now because I’d love to play around with these shapes, building towers and buildings both to see what neat things I can put together. That’ll have to wait a few days, however.

Writing the lighting & geometry generation code is very intensive. The math isn’t bad, but it’s very … 3D. Mental. Mind-warping. And of course when it doesn’t work it makes me feel insane! Yet the longer I work on it, the more it makes sense. My brain is learning to handle it better.

In other news, we’ve picked up another programmer, part-time, who will initially be working on the user interface. He’s a Unity guru and a great programmer, so I’m looking forward to showing you guys the great stuff he’s putting together. We’re still looking for an artist, too, although we’re also trending towards a more stylized, blocky texture look that we think fits the voxel-sandbox nature of the game.

Posted in Uncategorized | Tags: subvoxels | Leave a comment |

Recent Posts

  • Current Plans for SteamShards
  • Perfect Lighting?
  • Reworking Placement UI
  • Placement Preview
  • Subvoxels, aka Partial Voxels

Categories

  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Pages

  • About
  • Gameplay
  • Images
  • Purchase

Archives

  • July 2015
  • June 2015
  • May 2015

Categories

  • Uncategorized (6)

WordPress

  • Log in
  • WordPress

CyberChimps WordPress Themes

© A WordPress Site