Close to giving up :-(
froamer
Member Posts: 29
I have been playing with GS for some months now, I've helped others on the forum (within my abilities) and I am a web software developer. I have a great game concept, I developed some proof of concepts and I've paid for artwork.
But I can't for the life of me get the basic physics of my game to work. So I turn to you GS experts in hope you can help.
Concept:
A ball bounces vertically constantly. You drag the background horizontally to scroll it and the ball moves horizontally with the background. Platforms, obstacles, etc. scroll with the background and you control where the ball will bounce to navigate through the game.
I have tried two techniques:
1) Move the camera and constrain the ball in the x-axis
2) Drag the ball and make it control the camera.
In both approaches everything is fine until the ball reaches a virtual wall. I want the scrolling to stop taking effect but the ball to carry on bouncing vertically.
What actually happens is the ball goes all over the place as it seems to overlap with the wall. I have tried only constraining the x-axis of the ball only when it is not colliding, but if you keep scrolling the ball "pushes" through the wall. All this tends to disrupt the vertical bounce.
This is what I currently have:
Scene
....Size
........Width: 4800
........Height: 320
Background (instance) 4800x320
....Rule:
........When Actor receives event touch is pressed
............Change Attribute: game.Dragging = true
........Otherwise
............Change Attribute: game.Dragging = false
....Rule:
........When Attribute game.Dragging = true
............Change attribute game.BallOrigin = scene.Background.Ball.Position.X
............Change attribute game.DragOrigin = game.Mouse.Position.X
Ball (Prototype)
....Collide with actor with tag "bouncy"
....Control Camera
....Rule:
........When actor receives event "overlaps or collides" with actor with tag "bouncy"
............(do nothing)
........Otherwise
............Rule:
................When attribute game.Dragging = true
....................Constrain attribute self.Position.X = ( game.DragOrigin - game.Mouse.Position.X )- game.BallOrigin
There are various walls tagged as "bouncy".
I know it is a lot to ask, but if anyone can help or give me some pointers I would very much appreciate it.
But I can't for the life of me get the basic physics of my game to work. So I turn to you GS experts in hope you can help.
Concept:
A ball bounces vertically constantly. You drag the background horizontally to scroll it and the ball moves horizontally with the background. Platforms, obstacles, etc. scroll with the background and you control where the ball will bounce to navigate through the game.
I have tried two techniques:
1) Move the camera and constrain the ball in the x-axis
2) Drag the ball and make it control the camera.
In both approaches everything is fine until the ball reaches a virtual wall. I want the scrolling to stop taking effect but the ball to carry on bouncing vertically.
What actually happens is the ball goes all over the place as it seems to overlap with the wall. I have tried only constraining the x-axis of the ball only when it is not colliding, but if you keep scrolling the ball "pushes" through the wall. All this tends to disrupt the vertical bounce.
This is what I currently have:
Scene
....Size
........Width: 4800
........Height: 320
Background (instance) 4800x320
....Rule:
........When Actor receives event touch is pressed
............Change Attribute: game.Dragging = true
........Otherwise
............Change Attribute: game.Dragging = false
....Rule:
........When Attribute game.Dragging = true
............Change attribute game.BallOrigin = scene.Background.Ball.Position.X
............Change attribute game.DragOrigin = game.Mouse.Position.X
Ball (Prototype)
....Collide with actor with tag "bouncy"
....Control Camera
....Rule:
........When actor receives event "overlaps or collides" with actor with tag "bouncy"
............(do nothing)
........Otherwise
............Rule:
................When attribute game.Dragging = true
....................Constrain attribute self.Position.X = ( game.DragOrigin - game.Mouse.Position.X )- game.BallOrigin
There are various walls tagged as "bouncy".
I know it is a lot to ask, but if anyone can help or give me some pointers I would very much appreciate it.
Comments
Not sure if that will suit your design goals or not.
I'd be happy to take a look at it for you if you like.
Email soul@orbz.com
I don't have a sure fire answer but I think in general you may need multiple ball actors and swap them for different puzzles or even areas of puzzles. Use foreground objects to cover the swapping.
I'm sure someone here will be able to help you; we have SO many wonderful community members
Hang in there!
Peach
ORBZ above offered to take a look at my project and fixed it - a true star!!!!!
We are now collaborating. I am a singer song writer so I am going to write his game music, he is going to help me with GS when I get stuck (hopefully not too often now).
Thanks again everyone, your right peachpellen, it's a great community :-)
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io