Author: Nic Raboy
Animate Spritesheets in a Phaser Game
When it comes to 2D game development, sprite animations are going to be a critical part of the game experience. No one wants to play a game with a static unappealing image that moves around on the screen. They are going to want vibrant animations that add a certain realism to the game-play experience, even with it being 2D.
There are a few ways to accomplish animations in game development. You could develop complex logic that swaps images on a sprite every time the render function updates, or you could work from a single spritesheet and iterate over the frames in that spritesheet.
One of the main benefits to spritesheets, beyond them being easy to animate in modern game development frameworks, is they are easy on the computing resources. Loading one image file is less resource intensive than loading several image files, and when it comes to smooth performance in games, how you manage your resources can make or break your game.
In this tutorial, we're going to see how to animate 2D sprites in a Phaser 3.x game using simple spritesheets with JavaScript.
Read MoreAnnouncing, Blogging with WordPress for Beginners, an Online Course
I'm pleased to announce that the course, Blogging with WordPress for Beginners, has been released to The Polyglot Developer courses portal.
So what does this course attempt to accomplish?
If you're interested in starting a blog to represent your brand and grow your audience, you'll see how to do this using WordPress, a popular content management system (CMS), and a strong search engine optimization (SEO) strategy.
Read MoreCreate a Stream Deck Plugin to Interact with Webhooks
I recently jumped on the hype train when it comes to streaming and picked up an Elgato Stream Deck. If you're unfamiliar, these devices are essentially hotkey peripherals with LCD adjustable keys that allow you to quickly perform certain tasks. Could a keyboard shortcut get the job done? For a lot of tasks, definitely, but the Stream Deck software is where the magic comes in.
The Stream Deck software allows you to connect certain services or multi-stage shortcuts to a specific key, something a standard keyboard shortcut probably won't do well. In addition, you're able to design your own actions using simple JavaScript and HTML.
In this tutorial, we're going to see how to create a Stream Deck action, one that sends HTTP requests to remote webhook services, using JavaScript.
Read MoreTPDP E38: COBOL Development on the Mainframe
If you're interested in learning about COBOL, you'll find a lot of value in, COBOL Development on the Mainframe, the latest episode of The Polyglot Developer Podcast.
There's been a lot of buzz around COBOL in recent news, which is amazing considering how far the programming technology dates back. In this episode of the podcast, I'm joined by Elizabeth Joseph from IBM, and we discuss the things that COBOL does well, where it's used the most, and why it's making such a huge comeback.
You don't have to be a system admin, mainframe developer, or COBOL expert to get a lot of value out of this episode.
Read MoreSearching for Nearby Points of Interest with MongoDB and Mapbox
When it comes to location data, MongoDB's ability to work with GeoJSON through geospatial queries is often under-appreciated. Being able to query for intersecting or nearby coordinates while maintaining performance is functionality a lot of organizations are looking for.
Take the example of maintaining a list of business locations or even a fleet of vehicles. Knowing where these locations are, relative to a particular position isn't an easy task when doing it manually.
In this tutorial we're going to explore the $near operator within a MongoDB Realm application to find stored points of interest within a particular proximity to a position. These points of interest will be rendered on a map using the Mapbox service.
Real-Time Location Changes with MongoDB Realm, Change Streams, and Mapbox
When it comes to modern web applications, interactions often need to be done in real-time. This means that instead of periodically checking in for changes, watching or listening for changes often makes more sense.
Take the example of tracking something on a map. When it comes to package shipments, device tracking, or anything else where you need to know the real-time location, watching for those changes in location is great. Imagine needing to know where your fleet is so that you can dispatch them to a nearby incident?
When it comes to MongoDB, watching for changes can be done through change streams. These change streams can be used in any of the drivers, including front-end applications with MongoDB Realm.
In this tutorial, we're going to leverage MongoDB Realm change streams. When the location data in our NoSQL documents change, we're going to update the information on an interactive map powered by Mapbox.
Read MoreScan for Broken Links on a Website with JavaScript
Building a website isn't a difficult task in a lot of circumstances, but maintaining a website is a totally different story. When it comes to larger scale websites or blogs such as The Polyglot Developer, content can become out of date at any time, and it's more likely to happen the longer the content appears on the site.
Stale content and content that doesn't work, whether that be through links, formatting, or something else, can severely damage how you rank in search results and the overall growth of your website.
Let's dig a little deeper into links for example.
You're probably going to have links on your website, whether they be internal or external in terms of where they route to. As your website evolves, or as the external websites evolve, those links might change and break. Broken links create a poor experience, something that Google and other search engines take into consideration when it comes to search engine optimization (SEO).
In this tutorial, we're going to use simple JavaScript to find all of the broken links on an entire website, not just the current page.
Read More