Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Scrolling Game (2)
- ApophisOfficial
-
2 posts
Scrolling Game (2)
Hello,
I'm working on a scrolling space game and need help with a few mechanics:
1. Finding width:
I have objects in space, like moons and planets, and want them to hide when off-screen. So is there any way to use a script to get the width and height of a clone?
2. Camera Lag Effect:
If the player is always at the center of the screen, it can feel like they're not moving. Instead, I want the camera to slightly lag behind the player.
The camera should have a delayed response when the player starts moving and catch up when they stop, so movement feels smoother and more dynamic.
Any advice on how to implement these? Thanks in advance!
I'm working on a scrolling space game and need help with a few mechanics:
1. Finding width:
I have objects in space, like moons and planets, and want them to hide when off-screen. So is there any way to use a script to get the width and height of a clone?
2. Camera Lag Effect:
If the player is always at the center of the screen, it can feel like they're not moving. Instead, I want the camera to slightly lag behind the player.
The camera should have a delayed response when the player starts moving and catch up when they stop, so movement feels smoother and more dynamic.
Any advice on how to implement these? Thanks in advance!
- kemoCyan
-
24 posts
Scrolling Game (2)
I can help you with hiding objects off-screen, you can basically make a border around the screen that doesn't move and is always on the front layer so that it hides things that are off-screen/stuck to the edge, it's kinda annoying because it makes the screen even smaller
or you can just use a block I use in my scrolling platformers so that I don't have to use a border:
or you can just use a block I use in my scrolling platformers so that I don't have to use a border:
define check
set [ghost] effect to (0)
set [prev pos] to (x position)
change x by (1)
if <(x position) = (prev pos)> then
set [ghost] effect to (100)
end
change x by (-2)
if <(x position) = (prev pos)> then
set [ghost] effect to (100)
end
change x by (1)
set [prev pos] to (y position)
change y by (1)
if <(y position) = (prev pos)> then
set [ghost] effect to (100)
end
change y by (-2)
if <(y position) = (prev pos)> then
set [ghost] effect to (100)
end
change y by (1)
- Arrow577
-
6 posts
Scrolling Game (2)
I've been wanting to make a 3D game for a while, but I just don't know how to is there any way to make the 3D game 
could you tell me how to make the 3d code
if it is too much its ok

could you tell me how to make the 3d code
if it is too much its ok
Last edited by Arrow577 (Yesterday 21:32:30)
- HighlaneGamingStudio
-
100+ posts
Scrolling Game (2)
I know you're new on the forums, but please make you're own topic. I've been wanting to make a 3D game for a while, but I just don't know how to is there any way to make the 3D game
could you tell me how to make the 3d code
if it is too much its ok
- Discussion Forums
- » Help with Scripts
-
» Scrolling Game (2)