Making games with impact.js : Part 4, Permission to Make a World

This is part 4 of a series on making games with impact.js . Don’t be a smart ass and skip this part. You might be able to open the weltmeister.html and start a game but you won’t be able to save it unless you have permission.

Part 1

Part 2

Part 3

Our story so far …

To recap, you have a copy of impact.js , some artwork and maybe sound. You have some type of software for a local server.

  • Just copy the impact directory over to where you want to make the game. I’d put it in the htdocs folder in XAMPP. If I want a game named winuna, I’d create a folder named winuna and copy the impact folder into it.
  • To add sound – copy the sound files you want into the sounds folder which is inside the media folder.
  • By default the impact folder seems to be read only so you won’t be able to save any edits unless you change the permissions. Oddly, doing it in get info doesn’t always work, so do this:

Open the terminal window (found in applications > utilities > terminal) type this command chmod -R 777 path-to-the-game/

If you don’t know the path to the game, right-click on the folder, and select GET INFO, in the window that pops up, copy the path next to Where.

Get info screen

When I paste this after chmod -R 77 it looks like this

chmod -R 777 /Applications/XAMPP/xamppfiles/htdocs/new_level5_game

This isย  a Linux command that gives permission to read, write and execute to all users on the server for all files in the directory. Normally, that would be an ill-advised thing to do because it leaves you open to having just anyone access your files. In this case, though, it is a local server on my computer, not a remote server accessible on the Internet. Theoretically, someone could hack into my computer and then gain access to these files. Of course, if they somehow had access to my computer, I already have bigger problems to worry about.



Want to buy the game that includes this ‘intermission game’ created in these posts ? Check out Fish Lake

Leave a comment

Your email address will not be published. Required fields are marked *