quillraven / dark-matter Goto Github PK
View Code? Open in Web Editor NEWA tiny autoscroller game for android and desktop written in Kotlin using LibGDX, LibKTX and Ashley.
License: MIT License
A tiny autoscroller game for android and desktop written in Kotlin using LibGDX, LibKTX and Ashley.
License: MIT License
Currently we know the size of one pixel of the display (desktop display or android).
But for our outline shader to be consistent across different resolutions we need to find out the size of one pixel of our game viewport because 1 pixel there represents multiple pixels of the real display.
@czyzby @tommyettinger: Seems like there is a problem with Android 10 that fetchUniformLocation is not working. Do you have any experience with that or how to solve it?
Otherwise, I will google a little bit over the weekend to find that out.
I tested it with an emulated device running Android 10 and the game crashes with below stacktrace when switching to a custom shader. Could also be related that the custom shader is not loaded properly and for some reason it does not get logged correctly.
Running fine on my Galaxy S8 though. Not running on Galaxy S10 of a friend ;)
E/AndroidRuntime: FATAL EXCEPTION: GLThread 551
Process: com.github.quillraven.darkmatter, PID: 7275
java.lang.IllegalArgumentException: no uniform with name 'u_projTrans' in shader
at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchUniformLocation(ShaderProgram.java:308)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchUniformLocation(ShaderProgram.java:298)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.setUniformMatrix(ShaderProgram.java:528)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.setUniformMatrix(ShaderProgram.java:519)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.setupMatrices(SpriteBatch.java:1061)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.setShader(SpriteBatch.java:1091)
at com.github.quillraven.darkmatter.ecs.system.RenderSystem.renderEntityOutlines(RenderSystem.kt:100)
at com.github.quillraven.darkmatter.ecs.system.RenderSystem.update(RenderSystem.kt:95)
at com.badlogic.ashley.core.Engine.update(Engine.java:202)
at com.github.quillraven.darkmatter.screen.MenuScreen.render(MenuScreen.kt:81)
at ktx.app.KtxGame.render(game.kt:53)
at com.github.quillraven.darkmatter.Game.render(Game.kt:131)
at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:494)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1573)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1272)
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.