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

#1351 2010-04-14 13:41:39

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Panther development thread

nXIII wrote:

sparks wrote:

oh yes, Loading images, even small ones from an online file is a no-go. I tried it with a tiny image and it took a long time, about 1 pixil every half a second. My internet speed is pretty good too.

Load all the information into a variable, then parse the variable, then draw it.

Ya, loading it one line at a time is SLOW!


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#1352 2010-04-14 13:51:19

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

Meh, im just sticking to my own stuff and not going online or anything.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#1353 2010-04-14 13:56:08

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Panther development thread

The code for <list [] exists?> instance is:

Code:

listExists: aList
self variableNameInUse: aList

http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#1354 2010-04-14 13:56:44

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

nXIII wrote:

sparks wrote:

oh yes, Loading images, even small ones from an online file is a no-go. I tried it with a tiny image and it took a long time, about 1 pixil every half a second. My internet speed is pretty good too.

Load all the information into a variable, then parse the variable, then draw it.

wouldn't that take longer? surely reading a colour online is faster than reading it to a variable and then reading the variable?
remember that as each pixil of colour is stored on one line or list item, only one line can be read at once.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1355 2010-04-14 13:59:20

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

a quick test.
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1356 2010-04-14 13:59:59

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

sparks wrote:

a quick test.
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

Nope, that didn't work...  wink


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#1357 2010-04-14 14:01:06

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

MathWizz wrote:

The code for <list [] exists?> instance is:

Code:

listExists: aList
self variableNameInUse: aList

thank yuh!

I need that for my compiler thing!


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#1358 2010-04-14 14:04:39

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

Squeak is so confusing...


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#1359 2010-04-14 14:14:23

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

ok, I hope this works, 40X40 image coming your way...








































http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1360 2010-04-14 14:14:45

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Panther development thread

MathWizz wrote:

The code for <list [] exists?> instance is:

Code:

listExists: aList
self variableNameInUse: aList

Not really.... that tests if a list OR A VARIABLE exists.
Just lists would be

^ (self listVarNames includes: aListName) or: [(self ownerThatIsA: ScratchStageMorph) listVarNames includes: aListName].


nXIII

Offline

 

#1361 2010-04-14 14:15:37

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

was originally 80X80 but it didn't like that. 40X 40 was all it took. and no, the test didn't fail, it told me how wide the image could be (80)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1362 2010-04-14 14:17:02

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Panther development thread

sparks wrote:

ok, I hope this works, 40X40 image coming your way...

It does work, but you might want to use any of these instead:
░▒▓█
___
Does anyone know a nice way to convert strings to blocks in Squeak?

Last edited by nXIII (2010-04-14 14:18:09)


nXIII

Offline

 

#1363 2010-04-14 14:19:08

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

█ Would be a better one,like what Mathwhizz used.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#1364 2010-04-14 14:20:10

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

nXIII wrote:

MathWizz wrote:

The code for <list [] exists?> instance is:

Code:

listExists: aList
self variableNameInUse: aList

Not really.... that tests if a list OR A VARIABLE exists.
Just lists would be

^ (self listVarNames includes: aListName) or: [(self ownerThatIsA: ScratchStageMorph) listVarNames includes: aListName].

Sorry, but that comes up with an Error! message.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#1365 2010-04-14 14:21:29

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Panther development thread

Sperry wrote:

nXIII wrote:

MathWizz wrote:

The code for <list [] exists?> instance is:

Code:

listExists: aList
self variableNameInUse: aList

Not really.... that tests if a list OR A VARIABLE exists.
Just lists would be

^ (self listVarNames includes: aListName) or: [(self ownerThatIsA: ScratchStageMorph) listVarNames includes: aListName].

Sorry, but that comes up with an Error! message.

Oh, well, whatever. But the one you're using is wrong. I would get you the right one but I'm kind of in the middle of custom blocks.


nXIII

Offline

 

#1366 2010-04-14 14:22:39

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

