theovier / athena Goto Github PK
View Code? Open in Web Editor NEWPlayground. Prototyping ideas for a simple 2D game.
License: GNU General Public License v3.0
Playground. Prototyping ideas for a simple 2D game.
License: GNU General Public License v3.0
Add subfolder to resources, e.g. /assets-raw
to preserve the original input files.
Specify a sprite's origin via prefab and set is in the SpriteSerializer
accordingly.
Add the possibility to load an array of fixtures with different shapes to the PhysicsComponentLoader
.
Add the possibility to load the animation blends from file and read them via SpineComponentLoader
.
Currently an entity and it's components are read synchronously from file. A good way to improve the speed would be to read them asynchronously.
Merge the "normal" game engine and the debug engine. In order for this to work, we have to change the way the batch rendering works currently. As the PhysicsDebugSystem
uses a ShapeRenderer
under the hood, we have to make sure that our main SpriteBatch
's end method has been called before calling update on the debug system. As long as we use
game.batch.use(camera) {
engine.update(delta)
}
to update the engine, the PhysicsDebugSystem
won't be able to work properly inside it.
Use https://github.com/libktx/ktx/tree/master/freetype instead of loading the font generator in the WorldTextRenderingSystem
The LibGdx context is needed to test the SpriteSerialization process for example as the process relies on loading texture Assets.
The addition of more libgdx specifc unit tests would seem helpful in general.
This would also help to test the particle system.
When the deltaTime is lowered, the player can still attack independent of the deltaTime.
We need to change the TimeUtils.millis()
implementation and instead use a deltaTime dependent variant.
package com.theovier.athena.client.ecs.prefabs.serializers
import com.badlogic.gdx.graphics.g2d.ParticleEffect
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializer
import kotlinx.serialization.encoding.Decoder
@Serializer(forClass = ParticleEffect::class)
class ParticleEffectSerializer : KSerializer<ParticleEffect> {
override fun deserialize(decoder: Decoder): ParticleEffect {
return ParticleEffect()
}
}
will throw
Kotlin: [Internal Error] org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /home/theo/dev/athena/client/src/main/kotlin/com/theovier/athena/client/ecs/prefabs/serializers/ParticleEffectSerializer.kt
The root cause java.lang.AssertionError was thrown at: org.jetbrains.kotlin.backend.jvm.lower.SyntheticAccessorLowering.lower(SyntheticAccessorLowering.kt:62)
at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:239)
at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:235)
at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(PhaseBuilders.kt:124)
at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(PhaseBuilders.kt:112)
at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94)
at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:30)
at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94)
at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:41)
at org.jetbrains.kotlin.backend.jvm.JvmLower.lower(JvmLower.kt:407)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.doGenerateFilesInternal(JvmIrCodegenFactory.kt:191)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:62)
at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:35)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:592)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:212)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:155)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1500)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.AssertionError: SyntheticAccessorLowering should not attempt to modify other files!
While lowering this file: FILE fqName:com.theovier.athena.client.ecs.prefabs.serializers fileName:/home/theo/dev/athena/client/src/main/kotlin/com/theovier/athena/client/ecs/prefabs/serializers/ParticleEffectSerializer.kt
Trying to add this accessor: FUN SYNTHETIC_ACCESSOR name:access$getXSizeScale$p visibility:public modality:FINAL <> ($this:com.badlogic.gdx.graphics.g2d.ParticleEffect) returnType:kotlin.Float
at org.jetbrains.kotlin.backend.jvm.lower.SyntheticAccessorLowering.lower(SyntheticAccessorLowering.kt:62)
at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:155)
at org.jetbrains.kotlin.backend.common.phaser.FileLoweringPhaseAdapter.invoke(PhaseBuilders.kt:151)
at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94)
at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(PhaseBuilders.kt:121)
... 35 more
Something with the public serializer invoking protected fields on the ParticleEffect
seems to be off.
Related: SyntheticAccessorLowering that throws the assertion error
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.