Adventures in AR: Flub'd it
It's time for a (moderately) funny story. When we last met, I had just started messing around with using the Graphics of features such as roads and water as a mask for sprites. This allowed me to add some texture to the features. It also added a whole slew of new problems that needed to be solved.
Not long after my last post, while I was admiring my handiwork, I noticed that some water features looked more than a little messed up. It didn't take long to figure out that the messed up features were the ones that simply drew lines. It probably goes without saying that a line cannot be used a mask in Phaser. Instead, the starting and ending points of the line are connected and filled like a polygon. Unfortunately, this makes for less than ideal looking rivers and creeks. The fix was simple enough though. I just needed to use the same system that is used to generate the roads, which more or less 'extrudes' the points of the line outward to form a polygon. It'd be around this time that the old, "plan everything out" me would have started moving all the generation code into the Feature base class so water features could use the road generation code. But the new Flub me wasn't about to waste his time with sensibility. No sir, new me solved the problem real quick.
I think this is the first bit of code ever posted on the blog. Damn. Alright, so this "solution" is a bit silly, but it did fix the problem. It also introduced some new problems too. Namely, shorelines started looking a bit strange. More importantly, though, as with any bad coding decision, it made me think about what I was doing with my life.
First and foremost, I realized at this point, the feature classes weren't actually doing much. An object was instantiated and a function was called to generate the feature, but then the object was left to be garbage collected. Did we just start getting technical? Uh oh. The bigger, not-so-technical issue was that I was putting all this work into the ability to support textures, but it wasn't making the game look all that much better. Not the least of the problems was that with textures, the map wouldn't match my NPC art, which actually looks decent (at least to me). So I was essentially playing whack-a-mole trying to potentially make the game look better, with no ability to do so when all is said and done.
I'm not one to shy away from a challenge. In fact, I tend to seek them out. I see an obstacle to overcome and I get tunnel vision. And that's not always a strength. More often than not, it has been my weakness when trying to actually finish projects. I get so caught up by perfecting these individual bits that don't actually move the project forward.
That's my long-form way of saying that I am scrapping this texturing endeavor. I'm going to revert back to flat colors and try to pick out a palette that makes it look appealing. Then I'm getting to work on that quest system!
Oh, and this totally counts as solving the grass sprite overlapping issue from last time.
![]() |
| Collin's Creek has seen better days |
Not long after my last post, while I was admiring my handiwork, I noticed that some water features looked more than a little messed up. It didn't take long to figure out that the messed up features were the ones that simply drew lines. It probably goes without saying that a line cannot be used a mask in Phaser. Instead, the starting and ending points of the line are connected and filled like a polygon. Unfortunately, this makes for less than ideal looking rivers and creeks. The fix was simple enough though. I just needed to use the same system that is used to generate the roads, which more or less 'extrudes' the points of the line outward to form a polygon. It'd be around this time that the old, "plan everything out" me would have started moving all the generation code into the Feature base class so water features could use the road generation code. But the new Flub me wasn't about to waste his time with sensibility. No sir, new me solved the problem real quick.
![]() |
| Not even ashamed, it worked |
I think this is the first bit of code ever posted on the blog. Damn. Alright, so this "solution" is a bit silly, but it did fix the problem. It also introduced some new problems too. Namely, shorelines started looking a bit strange. More importantly, though, as with any bad coding decision, it made me think about what I was doing with my life.
First and foremost, I realized at this point, the feature classes weren't actually doing much. An object was instantiated and a function was called to generate the feature, but then the object was left to be garbage collected. Did we just start getting technical? Uh oh. The bigger, not-so-technical issue was that I was putting all this work into the ability to support textures, but it wasn't making the game look all that much better. Not the least of the problems was that with textures, the map wouldn't match my NPC art, which actually looks decent (at least to me). So I was essentially playing whack-a-mole trying to potentially make the game look better, with no ability to do so when all is said and done.
I'm not one to shy away from a challenge. In fact, I tend to seek them out. I see an obstacle to overcome and I get tunnel vision. And that's not always a strength. More often than not, it has been my weakness when trying to actually finish projects. I get so caught up by perfecting these individual bits that don't actually move the project forward.
That's my long-form way of saying that I am scrapping this texturing endeavor. I'm going to revert back to flat colors and try to pick out a palette that makes it look appealing. Then I'm getting to work on that quest system!
Oh, and this totally counts as solving the grass sprite overlapping issue from last time.

