Discuss Scratch

Aloft32
Scratcher
34 posts

How do I make Obstacles?

So I recently decided to make a game similar to geometry dash, and I got the gamemodes running perfectly. I then ran into a problem. I was stuck with getting the actual obstacles moving towards the player. I know how to detect whether you are touching an obstacle though. What im trying to go for is similar to @griffpatch's version of it. I tried looking into the code but i couldn't make sense of it. Should i use cloning, or something else? I noticed that there was on sprite with roughly 100 costumes, each having a different obstacle. Hope you can help!

Link to @griffpatch's version of geometry dash: https://scratch.mit.edu/projects/105500895/

Last edited by Aloft32 (Oct. 24, 2019 00:36:11)

-ShadowOfTheFuture-
Scratcher
1000+ posts

How do I make Obstacles?

I'd suggest using cloning; the other methods I can think of off the top of my head would involve stamping (lag!), one sprite moving to many positions (not that feasible in my opinion) or many, many sprites (no… just no).

If you want to recreate the feeling of multiple levels that can be completed, as griffpatch does, you have a few options. You could try making specific clones corresponding to specific parts of the levels constantly move to certain positions with respect to a variable, and have that variable constantly change, so that the clones will progressively scroll towards the player.

You could also try making clones of the aspects of the levels, like the platforms and obstacles, and then thus have many clones composing each obstacle, platform, etc. in each level. You would probably need to have the clones be constantly created and deleted once they've reached the other side and are out of sight, so you won't hit the 300 clone limit.

I hope this helps. Sorry if it's a bit jumbled, I'm pretty tired right now.
Aloft32
Scratcher
34 posts

How do I make Obstacles?

-ShadowOfTheFuture- wrote:

I'd suggest using cloning; the other methods I can think of off the top of my head would involve stamping (lag!), one sprite moving to many positions (not that feasible in my opinion) or many, many sprites (no… just no).

If you want to recreate the feeling of multiple levels that can be completed, as griffpatch does, you have a few options. You could try making specific clones corresponding to specific parts of the levels constantly move to certain positions with respect to a variable, and have that variable constantly change, so that the clones will progressively scroll towards the player.

You could also try making clones of the aspects of the levels, like the platforms and obstacles, and then thus have many clones composing each obstacle, platform, etc. in each level. You would probably need to have the clones be constantly created and deleted once they've reached the other side and are out of sight, so you won't hit the 300 clone limit.

I hope this helps. Sorry if it's a bit jumbled, I'm pretty tired right now.
Thanks! That actually really helped! Can you give a visual representation using code blocks if possible? I'll refer to this when making my project! Have a nice day!
RaWi2021
Scratcher
8 posts

How do I make Obstacles?

how to make hurdles/ boxes/platforms?
NathanGamesInc
Scratcher
64 posts

How do I make Obstacles?

bro it's easy just use the costume's vector mode then make obstacles using squares
set [IQ v] to [10021389734270123857]
NathanGamesInc
Scratcher
64 posts

How do I make Obstacles?

NathanGamesInc wrote:

bro it's easy just use the costume's vector mode then make obstacles using squares
set [IQ v] to [10021389734270123857]
or just use clones
qwertycodechamp90411
Scratcher
100+ posts

How do I make Obstacles?

Griffpatch began a tutorial 2 weeks ago for gd
RaWi2021
Scratcher
8 posts

How do I make Obstacles?

Pls do an ezier explanation
RaWi2021
Scratcher
8 posts

How do I make Obstacles?

And also actual platform code ._.
RaWi2021
Scratcher
8 posts

How do I make Obstacles?

How do I make portals?
supa-panda
Scratcher
100+ posts

How do I make Obstacles?

I apologize if I came off as rude. The thing I was talking about was that we try to avoid posting on really old topics as it leads to endlessly long threads owned by people who have long moved on from the Scratch Forums. If you do have a question please create your own topic.

Powered by DjangoBB