phpBB Arcade Html5

Here you will find some tutorials about game converting
Post Reply
KillBill
Donator
Donator
Posts: 2
Joined: Sat May 28, 2016 11:51 am
Arcade super highscore: 0
Arcade highscore: 0

phpBB Arcade Html5

Post by KillBill » Wed Dec 27, 2017 1:34 pm

The game works offline and online, the code is as follows:

Code: Select all

if (typeof parent.phpBBArcade !== 'undefined' && parent.phpBBArcade.GameIni())
{
	parent.phpBBArcade.MVR('GameScore', /* Replace use score variable */);

	eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1j a=["\\t\\N\\t\\B\\B\\z\\c\\g\\h\\l\\b","\\r\\L\\n\\b\\c\\C","\\n\\e\\b\\G\\e\\i\\c\\k\\g\\i","\\e\\g\\d\\c\\b","\\I\\h\\A\\b","\\H\\S\\c\\v","\\T\\W\\p\\w","\\e\\g\\d\\c\\b\\l\\h\\i\\h","\\r\\e\\d\\m","\\F\\b\\c\\k\\x\\C\\e\\g\\d\\c\\b","\\d\\Z","\\v\\d\\g","\\v\\d\\g\\h\\i\\k\\d\\m","\\e\\g\\d\\c\\b\\F\\h\\c","\\e\\n\\K\\A\\k\\i\\e\\g\\d\\c\\b","\\Y\\u\\p\\p\\z\\R\\u\\Q\\w\\P\\w\\O\\u","\\n\\m\\l\\b\\x\\k\\m\\b\\l","\\c\\b","\\h\\r\\h\\U","\\e\\i\\t"];(o(f,y){a[2];s(f[a[4]][a[3]]()){y[a[18]]({1b:f.1c(a[5]),1d:1e,1f:a[6],1h:1i,V:f[a[4]][a[7]](),1g:a[8],1a:o(j){s(j[a[9]]==a[10]){j[a[11]]=X[a[12]];f[a[4]][a[14]](f[a[4]][a[13]](j))}q{s(M j[a[15]]!==a[16]){f[a[4]][a[14]](j)}q{f[a[4]][a[14]](a[17])}}},J:o(E){f[a[4]][a[14]](E)}})}q{f[a[4]][a[14]](a[19])}})(D[a[0]],D[a[1]]);',62,82,'||||||||||_0xf5d1|x65|x72|x6F|x73|_0x85c9x1|x63|x61|x74|_0x85c9x3|x69|x64|x6E|x75|function|x53|else|x6A|if|x70|x45|x6C|x54|x66|_0x85c9x2|x41|x6D|x42|x79|parent|_0x85c9x4|x76|x20|x52|x67|error|x62|x51|typeof|x68|x4C|x49|x5F|x47|x55|x50|x78|data|x4F|window|x4D|x6B|||||||||||success|url|MV|timeout|5000|type|dataType|cache|false|var'.split('|'),0,{}));
}
else
{
	/* Here the restart code for the game */
}
This 2 code line change correct code:
  1. /* Replace use score variable */
  2. /* Here the restart code for the game */
example game install file: (this work only phpBB Arcade 4.2.0 version or higher)

Code: Select all

$game_data = array(
	'game_name'			=> 'Game name',
	'game_desc'			=> 'Game desc',
	'game_control'		=> GAME_CONTROL_MOUSE,
	'game_control_desc'	=> 'Game control desc.',
	'game_image'		=> $game_file . '.gif',
	'game_swf'			=> $game_file . '.swf',
	'game_scorevar'		=> $game_file,
	'game_type'			=> GAME_TYPE_HTML5,
	'game_width'		=> 320,
	'game_height'		=> 480,
	'game_scoretype'	=> SCORETYPE_HIGH,
	'game_save_type'	=> PHPBBARCADE_GAME
);
Installed game files structure:

arcade/gamedata/game_folder/ contain all game files

arcade/games/game_folder/
1. game install file
2. game image 50*50px
3. index.htm empty file content

User avatar
origon
Site Admin
Site Admin
Posts: 19511
Joined: Thu Mar 17, 2016 8:24 pm
Location: Denmark
Arcade super highscore: 3
Arcade highscore: 2

Re: phpBB Arcade Html5

Post by origon » Wed Dec 27, 2017 5:31 pm

Thank you very much KillBill :tu

User avatar
origon
Site Admin
Site Admin
Posts: 19511
Joined: Thu Mar 17, 2016 8:24 pm
Location: Denmark
Arcade super highscore: 3
Arcade highscore: 2

Re: phpBB Arcade Html5

Post by origon » Fri Jan 05, 2018 8:56 pm

In what file do we insert the code?

KillBill
Donator
Donator
Posts: 2
Joined: Sat May 28, 2016 11:51 am
Arcade super highscore: 0
Arcade highscore: 0

Re: phpBB Arcade Html5

Post by KillBill » Sun Jan 07, 2018 5:02 pm

origon wrote:In what file do we insert the code?
game.js file search 2 position

1. lives 0 = game over
2. all level complet = game over

+ the score variable must be given!

Post Reply