How to create a war game

Hi, I’m Mexican and codify new. and tried to create some games baces because in my pc using game maker, and basic to games there, so codify the glory to myself that the codes are very different and need some allude and thanked them, here my code and I want to move a finger to the player and another shot, thanks in advance! postscript: add new sprites to use game maker to make it One to codify! my channel on youtube 5ontrol games is to be an idea that I want to do:


function setup()
    origin = vec2(0,0)
    w2 = WIDTH/2
    h2 = HEIGHT/2

function draw()
    background(255, 255, 255, 255)
    if CurrentTouch.state==BEGAN then
        sprite("Planet Cute:Star",CurrentTouch.x,CurrentTouch.y)
    elseif CurrentTouch.state==MOVING then
        sprite("Planet Cute:Star",CurrentTouch.x,CurrentTouch.y)
    t = vec2(CurrentTouch.x-w2, CurrentTouch.y-h2)
    r = math.deg(origin:angleBetween(t))-270

    sprite("Planet Cute:Heart")

--the star is the direction you should shoot and the heart is the player

:-(( hel me please :slight_smile:

Hi Kikeloop

From the video, what you want to do looks fairly simple. I’ll have a go at writing a sample for you after I finish work.

I have no doubt Simeon’s sample will be better, but here is a way to do it.

That looks pretty good, the only thing I would change is move the shoot sound() call into make_bullet() so it doesn’t continuously make a shooting sound.

What you have there is very similar to one of the first projects I did - see - so far as I can tell, the only real difference (other than graphics) is we picked a different origin vector. :slight_smile:

The code is here

thank you very much, that was very good :smiley:

Added my version credited to Kikeloop to wiki

You may want to add your version too Bortel’s but with a common sprite.