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

#1 2010-05-22 07:54:31

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

A simple online/offline detector

http://www.mediafire.com/imgbnc.php/2b75eb2b1f2654aa4a4c1a2a4f35b1784g.jpg

Why it works:

Off-line scratch has problems dividing by 0 or nothing for some reason, and when a script has an error it stops the whole script from working.

On-line either it can divide by 0 or when it has an error it just skips that part, but either way it allows us to create on-line detectors.


What could we use it for:

Often projects are broken or laggy on-line, if you want people to download it to get a better playing experience or you want people to stop saying "Dosent work!" in the comments then you can either have a little message telling them they should download popping up or completely stop the game on-line so they have to download.

Offline

 

#2 2010-05-22 08:15:37

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: A simple online/offline detector

Very helpful! I've posted similar things to help other people, but it's nice to have a great reference for it! Great job!

Offline

 

#3 2010-05-22 08:40:39

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: A simple online/offline detector

Cool find. I know that there are other methords too.


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#4 2010-05-22 08:44:19

coka
Scratcher
Registered: 2007-11-03
Posts: 1000+

Re: A simple online/offline detector

colorfusion wrote:

http://www.mediafire.com/imgbnc.php/2b7 … b1784g.jpg

Why it works:

Off-line scratch has problems dividing by 0 or nothing for some reason, and when a script has an error it stops the whole script from working.

On-line either it can divide by 0 or when it has an error it just skips that part, but either way it allows us to create on-line detectors.


What could we use it for:

Often projects are broken or laggy on-line, if you want people to download it to get a better playing experience or you want people to stop saying "Dosent work!" in the comments then you can either have a little message telling them they should download popping up or completely stop the game on-line so they have to download.

Yep, I've used this one before because it very simple.  And what you mentioned about laggy projects is a good idea. If you also have music in a project, and it makes it slow online, you could only have it play offline.


http://i42.tinypic.com/2rot8c2.png

Offline

 

#5 2010-05-22 09:32:28

shamrocker
Scratcher
Registered: 2009-03-19
Posts: 1000+

Re: A simple online/offline detector

Oh WOW! Cool! I needed this. I just hope it's good for BYOB, that's all. I'm making a chat room with Mesh and a few scripts, a Terms of Use sprite, and a Users list.


http://i46.tinypic.com/2s1b32e.png
respect the oxford comma

Offline

 

Board footer