Experimental Tileset, Lights, Ship Data

Hey Folks! I managed to get a new tileset done in order to experiment more with lighting and layouts. This one uses 10x10 tiles instead of the last one's 32x32. Also, this one has a single, dedicated material type per tile, while the last one was "straddling" 2 or 3 materials per tile.

The result? A mixed outcome. See for yourself:

IMAGE(http://bluebottlegames.com/img/screenshots/screenshot-2015-10-28.jpg) All aboard the SS Dark Blocks!

First, the good. Lighting behaves better now. You can see several places where walls have light differences on one side vs. the other. This can be different-colored lights, or light/shadow differences. So score one improvement.

Also, the smaller 10x10 grid size means the lightmaps look a bit better. Shadows cast around corners and other obstacles are more discernable, and look a bit better as a result. The old 32-pixel tiles were so large that one rarely saw these shadow "rays" on the map. Score two.

Finally, the map itself can support more detail per human-sized area. The walls can be thinner, and the room/exterior shapes more detailed. One can get closer to the desired aesthetic they seek using smaller tiles. (I.e. better layout resolution)

Now for the bad.

The small tiles look positively boring compared to the 32-pixel ones:

IMAGE(http://bluebottlegames.com/img/screenshots/screenshot-2015-10-26b.jpg) Bigger tiles have more detail and less repetition.

Smaller tiles have less room for detail, so they have less going on per-tile. And what's more, their small size means they repeat more to cover the same area as a larger tile. Lose one mark for repetition.

Smaller tiles also have the issues with pathfinding/walking overlapping with larger human sprites. It's fixable, but it's more work to setup. (E.g. adding special non-walkable floor tiles to "pad" between wall and floor). Lose another mark.

Finally, the increased tile count means the engine has to work harder when calculating lighting, pathfinding, and other per-tile algorithms. This can be mitigated by limiting the frequency of said calcs, but it's already an issue with as few as a dozen lights in the scene.

Now, to be fair, these pluses and minuses are not all equal. Performance isn't a huge concern in a game like this, where I can probably only calculate lighting or pathfinding when something major changes.

Also, it isn't exactly fair for me to compare the snazzy 3-part (outer cladding/structure/and inner wall), 32-pixel tiles against 10-pixel tiles with only the cladding and interior walls. The smaller tiles could have more variants to break up the patterns. I could add a set of structural tiles to sandwich in between cladding and interior walls, etc. I could even add a few multi-tile pieces (e.g. a sloped corner that spans 2-3 grid squares) to spruce things up.

However, I'm also having doubts now that I see the lighting in action. For example, certain inner corner tiles are completely black due to being surrounded, despite lights being near. And the harsh transition looks bad. (See the top of the ship, where the outer white and inner blue light hit the jagged slope.)

And while watching Mal walk around the ship with his line of sight sweeping rooms is cool, I'm not sure it'll be fun. Nor may it be sensible if I decide all crew LOS can be seen at once.

Food for thought, this is. Though, this is exactly why prototyping is good!

Oh, and in other news, this switch to 10x10 grid exposed some tilemapping bugs that I fixed today. And also prompted me to write code to save and load the working ship layout to a file between sessions. So not a total loss by a long shot!

Anyway, I'll let this steep in my brain overnight. Tomorrow, maybe I'll try adding a few more tile types to spice things up. See if it resolves any doubts. Or maybe it's time to switch back to crew sim for a bit, and make more "game" to play. We'll see!


matsy's picture

You're definitely right on the less room for detail front, but like you've said you could create a few variations of each tile which could be assigned when placed randomly to mix it up a bit. Or going further applying your bigger texture set after a room has been completed, I guess kind of like a 'paint' feature following the pattern but bit of an overhead!

10x10 seems to be a random choice if the player is still 32x32. Wouldn't 16x16 be easier to scale up and down with? I would imagine a wall to be half the size of the character to be kind of acceptable.

Also to thinking further afield, do plan to use the same system to draw planet side buildings (if you plan to).

dcfedor's picture

Yeah, I was thinking later on that I might be able to use items to handle more macroscopic features. E.g. a sloped cowl that only fits on the outside corners of the ship, larger floor tiles or luxury wall panels, etc.

But then it occurred to me that the lighting system would sort of break if I did that. Currently, items have only one value for brightness/color-tint assigned to the whole item. If it sat on both light and dark tiles, it'd look out of place. (Well, in theory. Maybe it'd look passable.)

As for the 10x10 vs. 16x16, you're right that it was fairly arbitrary. My original tile grid was 10x10, and I had a lot of template stuff still lying around, so I just reused that. Ideally, it'd be a power of 2 like 8 or 16. (Probably 8, since back-to-back 16-pixel walls would make interior walls a minimum of 32 pixels thick.)

Regarding buildings and other structures, they're something I'd like to include. And I suspect that they'd use the same systems for convenience/maintainability. As with everything else, though, we'll have to see how it pans out.

Docking a ship with a structure promises to be a tricky issue, since orientations can vary, and Flixel doesn't like rotating tilemaps. I was able to hack around it using rotated cameras for the planetfall mode, but performance may be an issue. But whatever I do for ships, I should bear structures in mind so I don't paint myself into corners unnecessarily.

Dan Fedor - Founder, Blue Bottle Games

Rusguy's picture

Wow! Looks cool! :D Want to see small three? Okay! Here it is - з!