Archive for June, 2013

Let’s Build a Game! Part 1

June 29th, 2013 2 Comments

Game screen
Canvas has been something I wanted to make games with for a while now. It can be tough to put the time into it when you are focusing on other things, but every now and then I get to sit down and play around. But I have learned a few things, so lets see if I can help you too as well!.

So to begin, you can find an example of the game here https://github.com/Rchristiani/Space. I will be creating a separate repo for the game, so that you can see the code as it is from part to part. The game we will be creating will be very simple. We will have a few key features:

1. Player movement from input
2. Getting the player firing bullets!
3. Getting the enemy to fire back.

So in the end we will have a simple game. You have your players ship, it can move up and down and left and right etc, you can fire bullets, and we will have an enemy that can fire back at us. Super simple but pretty satisfying to get set up. Lets dive in!

All game files can be found Here. So that you can follow along, or create your own!
(more…)

Em’s in Media Queries

June 20th, 2013 No Comments

The Scenario: You are building a site, the designer has set what looks like a base font size of 13px. So you go ahead and set body{font-size: 13px;} and carry on using this as the value for your measurements. Need something to be 26px? font-size: 2em; etc.

You ran into a problem though when you set up your media queries with ems:

@media screen and (max-width: 76.9230769em){
	/*1000px? No*/
}

(more…)

Emmet

June 18th, 2013 No Comments

Not to long ago I was hearing about Zen Coding, and at the time I thought nothing of it. Why would I need a tool to help me write faster markup, HTML isn’t that hard…WRONG. I started to look into it again, and noticed that it had changed its name to Emmet, and it is amazing.

Why would you want to use such a tool? When you are building out sites and have to have tags that repeat over and over. Copy and paste seems fine, but it can sure get tedious. Enter Emmet.

Example markup, you would probably copy and paste all the li tags.

<ul>
	<li></li>
	<li></li>
	<li></li>
	<li></li>
	<li></li>
	<li></li>
</ul>

With Emmet you can write a small amount of syntax you can produce that same markup:

ul>li*6

(more…)