Giter Club home page Giter Club logo

bombermine-shuffle's Introduction

bombermine-shuffle

Click on a character, move it with keyboard.

First step

Copy files to your web-server or start google chrome with "--allow-file-access-from-files" argument.

Work loop

Open index.html in a browser. Modify images and index.html. Refresh the page.

Hints

{
	tilesUrl: "img/tileset_02_03.png",
	//shuffle takes random rectangle from that map
	mapUrl: "save/firstmap.bin",
	//32 pixels per tile
	zoom: 32,
	things: [
		{
			name: "player",
			// one sprite per 48 tiles
			density: 48,
			url: "img/character.png",
			frameWidth: 34,
			//entity size
			renderWidth: 34,
			//four frames
			framesX: 4, 
			//four animations
			framesY: 4,
			//animation parameters, animSpeed / speed ms per one cycle
			//default 1200 / 4 = 300ms per one cycle
			animSpeed: 1200,
			//speed/16 tiles per 100ms
			//default value is 4, it means 2.5 tiles per second 
			//max value is 6, NYAN value is 7
			speed: 4,
			//UP, RIGHT, LEFT, DOWN
			row: [0, 1, 2, 3]
		},
		{
			name: "item", 
			// one sprite per 64 tiles
			density: 64, 
			url: "img/items.png",
			frameWidth: 32, 
			//how to draw sprite
			renderWidth: 32, 
			//number of frames per row and col
			framesX: 3, 
			framesY: 4,
			//probabilities of frames.
			//0 means that it won't appear at all.
			prob: [1, 1, 0, 
				1, 1, 1, 
				1, 1, 1,
				1, 1, 1,
				1, 0, 0,
				1, 1, 1,
				1, 0, 0]
		}
	]
}

License: MIT

Author:

bombermine-shuffle's People

Contributors

ivanpopelyshev avatar excuseme avatar thelxr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.