Skip to content

arturkot/the-house-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The House - simple adventure game

Introduction

I've wanted to create a game since a long time. You know - one of those cool things you'd like try. :) When I started working on this project I had only basic knowledge about JS. Very basic. I didn't even know how to define an array and JS objects and methods were some kind of mystery. Thanks to this game my skills have developed tremendously. I'm still far from calling myself "pro JS dev" but I've got siginficantly closer.

You can play it right here. Please mind that:

  • it's very, very short,
  • it's my first game ever. :)

How does it work?

The game is made using HTML, CSS (Less) and JS (depends strongly on jQuery). Every room, roughly speaking, has simple markup in HTML which defines items (such as table, window, etc.) and click areas. CSS is responsible for graphic and JS for all the rest (DOM animations, interactions, saving game state). Since I had some experience with developing and designing websites I decided that HTML would be the right technology to start with.

A little bit more about scripts:

  • js/audio.js - all sounds are defined here,
  • js/data.js - responsible for saving game state,
  • js/dialogue_box.js - responsible for various popups,
  • js/game.js - sits on the top of all scripts and uses them to genrate game,
  • js/items.js - manages items found by a player,
  • js/npcs.js - non playable charcters,
  • old_browser.js - fires when not supported browser is detected,
  • js/room.js - generates rooms, responsible for interaction of the main character wit the game world the A (A-Star) algorithm here is by Andrea Giammarchi*,
  • js/scenes.js - cutscenes are stored here,
  • js/settings.js - game settings, at the time this file is responsible for reseting the game only :P,
  • js/text_cloud.js - speech balloons for the main character,
  • js/tooltip.js - tooltips :),
  • js/utility.js - super simple tool: I use it to define hit-areas for tha game grid,
  • js/view.js - generates outside views (when you look throught a window).

Credits

It's about time to mention resources (and people behind them) that helped me (A LOT) to create my game.

Sound

All sounds come from Freesound.org. Full list below:

Graphic

JavaScript

Licenses

The House code:

MIT License

Copyright (c) 2019 Artur Kot

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The House artwork:

Creative Commons Attribution 3.0 License