Hello everyone, programming and allegro newbie here. I've been tinkering with this library for a few days, and now I'm trying to create a very small game for an uni project.
The idea I have in mind is a simple version of the atari classic "missile commander". Enemy missiles (represented by slow moving lines) come from above, and you shoot them back with your missiles from below, before they hit the ground.
Problem is, I can't figure out how to implement the missile movement from point A to point B (aka from turret to mouse cursor, when the mouse is clicked). I've been using al_draw_line as a placeholder while testing other functions, but of course that won't cut it, as it draws the entire thing immediately.
If I'm not mistaken, Allegro 4 had a do_line function that when combined with putpixel, did exactly what I'm asking for, but I can't find its equivalent for Allegro 5 (I might easily be missing something huge here).
I've even tried Bresenham's algorithm with al_draw_pixel, and it works like a charm, but the line is drawn from the cursor to the turret, rather than the opposite, and reversing it is proving harder than it actually seemed. In the end, I'm probably overthinking it, so I finally decided to ask for help. In the meantime, I'll try to figure out how to implement threading, which is looking like an even bigger nightmare
Thanks in advance people