This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#101 2010-08-21 08:22:51

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

ok


You can now reach me on Twitter @johnnydean1_

Offline

 

#102 2010-08-22 12:31:25

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

bump done?


You can now reach me on Twitter @johnnydean1_

Offline

 

#103 2010-08-23 04:56:59

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Online Multiplayer PHP

johnnydean1 wrote:

sparks wrote:

what was the point of that? I was explaning why a new catagory does not work, why custom blocks can be used and generally ANSWERING IT! No need to repeat  tongue

I explained how to do every block.

And you can add 1 new catagory NXIII did it in a tutorial.

Where is the tutorial?

Offline

 

#104 2010-08-23 05:16:32

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP


You can now reach me on Twitter @johnnydean1_

Offline

 

#105 2010-08-24 15:28:11

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

pmub


You can now reach me on Twitter @johnnydean1_

Offline

 

#106 2010-08-25 06:08:55

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Online Multiplayer PHP

I need upload info (the bit that says FTP).


/* No comment */

Offline

 

#107 2010-08-26 14:53:08

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

Umm It shut me down so can you make your own?


You can now reach me on Twitter @johnnydean1_

Offline

 

#108 2010-08-26 15:32:29

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Online Multiplayer PHP

Righty-ho.  smile


/* No comment */

Offline

 

#109 2010-08-26 16:58:22

1stCorinthians
Scratcher
Registered: 2009-06-14
Posts: 52

Re: Online Multiplayer PHP

Well, perfect timing. Im no expert at PHP, but there are some things you should know:

1. PHP mainly doesn't interact with players in the right way to make any RPG you see today, and if you tried, it would be very, very hard, if not impossible. For one thing, you would have to have a very good knowledge of PHP, HTML, and CSS to make any common RPG. You'd be better off using flash.

2. In plain English: PHP would probably be only useful for text-based games, unless you are willing to spend years on it.

3. As for the scripts, I will type them here (if it's possible to accomplish them; keep in mind that while i know PHP im not a pro yet. THIS ARTICLE MAY STILL BE INCOMPLETE!):

// First, you need to connect to the MySQL server. To do this type:

<?php

// set database server access variables:
$host = "localhost";
$user = "test";
$pass = "test";
$db = "testdb";

// open connection
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");

// select database
mysql_select_db($db) or die ("Unable to select database!");

// Put this in as an SQL script:

CREATE DATABASE testdb;

CREATE TABLE `symbols` (
    `id` int(11) NOT NULL auto_increment,
    `column1` varchar(255) NOT NULL default '',
    `column2andsoon` varchar(255) NOT NULL default '',
    PRIMARY KEY  (`id`)
) TYPE=MyISAM;

INSERT INTO `symbols` VALUES (1, 'America', 'eagle');

// WHOA WHOA... stop here
// -------------------------------------Now for the scripts------------------------------------------------

// set game to %s =
$gamename = 'input here';

// get %v of player %s online =
// create query - Replace * with the desired item
$query = "SELECT * FROM column";

// execute query
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());

// AND IM SORRY I COULD ONLY HELP WITH SO LITTLE AND YET CAUSE A LOT OF
// ERRORS, BUT IF YOU REALLY TINK I SUCK THEN GO TO A REAL PHP SITE OR LEARN
// IT YOURSELF! See more info on PHP
// here: http://devzone.zend.com/article/627
// and here: http://www.php.net/manual/en/function.mysql-query.php
// Sorry for all the double slashes, but i didn't want you to put this in by accident as
// it would be invalid code without them.

Last edited by 1stCorinthians (2010-08-26 17:38:50)

Offline

 

#110 2010-08-26 17:06:27

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

^ Dont say that, look here: click thats done mainly using PHP


You can now reach me on Twitter @johnnydean1_

Offline

 

#111 2010-08-26 17:33:51

1stCorinthians
Scratcher
Registered: 2009-06-14
Posts: 52

Re: Online Multiplayer PHP

what the game itsself or the site? You can do the site just using basic HTML! As for the game, you probably cant code a game with PHP. You must be thinking of the wrong code.

-------------------------------------------------------------------------------------------------------------

Oh, and here? http://dsipaint.com/tmj/tmj_npc_test.php
One compound word: JAVASCRIPT!!!!!!

--------------------------------------------------------------------------------------------------------------

Sorry if i sound rude, I'm not intending to be.

Last edited by 1stCorinthians (2010-08-26 17:38:13)

Offline

 

#112 2010-08-27 04:06:27

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Online Multiplayer PHP

I could easily script the PHP for you.  smile  I can make it possible but I'll just need someone to do the squeak bit. I have already made an upload form and a forum out of PHP with NO SQL. Yes it is possible and it is fairly secure. And anyway does need to be secure??? It's not like you've got passwords been stored. Let me know if you need my help.  smile  (PS it's also possible with javascript, I can do it that way too.)


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#113 2010-08-27 04:49:23

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Online Multiplayer PHP

