Why tabs are better than spaces

Before I present my argument for using hard tabs in code, it’s really important that I make another related argument first, so bear with me as you consider the following statement: Aligning code is bad practice, and should be avoided. Only indentation should be used to arrange code horizontally. The problem with aligning code Why would I say this? First, let’s look at a common usage of alignment, along with its indented counterpart: »

2DRemix Devblog 4: Minimap, rewinding, and area management

1. Minimap New editor feature: added a minimap to the corner of the editor showing an overview of the entire area, and making it easy to jump to a specific part of the map. 2. Rewinding Restored the old behavior of allowing the player to rewind time while playing. I moved this from the “Shift” keyboard key binding to a new “Time machine” item in the item bar, making it more clear to players that this functionality is available. »

2DRemix Devblog 3: Prefabs, script parameters, and fixed pushing

1. Prefabs 2DRemix has always had a panel containing a “palette” of all the tile images you’ve used in your area, so you can select them and reuse them as needed. With this update, I’ve expanded the items in this palette from being merely images, to also embodying a default color, layer, script, and script parameters, which are all selected when that tile in the palette is selected. This means there can be a bunch of default objects, such as “grass”, “wall”, “crate”, “pusher” that are all ready to go, and can be dropped straight onto the map with a few clicks. »

Extracting data from a web page in Zapier using JavaScript

In this case, my objective was to extract specific data from one of my blog posts, so I can use Zapier to automatically share the post for me on social media. I started by creating a Push trigger, that will allow me to manually start my script on an open web page using the Chrome extension for Zapier. From here, I added a new action of the “Code” type, and configured it to pass through the URL from the push trigger. »

2DRemix Devblog 2: Saving and image editing

Restored the ability to save changes, and create new images for tiles. Both of these were removed in a recent refactor, and in putting them back I took the time to improve on the user experience around them by taking advantage of some newer UI changes. Instead of automatically saving every time a tile is placed, you now save manually with a button next to the “play” controls. This gives you more control over the process, and should cut down on server load. »