Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
vbProArcade v1.0 Flash Games Development Details »»
vbProArcade v1.0 Flash Games Development
Version: 1.00, by futureal futureal is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-31-2002 Last Update: Never Installs: 83
Is in Beta Stage  
No support by the author.

vbProArcade v1.0 Flash Games Development Thread

This thread is intended to provide support for those who wish to find new games for their Arcades, or wish to assist in the development of new games for vbProArcade, or wish to modify existing, open-source Flash games for use with vbProArcade.

Note to vbulletin.org moderators: I could not find an appropriate place for this thread, other than the Beta Hacks forum, so here it is. If you feel this should be moved somewhere else, by all means do so. An additional reason I posted it here was because, to my knowledge, only registered users can view this thread, which may contain hack code at one point or another.

For the hack itself, you will need to see this thread. The Flash Development thread that you see here is just that, and should only be for the discussion of creating/modifying games to work with vbProArcade. Any discussion of or support for the hack itself will be conducted in the other thread.

For documentation on how to modify a game to work with vbProArcade, please see the vbProArcade documentation, which will always be contained in this post. I will try and update this post whenever I update the documentation itself.

A list of current games can you find in the second post.

Before you modify ANY game's source or post it here, you must MAKE SURE that you have the author's permission to modify and redistribute the code, compiled or otherwise.

As games are modified and posted, I will update this post to list them, so that people running vbProArcade may find and install them more easily.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-01-2003, 01:27 AM
joecool joecool is offline
 
Join Date: Mar 2002
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the most current list of games that work with vbProArcade, along with the original person that modified the code:Note that some games may (eventually) have multiple versions as people modify them to suit their needs. For example, I know that there are already a few different versions of vbTetris floating around.
Reply With Quote
  #3  
Old 01-01-2003, 01:28 AM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vbProArcade v1.0 Beta 2 Documentation

/////////////////////////////////
// vbProArcade v1.0 Beta 2 //
// The Extended Documentation! //
// v1b2.030105 //
// by futureal //
////////////////////////////////


Introduction
------------

vbProArcade is a PHP script designed to provide an interface between the vBulletin Instant Community and Macromedia Flash-produced games. vbProArcade is made freely available via vbulletin.org to licensed vBulletin owners ONLY, and should not be redistributed or modified in any other way without the express written consent of the author.


Installation
------------

There are multiple steps required to making vbProArcade work with your vBulletin installation. They are:

- uploading the vbProArcade files
- uploading the arcade game files
- modifying your SQL database with the vbProArcade tables and settings
- modifying (hacking) the vBulletin PHP code
- installing (and possibly editing) the vbProArcade templates

The majority of these instructions are contained in a separate file (vbproarcade-install.txt). This file is meant as more of an explanaton of vbProArcade's features and how to use them effectively, as well as a revision log and other information from the author.

Note that this is an EXTENSIVE hack and will require some time and effort to get to work correctly. As a word of warning, there have been sites where vbProArcade would not work, for whatever reason. While I hope that your site is not one of them, I cannot guarantee that this will work everywhere. Still, I will make every effort to continually update the code to get it working in as many environments as possible.


Games and How to Modify Them
----------------------------

vbProArcade interfaces with Macromedia Flash games that have been specially modified to work with it. To modify a Flash game to work with vbProArcade, you will need access to the game's source code (usually a .FLA file). Just having the pre-compiled .SWF file will NOT work.

This is the block of code that needs to be added to a Flash Game to make it compatible with vbProArcade:

-----

// set up vars to return
vpaver = "100B2";
scorevariable = score;
action = "gameover";
game = gamename;
score_loc = location + "/proarcade.php";

// this needs to match the Admin CP value
// and should be between 0 and 31
hashoffset = 5;

// do security shuffle to return newhash
subhash1 = gamehash.substr(0,hashoffset);
subhash2 = gamehash.substr(hashoffset);
newhash = subhash2.concat(subhash1);

// redirect back to vbProArcade
getURL (score_loc, "_self", "POST");

-----

There are a couple of things to pay attention to here. First, "scorevariable" MUST match whatever you set the score variable to be in the Admin Control Panel in vBulletin. In this case, "scorevariable" would correspond to "$scorevariable" in the CP. Second, "hashoffset" MUST match the hash offset defined for the game in the Admin Control Panel in vBulletin. This value needs to be between 0 and 31, since the MD5 hash is a 32-character string. If these values do not match, you game will always return a Security Violation after exiting.

When you add a game to the arcade, you must give the arcade the HTML code associated with the Flash file, which should look something like this (this is the default code for Tetris):

-----

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="550" height="380">
<param name="movie" value="$vpa_gameurl?location=$vpa_bburl&gamename=$ game&gamehash=$gamehash&s=$session[sessionhash]&username=$username&highscore=$highscore&bbtitle=$ bbtitle">
<param name="quality" value="high">
<param name=bgcolor value="#576375">
<embed src="$vpa_gameurl" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="380">
</embed></object>

-----

Note the variables that can be used in this process:

$vpa_gameurl - The Path to the Arcade Games on your Server
$vpa_bburl - The Path to your Forum on your Server
$game - Game's Text Identifier
$gamehash - Game Security Hash (will not return scores correctly without this)
$session[sessionhash] - vBulletin Session Data (should pass this for non-cookied users)
$username - User who is Playing
$highscore - Current High Score for this Game
$bbtitle - Title of your Forums

Not all games will support all of these, but if you are creating (or modifying) a game to work with vbProArcade, you might make use of some of these variables to "spice it up" a bit.

The rest of the code should remain the same from game to game and does not need to be specially modified. If you are wondering about the security features, see the section on security further down in this documentation.

Also note that before modifying any games you find, please make sure that you have the author's permission, *especially* if you intend to redistribute the file after it has been modified.


Templates
---------

vbProArcade is a completely templated-out hack, meaning that it is remarkably easy to change the look of your Arcade without having to edit the PHP code itself. The downside of this is that there are a bunch of templates to install and manage. Here is a list of the templates that come with vbProArcade, and where each one is used:

- vbproarcade_arcade - Main Arcade Page
- vbproarcade_arcadebit - Main Arcade Page - "Bit" to Display Each Game on the Main Page
- vbproarcade_arcade_gamedesc_icon - Main Arcade Page - Game Description (with Game Icon)
- vbproarcade_arcade_gamedesc_noicon - Main Arcade Page - Game Description (without Game Icon)
- vbproarcade_arcade_gamename_icon - Main Arcade Page - Game Name (with Game Icon)
- vbproarcade_arcade_gamename_noicon - Main Arcade Page - Game Name (without Game Icon)
- vbproarcade_arcade_gamescorecell - Main Arcade Page - Mini-Scoreboard Game Score Cell
- vbproarcade_arcade_gamescorecellbit - Main Arcade Page - Mini-Scoreboard Game Score Cell "Bit"
- vbproarcade_arcade_userscore_guest - Main Arcade Page - Score Message for a Guest
- vbproarcade_arcade_userscore_king - Main Arcade Page - Score Message for the Champion
- vbproarcade_arcade_userscore_notking - Main Arcade Page - Score Message for Normal Players
- vbproarcade_arcade_userscore_notplayed - Main Arcade Page - Score Message for Users who Have Not Played
- vbproarcade_errormessage - Arcade Message - Template
- vbproarcade_gameover - Game Over Template
- vbproarcade_playgame - Game Screen Template
- vbproarcade_scorebit - Game Scoreboard - Score "Bit"
- vbproarcade_scoreboard - Game Scoreboard
- vbproarcade_scoreboard_gamelinkbit - Game Scoreboard - Game Links (at bottom of pages) "Bit"
- vbproarcade_scoreboard_gamelinks - Game Scoreboard - Game Links (at bottom of pages)
- vbproarcade_scoreboard_userstats - Game Scoreboard - User Statistics
- vbproarcade_topscoreboard - Game Top Scoreboard
- vbproarcade_userdetail - User Detail Main Page
- vbproarcade_userdetail_gamecell - User Detail Game Cell

As it stands, there are 23 templates in use in vbProArcade Beta 2. As the code is optimized further, this number *should* go down; however, as new features are added, new templates may be necessary. I know that maintaining this many is a heavy workload for an administrator, but it seems to be the best way to allow for customization, so I am sticking with it (for now).


Arcade Tables
-------------

There are five tables that make up vbProArcade:

arcadeconfig - Stores the Arcade Configuration
arcadegames - Stores the Arcade Games' Configuration
arcadescoregroups - Defines Groups of Scores (not fully implemented)
arcadescores - Stores the Top Scores for each Game
arcadetopscores - Stores the Scores for each Game

To see the individual layouts of each table, you can execute a "desc tablename;" query from the MySQL command line.



Score Table Structure and Security
----------------------------------

One of the major problems with Beta 1 of vbProArcade was a lack of security. This has been addressed (somewhat) in Beta 2 by a rather large modification of the way scores are stored and handled.

First of all, the arcadescores table (which stores the regular scores themselves) now looks like this:

int(10) unsigned scoreid unique score identifier
int(10) unsigned scoregroup group the score belongs to
varchar(50) game game's textual identifier

int(11) begintime timestamp for game start
int(11) endtime timestamp for game end

varchar(50) gamehash md5 encrypted identifier
tinyint(1) valid see if score is valid (0 invalid, 1 valid)

int(10) unsigned userid userid of player
varchar(50) username username of player

int(11) score user's score
varchar(70) comment user's comment

When a user chooses to play a game, the database creates an invalid score entry containing that user's name and ID, the current UNIX timestamp, and an MD5 hash of some encrypted value. The hash, along with any other interesting information, is passed into the Flash game.

When a Flash game exits, it redirects the user to the "Game Over" screen, and passes along the hash with the other data. The Arcade then queries the database, looking for the most recent entry for that particular user, checking to see if the game matches, the hash matches, and that the time is greater than the recorded time. If everything checks out, the score is recorded as a valid score, and the user is prompted to enter a comment.

When the user clicks "Submit" on the comment screen, a new, random MD5 hash is generated and stored alongside the score in the database, which is then passed along with the form data, and re-checked against the database. This will prevent users from "brute-forcing" the Arcade to record a new comment for a given score, as was possible in Beta 1.

On top of the MD5 security, the server is recording the entry and exit timestamps of each game, which cannot be altered by user input at all. An astute administrator should be able to determine whether or not a game was completed in a reasonable amount of time or not, thus giving him or her yet another method of weeding out fake scores, should they arise.

Another new feature of the score table is "Score Grouping." Although this is not yet implemented, it will allow the Administrator to define sets of scores for a given time period. This could be used for daily, weekly, or monthly scoreboards, for example, or perhaps for a tournament or some other form of grouping.

Obviously, this system is not foolproof, since a cheater could (for example) still wait the requisite amount of time for a game and use a hex-editor to change memory locations. Still, this is a good start, and should prevent all of the "address bar cheating" that we saw with Beta 1.


History
-------

Release History (so far):

8/31/02 - vbProArcade Beta 1 Released
9/13/02 - vbProArcade Beta 1.03 Released
1/05/03 - vbProArcade Beta 2 Released


Revision History:

Beta 2:

- Fixed Top Score Board bug
- Fixed Champions System to Correctly Integrate with postbit
- Added Icons to Champions System
- Added Template Support to Champions System
- Added Usergroup Access Control to Admin CP
- Added Mini Scoreboards to Main Arcade Page
- Changed Score Tables to use UNIX timestamps
- Changed Score Tables for additional security
- Added Score Grouping for future expansion
- Added Customizable Icons for User Detail Pages
- Added User Scoreboards for Individual Games
- Added User Statistics Pages
- Removed/Cleaned Up Some Old Templates
- Added Simple Score Editor Framework (for future expansion)
- Added Ability to Reset Scores

Beta 1.03:

- Fixed PHP Safe Mode bug
- Fixed Top Score Board Division by Zero error
- Fixed Undefined Function Call in online.php
- Fixed URL Redirection Problems

Beta 1:

- Initial Release
- Basic Arcade/Scoreboard Functionality


Conclusion
----------

Although I certainly *hope* that vbProArcade will work flawlessly on your forums, I am sure that as time goes on people will run across small bugs and problems that need to be corrected. I will make every effort to make myself available for support, though I urge you to exercise patience, as I have a very, very busy schedule.

I plan to continue to work on vbProArcade for the foreseeable future, including porting it over to vBulletin v3.0 when it is released to the public.

Should anybody feel ambitious, Paypal donations are always graciously accepted, and any money received in this manner will go directly towards the upkeep and maintenence of my two websites. To donate, go to www.paypal.com and use my futureal@rctech.net email address. Note that donations are not at all required for support purposes!

Any support questions should be directed to the vbProArcade thread on www.vbulletin.org, though my email addresses are available should they become necessary.

Thanks for using vbProArcade!


- Shane (futureal)

futureal@rctech.net
futureal@shadowsofnamek.com
Reply With Quote
  #4  
Old 01-01-2003, 01:33 AM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font size="5">vbProArcade Flash Game: Breakout</font>

This is the game Breakout, which originally was released as part of vbProArcade v1.0 Beta 1.

Version:

For all intents and purposes, this should be considered v1.0 of Breakout, and referred to as such.

Compatibility:

- vbProArcade Beta 2
- vbProArcade Beta 1

Original Credits:

TBD

Other Information:

Nothing at this time.
Reply With Quote
  #5  
Old 01-01-2003, 01:33 AM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vbProArcade Flash Game: Pacman

This is the game Pacman, which originally was released as part of vbProArcade v1.0 Beta 1.

Version:

For all intents and purposes, this should be considered v1.0 of Pacman, and referred to as such.

Compatibility:

- vbProArcade Beta 2
- vbProArcade Beta 1

Original Credits:

Paul Neave, http://www.neave.com/webgames/

Other Information:

Nothing at this time.
Reply With Quote
  #6  
Old 01-01-2003, 01:33 AM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vbProArcade Flash Game: Snake

This is the game Snake, which originally was released as part of vbProArcade v1.0 Beta 1.

Version:

For all intents and purposes, this should be considered v1.0 of Snake, and referred to as such.

Compatibility:

- vbProArcade Beta 2
- vbProArcade Beta 1

Original Credits:

Paul Neave, http://www.neave.com/webgames/

Other Information:

Nothing at this time.
Reply With Quote
  #7  
Old 01-01-2003, 01:34 AM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vbProArcade Flash Game: Space Invaders

This is the game Space Invaders, which originally was released as part of vbProArcade v1.0 Beta 1.

Version:

For all intents and purposes, this should be considered v1.0 of Space Invaders, and referred to as such.

Compatibility:

- vbProArcade Beta 2
- vbProArcade Beta 1

Original Credits:

Paul Neave, http://www.neave.com/webgames/

Other Information:

Nothing at this time.
Reply With Quote
  #8  
Old 01-01-2003, 01:34 AM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font size="5">vbProArcade Flash Game: Tetris</font>

This is the game Tetris, which originally was released as part of vbProArcade v1.0 Beta 1.

Version:

For all intents and purposes, this should be considered v1.0 of Tetris, and referred to as such.

Compatibility:

- vbProArcade Beta 2
- vbProArcade Beta 1

Original Credits:

Original Author: unknown
vBTetris Modifications: john.eovie

Other Information:

Nothing at this time.
Reply With Quote
  #9  
Old 01-01-2003, 05:22 AM
SS9267547's Avatar
SS9267547 SS9267547 is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Super! Thanks for releasing them!
Reply With Quote
  #10  
Old 01-01-2003, 10:29 AM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Funny, this looks an awful lot like the Tetris Flash file which I modded...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:02 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06212 seconds
  • Memory Usage 2,344KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete