Skip to content

Conversation

@renaud
Copy link
Contributor

@renaud renaud commented May 11, 2025

  1. Updated LibGDX version from 1.9.8 to 1.12.0
  2. Switched from LWJGL2 to LWJGL3 backend
  3. Updated controllers API (replaced PovDirection enum with int values)
  4. Fixed type casting for camera movement in tile demos
  5. Updated Java requirements from 1.6 to 1.8
  6. Added proper window resize handling in Game2D class
  7. Maintained LWJGL2 support for Swing integration
  8. Updated gdx-controllers dependency to the new separate package (2.2.2)
  9. Removed deprecated GdxNativesLoader class
  10. Improved student script with safer sed command usage
  11. Wasted 45,390,848 tokens using Claude CLI, but it was not that bad

To make the application work in IntelliJ IDEA on macOS:

  1. Open your project in IntelliJ IDEA
  2. Click on "Run" in the top menu, then select "Edit Configurations..."
  3. Select your run configuration (or create a new one if needed)
  4. In the "VM options" field, add: -XstartOnFirstThread
  5. Make sure the "Main class" is set correctly (e.g., ch.hevs.gdx2d.demos.DemoSimpleAnimation)
  6. Click "Apply" and then "OK"
  7. Run your application using the updated configuration

@metc
Copy link
Contributor

metc commented May 12, 2025

11. Wasted 45,390,848 tokens using Claude CLI, but it was not that bad

Short note. You can get free access to Copilot Pro as a student, teacher, or maintainer
With the free pro plan on GitHub Copilot you can get Claude 3.7 Sonnet, o1, and more. 🚀

@renaud
Copy link
Contributor Author

renaud commented May 23, 2025

@metc I am testing this version with the new LibGDX. I can make a basic example work. But strangely when subclassing PortableApplication, the onInit() methods gets called BEFORE the class variables initialization. I don't think that should be the case. Do you have any idea why?

To reproduce:

import ch.hevs.gdx2d.lib.GdxGraphics
import ch.hevs.gdx2d.desktop.PortableApplication
import com.badlogic.gdx.graphics.Color

class Demo() extends PortableApplication {

  var a = 1

  override def onInit(): Unit = {
    setTitle("demo" + a)
  }

  override def onGraphicRender(g: GdxGraphics): Unit = {
    a+=1
    g.clear()
    g.drawRectangle( 10, 10, 20, 20,0)
    g.drawAntiAliasedCircle(200, 200, a, Color.RED)
  }
}

object Demo extends App{
  new Demo()
}

The title should be demo1 but it is demo0. variable a never gets initialized before onInit() is called...

@renaud renaud force-pushed the feature/upgrade_libgdx branch from 5d4be77 to 488209d Compare May 23, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants