My first game :) but I know nothing

Hi there, I’m extremely new to coding so I don’t know much at all. So I was hoping for help in making as simple of a game as possible that still kinda fits what I would want to do later.
Game idea:
-Vertical scroll
-Ball
Make ball jump via sling shot (this is my biggest focus, I really wanna know how to do this because this will be in many of my game ideas)
-ball must go high for score
-platforms randomly spawn
-ball is bouncy
Bonus
-touching slows down ball movement for easier aiming

I’m not looking for the code as much as I’m looking for the proper way to convey these thoughts into code.
I’m lacking the knowledge of what math I may need or how to translate these thing onto the screen
Thank you o greatly appreciate your help. I’m

@Dezmo Welcome to Codea. You say you’re extreamly new to coding, and you want to start making games. Without knowing much, it’s going to be hard trying to do things. We can help, but some of what we tell you won’t make any sense. Instead of jumping right into a game, you should just try small things like moving sprites around the screen, using touch to control how something moves, etc. From the description of the things you want your game to do, using the physics code would probably be the easiest, but there’s a lot you need to know about it.

Can you describe a little more of what you want to do. You want a ball to go up the screen and bounce around things. You could looks at the example code for the games like Brickout or Ping or Flappy to see what some of the code looks like.

Don’t feel overwhelmed by what you see because after awhile it will all make sense, it just takes time.

If you have anymore questions, just ask, there are a lot of people here that will help. You can ask them here instead of starting different discussions for questions about the same subject.

I’ve gotten basic movement of an object via touch and collisions so far
now I want to put it to use for a proper game loop.

But I want to learn how to create the sling shot mechanic for spice.
When you touch the screen and move your finger right the ball would move left, etc
And not have to touch the ball but anywhere on the screen

@Dezmo Are you after something like this. Touch the screen below the ball and drag it around to aim. The longer the line, the faster the ball goes when you lift your finger.

Not sure what you mean by “sling shot mechanic for spice”.

viewer.mode=FULLSCREEN

function setup()
    ball=physics.body(CIRCLE,10)
    ball.type=DYNAMIC
    ball.position=vec2(WIDTH/2,300)
    
    p=physics.body(CIRCLE,20)
    p.type=STATIC
    p.position=vec2(WIDTH/2,280)
    
    stroke(255)
    strokeWidth(2)    
    speed=5
    fill(255)
end

function draw()
    background()
    ellipse(ball.x,ball.y,20)
    if drawLine then
        line(ball.x,ball.y,tx,ty)        
    end
end

function touched(t)
    if t.state==BEGAN or t.state==CHANGED then
        tx=t.x
        ty=t.y
        drawLine=true
    end
    if t.state==ENDED then
        drawLine=false
        vx,vy=ball.x-tx,ball.y-ty
        ball.linearVelocity=vec2(vx*speed,vy*speed)
    end   
end

YES this exactly
I’ll head on to play with this a little on my own to fine tune it

I GOT IT (I need to stop the capitalizing)
I got it to where the aim is separate from the circle but it still move the circle like before

Not sure how to post code but

– Touch Practice

– Use this function to perform your initial setup
function setup()

x=WIDTH
y=HEIGHT

– floor, floor isneant to leave finger space
w1= physics.body(EDGE,vec2(0,HEIGHT/4),vec2(WIDTH,HEIGHT/4))

– left wall
w2=physics.body(EDGE,vec2(0,0),vec2(0,HEIGHT))

– right wall
w3=physics.body(EDGE,vec2(WIDTH,0),vec2(WIDTH,HEIGHT))

– ceiling
w4=physics.body(EDGE,vec2(0,HEIGHT),vec2(WIDTH,HEIGHT))

physics.gravity(vec2(0,-500))

o=physics.body(CIRCLE,50)
o.type=DYNAMIC
o.x=WIDTH/2
o.y=HEIGHT/2

joystick=physics.body(CIRCLE,50)
joystick.type=STATIC
joystick.position=vec2(WIDTH/4,HEIGHT/4)

speed=5
end

– This function gets called once every frame
function draw(DeltaTime)
– This sets a dark background color

background(40, 40, 50)
pushStyle()
strokeWidth(5)
fill(112, 36, 31)
ellipse(o.x,o.y,50)
if drawJoystick then
pushStyle()
fill(0,0)
strokeWidth(3)
stroke(255, 0, 0)
ellipse(tx,ty,20)
popStyle()
end
if drawLine then
pushStyle()
stroke(255, 14, 0)
strokeWidth(5)
line(joystick.x,joystick.y,ttx,tty)
end
popStyle()

end

function touched(t)
if t.state==BEGAN then

tx=t.x
ty=t.y
joystick.position=vec2(tx,ty)
drawJoystick=true

end

if t.state==CHANGED then
speed=-5
ttx=t.x
tty=t.y
drawLine=true
end

if t.state==ENDED then
speed=5
drawJoystick=false
drawLine=false
vx,vy=tx-ttx,ty-tty

o.linearVelocity=vec2(vx*speed,vy*speed)

end
end

Enclose code in separate lines containing three tildes. ~~~, one before the code block, one after. Keep learning!

Posting code from an iPhone doesn’t seem to work using the ~~~ . So if you’re posting from an iPhone I don’t think there’s any way to format it correctly.