@bharvey
We can just have a .desktop file that runs a command line command on Linux.
Offline
Can we please have the source files? I'd be glad to make a Windows installer.
Offline
bharvey wrote:
technoboy10 wrote:
We can just have a .desktop file that runs a command line command on Linux.
![]()
You sure? Does it work in every window manager? I'm a twm user, not Gnome.
No clue. I use Unity.
EDIT: I think that's what comes with Ubuntu...
Last edited by technoboy10 (2013-03-27 08:31:44)
Offline
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
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
![]()
EDIT: I HATE trig. It's just way overcomplicated.
Offline
roijac wrote:
I HATE trig. It's just way overcomplicated.
Rotating the sprites shouldn't be so complicated... What's the problem?
Offline
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.
Offline
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
GOT IT :DDD
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
Last edited by roijac (2013-03-29 08:00:51)
Offline
I've released an RSS extension for Snap!!
http://technoboy10.github.com/rssnap
Offline
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?
Offline
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
@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.
Offline
@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.
Offline
The (Sn)app store!
Offline
Hardmath123 wrote:
The (Sn)app store!
There's a (Sn)app for that!
Offline
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
Oh, yeah, I'll give them to you, just a second. Sorry I missed that.
Offline
Offline
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?
Offline
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"?
Offline
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.
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)
Offline
bharvey wrote:
I think things that go on a stage and aren't backdrops are either actors or props.
![]()
I like the way you think.
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 hard.
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.
Offline