nXIII wrote:

Sperry wrote:

nXIII wrote:

MathWizz wrote:

The code for <list [] exists?> instance is:

Code:

listExists: aList
self variableNameInUse: aList

Not really.... that tests if a list OR A VARIABLE exists.
Just lists would be

Sorry, but that comes up with an Error! message.

Oh, well, whatever. But the one you're using is wrong. I would get you the right one but I'm kind of in the middle of custom blocks.

Nevermind, I made a typo in te blockspecs that made it call the wrong function (one that didn't exist)


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#1367 2010-04-14 14:26:20

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

guy's  can't believe I haven't thought of this sooner!

open Panther and write the script:
set page to (whatever web address the current page of the forum is)
forever:
set previous to (number of lines on URL (page)
wait until (previous) is not = number of lines on URL (page)
play sound pop

et voila! you have a project that pops when someone posts something new to the current topic page!

finally! no more refreshing, you KNOW when someone has posted!

it works!

downsides:
Panther don't like reading it too much so maybe put a wait in there.
once we reach a new page, it won't pop until the variable "page" is change


I hope you like it!

Last edited by sparks (2010-04-14 14:27:20)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1368 2010-04-14 14:31:58

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

you could use it to check if a change had been made to the Panther site since you last stopped the project, or see if  something else has changed. As long as it means a new line is added to that web page, it will notice without having to parser anything.

my thing hasn't popped in a while, where is everyone?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1369 2010-04-14 14:33:47

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

I'm here! You'r idea works brilliantly! I luv-it *clicks on luv-it*  big_smile   tongue


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#1370 2010-04-14 14:35:33

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

did you hear a pop just before you read this?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1371 2010-04-14 14:36:19

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

sparks wrote:

did you hear a pop just before you read this?

Yup, it's sooooo cool!


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#1372 2010-04-14 14:37:49

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

Hmm.. Sometimes it pops randomly. hmm.....


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#1373 2010-04-14 14:38:07

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

I can't belive it's possible... it's such as simple script, but we had the blocks for DAYS before anyone realised what we could do with them! I'm telling you, I'm so glad I don't have to keep refreshing anymore.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#1374 2010-04-14 14:38:12

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Panther development thread

sparks wrote:

guy's  can't believe I haven't thought of this sooner!

open Panther and write the script:
set page to (whatever web address the current page of the forum is)
forever:
set previous to (number of lines on URL (page)
wait until (previous) is not = number of lines on URL (page)
play sound pop

et voila! you have a project that pops when someone posts something new to the current topic page!

finally! no more refreshing, you KNOW when someone has posted!

it works!

downsides:
Panther don't like reading it too much so maybe put a wait in there.
once we reach a new page, it won't pop until the variable "page" is change


I hope you like it!

Or
[set previous to (contents of file at URL (page))]
[repeat until <not <(previous) = (contents of file at URL (page))>]
|| [wait 10 secs]
[___________________________________________________________]
[play sound [pop]]


nXIII

Offline

 

#1375 2010-04-14 14:39:56

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

nXIII wrote:

sparks wrote:

guy's  can't believe I haven't thought of this sooner!

open Panther and write the script:
set page to (whatever web address the current page of the forum is)
forever:
set previous to (number of lines on URL (page)
wait until (previous) is not = number of lines on URL (page)
play sound pop

et voila! you have a project that pops when someone posts something new to the current topic page!

finally! no more refreshing, you KNOW when someone has posted!

it works!

downsides:
Panther don't like reading it too much so maybe put a wait in there.
once we reach a new page, it won't pop until the variable "page" is change


I hope you like it!

Or
[set previous to (contents of file at URL (page))]
[repeat until <not <(previous) = (contents of file at URL (page))>]
|| [wait 10 secs]
[___________________________________________________________]
[play sound [pop]]

no, because the (contents of file[]) block only reports the first line... I'm pretty certian that's the case

really? mine only pops when I post or someone else posts.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer