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

#26 2012-02-15 10:18:19

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Minecraft: In Javascript

That sounds very hard. ^^

Offline

 

#29 2012-02-15 10:30:19

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Minecraft: In Javascript

rdococ wrote:

It probably is. But I've come up with a way to rotate the camera.

Cool! How're you doin' it?


Posts: 20000 - Show all posts

Offline

 

#30 2012-02-15 10:31:28

Dinoclor
Scratcher
Registered: 2010-06-10
Posts: 1000+

Re: Minecraft: In Javascript

Could you use a panorama?


This is a temporary signature. It will exist until I think of something witty.

Offline

 

#31 2012-02-15 10:32:20

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Minecraft: In Javascript

rdococ wrote:

Just asking, how do you run a script repeatidly forever?

I think in Javascript you can use a while(true) loop or something to that effect.


Posts: 20000 - Show all posts

Offline

 

#32 2012-02-15 10:36:45

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Minecraft: In Javascript

Wild google search: http://www.ambiera.com/copperlicht/download.html


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#33 2012-02-15 10:36:55

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

Re: Minecraft: In Javascript

veggieman001 wrote:

rdococ wrote:

It probably is. But I've come up with a way to rotate the camera.

Cool! How're you doin' it?

Actually pretty simple -- it just changes the X and Y position based on x-rotation and y-rotation values.

Offline

 

#34 2012-02-15 10:38:57

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: Minecraft: In Javascript

rdococ wrote:

veggieman001 wrote:

rdococ wrote:

It probably is. But I've come up with a way to rotate the camera.

Cool! How're you doin' it?

Actually pretty simple -- it just changes the X and Y position based on x-rotation and y-rotation values.

Sounds like how most scrolling scratch projects work.


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#35 2012-02-15 10:43:03

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

Re: Minecraft: In Javascript

zippynk wrote:

rdococ wrote:

veggieman001 wrote:

Cool! How're you doin' it?

Actually pretty simple -- it just changes the X and Y position based on x-rotation and y-rotation values.

Sounds like how most scrolling scratch projects work.

Yeah, quite like it.

Except that I (will) be adding something in the scripts that replaces the xrot and yrot with 0 if they are above 360 and with 359 if they are negative values.

Last edited by rdococ (2012-02-15 10:46:52)

Offline

 

#36 2012-02-15 10:46:40

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Minecraft: In Javascript

rdococ wrote:

veggieman001 wrote:

rdococ wrote:

It probably is. But I've come up with a way to rotate the camera.

Cool! How're you doin' it?

Actually pretty simple -- it just changes the X and Y position based on x-rotation and y-rotation values.

Wouldn't that be translation, not rotation?


Posts: 20000 - Show all posts

Offline

 

#37 2012-02-15 10:48:24

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

Re: Minecraft: In Javascript

veggieman001 wrote:

rdococ wrote:

veggieman001 wrote:


Cool! How're you doin' it?

Actually pretty simple -- it just changes the X and Y position based on x-rotation and y-rotation values.

Wouldn't that be translation, not rotation?

Yes, it is translation. But I will try to add a bit of distortion based on the visible x-position and y-position of an object according to the canvas "eye".

Offline

 

#38 2012-02-15 10:53:13

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Minecraft: In Javascript

rdococ wrote:

veggieman001 wrote:

rdococ wrote:

Actually pretty simple -- it just changes the X and Y position based on x-rotation and y-rotation values.

Wouldn't that be translation, not rotation?

Yes, it is translation. But I will try to add a bit of distortion based on the visible x-position and y-position of an object according to the canvas "eye".

Hmm. Okay then.


Posts: 20000 - Show all posts

Offline

 

#40 2012-02-15 11:08:09

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

Offline

 

#41 2012-02-15 11:12:48

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Minecraft: In Javascript

Why do you keep saying we?

And here


Posts: 20000 - Show all posts

Offline

 

#43 2012-02-15 11:27:17

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Minecraft: In Javascript

Ehh, I'm fine.


Posts: 20000 - Show all posts

Offline

 

#44 2012-02-15 11:28:41

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

Re: Minecraft: In Javascript

veggieman001 wrote:

rdococ wrote:

Just asking, how do you run a script repeatidly forever?

I think in Javascript you can use a while(true) loop or something to that effect.

When I do that, Javascript crashes.

How did RHY do it?

Offline

 

#45 2012-02-15 12:22:50

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

Re: Minecraft: In Javascript

The javascript isn't working-- but Firebug reports no mistakes. What is the problem?

My theory: Firefox doesn't support key detection. But why did RHY's thing work?

Last edited by rdococ (2012-02-15 12:23:09)

Offline

 

#47 2012-02-15 13:57:46

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Minecraft: In Javascript

Perhaps this would be of interest to you? http://www.scratch.mit.edu/ext/youtube/?v=Q9BkDzHPf4I


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#48 2012-02-15 16:06:41

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Minecraft: In Javascript

rdococ, I can hep develop this. (so it is we)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

Board footer