Giter VIP home page Giter VIP logo

fuzzy-octo-shame's Introduction

fuzzy-octo-shame

Build Status

2D Platformer skeleton built with LWJGL and a fork of Slick2D

Visit the wiki for more information.

Useful stuff:

  • mvn nativedependencies:copy

  • -Djava.library.path=/path/to/project/root/target/natives

  • -Dorg.slf4j.simpleLogger.defaultLogLevel=debug

  • ./mvnw versions:display-dependency-updates

  • ./mvnw versions:display-plugin-updates

"How to configure slf4j-simple"

fuzzy-octo-shame's People

Contributors

dependabot[bot] avatar hornswaggler avatar virtuoushub avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fuzzy-octo-shame's Issues

Add Javadoc

Using this checkstyle configuration results in ~240 errors due to missing Javadocs. For my opinion on the matter see this commit message. The tl;dr is depending on the complexity of the problem being solved well written code does not need verbose, or sometimes any documentation. However, Javadoc is too great of a tool not to use in a sane manner.

Building with JDK 7 Fails

I used the SO recommended fix for "Maven is not working in Java 8 when JavaDoc tags are incomplete." However, -Xdoclint:none it seems, does not exist in JDKs 7 and below. I get an error when trying to use the JDK 7

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.1:jar (attach-javadocs) on project fuzzy-octo-shame: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: error - invalid flag: -Xdoclint:none

While the code currently enforces the use of JDK 8 in the POM.xml, in theory it can be compiled using JDK 7. JDK 6 and below will not work because of the use of the Diamond Operator.

For the time being, I would like to have the option to be able to compile via JDK 7. This might change in the future if we start using lambdas or some other 8+ only feature. Thus this is a low priority issue.

Have build system handle native binaries more elegantly.

The dependency org.lwjgl.lwjgl:lwjgl-platform:2.9.1 has native binaries for the respective OSs that Java needs to know about in order to run the project. We are currently leveraging the mavennatives plugin, however it can be more automated. The process of unzipping and setting the java.library.path variable needs to be relatively transparent to the developer.

Ideally you have it so only the OS you are building on gets those binaries unzipped. I have done this in the past, and with the help of the mavennatives plugin it is rather trivial can be done, just not with the latest version of the plugin(0.0.7 as of 2014-11-12). It is just a matter of wiring it all up in a sane manner so that the build works in any environment.

Clean Up POM.xml

Make version properties, add release plugin(to concatenate issues like 25 and 27) *, try to slim down the file down, and optimize the POM.

***** I moved adding a release plugin to a separate issue: #29

AbstractInputListener.mouseWheelMoved NotImplementedException

[main] INFO org.newdawn.slick.util.DefaultLogSystem - Wed Oct 18 08:38:44 EDT 2017 INFO:Use Java PNG Loader = true
Exception in thread "main" org.colapietro.lang.NotImplementedException: Not implemented yet.
	at org.colapietro.slick.AbstractInputListener.mouseWheelMoved(AbstractInputListener.java:95)
	at org.newdawn.slick.Input.poll(Input.java:1260)
	at com.jed.core.MotherBrain.processInput(MotherBrain.java:290)
	at com.jed.core.MotherBrain.start(MotherBrain.java:280)
	at com.jed.core.FuzzyOctoShame.main(FuzzyOctoShame.java:31)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
	at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
	at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
	at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
	at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
	at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
	at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
	at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)

Collision Detection Bug(The Sad Tragedy of Micro-Optimization Theater II:Coding Horror Boogaloo)

If you hit a tile's corner at just the right point, issues like the image below where the player is not falling down but actually standing on the wall's tile will occur.

collisionfail

I have also noticed when jumping up to a tile that you can make it into, but because of a mistimed jump you should not be able to get to, this bug allows you to "pop" to the top on ledge thereby lowering the skills needed for precision timing of jumps.

Somewhere along the misguided path of my micro-optimization, I suspect I introduced this bug. I modified the original code to do some cheeky floating point arithmetic comparisons which most likely caused the observed problem.

Add Unit Tests

Write Unit tests with as close to 100% code coverage as possible. roughly 60%-70% code coverage and follow the 80/20 rule.

VSync

Enabling vertical monitor synchronization via org.lwjgl.opengl.Display#setVSyncEnabled causes the game speed to slow down. Disabling it cause "tearing" of the QuadTree's debug lines, that I unfortunately can not seem to get a screenshot of.

Do you know how to get the "tearing" effect to go away while maintain a fast game speed? It feels like an underwater level with VSync enabled.

Fix the description

LJWJGL 2d platformer skeleton has too many Js.

I propose my fork's description:

2D platformer skeleton built with LWJGL and a fork of Slick2D

Research JMX

Look into developing and integrating into codebase separate modules, which leverage JMX; possibly for things like real time retrieval of error logs, profiling, etc.

Use Gradle as the build system.

With the Gradle wrapper, a new developer does not need to have Gradle installed in their environment to get started. For this reason alone, I suggest migrating from Maven to Gradle.

Create Documentation

Provide a clear, and concise getting started guide. It shall include such things as technical requirements, coding conventions, etc.

Possible Infinite Disco State...

[edited]

I am not sure if this issue (tiles not loading properly) is local to my environment or if it exists in the develop branch. Please check out the latest from develop of your repo and see if you can reproduce.

I noticed it last night, intermittently and thought it was due to me changing over versions of Eclipse. I want to be sure I did not introduce any bugs before I continue on my milestone goal.

screen shot 2014-11-06 at 12 36 59 am

Remove Slick2D Dependency

I want to removed the dependency on Slick2D. LWJGL, does most of what we want.

I analyzed our project and we are only using a a limited number of classes from the Slick2D library:

  • org.newdawn.slick.Color
  • org.newdawn.slick.SlickException
  • org.newdawn.slick.UnicodeFont
  • org.newdawn.slick.font.effects.ColorEffect
  • org.newdawn.slick.opengl.Texture
  • org.newdawn.slick.opengl.TextureLoader
  • org.newdawn.slick.util.ResourceLoader

The source code to the project can be found at the bitbucket repo.

I propose we "vendor" those classes we are currently using(copy them, and any of their compile time dependencies over to our repo) and remove the overall dependency.

Fix Input

I broke input handling in the develop branch when I implemented a command system to bind multiple inputs(keyboard, controller, etc.) to a command.

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.