thelogicmaster / tower-defense-galaxy Goto Github PK
View Code? Open in Web Editor NEWA tower defense game using libgdx
License: MIT License
A tower defense game using libgdx
License: MIT License
Superfoo(){super.foo ()}
Add methods to overide behavior of one method while still getting the super behavior.
Need to create custom vr camera that has a better named interface for ALL of the rendering, so TDScreen needs to use it.
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.
Redo main menu and settings menu to fit screens dynamically. Possibly need to do that when I implement multiple viewports.
If I am not feeling lazy make the sign in/out button use the stacking widget thing for auto placement and sizing.
android.util.AndroidRuntimeException: requestFeature() must be called before adding content
presents itself on android 4.4, so get emulator.
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.
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.
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.
Move the preference stuff from TDGalaxy to a Preferences class with methods.
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();
}
}
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.
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.
Add copy constructors to all of the child-most classes.
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.
Need to remove all object creation from rendering code and need to use stringbuilders with the drawing code.
Do that to improve crap for all of the icons that are used.
Need to test for the existence of the obb file and download it if it doesn't exist. Move this to TDGalaxy class to load assets before doing anything.
https://developer.android.com/google/play/licensing/index.html
Add a parent class for default fading that extends Window. Make MessageWindow extend this new "FadingWindow" and use the default background rendering,
`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);
}
}`
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.
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.
Remove isTemplate Boolean? Generics?
Change TDWorld class's constructor to take in only interface and move desktop specific code(google class loading) to desktop main class.
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.
Need to pass in reference to the asset handler or loaded assets when creating entities.
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().
Need to add pools for 3D effects and things used by entities to appease the great garbage collector. Mostly for projectiles, but possibly create a custom pool that overrides the default "get" or whatever it is called method to set the location and direction? Maybe?
https://github.com/libgdx/libgdx/wiki/Memory-management
Make the selector pretty by increasing the size and offsetting the other tabs and having a bit of a movement animation.
Switch track data and all files that are read and stored to json for readability.
https://stackoverflow.com/questions/2591098/how-to-parse-json-in-java
Need to look into releasing bullet objects and add disposable array to TDScreen class and move it out of TDGame.
Possibly change font map in in game class to non-static or decide upon another way of storing the fonts in the screen classes.
Add getters and make FileStuff and OnlineServices private in TDGalaxy.
Change screens to use aspect ratios and don't use this constructor:
public TDScreen (Game game) {
this(game, new OrthographicCamera());
}
assetManager.getProgress();
Add loading animation and asset manager to TDScreen class, possibly in a method to override for customizing it.
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.
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.
Should possibly add a classification of tower to include adding an array of nodes based on the model and some default aiming code.
Catch errors related to assets not being found and replace them with a default asset instead or look somewhere else for them.
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.
Make sure asset loading uses getMethod rather than getDeclaredMethod and add default version that searches in the default directory, possibly theme/basic/...
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)); }
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;
}
Check the order of length, width, and height when creating vector or calculating values.
Need to figure out how to use tables better and center the text in the window class I have.
Use math.min() to limit distance traveled by projectiles when multiplying delta float by distance. Also use that in rotations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.