Articles
Standalone articles on programming, game development, and related topics.
-
Crash Course in PixiJS
Beginner
If you’ve been through the JavaScript crash course, you’ve got the language basics down. Now we need a way to actually draw things on screen. That’s where PixiJS comes in. Let’s look at what it is, why it’s a great fit for tile-based games, and how to get something on screen with just a few lines of code.
Why PixiJS?
Browsers have a built-in way to draw 2D graphics called the Canvas API. You can draw rectangles, images, and paths with it. It works fine for simple stuff, but it runs on the CPU — your computer’s main processor — and for games with lots of tiles updating every frame, that becomes slow pretty quickly.
-
WebSocket Stack Comparison for Indie Game Servers
Disclaimer: This is really a level above the kind of content I was intending to publish, but while researching for the multiple player gamer series I found these numbers genuinely interesting.
TLDR: Use Node/Socket.io when starting out, its simply well documented, tonnes of examples and support. This makes AI support effective also.
Choosing a WebSocket server stack for an indie game is not primarily a performance decision. At the connection counts a small game reaches, every stack on this list is fast enough. A Slither-style game at peak might hold 500 concurrent players in a single room. At Node.js + Socket.io’s 150KB per connection, that’s 75MB — trivial on any VPS.
-
Crash Course in JavaScript
Beginner
So you might be here because you’re interested in code or fearful of it. Hopefully, this little read will empower you with some basics. And we’ll discover it’s really not too scary and kind of exciting what we can do with very little.
These are some foundational concepts. You don’t have to read or understand this to begin. But if you’re unfamiliar with code you might have a better time if you do. I know it’s boring and a little hard to relate to these ideas without all the context of what you’ll be doing later.