How do you make it so that instead of the point and scroll.you can rotate the scrolling area instead.
Not sure if im making sense to you.
Example http://www.tonypa.pri.ee/tbw/tut21.html
Last edited by keroro645 (2008-11-14 21:04:38)
Offline
Rotate the entire scrolling area eh? Sounds hard, probably involves trig. I can't really think of a way to do it.
Offline
lets see, well you'd use the scrolling in steps technique to move your character, basically
forever
if <key [A] is pressed?>
change direct by (-5)
if <key [D] is presssed?>
change direct by (5)
for the player:
if left arrow is pressed
set direct to 1
if right arrow is pressed
set direct to 2
if direct = 1
point in direction (direct) - (180)
else:
point in direction (direct)
that's all the direction scripting for a side scroller, just insert scrolling in steps and it works and remember the platforms point direction (direct)
Offline
keroro645 wrote:
DO you get what im saying?
You want something like this project correct?
http://scratch.mit.edu/projects/Mayhem/33629
You will need to figure out how to correctly rotate all of the different sprite which involves trig.
Or you can use the method in the project I posted but it only works for small areas.
Last edited by archmage (2008-09-08 16:29:58)
Offline
archmage wrote:
keroro645 wrote:
DO you get what im saying?
You want something like this project correct?
http://scratch.mit.edu/projects/Mayhem/33629
You will need to figure out how to correctly rotate all of the different sprite which involves trig.
Or you can use the method in the project I posted but it only works for small areas.
Exactly.Ill try figuring that out.
Offline
You could use a sprite bigger then the screen if u need to like this http://scratch.mit.edu/projects/deatheater/212169
Offline
deatheater wrote:
You could use a sprite bigger then the screen if u need to like this http://scratch.mit.edu/projects/deatheater/212169
Do you think this will help?
I want something similar to this http://scratch.mit.edu/projects/Mayhem/33629
Offline
keroro645 wrote:
deatheater wrote:
You could use a sprite bigger then the screen if u need to like this http://scratch.mit.edu/projects/deatheater/212169
Do you think this will help?
I want something similar to this http://scratch.mit.edu/projects/Mayhem/33629
That's basically what mayhem did, he made a sprite bigger then the screen, I think
Offline
fullmoon wrote:
Actually, I'm just going to remix Jens' Cluster. It'll be much faster.
That's a good idea, fullmoon. I specifically created Cluster to collect and test all the trig stuff needed for rotation and perspective, so you can just remix/canibalize it.
Also, cluster is using a virtual coordinate grid which keeps the sprites in their correct relative position, even if they get displayed differently due to the limitations of the Scratch playfield. Therefore this cluster mechanism should be perfect for scrolling. The only disappointment is, that the java player right now makes it run super-slowly. But I'm confident the Scratch Team will eventually speed it up
Offline
archmage wrote:
Rotate the entire scrolling area eh? Sounds hard, probably involves trig. I can't really think of a way to do it.
You just do your mario galaxy method, and make it so if left/right pressed, turn 15 degrees.
Offline
zawicki1fromyoutube wrote:
archmage wrote:
Rotate the entire scrolling area eh? Sounds hard, probably involves trig. I can't really think of a way to do it.
You just do your mario galaxy method, and make it so if left/right pressed, turn 15 degrees.
Thats not the same thing as rotating the scrolling area.
Offline
Do you think it has to be done with lists?I found on the site archmage found an example. http://www.tonypa.pri.ee/tbw/tut21.html
Offline
keroro645 wrote:
Do you think it has to be done with lists?I found on the site archmage found an example. http://www.tonypa.pri.ee/tbw/tut21.html
Lists wouldn't help with this. You don't really need to store data for this.
Offline
deatheater wrote:
keroro645 wrote:
deatheater wrote:
You could use a sprite bigger then the screen if u need to like this http://scratch.mit.edu/projects/deatheater/212169
Do you think this will help?
I want something similar to this http://scratch.mit.edu/projects/Mayhem/33629That's basically what mayhem did, he made a sprite bigger then the screen, I think
Actually, I used four sprites (each bigger than the screen).
The top left sprite has its rotational center at the bottom right of the sprite.
The top right sprite has its rotational center at the bottom left of the sprite.
The bottom left sprite has its rotational center at the top right of the sprite.
The bottom right sprite has its rotational center at the top left of the sprite.
Thus, they can all go to and rotate around the same co-ordinates whilst appearing as a coherent whole.
It could do with some tweaking, though, as its very slow...
Making in monochrome - black on white only - with the background white and the sprites made of black lines on transparent background - would speed it up considerably.
Last edited by Mayhem (2008-11-15 03:39:00)
Offline
Also, my project was written before the trig functions were available. The code could now be made a little bit more effiecient by using those.
Offline