“Mind Frog” Documentation by “Officine Pixel” v1.0


Title

Created: 17 July 2015
By: Lamberto Tedaldi (Officine Pixel)
Email: games@officinepixel.com

Thank you for purchasing our game. If you have any questions that are beyond the scope of this help file, please feel free to email via our user page contact form here. Thanks so much!


Table of Contents

  1. How to deploy the game on your site
  2. How to customize the game
  3. How to translate the game
  4. How to reskin the game
  5. How to Change sounds

“Deploying the Game”

Deploying the game on your server is a simple operation:

step 1
In order to deploy the game in your website you have to do some minimal changes to configuration file before uploading files.
Let's suppose you wish to deploy the game on www.mydomain.com/mindfrog/
Open data/prefs.json with your favorite text editor.
Change SERVER_URL's value with the URL of your website at the beginning of the file:

{
	"SERVER_URL":{
		"value":"http://www.mydomain.com/mindfrog/",
		"type":"url",
		"properties":{
			"label":"Game URL",
			"description":"This is where the game is located on the web.",
			"group":"sys"
		}
	},


step 2
Now copy all files inside mindfrog/ folder on your server by using your FTP client.

step 3
Give full permission to the folder gfiles/ and to his subfolder private/ (tipically 777)

Finish
That's all, now you should be able to play the game with your friends from the URL.


Go To Table of Contents




“Customizing the Game”

There are some aspect of the game you can customize by editing the prefs.json file.
Open data/prefs.json file in your favorite text editor.
Each text block represents a feature of the game you can customize. Each text block have:
An internal reference that is the the all capital name.
the "value" string that is the only portion of text may change.
the "type" string telling the kind of value you are editing, it may be a text, a number, a color, etc...
property block containing the description of the feature and eventually the range it may assume.

{
	"SERVER_URL":{
		"value":"http://www.ffx.it/games/mindfrog/",
		"type":"url",
		"properties":{
			"label":"Game URL",
			"description":"This is where the game is located on the web.",
			"group":"sys"
		}
	},

	"GAME_EASY_MODE":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Game Rules",
			"description":"Enable or disable easy game rules, if easy pawns can jump to near blank space otherwise a pawn can only moves by jumping over other pawns.",
			"group":"preferences"
		}
	},

	"POLLING_TIME":{
		"value":1000,
		"type":"number",
		"properties":{
			"label":"Polling Time Interval",
			"description":"This is the amount of milliseconds the game must wait from a request to the server and the next.",
			"min":1000,
			"max":10000,
			"group":"preferences"
		}
	},

	"TIMER":{
		"value":15000,
		"type":"number",
		"properties":{
			"label":"Timer",
			"description":"This is the time, expressed in milliseconds, given to the player for doing his move.",
			"min":0,
			"max":60000,
			"group":"preferences"
		}
	},

	"SCALE_INTERPOLATION_DESKTOP":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Scale Interpolation Desktop",
			"description":"It enable or disable pixel interpolation on desktop.",
			"group":"preferences"
		}
	},
	
	"SCALE_INTERPOLATION_MOBILE":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Scale Interpolation Mobile",
			"description":"It enable or disable pixel interpolation on mobile devices.",
			"group":"preferences"
		}
	},

	"MAX_FPS":{
		"value":30,
		"type":"number",
		"properties":{
			"label":"Max FPS",
			"description":"This is the maximum frames per second rate.",
			"min":10,
			"max":60,
			"group":"preferences"
		}
	},

	"AUDIOENABLED":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Audio",
			"description":"This turns on/off the whole audio system.",
			"group":"preferences"
		}
	},

	"GAME_NAME_1":{
		"value":"Loading...",
		"type":"text",
		"properties":{
			"label":"First line text",
			"description":"First line of the text shown in loading screen.",
			"group":"loading"
		}
	},
	
	"GAME_NAME_1_SIZE":{
		"value":30,
		"type":"number",
		"properties":{
			"label":"First line font size",
			"description":"Font size of the first line of the text.",
			"min":10,
			"max":60,
			"group":"loading"
		}
	},
	
	"GAME_NAME_1_COLOR":{
		"value":"#0000FF",
		"type":"color",
		"properties":{
			"label":"First line color",
			"description":"Color of first line expressed in hex value.",
			"group":"loading"
		}
	},
	
	"GAME_NAME_2":{
		"value":"Mind Frog",
		"type":"text",
		"properties":{
			"label":"Second line text",
			"description":"Second line of the text shown in loading screen.",
			"group":"loading"
		}
	},
	
	"GAME_NAME_2_SIZE":{
		"value":60,
		"type":"number",
		"properties":{
			"label":"Second line font size",
			"description":"Font size of the second line of the text.",
			"min":10,
			"max":60,
			"group":"loading"
		}
	},
	
	"GAME_NAME_2_COLOR":{
		"value":"#f200ff",
		"type":"color",
		"properties":{
			"label":"Second line color",
			"description":"Color of second line expressed in hex value.",
			"group":"loading"
		}
	},
	
	"LOADING_BG_COLOR":{
		"value":"#000000",
		"type":"color",
		"properties":{
			"label":"Loading screen backgorund color",
			"description":"Loading screen backgorund color expressed in hex value.",
			"group":"loading"
		}
	},
	
	"LOADING_BAR_COLOR":{
		"value":"#ff0000",
		"type":"color",
		"properties":{
			"label":"Progress bar color",
			"description":"Progress bar in color loading screen expressed in hex value.",
			"group":"loading"
		}
	},
	
	"GAME_LANGUAGES":{
		"value":["en"],
		"type":"text",
		"properties":{
			"label":"Game languages",
			"description":"add your additional languages here. For esample 'ru','es', etc...",
			"group":"sys"
		}
	},
	
	"TOGGLE_AUDIO_BUTTON":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Audio Toggle Button",
			"description":"This turns on/off the Audio Toggle Button from showing in home screen.",
			"group":"menu"
		}
	},
	
	"FULLSCREEN_BUTTON":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Full Screen Button",
			"description":"This turns on/off the Full Screen Button from showing in home screen.",
			"group":"menu"
		}
	},
	
	"INFORMATION_BUTTON":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Info Button",
			"description":"This turns on/off the Info Button from showing in home screen.",
			"group":"menu"
		}
	},
	
	"HOW_TO_PLAY_BUTTON":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"How To Play Button",
			"description":"This turns on/off the How To Play Button from showing in home screen.",
			"group":"menu"
		}
	},
	
	"MORE_GAMES_BUTTON":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"More Games Button",
			"description":"This turns on/off the More Games Button from showing in home screen.",
			"group":"menu"
		}
	},
	
	"MORE_GAMES_URL":{
		"value":"http://www.ffx.it/",
		"type":"url",
		"properties":{
			"label":"More Games Link",
			"description":"Url for 'More Games' button.",
			"group":"menu"
		}
	},
		
	"KEYBOARD_NUMBERS":{
		"value":"false",
		"type":"bool",
		"properties":{
			"label":"Keyboard With Numbers",
			"description":"Enable or disable numbers in virtual keyboard when player enters his/her nickname.",
			"group":"preferences"
		}
	},
	
	"DEBUG":{
		"value":"true",
		"type":"bool",
		"properties":{
			"label":"Debug flag",
			"description":"This turns on/off the console messages useful for debugging.",
			"group":"sys"
		}
	}
	
}

