Giter Site home page Giter Site logo

ogzkrt / otd Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 3.0 43.96 MB

A Tower Defense game written in Java by using LibGDX.

Home Page: https://ogzkrt.github.io/gposts/2021-3-17-tower_defense/

License: MIT License

Java 100.00%
game-development java libgdx tower-defense tower-defense-game

otd's People

Contributors

ogzkrt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

otd's Issues

Tower effects on enemy should be renderable.

Currently, when enemies are slow down, different set of textures are used to render enemies. This is not scalable. Instead of having ENEMY_SLOWED texture, we should have SLOW_EFFECT texture. For different future effects, we should have this.

Fix the music issue

When the game starts, music is not playing. After clicking disable and enable again, it works fine. This should be fixed.

To reproduce:

  • Go to options
  • Disable music
  • Enable it. ( you should be hearing the music)

Update dependencies to newest version

Some dependencies in build.gradle file is outdated now, when a new project is generated by setup-gdx.jar instead of using:

  • api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
  • api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion" is used. Update all the dependencies, if there are any other like this.

Implement new approach for handling inputs

It seems like every input class has repeated code like below

    @Override
    public boolean touchDown(int screenX, int screenY, int pointer, int button) {

        OrthographicCamera camera = state.getCamera();
        Vector3 unprojected = camera.unproject(new Vector3(screenX, screenY, 1));
        state.touchDown(unprojected.x, unprojected.y);
        return super.touchDown(screenX, screenY, pointer, button);
    }

    @Override
    public boolean touchUp(int screenX, int screenY, int pointer, int button) {
        OrthographicCamera camera = state.getCamera();
        Vector3 unprojected = camera.unproject(new Vector3(screenX, screenY, 1));
        state.touchRelease(unprojected.x, unprojected.y);
        return super.touchUp(screenX, screenY, pointer, button);
    }

There should be better way to handle inputs

Rewrite buttons

Currently buttons have

  • sprite;
  • pressedSprite;
  • disabledSprite;

I don't remember what was my intention that time, I don't think I need 3 sprite now, just change the alpha value or something similar to that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.