Swingin'

Hey guys, just wanted to know something simple: how to make a “web sling” game like Spider Square.
Thanks

I love it when people come and ask the simple question: “how to make a complete game” :smiling_imp:

Well I can tell you in 8 simple steps:

1.add the images you need
2.add the sounds you need
3.create a new scene
4.create the objects you need
5.enable physics behaviour as you probably going to need it
6.put the level together using the scene editor or make it randomly generated
7.add the player
8.add the events

Job done
:mrgreen:

I’m sorry but I can’t explain it any more simple than that I hope it is not too confusing for you. :frowning:

1 Like

Oh, I was forget, you also need to:

9.export the game
10.upload it to a host
11.share the link with the world
12.take the money

It is 4 more steps to add, sorry, I should think before I write something :frowning:

Thanks. I was thinking of making the “web” a bullet object and have it propel the player forward. It would be nice to have some help, but as you said, I don’t want you make the whole game.

I just tried the web version of that game and seems to me a simple flappy bird clone. You don’t really need any fancy physics to remake. Just constantly move the player forward on the X axis and when the mouse button is down or touch held, move it up on the Y axis and move it down when it not. The only reason it looks like swinging is because it shoot a web up to the ceiling and the distance between the player and the mouse/touch or the elapsed time since the touch begin may even effect the speed of movement but I don’t think the web and swinging got anything to do with the movement. Just a simple animation only but the movement is done similar to flappy bird in my opinion.

To make the web shoot from player toward the ceiling, would require ray casting but the web version of GD don’t have that. Maybe you can use just a single sprite for the web. Make it long enough to cover any distance between the player and the ceiling, set the Z order to be behind the ceiling sprites and simply create it whenever need it and rotate it toward the player but make sure it center point is set to the top so it rotate at the top.

Looks like a job for the primitive drawing extension as an action, combined with the Pick nearest object condition used with player.X() and player.Y().

Thanks, I understand very well. The flappy bird analogy helped a lot, seeing as I have to get the character to always fall and move forward on click, and fall otherwise. Some final takeaway questions (sorry!)

  1. what is Ray casting? I have GDev downloaded.
  2. how do I get it to fall constantly, move forward on click, and get the web to appear on click?

Back to revive this old post. How do you get the character to increase its position on the Y Axis the longer you click?

You mean while holding the Left mouse button or something?
If so, all you need to do is:

Condition:
If Left mouse button or Touch is down

Action
Do +1 to the Y position of object

In case you want to increase the speed the longer the mouse is down, you can use a variable:

Condition:
If Left mouse button or Touch is down

Action
Do +1 to scene variable Speed
Do +Variable(Speed) to the Y position of object

And then reset the variable when the click is released

Condition:
If Left mouse button was released

Action
Do = 1 to scene variable Speed

You might want to use a Force instead of changing position

Thanks! That’s what I needed.

Is this correct? It doesn’t seem to change anything.

Another quick update; there was a distance joint that I removed between the swinging object and the Main Character (MainChar). That just completely removes resistance, and the MainChar flies all over. How do I make it so that the Swing Box (object that MainChar wings on) and MainChar get closer, so that the character doesn’t just float loosely?

It doesn’t seem to change anything.

You forget to select the Left mouse button.

How do I make it so that the Swing Box (object that MainChar wings on) and MainChar get closer

Increasing/Decreasing the Y position of the character should work, however in case you are using physics, I’m not sure I don’t have much experience with physics.

Another question; how do i copy and paste the events of one project to another? Would you recommend that I do such a project in platformer mode?

hi,
I think you can open 2 gdevelop instances one with each project and then copy and paste.
It would be nice to see an option to export code or scenes on gdevelop :blush:

2 Likes