Go To Table of Contents

“Translating the Game”

The game comes with English and Italian languages, so, for example, if user's browser is set to Italian, texts are shown in Italian, for any other language configuration forces the engine to fall back on English.
You can translate or add new languages to the game. Inside the prefs.json file there is a parameter for this puropse:

	"GAME_LANGUAGES":{
		"value":["en"],
		"type":"text",
		"properties":{
			"label":"Game languages",
			"description":"add your additional languages here. For esample 'ru','es', etc...",
			"group":"sys"
		}
	},
The value parameter consists in the list of languages the game can use for showing texts.
The first language in the list is used as default language.
Game comes with the value set to ["en","it"], if you wish to add a new language you need to add the language code to the list.
For your convenience here a list of language code you may use.
For example, if you wish to add Spanish, the parameter value will become ["en","it","es"].
Then you need to make a copy of the English language file, rename it, according to the language you added and translate it.
Languages files are located in data/local/ folder, so, make a copy of data/local/en.json and rename the copy as data/local/es.json.
{
	"play"				: "PLAY",
	"join"				: "JOIN",
	"how_to_play"			: "HOW TO PLAY",
	"play_again"			: "PLAY AGAIN",
	"play_more_games"		: "PLAY MORE GAMES",
	"back"				: "BACK",
	"next"				: "NEXT",
	"input_nickname"		: "INPUT YOUR NICKNAME",
	"email_friend"			: "by Email",
	"whatsapp_friend"		: "by Whatsapp",
	"sms_friend"			: "by SMS",
	"invite_a_friend"		: "Invite a friend to challenge you then back here and wait.\n\nWhen your friend will join, the match will start.",
	"copy_and_paste"		: "or\n\npress CTRL + C now and paste link\n into Skype or your prefered IM\n\nor",
	"copy_and_paste_osx"		: "or\n\npress CMD + C now and paste link\n into Skype or your prefered IM\n\nor",
	"email_subject"			: "Let's play",
	"invite_body"			: "Hi, challenge me in this game by clicking this link: ",
	"alert_reload"			: "WARNING You have a game running",
	"its_up_to"			: "It's up to ",
	"its_your_turn"			: "It's your turn",
	"time_over"			: "Time over\n It's up to ",
	"you_win"			: "YOU WIN!!!!\nWant you play a new match\nagainst $1",
	"you_lose"			: "YOU LOSE!!!!\nWant you play a new match\nagainst $1",
	"deciding"			: "Please wait\n $1 is deciding.",
	"leaved"			: "Sorry,\n $1 leaved the game",
	"already_joined"		: "Sorry,\ngame was already joined by another player",

	"howToPlay_desktop": {
		"p1"				: "The object is to move your frogs into the back two rows on the opposite side of the board. The first player to accomplish this is victorious.",
		"p2"				: "A frog can move to adiacent free cell or by leaping over other frogs. A frog may leap over any number of frogs that are in a row, either vertically or horizontally.",
		"p3"				: "Click on a frog to select it, targets will show you where the frog can moves. Click onto a target to make your move. Warning, you have limited time."
	},

	"howToPlay_mobile": {
		"p1"				: "The object is to move your frogs into the back two rows on the opposite side of the board. The first player to accomplish this is victorious.",
		"p2"				: "A frog can move to adiacent free cell or by leaping over other frogs. A frog may leap over any number of frogs that are in a row, either vertically or horizontally.",
		"p3"				: "Tap on a frog to select it, targets will show you where the frog can moves. Tap onto a target to make your move. Warning, you have limited time."
	},

	"info":{
		"title1"			: "A GAME BY",
		"text1"				: "OFFICINE PIXEL SNC (FFX.IT)",
		"title2"			: "SOFTWARE",
		"text2"				: "Lamberto Tedaldi",
		"title3"			: "GRAPHIC",
		"text3"				: "Davide Romboli",
		"title4"			: "MARKETING MANAGER",
		"text4"				: "ALESSANDRA TOMBACCINI (SICOMUNICA.NET)",
		"title5"			: "",
		"text5"				: "",
		"title6"			: "DEVELOPED USING",
		"text6"				: "MELONJS GIMP INKSCAPE TILED"
	}
}

Go To Table of Contents




“Reskinning the Game”

You can change the appearance of the game in all its aspects by substituting the image assets. Image asets are located in the data/img/ folder and they have png extension.
For doing so, you may use your favorite image editing software or vector graphics software, if you don't have any, we warmly encourage you to use GIMP, if you prefer working with pixels, or Inkscape if you prefer working with vectors. Both are free and open source software which running on Windows, Linux, OSX.

Go To Table of Contents

“Changing Sounds Effects”


Each sound needs to be stored in 2 different file formats: mp3 and ogg, this way the game engine will load and use the right format according to the platform it's running upon.
If you are in trouble creating your new sound effects, give a try to those free programs: sfxr or Bfxr When you have generated the sound effects you like, you can edit, mix and convert them from wav to mp3 and ogg by using the free and open source software Audacity.

GUI and in-game sounds are stored in data/sfx/ folder.

Go To Table of Contents




Once again, thank you so much for purchasing this game. As I said at the beginning, I'd be glad to help you if you have any questions relating to this game. No guarantees, but I'll do my best to assist.
If you need, we can customize Mind Frog for you! Costs vary by the kind of customization, so, contact us for inquiring.

The staff of Officine Pixel