quillraven / quilly-s-adventure Goto Github PK
View Code? Open in Web Editor NEWA little adventure game written in Kotlin using LibGDX,LibKTX,Box2D and Ashley
License: MIT License
A little adventure game written in Kotlin using LibGDX,LibKTX,Box2D and Ashley
License: MIT License
AudioManager is currently playing sounds and music directly.
Change it to a request queue which means other systems can only make a request to play a sound.
This method will check if the sound was already requested in this frame to only play a unique sound once.
A second method "update" will go through the queue and play the sounds accordingly. It also clears the queue.
The maximum size of the queue is the maximum amount of concurrent sounds that are supported on the device (can most likely be retrieved from LwglConfig)
Seems like menu screen without ecsEngine.update has a lot of drawcalls although there should be only one draw call because UI is using an atlas.
Need to find out, why this is happening
I am quite sure you're not the owner of game.com
The current implementation needs a method for every single listener type and for every single event
this should change that you have an Event interface and then you have only one method for dispatching events
I was searching for open source platformer games, when I came across this project. While interesting and promising, development of the project seems stopped. If you are willing to continue the development, here are some cool open resources you can use to improve the game.
Duelyst - everything is licensed under CC0.
Frogatto & Friends - everything is licensed under CC-BY 3.0, except for a few specific directories.
The following directories and all of their contents are copyrighted to the frogatto team.
I hope you will look into these projects.
related to #6
When the AudioManager changes are done then provide it as a service via our game class.
That way you can globally access it via Gdx.app.getAudioService().
The method returns a NullAudioService in case our AudioService cannot be created.
This makes it easier to access the sound functionality in our game and we do not need to pass the AudioManager everywhere.
This is of course useful for other things as well like MapManager but for now we only improve the audio part since it also improves the situation with the related issue.
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.github.quillraven.darkmatter-1/base.apk"],nativeLibraryDirectories=[/data/app/com.github.quillraven.darkmatter-1/lib/x86, /data/app/com.github.quillraven.darkmatter-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libgdx-box2d.so"
12-25 06:50:43.176 E/AndroidRuntime( 1966): at java.lang.Runtime.loadLibrary0(Runtime.java:972)
12-25 06:50:43.176 E/AndroidRuntime( 1966): at java.lang.System.loadLibrary(System.java:1530)
12-25 06:50:43.176 E/AndroidRuntime( 1966): at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:114)
The reason is that the jump system is applying a force every frame but the physic system is running at a constant interval.
I guess we have the same problem with the Movesystem but there it is not that critical.
Right now the jump direction must be updated every frame to the real value because it is used in some conditions like e .g. if the player can move from the JUMP state to the FALL state.
Need to rethink this approach and come up with a solution ;)
For whatever reason there was an issue that the DesktopLauncherKt
main class could not be found when running the DesktopLauncher from Intellij.
I reverted the build.gradle.kts files now to groovy build.gradle files, deleted the .idea/.gradle folder, cleaned the project, deleted the .iml project file and reimported the project with the build.gradle file.
Now I have three modules - desktop, core, android - all on the same level and I am able to run the DesktopLauncher again from Intellij and also I can run android.
Will try to convert to build.gradle.kts again once I finished some other stuff for the project.
related PR: #9
Add GitHub actions to verify code quality on PRs and create artifacts
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/build.gradle.kts#L1
Build script DSL is obsolete using plugins DSL is recommended (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/build.gradle.kts#L3
You don't use any plugin from maven local (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/build.gradle.kts#L4
This is unnecessary this it's getting proxied by JCenter (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/build.gradle.kts#L5
This is the default repo afaik (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/build.gradle.kts#L6
Should be proxied by JCenter but you don't use it anyways (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/build.gradle.kts#L20-L26
Everything above applies to this as well (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/desktop/build.gradle.kts#L28
Why the hell is the assets folder in the android directory these don't seem to be Android only assets (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/buildSrc/src/main/java/Dependencies.kt#L1-L20
.kt
file in java
folder (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/android/AndroidManifest.xml#L3
Quillraven PRESENTS THE ONE AND ONLY gamename
(+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/android/src/com/game/quillyjumper/AndroidLauncher.kt#L8
Something is telling me that this is not nullable (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/build.gradle.kts#L33
Java 7 reached it's EOL in 2014 or something (+1)
https://github.com/Quillraven/QuillyJumper/blob/master/core/src/main/kotlin/com/game/quillyjumper/trigger/Map2Trigger.kt
That's not how you name Kotlinfiles properly (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/trigger/Map2Trigger.kt#L28
Use of println even if there is a logger in the classpath (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/trigger/Map2Trigger.kt#L65-L66
You don't use these shortenings in Java or Kotlin (I am not going to link every occurrence of this since I want to do other things this year) (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/trigger/Trigger.kt#L23-L29
Oneliners that aren't actual Kotlin oneliners (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/screen/EndScreen.kt#L10
the logging thing again (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/screen/GameScreen.kt#L175-L256
NAMING FTW (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/screen/LoadingScreen.kt#L35
MusicAssets.values().forEach(assets::load)
TextureAtlasAssets.values().forEach(assets::load)
MapAssets.values().forEach(assets::load)
(+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/screen/LoadingScreen.kt#L44-L46
One liner that is not actually a one-liner (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/screen/MenuScreen.kt#L39-L45
Oneliners that aren't actual oneliners (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/input/InputListener.kt#L6
I am not a native speaker but I think it's called percent (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/EcsUtils.kt#L602
Find method does not return the thing that it is supposed to find (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/EcsUtils.kt#L574-L580
Kotlin reflect is made for "reflecting" Kotlin (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/EcsUtils.kt#L567
Naming (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/EcsUtils.kt#L472
Unnecessary this
is unnecessary (also in L490, L472, 439, 384, 359, 333, 233, 83, 55, 58, 70 and 43)
https://rice.by.devs-from.asia/idea64_HWngFn0yw9.png
These are way too many files I would combine all of these 10 lines long classes into one file (or categorize them and put one category in one file (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/system/RenderPhysicDebugSystem.kt#L18-L20
Fake oneliner (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/system/RemoveSystem.kt#L25-L27
Make the Listener abstract and don't override if not wanting to do anything THX (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/system/RemoveSystem.kt#L36-L38
Fake oneliner again (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/system/PhysicJumpSystem.kt#L24
This should be an if (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/system/ParticleSystem.kt#L54
What is that even supposed to mean? Is the Runescape username of your girlfriend? (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/system/ParticleSystem.kt#L63-L65
AudioService#play()
should check that (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/system/OutOfBoundsSystem.kt#L80-L82
Fake one-liner (+1)
https://rice.by.devs-from.asia/chrome_T1DTlVCjQU.png
Chrome wants do die right now and I can understand little Chrome (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/component/TriggerComponent.kt#L14-L16
Companion objects are supposed to be at the very bottom of class (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/component/TransformComponent.kt#L26-L28
Yeah the same thing again (won't repeat me for the rest of component
(+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/component/TransformComponent.kt#L21-L24
this could be an operator fun but it probably won't help much (+1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/ecs/component/TakeDamageComponent.kt#L16-L18
Last time that I am going to point out fake oneliners I think you got it (+1)
https://rice.by.devs-from.asia/chrome_9vl8QDoBy2.png
Somehow GitHub fails syntax highlighting this
https://github.com/Quillraven/QuillyJumper/blob/master/core/src/main/kotlin/com/game/quillyjumper/ecs/component/AttackComponent.kt (+1)
Not pointing out fake oneliners and companion objects anymore saved me a lot of time (+1)
https://github.com/Quillraven/QuillyJumper/tree/master/core/src/main/kotlin/com/game/quillyjumper/configuration
This thing actually isn't that bad (-1)
https://github.com/Quillraven/QuillyJumper/blob/aad2db5f9f94eb28f789785ac5cb65e8f06237db/core/src/main/kotlin/com/game/quillyjumper/audio/DefaultAudioService.kt#L20
Why not using kotlin.collections
it's way better (+1)
https://github.com/Quillraven/QuillyJumper/blob/master/core/src/main/kotlin/com/game/quillyjumper/assets/Assets.kt
Those enums should each have a folder name constant as every enum constant is in the same folder (+1)
I actually had to remove the Android project to make this project compile (+1)
Cause this project has no .idea
folder I had to set up all of the settings again (+1)
It takes to long to generate all of the project files (Just importing the build.gradle.kts and that's it) (+1)
There is no license header (+1)
Each submodule has it's own build folder (+1)
I am not mentioned in the LICENSE
file neither am I in the credits.txt (+1)
There are a whole bunch of other issues but most of them were already mentioned and I don't want to spent another week in writing all of them down
Issues: 48
Use this cool tool to detekt code quality: https://github.com/arturbosch/detekt
Would assign that to me but I am no longer a collaborator
Is it OK if I add your project to the LibKTX showcase on the official website? You're using a significant portion of LibKTX APIs - I think this project would be a useful resource for people starting with the framework.
Type Object Pattern
The idea is to first introduce the sandbox pattern by adding base functionality to our existing Ability class.
In our case it would be a spawnMissile method and playSound e.g..
This cleans up our Fireball class and ideally we also get rid of the Ability constructor parameters by using #7.
With those changes it should be possible to introduce the Type Object pattern and instead of having multiple ability subclasses we will only have one that can be pooled easily via the AbilityComponent.
The ability then references the real ability object like the monster-breed example of the link above.
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.