Skip to content

Instantly share code, notes, and snippets.

@remixz
Last active March 8, 2016 22:14
Show Gist options
  • Save remixz/63598f974b7f7b53ad6f to your computer and use it in GitHub Desktop.
Save remixz/63598f974b7f7b53ad6f to your computer and use it in GitHub Desktop.

additional resources

if you're looking for some new things to try with your club, try out these tutorials. some may not be as in-depth as our workshops, but for people who have done our workshops, they shouldn't be too hard. phaser is the most in-depth in terms of resources, so that'll likely be the best one to try with beginners.

phaser game engine

start with http://phaser.io/tutorials/making-your-first-phaser-game/index to learn about the engine, and then look through http://phaser.io/learn/official-tutorials and http://phaser.io/learn/community-tutorials for more tutorials and ideas for games. for even more examples, look at http://phaser.io/examples. the api documentation is here: http://phaser.io/docs first tutorial is super basic, and requires very little JS knowledge to understand. if a student's done any of the game workshops already, they're totally set.

with the first tutorial, you should create a new c9 workspace, and enter https://github.com/photonstorm/phaser.git into the clone URL box. after it's done cloning (this may take a minute or two, you can see the progress in the console at the bottom), go to the folder resources/tutorials/02 Making your first game, open up part1.html and follow along with the tutorial. note: you can skip the folder 01 Getting Started, as this is about setting up a development environment, which we've already done by using c9

socket.io

http://socket.io/get-started/chat/

chat is kinda lame, but this does teach about server-side stuff, which is kinda cool, plus is easy to do with c9. would recommend for people who are comfortable with basic html, css and js. for use in c9, here are some guidelines:

  • you can use your existing workspace for this, but running the files will be different for this. create a new folder for this, call it chat-example.
  • when the tutorial says to run commands, you can run those at the bottom of the c9, in the bash tab. this is similar to what you would have done in the personal website workshop.
  • in the example, code, you'll notice on line 8, there is this code: http.listen(3000, function(){. replace 3000 with process.env.PORT, so it looks like this http.listen(process.env.PORT, function(){
  • instead of running node index.js in the console, go to the "Run" menu at the top of c9, and choose "Run" while you have index.js open. you can also press F5 with index.js open.
  • at the bottom, you'll notice it'll print out the URL your code is running on, like "Your code is running at https://your-url-here.c9users.io". visit that URL instead of http://localhost:3000 when it says to in the tutorial.
  • whenever it tells you to make changes to index.js, you'll need hit the refresh button next to the big stop button to reload the server: refresh button screenshot
  • when it says to run npm install --save socket.io, you'll need to switch back to the "bash" tab to run the command.
@jkwok91
Copy link

jkwok91 commented Mar 8, 2016

things that may need clarification:

  • what is an "api documentation" (though club leaders can explain this part)
  • what is the console (just tell club leaders to explain that it's the thing the bottom of the c9 window or something)

now i'm gonna actually try to follow your instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment