vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   v3 Arcade - Game Modification Guide & Releases (https://vborg.vbsupport.ru/showthread.php?t=60666)

John 01-23-2004 10:00 PM

v3 Arcade - Game Modification Guide & Releases
 
How v3 Games Work

v3 Arcade games are a little different to those in the original Arcade and futureal's proArcade.

Instead of a simple getURL which sends all of the variables to the next page, the v3 Arcade uses a completely different system - a series of sendAndLoad events where data is sent and received between the Flash file and vBulletin. As a result, converting games for the v3 Arcade is a little more complicated.

To get games working with the v3 Arcade, a piece of code needs to be inserted which will run on every frame of the Flash movie. (I.e. one looped movieclip which is active across all frames.) A variable also needs to be set to tell the v3 Arcade code when to end the game.

EDIT: INSTRUCTIONS UPDATED TO MAKE THE PROCESS A LOT EASIER!

Converting Games

Converting a game is quite simple, providing you have some basic knowledge of Flash.

Step 1.
Create a blank movie clip, containing two keyframes.

Step 2.
On frame 1 of this blank movieclip, insert this code (not forgetting to change the gamename value to something unique - THIS PRESUMES THAT _root.score CONTAINS THE SCORE VALUE!):
Code:

// HERE THE ARCADE SESSION IS INITIATED
// DON'T FORGET TO CHANGE THE GAMENAME VALUE!
if (this.sessionstarted != 1) {
    this.arcade = new LoadVars();
    this.sessionvars = new LoadVars();
    this.arcade.gamename = "towerball";
    this.arcade.sessdo = "sessionstart";
    this.arcade.sendAndLoad("arcade.php", sessionvars, "POST");
    this.sessionstarted = 1;
}

// IF GAMEOVER=1, SUBMIT THE SCORE AND REDIRECT THE PAGE
if (_root.gameover == 1) {
    if ((this.askpermission != 1) && (this.sessionvars.connStatus == 1)) {
        this.prequestvars = new LoadVars();
        this.pranswer = new LoadVars();
        this.prequestvars.gametime = this.sessionvars.gametime;
        this.prequestvars.fakekey = this.sessionvars.initbar;
        if (_root.score == 0) {
            this.prequestvars.score = -1;
        } else {
            this.prequestvars.score = _root.score;
        }
        this.prequestvars.id = this.sessionvars.lastid;
        this.prequestvars.sessdo = "permrequest";
        this.prequestvars.note = (this.prequestvars.id*this.prequestvars.score*this.prequestvars.fakekey);
        this.prequestvars.sendAndLoad("./arcade.php", this.pranswer, "POST");
        this.askpermission = 1;
    }
    if ((this.pranswer.validate == 1) && (this.finalsent != 1)) {
        this.burnscore = new LoadVars();
        this.burnscore.microone = this.pranswer.microone;
        this.burnscore.gametime = this.prequestvars.gametime;
        this.burnscore.id = this.prequestvars.id;
        if (_root.score == 0) {
            this.burnscore.noscore = 1;
        }
        this.burnscore.sessdo = "burn";
        this.burnscore.send("./arcade.php", "_self", "POST");
        this.finalsent = 1;
    }
}

Step 3.
Now, you need to let the game know when to finish the game and redirect the page. This is done by the setting of a new variable, "gameover". When _root.gameover==1, the game will end.

Find the frame of the "Game Over" page, and add this actionscript to the frame:
Code:

_root.gameover=1;
Save, and export the SWF movie to the appropriate place. :)

Releasing Games

When releasing a game, please try to stick to the same format as the other games provided below. (I.e. with the installation script.) It should be fairly easy to figure out what goes where. :) Try to release all games in this thread!


Additional Games So Far

? Pacman (by Paul Neave) - https://vborg.vbsupport.ru/showpost....&postcount=102
? Simon (by Paul Neave) - https://vborg.vbsupport.ru/showpost....&postcount=130
? Breakout - https://vborg.vbsupport.ru/showpost....&postcount=350
? Target - https://vborg.vbsupport.ru/showpost....&postcount=359
? Maeda Path - https://vborg.vbsupport.ru/showpost....&postcount=469
? Helicopter - https://vborg.vbsupport.ru/showpost....&postcount=504
? Curveball - https://vborg.vbsupport.ru/showpost....&postcount=506
? Miniclip Snake - https://vborg.vbsupport.ru/showpost....&postcount=537
? Towerball - https://vborg.vbsupport.ru/showpost....39&postcount=7
? Alien Clones - https://vborg.vbsupport.ru/showpost....3&postcount=12
? Penguin Bashing - https://vborg.vbsupport.ru/showpost....9&postcount=72
? Mars Rover - https://vborg.vbsupport.ru/showpost....&postcount=109
? Disco Racer - https://vborg.vbsupport.ru/showpost....&postcount=138
? Joust - https://vborg.vbsupport.ru/showpost....&postcount=144
? Hexxagon - https://vborg.vbsupport.ru/showpost....&postcount=938
? Monkey Lander - http://www.v3arcade.com/play/showthread.php?t=55
? Pingu Slap - http://www.v3arcade.com/play/showthread.php?t=53
? Bloody Pingu - https://vborg.vbsupport.ru/showpost....&postcount=295
? Radial Snake - https://vborg.vbsupport.ru/showpost....&postcount=300
? Kill Kenny - https://vborg.vbsupport.ru/showpost....&postcount=304
? Alien Attack - https://vborg.vbsupport.ru/showpost....&postcount=314
? Ron North's Jewels - https://vborg.vbsupport.ru/showpost....&postcount=329
? KickUps - https://vborg.vbsupport.ru/showpost....&postcount=363
? Altex - https://vborg.vbsupport.ru/showpost....&postcount=403
? Enemy Shooting - https://vborg.vbsupport.ru/showpost....&postcount=403
? Jail Break - https://vborg.vbsupport.ru/showpost....&postcount=403
? Snow Paul - https://vborg.vbsupport.ru/showpost....&postcount=403
? Space Hunter - https://vborg.vbsupport.ru/showpost....&postcount=403
? Plasmanaut on Fire - https://vborg.vbsupport.ru/showpost....&postcount=443
? Simpsons Shooter - https://vborg.vbsupport.ru/showpost....&postcount=447
? Plasmanout V2 - https://vborg.vbsupport.ru/showpost....&postcount=464
? Pinball - http://www.v3arcade.com/play/showthread.php?t=182
? Juggler - http://www.v3arcade.com/play/showthread.php?t=207
? Starship Legend - http://www.v3arcade.com/play/showthread.php?t=208
? Aim & Fire - http://www.v3arcade.com/play/showthread.php?t=206
? Plops - http://www.v3arcade.com/play/showthread.php?t=184
? Tie Fighter Shooter - https://vborg.vbsupport.ru/attachmen...chmentid=17650
? Witch Hunt - https://vborg.vbsupport.ru/attachmen...chmentid=17651

MindTrix 01-24-2004 11:56 AM

Cheers for the guide :)

KevinUK 01-24-2004 01:18 PM

John,

Neave's PacMan doesn't open in Flash - I get "unexpected file format" (even though it's .fla).

Kevin

NuclioN 01-24-2004 01:38 PM

The format is flash MX when it won't open with flash 5. You need to install flash MX to open it.

NuclioN 01-24-2004 01:43 PM

Quote:

The easiest way of doing this is to drag the new movieclip onto the last frame which the game will end on. (I.e. the game over screen.) An alternative is to create a new scene, and name it "Submit". On frame 1, include your new movieclip. In the main game, find the code which signifies the end of a game - and add:
Code:
gotoAndStop("Submit",1);
Is it possible (i shall test it also) to add an extra frame on the end of the game with a stopframe in it. On this frame is not a movieclip but a frameaction that is called when you add in the gameover section: GotoAndStop frame **. where the script is executed?

John 01-24-2004 02:07 PM

Quote:

Originally Posted by NuclioN
Is it possible (i shall test it also) to add an extra frame on the end of the game with a stopframe in it. On this frame is not a movieclip but a frameaction that is called when you add in the gameover section: GotoAndStop frame **. where the script is executed?

You can do whatever you like, as long as the first part of the code is at the beginning and the looping step 2 appears at the end of the game.

Dark Jim 01-24-2004 06:33 PM

Thanks for the game NuclioN, it's great. Could you convert some of the games that are in the vBProArcade games thread too?

BillaBongUSA 01-24-2004 06:39 PM

Thanks for the tutorial, John. I think I'll go through the other thread and try to convert some games that people have requested.

Littlebit 01-24-2004 06:46 PM

Hey John,
Why did the sound volumes get weird with curveball?

John 01-24-2004 06:48 PM

Quote:

Originally Posted by Littlebit
Hey John,
Why did the sound volumes get weird with curveball?

No idea, but they did. I can't afford to spend all day trying to fix them. :(

John 01-24-2004 07:34 PM

1 Attachment(s)
New Game: Alien Clones

Instructions in zip. Thanks to miniclip.com for this one...

InSaNeOnE 01-24-2004 08:41 PM

Quote:

Originally Posted by NuclioN
Towerball game. Tnx to John for the assistance by adding the code :)

Install the game in the same way you installed the others, so towerball.game.php in the admin dir and run it from there. Both images in images/arcade and the swf in the games dir.


Worked perfectly, Huge thanks for the new game :)


.. Will be installing the new game from John shortly also.



A Huge thanks for the new games, if any of the members on my forum make any (I am usless at flash) I will be sure to post them.

MaDCaT75 01-24-2004 08:51 PM

what about games like chopper challenge? How do we put in an extra thingie or whatever that gives us the option to play again or submit the score?

eXtremeTim 01-24-2004 09:19 PM

