Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Capturing Hacker News Mentions with Node.js and MongoDB

If you’re in the technology space, you’ve probably stumbled upon Hacker News at some point or another. Maybe you’re interested in knowing what’s popular this week for technology or maybe you have something to share. It’s a platform for information.

The problem is that you’re going to find too much information on Hacker News without a particularly easy way to filter through it to find the topics that you’re interested in. Let’s say, for example, you want to know information about Bitcoin as soon as it is shared. How would you do that on the Hacker News website?

In this tutorial, we’re going to learn how to parse through Hacker News data as it is created, filtering for only the topics that we’re interested in. We’re going to do a sentiment analysis on the potential matches to rank them, and then we’re going to store this information in MongoDB so we can run reports from it. We’re going to do it all with Node.js and some simple pipelines.

Read More

Manage Game User Profiles with MongoDB, Phaser, and JavaScript

When it comes to game development, you’re almost always going to need to store information about your player. This information could be around how many health points you currently have in the game or it can extend beyond the game-play experience and into details such as the billing information for the person playing the game. When we talk about this type of data, we’re talking about a user profile store.

The user profile has everything about the user or player and doesn’t end at health points or billing information.

In this tutorial, we’re going to look at creating user profiles in a game that leverages the Phaser game development framework, JavaScript, and MongoDB.

Read More

Developing a Side-Scrolling Platformer Game with Unity and MongoDB Realm

I’ve been a gamer since the 1990s, so 2D side-scrolling platformer games like Super Mario Bros. hold a certain place in my heart. Today, 2D games are still being created, but with the benefit of having connectivity to the internet, whether that be to store your player state information, to access new levels, or something else.

Every year, MongoDB holds an internal company-wide hackathon known as Skunkworks. During Skunkworks, teams are created and using our skills and imagination, we create something to make MongoDB better or something that uses MongoDB in a neat way. For Skunkworks 2020, I (Nic Raboy) teamed up with Barry O’Neill to create a side-scrolling platformer game with Unity that queries and sends data between MongoDB and the game. Internally, this project was known as The Untitled Leafy Game.

In this tutorial, we’re going to see what went into creating a game like The Untitled Leafy Game using Unity as the game development framework and MongoDB Realm for data storage and back end.

Read More

My Activity Report For 2020

It’s that time of year again. It is time to reflect on the things that happened on The Polyglot Developer, what went well, what didn’t go so well, and what the upcoming year looks like.

If this is your first time stumbling on an annual report article for The Polyglot Developer, you won’t find any tutorial content. This is mostly a numbers-based reflection, but it could be useful if you’re interested in building your own blog, video channel, or overall brand.

In this particular activity report, we’ll follow the same formula as the 2019 report, which includes analyzing the written content on the blog, video tutorials on YouTube, the podcast and Twitch channel, and any services and operating costs required to keep the channels alive.

Read More

Client-Side Field Level Encryption (CSFLE) in MongoDB with Golang

One of the many great things about MongoDB is how secure you can make your data in it. In addition to network and user-based rules, you have encryption of your data at rest, encryption over the wire, and now recently, client-side encryption known as client-side field level encryption (CSFLE).

So, what exactly is client-side field level encryption (CSFLE) and how do you use it?

With field level encryption, you can choose to encrypt certain fields within a document, client-side, while leaving other fields as plain text. This is particularly useful because when viewing a CSFLE document with the CLI, Compass, or directly within Altas, the encrypted fields will not be human readable. When they are not human readable, if the documents should get into the wrong hands, those fields will be useless to the malicious user. However, when using the MongoDB language drivers while using the same encryption keys, those fields can be decrypted and are queryable within the application.

In this quick start themed tutorial, we’re going to see how to use MongoDB field level encryption with the Go programming language (Golang). In particular, we’re going to be exploring automatic encryption rather than manual encryption.

Read More

Visually Showing Atlas Search Highlights with JavaScript and HTML

When it comes to finding specific words or phrases within text, you’re probably going to want to use a natural language search option like full-text search (FTS). Sure, you could probably create a complicated and difficult-to-maintain set of regular expressions to search within text, but that is an option that most developers don’t want. Not to mention it won’t cover the full scope of what a natural language processor typically accomplishes.

In a previous tutorial titled Building an Autocomplete Form Element with Atlas Search and JavaScript, I wrote about searching for recipes, as they are being typed, in MongoDB Atlas using the autocomplete operator. While this tutorial accomplished the job quite well, it didn’t elaborate on what exactly was being matched for any given term.

In this tutorial, we’re going to see how to use Atlas Search and work with the highlight data to visually show any matches on the terms in a user facing application. Highlighting is a powerful tool with Search to allow your users to find the exact text that they want in its proper context.

Read More

Sending and Requesting Data from MongoDB in a Unity Game

Are you working on a game in Unity and finding yourself needing to make use of a database in the cloud? Storing your data locally works for a lot of games, but there are many gaming scenarios where you’d need to leverage an external database. Maybe you need to submit your high score for a leaderboard, or maybe you need to save your player stats and inventory so you can play on numerous devices. There are too many reasons to list as to why a remote database might make sense for your game.

If you’ve been keeping up with the content publishing on the MongoDB Developer Hub and our Twitch channel, you’ll know that I’m working on a game development series with Adrienne Tacke. This series is centered around creating a 2D multiplayer game with Unity that uses MongoDB as part of the online component. Up until now, we haven’t actually had the game communicate with MongoDB.

In this tutorial, we’re going to see how to make HTTP requests from a Unity game to a back end that communicates with MongoDB. The back end was already developed in a tutorial titled, Creating a User Profile Store for a Game With Node.js and MongoDB. We’re now going to leverage it in our game.

Read More

Search

Follow Us

Subscribe

Subscribe to the newsletter for monthly tips and tricks on subjects such as mobile, web, and game development.

Support This Site