Worklog: 1986 - Best Of The 80's - 2023' Compo

Started by therevills, November 19, 2023, 03:13:16

Previous topic - Next topic

therevills

I decided to base my entry on 1942, released in 1984... but mine is going to be named "1986"   8)



Added screen manager, basic animations and controls  :P

therevills



therevills

Enemy planes! And really bad collisions!


therevills

Going to be tight to finish it, but it'll be playable.

Fixed collisions
Added Sounds
Enemies waves are loaded from a JSON file




TODO:
* Explosion effects
* Player Death
* Levels
* Powerups

therevills



blinkok

Nice. I always had trouble making paths like that

therevills

#8
Thanks Blinkok, this is the first time I've actually tried making paths myself.

I decided on a bezier curve for the movements, LibGdx has some nice built in functions for that.

public class Enemy extends Plane {
...
    private Bezier<Vector2> curve;
    private Vector2 angleCurve = new Vector2();
    Vector2 bezierPosition = new Vector2();
...
    private void logic(float delta) {
        stateTime += delta;
        if (stateTime > initTime) start = true;

        if (start) {
            speed += planeSpeed  * delta;

            curve.valueAt(bezierPosition, speed);
            setPosition(bezierPosition.x, bezierPosition.y);

            rotation = curve.derivativeAt(angleCurve, speed).angleDeg();
        }
    }
}
Then for each plane in the wave pattern I add a slight delay when they start.