Okay you flash wizards lets get some games converted. My users are dying for loads of new games.

MaDCaT75 01-24-2004 09:20 PM

Yes and I still want a submit button for copter.

eXtremeTim 01-24-2004 09:26 PM

I have a fealing your not getting one for a while :(

MaDCaT75 01-24-2004 09:28 PM

If someone would tell me how to put one in then I'd shut the hell up about it already ffs.

eXtremeTim 01-24-2004 09:30 PM

I would if i knew how.

John 01-24-2004 09:31 PM

Quote:

Originally Posted by MaDCaT75
If someone would tell me how to put one in then I'd shut the hell up about it already ffs.

I have a problem where I tend to ignore people who think they can get what they want by constantly whining and complaining. Nothing personal, just a habit.

BillaBongUSA 01-24-2004 09:32 PM

Quote:

If someone would tell me how to put one in then I'd shut the hell up about it already ffs.
I have a feeling that even if someone told you, you wouldn't know how to do it.

I don't know how this game is structured, but it seems like all you'd have to do is make the game direct you to a frame with a stop action on it that has buttons for submitting your score or restarting, rather than having it direct you to a game over frame whenever you crash. The submit button would direct you to the original game over screen, which would submit your score, and the restart button would just send you to frame one of the movie. But it's hard to say without having seen the FLA.

MaDCaT75 01-24-2004 09:33 PM

Quote:

Originally Posted by BillaBongUSA
I have a feeling that even if someone told you, you wouldn't know how to do it.

I appreciate people telling me I'm stupid.

John 01-24-2004 09:36 PM

BillaBongUSA is right, or using the code in the first post you can simple set the gameover variable to equal 1 on (release).

BillaBongUSA 01-24-2004 09:36 PM

That's good, because I enjoy calling people stupid.

MaDCaT75 01-24-2004 09:40 PM

Quote:

Originally Posted by BillaBongUSA
That's good, because I enjoy calling people stupid.

go to hell.

BillaBongUSA 01-24-2004 09:41 PM

Okay.

MindTrix 01-24-2004 09:44 PM

Stop the arguments please.

NuclioN 01-24-2004 09:45 PM

It's not easy and it is sometimes timeconsuming work. I can't test the games on my pc so i have to upload them, install them and if they don't work i have to start all over again. Confusing part is the _root.score = _root.var.score; where var is the name of the scorevariable. The score could be launched from different gamelevels and without a fla it becomes a hell of a task to find the right scorevariable.

If the scorevariable is 'points' is this the correct first line? : _root.score = points;

AutomatikStudio 01-24-2004 09:46 PM

What the hades does callling people stupid and people telling others to go to hell have to do with v3 Arcade? Absolutely nothing. Please take pointless bickering elsewhere.

John 01-24-2004 09:47 PM

Sorry Nuclion, you've lost me. Points? What game are you talking about? Or do you just mean in general?

MaDCaT75 01-24-2004 09:49 PM

Nuclion can you please PM me!!!

NuclioN 01-24-2004 09:52 PM

Quote:

Originally Posted by John
Sorry Nuclion, you've lost me. Points? What game are you talking about? Or do you just mean in general?

I mean in general. :) I've tried to make a _root.score = money; for the camelrace game but i haven't test it because it needs a button.

Nam 01-24-2004 10:04 PM

Thanks both NuclioN and John for 2 new games, they're really great.

John 01-24-2004 10:08 PM

NuclioN, just got battleships... how do you score something like that?

eXtremeTim 01-24-2004 10:21 PM

How about so many points for each ship and like some kinda time bonus for each ship sunken and take away so many points for each hit on there ship and maybe like a negative bonus for each ship the enemy sinks based on time taken. That should allow for alot of variation in score and stuff.

Nam 01-24-2004 10:51 PM

Is there anyway to make this PHP blackjack game? It's php, not flash.

http://www.gerradroberts.com/blackjack

NuclioN 01-24-2004 11:09 PM

I have some realy great blackjack games that i want to share. If i can't modify it i'm sure John can do it. :)

eXtremeTim 01-24-2004 11:22 PM

Im looking forward to it nuclion. :) I might try and edit a few games myself. Would somebody be willing to help me?

MaDCaT75 01-24-2004 11:47 PM

Quote:

Originally Posted by eXtremeTim
Im looking forward to it nuclion. :) I might try and edit a few games myself. Would somebody be willing to help me?

Everyone's too busy to help around here. I've asked for help a dozen times and nobody will.

John 01-24-2004 11:52 PM

Quote:

Originally Posted by MaDCaT75
Everyone's too busy to help around here. I've asked for help a dozen times and nobody will.

*sigh*.... will you ever drop it?

tomp 01-25-2004 12:32 AM

MaDCaT75, give people a break, alot of people active in this topic will be trying to get new games out so people like you can put them on your site


All times are GMT. The time now is 02:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02353 seconds
  • Memory Usage 1,842KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete