Coder Social home page Coder Social logo

quillraven / dark-matter Goto Github PK

View Code? Open in Web Editor NEW
56.0 56.0 10.0 6.85 MB

A tiny autoscroller game for android and desktop written in Kotlin using LibGDX, LibKTX and Ashley.

License: MIT License

Kotlin 98.82% GLSL 1.18%
gradle jetbrains kotlin libgdx libktx pixel-art survival-game

dark-matter's People

Contributors

czyzby avatar quillraven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar

dark-matter's Issues

How to calculate size of a pixel in game viewport

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.

UI ninepatches issue

Hey, I've noticed that there seems to be some kind of issue with the ninepatches in the UI. It adds extra transparent/black pixels around the corners, which looks like an unintended UI bug:

image

I suggest removing these gaps.

Shader not working for Android 10?

@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)

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.