Where do you store the forum data if you're not using SQL?

@1stCorinthians
The game is done in a scratch mod, I think, and the PHP just makes databases possible and acts as a kind of alternative mesh.


/* No comment */

Offline

 

#114 2010-08-27 05:10:01

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

Can you do the database thing Successor, I dont have a clue


You can now reach me on Twitter @johnnydean1_

Offline

 

#115 2010-08-27 10:21:05

1stCorinthians
Scratcher
Registered: 2009-06-14
Posts: 52

Re: Online Multiplayer PHP

Now, I'm honestly not the BEST at PHP but... Ah whatever. Bye-bye.
-------------------------------------------------------------------------------------------
@Successor: Oh... I get it now...

Offline

 

#116 2010-08-29 09:50:48

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

bump


You can now reach me on Twitter @johnnydean1_

Offline

 

#117 2010-08-29 15:54:03

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Online Multiplayer PHP

sparks wrote:

I am no expert on php, but I don't think it's possible for Panther to send info to a page. Pages can only be triggered by a block reading from it.

the only way I can think of writing info to an online store, is for each page to be IP sensitive, and say, have individual pages for all the characters on a keyboard and some other pages for things like "submit" "newline" and then get Panther to visit the correct pages in the right order and get the php to write a line corresponding to your IP with the pages in order of visit until that IP visits the submit page, then it clears the line and saves the content to a list pages for things like status, message, colour etc. you would have command pages that are visited to give meaning to a string.

here's an example of a status being updated:

page visited:
clear            (clears previous string)
i

a
m

h
a
p
p
y
status

so visiting the pages in that order will clear the line representing your IP on the store page, then as you visit each character page, it will write that character to your line.
in this case "I am happy" is written to it. When you visit the status page, the php script can grab the string from your line in the store page and because you visited the "status" page, it can write that string to your line on a status page that other projects can read and display. other end commands could include "username", "speech", "send to" (if each user had a page to themselves the string could be sent to their "inbox")

this is all purely theoretical, I have no knowledge of php, but I do think that should work.... let me know what you think

Bingo 1.2.0 has URL and file blocks, I use the URL blocks to make an Internet Explorer. There are 2 new categorys in Bingo.

Offline

 

#118 2010-08-30 06:20:29

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Online Multiplayer PHP

The php script should be available to use soon at http://domc.eu5.org/jd1. I'll post instructions when ready.


/* No comment */

Offline

 

#119 2010-08-30 06:23:12

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

thank you!!!


You can now reach me on Twitter @johnnydean1_

Offline

 

#120 2010-08-30 10:21:44

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Online Multiplayer PHP

bump


You can now reach me on Twitter @johnnydean1_

Offline

 

#121 2010-08-30 10:53:19

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Online Multiplayer PHP

fullmoon wrote:

johnnydean1 wrote:

Could you not do this:
On the A page

$letter = "A";
$IP = IP adress;
connect to database;
search table for IP;
$old = item (IP + 1) of database;
$new write = $old . $letter;
write $new to item (IP + 1) of database;

Yes, but sending a string one letter at a time is too slow to be practical.

What about it reades each line of each webpage? Possible, Bingo, a Scratch Hack has loads of new blocks and 2 new categorys. Including URL blocks. It is actullately possible to create a Internet browser with pages all over the world in Bingo!

Offline

 

#122 2010-08-30 12:11:34

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Online Multiplayer PHP

Put this in Panther's web block: http://domc.eu5.org/jd1/?test=yes


/* No comment */

Offline

 

#123 2010-08-30 12:13:12

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Online Multiplayer PHP

rdococ wrote:

What about it reades each line of each webpage? Possible, Bingo, a Scratch Hack has loads of new blocks and 2 new categorys. Including URL blocks. It is actullately possible to create a Internet browser with pages all over the world in Bingo!

in fact, my next OS will have an internet browser which reads the HTML from the page.

Offline

 

#124 2010-08-30 12:16:42

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Online Multiplayer PHP

LS97 wrote:

in fact, my next OS will have an internet browser which reads the HTML from the page.

Cool! Does it parse the HTML as well? JavaScript and VBscript? (Probably pushing it  tongue )

Last edited by TheSuccessor (2010-08-30 12:17:16)


/* No comment */

Offline

 

#125 2010-08-30 12:20:27

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Online Multiplayer PHP

TheSuccessor wrote:

LS97 wrote:

in fact, my next OS will have an internet browser which reads the HTML from the page.

Cool! Does it parse the HTML as well? JavaScript and VBscript? (Probably pushing it  tongue )

what i actually meant is that it will be able to read SOME of the html on the page and parse it. i will defintely include basc stuff like <title> and <a href> and <strong>. all of the non-parsed text will be displayed as plain text. this will get better over the years, of course.

Offline

 

Board footer