The No-Video Game!

It’s a vidya game but not! A completely audio-based game, the objective is to use sonar to find the hidden submarine and destroy it with depth charges. But be careful! If you are not close enough to hit the submarine, it will get away and you must hunt it down again.

Got an Arduino Mega2560 on the innards side. Got the joystick and arcade buttons from Ada Fruit! Very nice quality, shipped very quickly, and not too expensive to boot. Box was just a little, prefab wooden deal from a craft store somewhere in the middle of nowhere. And the speakers, I think I pried them out of a few alarm clocks.

Tagged with:
 

Fast JavaScript Game Loops

Change

Okay, so I’m going to switch over to a very simple format, with very short examples of how you do certain things. The long article format is just too much for everyone to digest and takes too much time for me to write, so I tend to put it off forever.

Types of Games

Most games fall into two patterns: turn-driven or time-driven.

Turn-driven games have distinct periods where user input is taken, then periods where game updates are made, and the two do not overlap in anyway. The user-input section waits for the user to make their choice, and the user then waits for the update section to finish before they take their next turn. Many puzzle games and most board games are going to be of this type. For example, in chess with an AI player, the game waits for the player to move a white piece. Once the player moves, the AI takes over and calculates a move for a black piece, during which time the player is stuck and cannot make any moves. Once the AI has moved the a black piece, it’s up to the player to make a move decision again, and the AI cannot progress until the user has decided.

Time-driven games work completely differently. They are constantly updating the game, never waiting for the user to first make a selection or hit a button or waggle their joystick. If a user does perform some kind of input, the input is not processed separately, it is taken into account for the next update. Think of a game of Asteroids, in which the big, giant rocks float around the screen all on their own until the user decides to turn her ship and blast them.

There is actually a third class of game called alternate-reality games (ARG) that do not really update and do not really take user input–not in the same way these other games do–but they are way outside of the scope of this project. ARGs are more literature projects than programming projects.

Turn-driven games are relatively simple to create, as the user drives everything and performance issues do not cause noticeable artifacts like frame-rate stutter or audio clipping and buzzing. When we get into handling user input, you’ll learn all you need to make turn-driven games. Actually, time-driven games turn out to have many of the same features as turn-driven games, just with the additional features of not waiting around for the user first, having its own pump to drive the game forward.

We will be focusing on time-driven games, as they are the most technically challenging.

(more…)

 

Huzzah!

I know I certainly had a really fun time last night with everyone.

To recap, we did a walk through the Pong example (play it here, or read the code here) and saw a lot of things that are common to games programming. We looked at some ways that simple changes to specific values can have a huge impact on the look and feel of the game. We discussed the discovery process of programming and how integral the act of testing is to finding good gameplay elements. And we discussed some tools and habits that are good to learn to be a more effective programmer.
I want to get everyone started with playing with code as quickly as possible now. The more you do, the more you will learn. There have been tons of times in my career that I’ve pontificated on how to do something with no good result coming from mere speculation, only to be able to figure it out within minutes by just trying it. So with that in mind:
 

Game Programming: A Pong Clone

Class Time!

Tonight is the first lab session for our series on learning how to program in study of games with JavaScript. Can’t wait to see everyone here in just a few hours!

Additionally, for anyone who couldn’t make the weeknight-at-7pm time slot, I’ve cleared some time this Sunday to do a repeat/additional session–Sunday, August 12th, at 3pm. You can get tickets here: https://www.wepay.com/events/intro-to-game-programming-with-javascript-weekend-edition

Or hell, just click the button:
Sunday, August 12th, 3pm – 5pm, @ Hive76 Register

Pong!

The first game is, as promised, Pong. You can see the game in action here: http://wedusc.com/games/pong.html

And you can read the source code online in my GitHub repository here: https://github.com/capnmidnight/JS_Game_Programming_Class/blob/master/pong.html

I’ll have printouts for everyone when you get here. If this is your first time trying to read code, try not to cross your eyes too much. We’ll cover how to read code along the way.

Though this game is pretty simple, it has a few interesting features…

(more…)

 

Only 5 Tickets Left!

Wow, these things are selling a lot faster than I expected. There is still a week left and most of the tickets are gone. If you’re still interested, you should hurry and buy one to secure your place. If you are interested but can’t make it to Monday, August 6th, leave a comment on what dates would work better as I’m looking to have an alternate class schedule as well.

Some Q/A

A few questions came up in the last post, so here are some answers summarized for anyone who doesn’t read blog-post comments.

  • What time is the class? The class starts at 7pm on Monday, August 6th, 2012.
  • Can I just show up? I would prefer if you signed up for a ticket first, so I know how many people are coming.
  • Is there anything we should have/know before the class? You’ll need your own laptop computer, we don’t have enough public computers to go around at Hive. I will briefly cover some options for text editors in a blog post or at the beginning of the class, but if you already have a favorite text editor like Notepad++, Gvim, or TextMate, then by all means use that. Also, it would be advantageous for you to setup some sort of webspace. There are some free places like 110mb.com, or you could even use the Public folder if you have a Dropbox account, which is quite convenient.
  • Is it just JavaScript in general, or does it include HTML 5 and Canvas? Various HTML 5 techs will definitely be covered, eventually. You can’t really do much graphically without it. JavaScript, HTML 5, and CSS 3 all go hand-in-hand. While there are some Dynamic HTML stuff that can be done (and we will certainly cover it just because DOM manipulation is a good skill to have), eventually Canvas and Audio are a necessities.
  • Why not do <insert language> instead? That’s a really big question…
 

Pentesting Wargame On Sunday

Sunday, May 20th at 6 PM we’re hosting a pentesting wargame. Players will learn how to use common security tools such as Medusa, and John the Ripper, and identify server misconfigurations and administrative carelessness.

Come and join in on the fun! Bring a laptop!

 

 

Monday – MMMM  Microcontroller Madness

Tuesday – DIY Music Night

Wednesday – Open House

Thursday – Game Night Featuring Tetris Arm Wrestling Tournament

Friday – PTW Gala demonstration (offsite)

Events at Hive76 Monday through Thursday start at 7pm and 

ARE OPEN TO THE PUBLIC.

Friday Gala Ticketing information available here.

 

January Philadelphia Star Trek Meetup Wrap Up

The meetup was great, we had a blast!

We watched “The City on the Edge of Forever“, and then played Artemis Spaceship Bridge Simulator (with a Star Trek mod) 5 times. We faced many Klingon, Romulan, and Orion ships in battle. Special nod to Captain Johnston, the best captain of the night. Nods to Lieutenant-Commander Kalup, as she was able to warp us out of danger many a time; and to Mr. Williams, for keeping the photon torpedo bays hot and ready to fire.

Our next meetup will be Sunday, February 12th, where we’ll be having a double episode watch (TOS & TNG) and more of Artemis with the Star Trek mod.

I’m going to try and put together a crew for the next meetup, if you’re interested in joining Captain Johnston, Lieutenant Williams, Lieutenant-Commander Kalup, and I (Chief of Communications Toliaferro), please email me at “d.toliaferro@gmail.com”. We really need an engineering officer, and a science officer. Captain, helm and tactical applicants are ok too, because we can rotate people in and out.

Live long, and prosper

 

We are excited to announce a very hacking winter-time Hive76 open-house hosted by NextFabStudio:

Hive76 Open House
December 20th, 7pm – Midnight
@ http://NextFabStudio.com/ @ 3711 Market Street

This Hack-tacular event will be at NextFabStudio and will get us free access for the night to some of their most awesome tools, such as: CNC plasma, CNC embroidery, e-textiles, electronics, 3D printers, shop bots… Check out all their equipment.

There will be food too.

So Awesome.

Now we need to brainstorm project ideas, let’s start things off in this email thread. Please reply-all so the proper NextFab people (cc’ed above) can tell us if this is possible and, if so, the logistics for how to make it happen.

All details are here on the Wiki

I’m proposing the first project (we can have many of them!!)…

A double-set of Hive76 chess pieces and boards. This will make use of their lasercutters, embroidery equipment, and possibly the electronics and 3D printers too. I really want a double-set (4 different colors) so we can play Bughouse Chess (You will love this game)

If we get really creative maybe some magnetics and electronics could be enabled as well.

Let’s get hacking!

To Join in on the Discussion, please join our mailing list

 

Week of 5/15/11 Saturday Open House Wrap-Up

Hey folks,

Yesterday we kicked off our new Saturday open house event, and it was awesome! We had some Hive regulars come by and get some work done on various projects, and we played a bunch of rounds of Artemis Spaceship Bridge Simulator as well.

During out Artemis games, we linked up with 091 Labs who hail from the Republic of Ireland, and a fellow science fiction enthusiast in Pittsburgh who manned his own ship. There were many, many close calls and fun was had by all.

We’ll be holding another open house this Saturday, so watch out for it if you can’t make it this Wednesday night.

Hope to see you there!