FREE US SHIPPING ON ORDERS $175+

Translation missing: en.general.language.dropdown_label

Translation missing: en.general.currency.dropdown_label

0 Cart
Added to Cart
    You have items in your cart
    You have 1 item in your cart
      Total

      Game Development

      Let's get Pixel Washing! 🫧

      Let's get Pixel Washing! 🫧

      Hold onto your squeegees - we're diving into another sparkling Pixel Spotlight interview! This time, we're scrubbing up next to Matt Hackett, the pixel-polishing powerhouse behind "Pixel Washer" and author of the squeaky-clean guide "How to Make a Video Game All By Yourself"! So, grab your digital sponge and get ready to suds up some juicy development secrets!

      How was this game born?

      The idea for Pixel Washer arrived in the shower. That’s when some of the best ideas happen, so I keep around water-proof notebooks.

      I’ve been stockpiling pixel art for years, so a project like this was inevitable. There are amazing artists like Gutty Kreum, LimeZu, and Kenney who have created volumes of pixel art for game devs like me to use in their games.

      Sometimes I’ll just gaze lovingly at these sprites piling up in my folders. It’s really amazing pixel art, and incredibly thorough! There are campgrounds, airports, boxing gyms, hospitals, construction sites, parks, cities, and the list goes on. They’re soooooooo pretty and I’ve been looking for excuses to use as many of these assets as possible. Pixel Washer turned out to be the perfect home for all of this pixel art.

      What was development like?

      Development has been really fun! I’m “getting back to my roots” by going from Unity to my own entity/component system (ECS) engine, handwritten in JavaScript. It’s a somewhat unusual approach in the games industry, but it’s how I got started over 12 years ago and still fun to me.

      To create the levels in Pixel Washer, I’m using an open source map editor called Tiled. It’s cross-platform and a joy to use. I’d been looking for a project to leverage this program for years, but most of my ideas lean towards procedural generation, where a map editor isn’t always necessary. So far making the levels by hand in Pixel Washer has been relaxing, almost therapeutic.

      What did you learn about yourself through this game?

      I think I’ve finally discovered that I can be happy working on a simple game. There’s a long history of overcomplication in many of the games I’ve designed. Large, complex systems are what I crave to make, but they’re so incredibly difficult to finish!

      Another project of mine (Witchmore) suffered from overcomplication and direction issues. I think being recently burned by this has given me a brand new outlook on the value of simplicity.

      Usually simple games like Pixel Washer don’t appeal to me creatively. But the challenge of creating a lean game with excellent washing mechanics (and not much else!) has been just what I needed. It turns out, making an extremely simple game is still extremely difficult! It’s just hard in other ways.

      What makes this game special?

      Pixel Washer highlights some of the amazing, unknown pixel art that’s hidden out there. Unless you’re a pixel art collector like me, I can almost guarantee that you’ll uncover some brand new pixels from an amazing pixel artist that you might not ever have seen otherwise.

      There’s a lovely natural history museum in Pixel Washer where you power wash dinosaur bones and paintings, but Pixel Washer itself is sort of like a museum! A museum of independent pixel art.

      There’s also something deeply satisfying about uncovering the lovely sprites. It just feels right. When I see a screen full of dirty pixels, I feel compelled to wash ‘em up.

      To me personally Pixel Washer is special because it relates to my earliest video game experiences. It’s a low-resolution pixel art game, similar to classic Nintendo Entertainment System or Sega Genesis games. These are the games that I grew up playing, so working on a game in the same vein feels warm and comfortable to me.

      How does sound play a role in the game?

      Sound was one of the first tasks I tackled, since it’s so important to the experience of power washing. To make the power washing sound good, there are three sounds that play: a “wash start” sound, a looping “power washing” sound, and a “wash stop” sound.

      There’s also a recent update that lets me choose which looping “power washing” sound to play for any given texture. Using this, I can make washing “glass” pixels sound different than washing “metal” or “wooden” pixels. The great part is that the game continues working as it did, but now I have the option of adding new washing sounds to any texture. So as I get more time to tweak the game, I can now vary the texture sounds, making the game even better.

      Lastly, I redid the audio system using a technology called Web Audio API, which is a low-level web-based technology. It’s really cool! It supports “nodes” which are like serial busses that allow developers to channel sounds together. Using this, I was able to add a volume slider specific for the washing sound. When all you’re doing is power washing, I think it’s important to make it satisfying & extra configurable.

      What games influenced this one the most?

      Everything I make is probably influenced a little by The Legend of Zelda (NES). Walking around the environments in Pixel Washer also feels influenced by Teenage Mutant Ninja Turtles (NES), The Ignition Factor (SNES), and the Phantasy Star games on Master System and Sega Genesis. I’m a fan of Vlambeer so there’s probably also a little Nuclear Throne in there!

      Although I haven’t played Power Wash Simulator, I think the comparison is inevitable, and I welcome it! It looks amazing. I’ve been meaning to play it, but I’m also cautious of avoiding too much influence in my games.

      Any fun stories or wild moments during development?

      Always! One that comes to mind is accidentally creating a multi-verse situation. There was a bug where, when implementing the loading of levels, the game wasn’t clearing the previous world state. This made the levels stack upon themselves, creating collision chaos and multiple player pigs in the game world.

      I’m pleased to report that the game code recovered “gracefully” and didn’t crash. The multiple pigs were fun to play! They all moved around based on your input, but only one would wash at a time. It made me want to add a co-op mode to the game (maybe someday, but, as I like to say when finishing something, “Save it for the sequel!”).

      Do you think preserving older gameplay mechanics in new games is important?

      I guess I feel like older gameplay mechanics are alive and well in new games! Whenever I move a high-resolution, 3D character around the screen I just think to myself “this is Gauntlet”. Or “this is Mario”. Modern games are built upon the groundwork that classic games laid, and I feel that when I play them. 

      Indies also lovingly experiment with older gameplay mechanics for fun or game jams, which inevitably end up on Itch. This platform has become a goldmine for players looking for classic or unusual gameplay.

      What's your favorite memory as a gamer?

      There was this glorious time during the brief period between Left 4 Dead and Left 4 Dead 2 where a handful of friends and I were obsessed with achievement hunting on Xbox. Every Sunday we’d gather, ideally with a team of 4, and try our hand at the impossibly hard Expert Mode.

      We tried & died over & over again, with no luck. Then finally we began sacrificing ourselves to get just one friend to the exit, so they could get the achievement, while the rest of us were overcome by the zombies. Using this method we eventually all earned the incredibly difficult achievements and had a lotta fun together. Ahhh I miss those days!

      Who will enjoy this game the most?

      Players who enjoy cute pixel art and are looking for a relaxed experience. Pixel Washer is a chill game: casual, nonviolent, and has no required challenge outside of patience and dedication.

      Anyone who enjoys coloring books or scratching off lottery tickets may enjoy Pixel Washer, as the mechanics are similar.

      It’s a great game for when you’ve only got 10 minutes of time to play, or when you want to unwind and power wash the night away.

      Bottom line why must someone play this game?

      You must play if you’re an appreciator of fine independent pixel art, sourced from artists all over the web. Or if you’re looking for a way to relax. Or if you like pigs!

      How do you want this game to be remembered?

      The game itself is quite simple, but I hope it’ll be remembered for nailing the core mechanic, highlighting underappreciated pixel art, and telling a heart-warming story about family.

      What's next?

      More, More, MORE!!! New pixel art is being cranked out every day, and there’s almost no end to the new levels I could add to Pixel Washer. Once that cools down I’ll circle back to Witchmore, my game about crafting black magic.

      Anything else you'd like to add? Promote?

      I was in highschool when Playstation was released. At the time, it felt like 3D games were going to replace 2D games entirely. There was a period in my life when I thought pixel art games were doomed to become extinct. Obviously we’re way past that now, but I still remember that period of time, and am grateful & excited to see pixel art games surviving & thriving!

      If Pixel Washer sounds fun to you, please add it to your wishlist on Steam (or as I say, “washlist” it!). I draw comics based on development & marketing research (ya know, for fun!), and my research has shown that about 10% of folks who wishlist a game could buy it in the first week. That’s a big help to an independent game developer like me!

      Interested in making your own games? My solo game dev book How to Make a Video Game All By Yourself is out now on paperback, and my YouTube channel Valadria is packed with free tutorials, devlogs, and podcasts. See you out there in the games world!

      *

      Follow Pixel Washer and Matt Hackett on their Website, and Twitter to get the latest updates from them and Wishlist the game on Steam!

      The Mega Cat Chronicles: Episode 1 - Part 1 - Diamond Thieves

      The Mega Cat Chronicles: Episode 1 - Part 1 - Diamond Thieves
      In the beginning, homebrew was the hobby of mad scientists experimenting with their own limited resources. There were no supply chains. Donor carts were the norm. But the community’s potential increased dramatically with the arrival of publishers offering molds for new cartridges, technical expertise to polish a game’s code, and a range of services, including the printing of quality labels, boxes, and manuals, and distribution through their online storefronts. Homebrewers were no longer constrained by their own means but could tap into the resources of others, such as RetroUSBInfiniteNESLivesBroke Studio, the 6502 Collective, and Mega Cat Studios.

      Read more

      Unity - Undefined Script Order of Execution Bugs

      Unity - Undefined Script Order of Execution Bugs

      When a bug consistently reproduces for one person but never does for another, or it appears in a build but not in editor or vice-versa, it may be from an undefined script order of execution bug. These bugs occur regularly if using Unity normally, and the cause is subtle. The inconsistency also makes them a pain to track down and fix. These are easily the worst type of bug out there due to their inconsistent nature. This document will explain how these bugs happen, demonstrate the reasons for inconsistency in whether they occur or not, methods for fixing them, and ways of designing your code so there’s no room for these bugs to manifest in the first place. To start, here's a simplified example of a script execution order bug, shown below:


      class CharacterUI : MonoBehaviour

      {
      public UiImage activeSkill; //set in inspector

      public Skills characterSkills; //set in inspector

      void Start()
      {
      activeSkill.sprite = characterSkills.skillsKnown.primarySkill.sprite;
      }

      }

      class Skills : MonoBehaviour

      {
      SkillData skillsKnown; //initialized from Resources.Load

      void Start()
      {
      skillsKnown = Resources.Load<SkillData>();
      }
      }

       

      For someone testing the game, they may always, consistently, get a null reference exception in Start() of CharacterUI, resulting in a broken-looking UI. For the developer and several other testers, the bug may absolutely never happen. The bug may also never happen for anyone in-editor, but does happen for some people in builds.


      Why does this happen?

      First, let’s establish that the CharacterUI’s Start() depends on Skills running Start() before it. Otherwise, when it would access the data within characterSkills.skillsKnown, skillsKnown would be null. With that in mind, for the above case, what actually defines the order the two Start() methods run? The order of execution for Start() between these two classes is completely undefined. Because it’s undefined, if these two objects are created at the same time at scene startup, Unity determines this order arbitrarily, and it varies between in-editor sessions and builds, and per machine! For some people the bug may always happen in editor and never in build, and others it may always in the build and never in editor, and for others it may never happen at all. This all depends on whether, for a given machine and build/editor session, Unity happens to decide if Skills runs before CharacterUI, or CharacterUI runs before Skills. While we work through the example, consider that for an actual codebase in a game, the classes involved in such a bug will be more numerous and complex.


      Solutions

      There's a few solutions available for our contrived example. One solution would be changing Skills to initialize on Awake(), which will always run before anything else’s Start(). But what if for your case’s current logic, both need to use Awake() or both must use Start() due to other dependencies from other classes? If both use Awake, you'd run into the same issue, as the order between the two Awake calls are undefined. If both must use Start, it’s the same as the example undefined order problem.


      The general solution requires explicitly defining the script's priority/order. There's a way to do this in the project's script settings, but it's a pain to manage it there (and gets out of hand as you get into hundreds of classes), so you can instead use an attribute on the class, which looks something like [DefaultExecutionOrder(150)]. Below I show the attribute applied to the classes to fix the bug.


      [DefaultExecutionOrder(10)]
      class CharacterUI : MonoBehaviour {
      public UiImage activeSkill; //set in inspector

      public Skills characterSkills; //set in inspector

      void Start()
      {
      activeSkill.sprite = characterSkills.skillsKnown.primarySkill.sprite;
      }

      }

      [DefaultExecutionOrder(-5)]
      class Skills : MonoBehaviour {
      SkillData skillsKnown; //initialized from Resources.Load

      void Start()
      {
      skillsKnown = Resources.Load<SkillData>();
      }
      }


      The lower the order value, the earlier its mono methods like Start() are executed relative to other monobehaviours. Now, the execution order for the Start() calls has been defined, so Skills Start() will always run before CharacterUI's Start(). Note, this execution order affects Start, Awake, Update (and all other types of update like FixedUpdate, LateUpdate), as well as OnEnable, OnDisable. For example, the Skills’ class OnEnable() would run before CharacterUI’s OnEnable().


      Note: if just one class had its order defined, such as CharacterUI’s, the bug could still occur as Skills’ order relative to it is still undefined.


      Preferred Solution - Avoiding this Problem By Design

      The above solution of using the DefaultExecutionOrder attribute is fine if the damage is already done and the code can’t be refactored. However, the ideal solution is to design your code in a way where this issue doesn’t have room to occur in the first place.


      Solutions for this problem at a design level involves avoiding using Start() or Awake() for anything which depends on another game object's state. Instead, you should have some dedicated code in another class responsible for initializing your objects and using them together, rather than having your individual objects cross-referencing each other. As a red flag, if you require your Start() or Awake() methods to run in very particular orders between separate objects of classes in order for them to function properly, they should be redesigned so they are initialized explicitly by hand in another class. The thought process behind this is that if their initialization order is so important for them to function at all, this order deserves to be explicitly defined by hand, line-by-line, in one location, and not spread out throughout the codebase by using the DefaultExecutionOrder attribute. Let’s look into an example.


      For a contrived example, imagine you have classes A, B, C, D, and E which all depend on each other in different ways in their Start() and Awake() methods. If you need to understand the order which they initialize and you’re using the DefaultExecutionOrder attribute, you’d need to go between each class and make note of their order number, then organize those order numbers lowest to highest, then separately consider how for this order their Awake()s run first, followed by their Start()s, and some classes may be missing one and have the other. There is a much clearer way - just introducing one simple class, which takes references to each involved class and explicitly initializes them in a manually defined order, passing their dependencies as arguments.


      e.Initialize();
      d.Initialize(e);
      c.Initialize(d, e);
      b.Initialize(e, c, d)
      a.Initialize(b, c);


      Now, the order of initialization to a developer is extremely clear by just looking at it, the dependencies between classes are also extremely clear, and very importantly, there’s also no room for undefined execution order bugs because you have explicitly defined the initialization order by hand.


      Note that when defining initialization orders by hand, you may encounter things called cyclic dependencies. For example, if system A requires B to be initialized, and B requires C to be initialized, and C requires A to be initialized, there’s no possible valid order to initialize them in. Resolving cyclic dependencies can be complicated and requires some sort of refactoring, so it’s outside of the scope of this document. Resolving cyclic dependencies is the expression you’d want to use when researching solutions.