Tag Archives: beginner game dev

Think 100 Days of Code is the Ultimate Challenge? Think Again.

A popular challenge that beginner programmers participate in is called 100 Days of Code. Although I never participated in it myself, I see countless tweets with screenshots and progress reports of people sharing bits of apps they made. 100 Days of Code is a great way to keep people in the programmer mindset. It gets them familiar with what it is like to code every day. Still, I wonder if it is the best approach for everyone.  For them, One Game a Month could be a great alternative.

I’m here to propose another approach, one that is gaining popularity in some game development communities. It’s called the One Game a Month challenge. Unlike the 100 Days of Code challenge, its designed to be undertaken for an entire year. Unlike the 100 Days of Code Challenge, One Game a Month allows you to take your time. Not necessarily write code every single day. 

I know what some of you might be thinking. Well, there are a lot of other components that go into a game — you have to make art, and audio, and design decisions. That is naturally all true. Although, I would argue that adding this creative element to your coding adventures actually makes the whole thing a lot more fun. Especially if you’re a creative coder like me. But I don’t want to land a job as a game developer. I want to work at a hip startup disrupting [insert industry here]. I get that too.. but here is the kicker. I am a self taught programmer, and the majority of my portfolio consisted of – you guessed it- games. 

There’s something that gets skipped over a lot when people talk about breaking into the software industry. It’s not necessarily about what type of product you show off. It’s about the coding language you use to make the product. And whether that language is one used by the startup you are applying to. It is very much possible to develop games with Javascript, and Javascript is also one of the most in demand languages. 

Although the original one game a month challenge ended, more people have picked up the mantle to continue the hashtag on Twitter.

So back to my earlier point. One Game a Month gives you a challenge that you can work on more steadily. It also conjures (hopefully) more excitement than making another Reddit or Craiglist clone. There are even communities built around specific game platforms such as Pico-8, which are very generous with sharing their code and resources. Although Pico-8 runs on Lua, it bears a lot of similiarities to Python. Lua still teaches you the important data structures and logic that you need to know to become a programmer. 

I can imagine some of you might still be skeptical. Maybe you want to see some real examples of games that were made with Javascript. I can understand if you’re not yet willing to buy into this “one game a month” thing. Here’s some different games that you can check out, starting from the easiest to the hardest to code:

Alien Attack: This game is good for getting your feet wet with Javascript, and isn’t too complicated. You have to guess the X and Y coordinates of an alien in order to shoot them. The blog post shows all the code involved in making the game.

https://stuyhsdesign.wordpress.com/2019/04/02/alien-attack-game-complete__trashed/

Sliding Tile Game: This game has a lot more Javascript, but is still fairly straightforward in terms of the logic. It’s a game where you have to get 8 tiles that are are scrambled back in the right order. But there is only one empty slot where you can move the tiles at any time. This blog post is extremely thorough in walking you through the game mechanics and how to figure out the winning state.

https://solathecoder.hashnode.dev/build-an-8-puzzle-game-with-pure-javascript-ck0s0k2bs000phjs1relpwc2l

Bunny Defender: Unlike the previous two games, Bunny Defender requires using a Javascript game engine called Phaser. Getting comfortable with a Javascript game engine will make it easier to learn Jframeworks like React or Angular. So, it is a great step forward. It is a mobile game where you have to destroy asteroids trying to destroy a planet of bunny rabbits. You can find some examples of code for this game on Github, but the original tutorial to make the game was on Lynda.com.

https://www.lynda.com/Phaser-tutorials/HTML5-Game-Development-Phaser/163641-2.html

2048 : 2048 is another puzzle game where you use the arrow keys to move all of the pieces on the board in that direction. There are many examples of this game coded with different frameworks like Vue and React. Here are a variety of links below:

Vue: https://github.com/es-repo/vue-exps/tree/master/game2048

React: https://codepen.io/jeffleu/pen/JRzyPZ

Multiplayer Battleship: This is a really advanced game that uses Angular and Typescript. I haven’t used this tutorial myself, but it seems comprehensive and a great fun way to get comfortable with a modern Javascript framework.

https://pusher.com/tutorials/game-angular

If you enjoyed this article, consider following me on Twitter @nadyaprimak or if you need more tips on breaking into the tech industry, you can read my book “Foot in the Door”.

