-
2 player game help please.
is it possible to make a very very simple 2 player game with this assumptions :
1. I have my own website but i cannot ask the hosting company to install something like socket servers or the electro server
2. the game takes some parameters from the database and stores some game info there also
3. the game will be turn based like a simple card game or chess game
with point no. 1 set in stone, is it impossible? if it is not, what approach do i take which wouldnt be a totally ridiculous approach
-
Senior Member
If you have access to php and mysql from your hosting company, then use them. Both are quite easy to learn, and work together to give you access to a single database online that you can use to make different players interact.
-
Flash hates me.
"wen i found my gerbil dead my other gerbil was eating it i just cried and screamed"
http://www.livescripts.net
--------------------------------------------------------------------------------
Last edited by some moderator : Today at 9:01 PM.
-
yup, you can either make a turnbased game that accesses PHP scripts or you can use msn ( http://games.mess.be ).
-
ok!
ok thanks guys.. ill definitely look into it...
-
databse question
by the way... i saw that php mysql is being recommended for my requirement... im currently using ASP with an ACCESS database.. would this be just the same thing? or is PHP better still a better option?
-
Senior Member
PHP/mySQL is just used more because those are free. But ASP/Acess should work too.
-
question
hi guys.. ive been checking out the sites and sample you gave me... i understand most of em... theres one thing i cand find and understand though....
i know LoadVariables() is used to get data from the database... but i can't seem to find the code that actually send them back to the asppage for insertion to the database!
my question is.. how or what line of code is actually used for so that flash can send what i typed in back to the asp page?
-
free-webmaster-resource.com
-
if you use php then you can put this script in the file you load with loadVariables():
PHP Code:
print("?_root.variable1=".$variable1."&variable2=".$variable2);
to send them to the php/asp page, you do this:
code:
loadVariables("myaspfile.asp?variable1="+variable1 +"&variable2="+variable2);
-
free-webmaster-resource.com
I would use loadvars.sendAndLoad() for those things if i were you.
loadVariables is older and loadVars is great
here's an example with php.
in the php file something like
Code:
$testVariable = $_POST['variableSendFromFlash'];
print("&testData=$testVariable");
Then in flash do something like this:
Code:
sendAndReceiveData = function(){
sender = new LoadVars();
sender.variableSendFromFlash = "hi send me to a php script";
receiver = new LoadVars();
receiver.onLoad = function(){
myTextBoxName.text = receiver.testData;
}
sender.sendAndLoad("phpscript.php",receiver,"POST");
}
and call the php script on a button something like this:
Code:
myButton.onPress = function(){
sendAndReceiveData()
}
straight outta my head, so don't expect it to work after a cut and paste but you should get the idea.
Last edited by deamothul; 05-19-2004 at 09:26 AM.
-
sendandload
from my current understand of sendandload()... is it correct to assume that if I use this, my approach no longer becomes polling? because i can get a response as soon as i send?
no need to poll the db?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|