GithubHelp home page GithubHelp logo

thelogicmaster / tower-defense-galaxy Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 8.0 47.41 MB

A tower defense game using libgdx

License: MIT License

Java 100.00%
libgdx tower-defense modular 3d tower-defense-game android virtual-reality java

tower-defense-galaxy's Introduction

Project Status

This project needs to be redone from the ground up. This was the project I used to learn Java and game development in general, so most aspects are very rough. For a much more advanced LibGDX game, see my current programming puzzle game: Robot Recharge

TDGalaxy

A 3D tower defense game using libgdx for android and desktop platforms.

This is a modular tower defense game that will allow for the easy addition of themes(Which contain all entity logic and assets) and levels.

tower-defense-galaxy's People

Contributors

thelogicmaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tower-defense-galaxy's Issues

TDScreen loading animation

Add loading animation and asset manager to TDScreen class, possibly in a method to override for customizing it.

Collision filtering

`public class BulletTest implements ApplicationListener {
final static short GROUND_FLAG = 1<<8;
final static short OBJECT_FLAG = 1<<9;
final static short ALL_FLAG = -1;

@Override
public void create () {
    collisionWorld.addCollisionObject(object.body, GROUND_FLAG, ALL_FLAG);
}

public void spawn () {  
    collisionWorld.addCollisionObject(obj.body, OBJECT_FLAG, GROUND_FLAG);
}

}`

Disposing resources

Need to look into releasing bullet objects and add disposable array to TDScreen class and move it out of TDGame.

Completely redo object creation

Implement factory methods instead of using reflection to create all of the objects to increase reliability.
Example:

public class Library implements BookFactory {
@OverRide
public Book newBook() {
return new PaperBook();
}
}

public class KindleLibrary implements BookFactory {
@OverRide
public Book newBook() {
return new KindleBook();
}
}

Texture packing

Do that to improve crap for all of the icons that are used.

Dependency handling in themes

Add main class for themes and add a method for getting the desired classes to pool. Change inherited method getDependencies to be inherited but be overriden.

Fix VR stuff

Need to create custom vr camera that has a better named interface for ALL of the rendering, so TDScreen needs to use it.

Label text

Need to figure out how to use tables better and center the text in the window class I have.

Clean up tower placement redundancy

Need to optimize how often raycasting is being done in the PlacementWindow class, though this is a lesser place to worry about it. Also remove the possible null pointer with the second ray cast.

Icon selector graphics

Make the selector pretty by increasing the size and offsetting the other tabs and having a bit of a movement animation.

Check cursor location better when deciding top window

Might currently not work quite right.
@OverRide
public boolean scrolled(int amount) {
for(MouseHandler mouseHandler: Lists.reverse(Tools.getImplements(elements, MouseHandler.class)))
if(mouseHandler.onWindow(Gdx.input.getX(), Gdx.input.getY()))
if(mouseHandler.scrolled(amount))
break;
return false;
}

Platform specific code

Make interfaces for things like loading classes in a package and have the platform main classes implement them and pass themselves in a constructor for the game so that the core code just calls a method and it goes to the respective platform's method.

Memory issues

Need to remove all object creation from rendering code and need to use stringbuilders with the drawing code.

Constructors are a mess

Organize order of arguments in constructors, add java-docs or comments, and finish adding constants to classes instead of values in the actual constructors for readability. Need to add constants to all of the top level entity classes instead of passing everything in.

Possible sign in loop

Need to make the current version able to have the permission dialog come up and not constantly pop up the attempting one that fails. Look at version code 4 for what kind of might have worked.

Assetmanagers

Need to add different asset managers to load resources in chunks, possibly some like menu and ui assets and ones in individual screens. Probably one in TDScreen for each screens assets to load each time. Also add loading animation for each screen. Need to move fonts from TDGalaxy class to TDScreen class, too.

Sign in button

If I am not feeling lazy make the sign in/out button use the stacking widget thing for auto placement and sizing.

Models for entities

Need to pass in reference to the asset handler or loaded assets when creating entities.

UI dynamic resizing

Redo main menu and settings menu to fit screens dynamically. Possibly need to do that when I implement multiple viewports.

Asset organization

The file structure for default resources needs work, not just having everything in the default theme. Need to move the assets that won't be customizable into a separate directory.

Debug window

Look through the Window or Dialog class to try to make a window pop up for displaying values or have it be one of my windows on android or if a boolean is false;
Get FPS with Gdx.graphics.getFramesPerSecond().

New method of loading entity assets

Possibly still add a static method to the entity or tower and enemy classes for default that uses class's name for default file name. Redo the asset class to include possibly an enum and string for source and maybe separate name/type.
Example:
public static List<Asset> getAssets() { return Arrays.asList(new Asset(Sources.INTERNAL, "theme/basic/tower/Gun.g3db", Model.class)); }

Aspect ratios

Change screens to use aspect ratios and don't use this constructor:
public TDScreen (Game game) {
this(game, new OrthographicCamera());
}

Window fading

Add a parent class for default fading that extends Window. Make MessageWindow extend this new "FadingWindow" and use the default background rendering,

Tower model nodes

Should possibly add a classification of tower to include adding an array of nodes based on the model and some default aiming code.

Tower Placement

Need to add a method for determining the orientation of the tower being placed in the region class based on proximity to a surface on the region.

Asset loading error catching

Catch errors related to assets not being found and replace them with a default asset instead or look somewhere else for them.

Possible teleportation.

Use math.min() to limit distance traveled by projectiles when multiplying delta float by distance. Also use that in rotations.

Class loader

Change TDWorld class's constructor to take in only interface and move desktop specific code(google class loading) to desktop main class.

requestFeature() issue.

android.util.AndroidRuntimeException: requestFeature() must be called before adding content
presents itself on android 4.4, so get emulator.

Window that takes focus

Need to create an Actor or window that overrides the hit() method and returns itself to block input from the parent actor. Implement this in the pause menu, popup window, confirmation dialog, and future popup type windows.

Pausing

Make sure all non-rendering code goes into the tick methods in entities because calculations need to stop when paused and render methods are still called. Laser class is the obvious example of this not working correctly with the laser going away while game is paused(Might be desirable in that instance). Also need to ensure that the other actors are not active while the pause one is up and draw a partially transparent image over everything maybe.

Hide entity map from entities

If possible, generate an id outside of the entity and pass it in to prevent entities from having access to other entities. Not sure what to do about targeting, though. Possibly pass in a reference to a targeting object that has access to said map of entities.

Increase Vector readability

Create local references to temp variables to make it easier to see what they are instead of "tempVector1" and such. Also use .cpy() instead of using a copy constructor to increase readability with chaining.

Tower placement window control

Need to work out a way to place towers without calling touch events to any of the other windows, maybe a lockout boolean in Window class to block other windows.

Get asset "override"

Make sure asset loading uses getMethod rather than getDeclaredMethod and add default version that searches in the default directory, possibly theme/basic/...

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.