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

#7551 2013-03-26 08:45:12

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

@bharvey

We can just have a .desktop file that runs a command line command on Linux.  smile


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7552 2013-03-26 21:18:16

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Can we please have the source files? I'd be glad to make a Windows installer.

Offline

 

#7553 2013-03-26 23:32:01

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

We can just have a .desktop file that runs a command line command on Linux.  smile

You sure?  Does it work in every window manager?  I'm a twm user, not Gnome.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7554 2013-03-27 08:31:14

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

technoboy10 wrote:

We can just have a .desktop file that runs a command line command on Linux.  smile

You sure?  Does it work in every window manager?  I'm a twm user, not Gnome.

No clue. I use Unity.  tongue
EDIT: I think that's what comes with Ubuntu...

Last edited by technoboy10 (2013-03-27 08:31:44)


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7555 2013-03-27 09:56:55

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

As much as I know, .desktop files are pretty much a standard and are being used in almost every GUI capable distro out there.

edit: they're part of freedesktop.org's standards

Last edited by roijac (2013-03-27 09:59:13)

Offline

 

#7556 2013-03-27 14:37:30

MrFlash67
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: BYOB 3 - Discussion Thread

@roijac Are you still developing M30W?


Who would win, SOPA or PIPA?

Offline

 

#7557 2013-03-27 18:35:14

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

MrFlash67 wrote:

@roijac Are you still developing M30W?

yes, although i'm not releasing anything atm, just commiting to the svn. currently stuck on rendering sprites rotated  roll

Offline

 

#7558 2013-03-28 15:23:21

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

roijac wrote:

MrFlash67 wrote:

@roijac Are you still developing M30W?

yes, although i'm not releasing anything atm, just commiting to the svn. currently stuck on rendering sprites rotated  roll

EDIT: I HATE trig. It's just way overcomplicated.

Offline

 

#7559 2013-03-28 16:42:34

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

roijac wrote:

I HATE trig. It's just way overcomplicated.

Rotating the sprites shouldn't be so complicated... What's the problem?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7560 2013-03-28 19:36:12

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

roijac wrote:

EDIT: I HATE trig. It's just way overcomplicated.

You must have a bad trig course.  Trig is really easy:  Draw any ray through the origin.  Note where it intersects the unit circle.  Let \theta be the angle between the positive X axis and your ray.  Let the point where it hits the unit circle be (x, y).  Then, by definition, cos \theta = x, and sin \theta = y.

So what this does is let you switch point of view between rectangular coordinates (x.y) and polar coordinates (r, \theta), because for any point, x = r cos \theta and y = r sin \theta.

That's it, basically.  So for example, the reason you're thinking about trig right now is that you want to rotate a picture, which means rotating each of its points, which is complicated in rectangular terms but in polar is just

(r, \theta) -> (r, \theta + rotation)

so therefore

(x, y) = (r cos \theta, r sin \theta) -> (r cos (\theta+rotation), r sin (\theta+rotation))

All that stuff about memorizing half-angle formulas and double-angle formulas is unnecessary; that's what Wolfram Alpha is for.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7561 2013-03-29 07:01:46

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

roijac wrote:

I HATE trig. It's just way overcomplicated.

Rotating the sprites shouldn't be so complicated... What's the problem?

wx rotates it for me, I just couldn't find a way to get the right coordinates of where to paint the rotated picture  hmm

GOT IT :DDD

Code:

            if not sprite.visible: continue
            costume = sprite.active_costume
            image = costume.get_image(wx.Image)
            if sprite.rotmode == NORMAL:
                rotation = radians(360 - (sprite.direction - 90) % 360)
                image = image.Rotate(rotation, costume.center, True)
                center = [i // 2 for i in costume.size]
                c = sqrt((center[0] - costume.center[0]) ** 2 +
                         (center[1] - costume.center[1]) ** 2)
    
                try:
                    rotation += atan((center[1] - costume.center[1]) /
                                     (center[0] - costume.center[0]))
                except ZeroDivisionError:
                    rotation += pi / 2 * cmp(center[1], 0)
    
                center = [i // 2 for i in image.GetSize()]
                x, y = center[0] + cos(rotation) * c, center[1] + sin(rotation) * -c
    
                x = sprite.truex - x
                y = sprite.truey - y
            elif sprite.rotmode == RL:
                if sprite.direction > 180:
                    image = image.Mirror()
                x = sprite.truex - costume.center[0]
                y = sprite.truey - costume.center[1]
            else:
                x = sprite.truex - costume.center[0]
                y = sprite.truey - costume.center[1]
            dc.DrawBitmap(_convert(image, wx.Bitmap), x, y)

Enjoy, masochists  tongue

Last edited by roijac (2013-03-29 08:00:51)

Offline

 

#7562 2013-03-29 11:20:15

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I've released an RSS extension for Snap!!
http://technoboy10.github.com/rssnap


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7563 2013-03-29 11:52:27

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

roijac wrote:

Code:

             try:
                    rotation += atan((center[1] - costume.center[1]) /
                                     (center[0] - costume.center[0]))
                except ZeroDivisionError:
                    rotation += pi / 2 * cmp(center[1], 0)

Doesn't your math library have an atan2 function?


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7564 2013-03-29 12:41:51

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

roijac wrote:

Code:

             try:
                    rotation += atan((center[1] - costume.center[1]) /
                                     (center[0] - costume.center[0]))
                except ZeroDivisionError:
                    rotation += pi / 2 * cmp(center[1], 0)

Doesn't your math library have an atan2 function?

Indeed... thanks!

Offline

 

#7565 2013-03-29 22:52:45

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

@tb10, ensemble:  Okay, I can see that we're going to need a way for people to keep these auxiliary helper programs straight, especially if you're going to start writing ones for software services (e.g. RSS), of which there are infinitely many.  I envision a Snap! menu item like "external services..." that starts a server server, which notes what servers you have installed and gives you a menu window (externally, I imagine) in which each line has a checkbox, the name of the device/service, and the port number it uses.  And at the bottom are two buttons (that I can think of offhand): START and UNINSTALL.  And maybe a SELECT ALL button too.  And starting the service has to automatically load the corresponding block library into the running Snap!.

PS  On the subject of software servers, the obvious one is a local-filesystem server, but first we should think about the UI.  I'm leaning toward a stream (lazy list) interface, so the blocks would be FILE->LIST (a reporter with filename as input) and LIST->FILE (a two-input command, taking a list and a filename), which would also have the virtue of being familiar to Scratch users.  I guess that would work even with non-lazy lists, except for gigantic files.

PPS  Since part of what I'm proposing involves modifying Snap! itself a little, volunteers should talk with Jens first.

PPPS  We also need someone to run an assembly line turning these servers into user-friendly packaged apps.  Or maybe three someones, for Lin/Win/Mac.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7566 2013-03-29 23:09:38

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

@bharvey
-section 1
    Yeah, that makes sense. And ideally we'd have an extension 'store' where you could download the apps.
-section 4
    I actually have access to a Linux, a Mac, and a Windows computer, so I could do that.


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7567 2013-03-30 02:46:02

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

The (Sn)app store!


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7568 2013-03-30 09:25:33

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

The (Sn)app store!

There's a (Sn)app for that!  tongue


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7569 2013-03-30 11:39:20

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

Can we please have the (Snapin8r) source files? I'd be glad to make a Windows installer.

Last edited by shadow_7283 (2013-03-30 11:39:33)

Offline

 

#7570 2013-03-30 12:45:16

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Oh, yeah, I'll give them to you, just a second. Sorry I missed that.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7571 2013-03-30 12:46:41

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7572 2013-03-30 14:22:29

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I'm working on the Kurt 2 API, and I need a good name for "things that can go on the stage", which is the superclass of variable/list watchers, stage, and sprite. My ideas so far aren't great:
* "Object" -- gets confusing.
* "Drawable" -- sounds like it's related to images (and Kurt doesn't draw them anywhere anyhow).
* "Morph" -- is morphic-specific (though it's currently the best option).

Any suggestions?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7573 2013-03-30 15:07:14

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

I'm working on the Kurt 2 API, and I need a good name for "things that can go on the stage", which is the superclass of variable/list watchers, stage, and sprite. My ideas so far aren't great:
* "Object" -- gets confusing.
* "Drawable" -- sounds like it's related to images (and Kurt doesn't draw them anywhere anyhow).
* "Morph" -- is morphic-specific (though it's currently the best option).

Any suggestions?

"On-screen object"?
"Visible object"?


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#7574 2013-03-30 15:12:34

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

* "Morph" -- is morphic-specific (though it's currently the best option).

"Morph" also includes blocks, menus, etc etc.

I think things that go on a stage and aren't backdrops are either actors or props.  smile

EDIT:  Or scenery.  "Actor" is a little tricky because in some circles it's used as a synonym for "object."  "Scenery" is growing on me, especially since "props" sometimes means "congratulations."

Last edited by bharvey (2013-03-30 15:36:00)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7575 2013-03-30 15:24:36

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

I think things that go on a stage and aren't backdrops are either actors or props.  smile

I like the way you think.  tongue

Or scenery.  "Actor" is a little tricky because in some circles it's used as a synonym for "object."  "Scenery" is growing on me, especially since "props" sometimes means "congratulations."

That quote about naming things is true; this is hardtongue

I think I like Actor. The fact that it's used interchangeably with object is okay, I think. Maybe Scenery, though it sounds a little weird.


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

Board footer