Game Dev Movement cheatsheet with examples

aka My Cheat Sheet of Helpful Code

I created a blog post way back title Game Snippets I Always Forget. I put it up basically as a dumping ground for random game related bits of code I found myself looking up over.. and over. A few of them are a bit cryptic but that’s mostly due to me quickly logging in and pasting before Id forget. While now I have (most) memorized I figured I would revisit the article and add some examples that may help others out. The following are examples dealing with movement, angles, and directions.

Read More

Simple 2d Terrain With Midpoint Displacement

Codepen terrain

Screenshot from scrolling terrain and shooting stars demo on codepen.io

In a few of my demos I’ve used 2d terrain. I love the effect and its really easy to do especially in 2d. The algorithm I use most is Diamond Square also known as Midpoint Displacement. What’s great about the algorithm besides its easy of use is that it can be used for simple 2d terrain as well as with 3d terrain. For now I will just be talking about generating 2d terrain, in a future article I will discuss how to use the same algorithm to make create height maps that can be used in turn to create 3d terrain.

Read More

Burn Away Effect Explanation

This explanation doesn’t show any code more of just an overview of how to achieve a simple but cool looking effect.

I’ve seen variations this effect used in different places, one of the more recent examples I can think of is the loading screens from Red Orchestra 2. RO2′s effect definitely uses a different method than mine but it gave me an idea to try something similar. I ended up with a similiar effect using pixel manipulation, and a tiny bit of Cellular Automaton.

Read More

Working on a new JS game

I’ve been furloughed from my job (government contractor) so I’ve had a bit of free time on my hands the last 2 weeks. I decided to start and hopefully in a reasonable amount of time finish a full fledged html5/canvas game.

The name of the game is Grapple Hero, check out a few of the wip screenshots.

levelselect

grapple herograsstiles

menu progress

If anyone has played my old js1k entry  you’ll recognize the game play immediately. Your character cannot move any way but using his grapple. Once your grapple makes a connection you are shot up into the air where you need to grapple again or you’ll fall (sometimes to your death). I created a website for the game  where you can play the most current demo build, which involves you trying to escape from lava.

I plan on releasing it on Windows, Linux, as a standalone executable, on Android via cacoonjs, on the Google app store, and Desura (hopefully).

Its also been added to IndieDB check it out :)

Grapple Hero Windows, Linux, Web, Mobile, Android, MetroTab game

Recreating gifs for the jsBin Compo

There’s a really interesting competition the creator of jsbin is running. The competition involves recreating some pretty amazing gifs (mostly mathmatical based) using Javascript, CSS, and HTML. I couldn’t help but try my hand at a few of the gifs. As of this writing I have successfully (mostly anyway) reproduced four of the images.

Read More

3d Shading with Points

I was checking out some old books the other day and I came across Commodore Step by Step Graphics Vol 3. It had an interesting looking screenshot for a bit of code, which showed shaded spheres entirely made of points. I thought the effect would look cool if multiple ones were layered over each other to look like planets and moons. So I converted the Basic over to JavaScript using the canvas element to replicate the effect.

Read More

New Blog Design and Demos

I was really hating my last design, so after saying I was going to do it for months I finally decided to redesign the blog. There’s a few things left to do like styling comment boxes, finishing the mobile version, and a few finishing touches here and there. My favorite part though about going to a design with so much white space is the ability to have some of my demos as the background. I will of course however be adding an option to turn them off for those of you who get distracted or think they are just plain ugly.

I finally feel like I can start writing some articles about my demos, games in progress, and everything else!

Atari Rom Reader, and color picker

Wanted to share an interesting yet simple project I created the other day. It simply dumps Atari 7800 roms and displays the data via canvas. I’ve wanted to create a few 7800 games for a long time, but playing the games and taking screenshots to remove sprites takes forever, so I made a simple application to do it for me (for the most part anyway).

Read More

Creating a canvas platformer tutorial part two

Wow, so its been a while since I’ve posted anything. I’ve been kind of busy, and was forcing myself not to post anything unless it was going to be part two of the tutorial. With that said lets begin! For all the code and fully working demo scroll to the bottom.

Last we left off we had a pretty complete demo where we could run and jump around the screen. Now we are going to add some objects that the player can actually collide into!

Read More