Making Games to Learn Programming with Pico-8

There are a lot of reasons to start making games to learn programming. Games are fun. They are the epitome of creative coding. Unlike to-do apps, games are something you are excited to show to your friend because it is something they will engage with. There is a misconception among some developers that games are difficult to code, and unapproachable to beginner developers. It’s also a great first language in coding for gamers.

I didn’t really get excited about learning to code until I started making games. As a creative coder, games have always been by far the most interesting to me. It’s quite possible I never would have become a software engineer if game development wasn’t one of the applications. As a kid games like Rayman, Zelda, and Donkey Kong filled me with excitement. I remember a feeling of joy when I finished a level or beat a boss that I wanted to shout it from the rooftops. With Pico-8, you will programming simple games, but some of them might remind you of those games from your childhood.

The fact that I have the skills to build games like that myself as an adult fills me with pride. That is because I know the kid I was before would have looked at the adult me with awe. Of course some days I forget about that when I am struggling with a frustrating bug. But at the end of the day it is the main reason I do what I do. We all have an inner child who we want to satisfy, after all.

It is possible today to learn all of the major programming concepts through making games. Although I did not do that myself, I think it would have made my experience much more engaging. My first real foray into programming was in college where I took a few programming classes, and some days it was a real drag.

Pico-8: The Perfect Platform

A year ago a friend showed me a game engine called Pico-8 for making minimalist pixel art games. I initially rolled my eyes at it, because I thought myself sophisticated making games in Unity. I thought that making games with Pico-8 was like advertising to the world that you don’t know what you are doing. Now I couldn’t disagree more.

Every Game is a Pico-8 Tutorial

The first thing that is amazing about Pico-8 is the community. Every one is passionate about learning and sharing, and many members of the community make their own Pico-8 tutorial (s). There is such an incredibly giving and supportive network of folks who participate in the forums. They are also active on Twitter and Discord and beyond. In fact, some users even post Pico-8 code snippets as tweets!

The pico-8 forums are a goldmine

Many software developers believe in open source and sharing their code on GitHub. But in the game development world it’s not so easy to get access to raw code. The AAA world obviously has every line of code concealed behind 10 page NDA agreements. Indie game developers tend to be cautious and perhaps paranoid about people stealing their game.

Thankfully, on Pico-8 that could not be farther from the truth. Every game uploaded to the website allows you to view the code right in the browser, right below the game window. You can copy and paste it right into your own game, no strings attached. That is another reason that makes Pico-8 an exceptionally good option for making games to learn programming.

Simple Coding Language

Pico-8 runs on an easy to understand programming language called Lua. If you’re looking for a Pico-8 tutorial, there are plenty to choose from. In many ways it resembles Python and doesn’t require and pesky semicolons or parentheses all over the place. It reads a lot more like English than a lot of other programming languages do.

Pico-8 also has limitations on the complexity of the logic in the game, which it counts with “tokens.” This forces people to simplify their games and keep the scope reasonable. That is great for beginning programmers. It helps to avoid temptation to code something the long way instead of looking for a solution with fewer lines of code.

Documentation and Tutorials

Programming languages, frameworks, and API’s live and die by their documentation. The quality of the documentation often goes hand in hand with the quality of the community. Since I already wrote about the community, you can probably guess what I will say next.

Just one of the many fanzines you can get on itch.io

I bought a zine on itch.io which breaks down Pico-8 into its different parts. From explaining the user interface walking you through steps to build basic games, it covers a lot of ground. It’s the type of documentation which is not only thorough, but very beginner friendly.

Great Games

You might have similar thoughts to mine when you glance at your first few games on the Pico-8 platform. Certainly they aren’t going to blow you away with their graphics the way that some Unreal Engine games do. But believe it or not, there are some real gems and even best seller games that were made with Pico-8.

The most notable example is Celeste, a critically acclaimed platformer where the original prototype was built with Pico-8 in just four days. Beginning programmers should not expect to make a bestselling game. But it is encouraging to know Pico-8 is a platform where that is possible.

If you enjoyed this article, consider following me on Twitter @nadyaprimak or if you need more tips on breaking into the tech industry, you can read my book “Foot in the Door”.