Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upReduce coupling with libgdx by extracting shared functionality into a new dependency #25
Comments
|
+1 This also gets rid of dependency on specific versions of libgdx. I want to use gdx-ai with mini2Dx but they have conflicting libgdx versions and I have to update mini2Dx to use a matching version. |
|
@tomcashman |
|
Ok I'm going to start working on this.
To fix the last set of dependencies I have to change how gdx-ai works internally by adding an abstraction layer. |
|
Service locator makes sense. I guess there would be something along the lines of Gdx.logProvider, Gdx.timeProvider, etc. to statically access them rather than passing references to everything? |
|
@tomcashman |
|
Just realized that most of the times you don't even need to set proper providers on the service locator. |
|
Ok I got it working with the auto-configuration mentioned in my previous post. |
|
Awesome! You're welcome to post an update about this on the jMonkeyEngine forum as well once it's ready ;) |
|
Done! GdxAI.getTimepiece().update(deltaTime);where Please, test and report @erlend-sh |
|
Not sure if it's just me or if Timepiece seems like the incorrect terminology here? Apart from that it looks good, will take it for test run tomorrow :) |
|
@tomcashman That said, English is not my native language. So If you have a better name I'm all ears of course. |
|
It makes sense that it is needed. Maybe Timestep is a more suitable term? Delta is often referred to as the timestep value (e.g. http://gafferongames.com/game-physics/fix-your-timestep/) |
|
Don't know. |
|
Good point. Yeah I'd say |
|
The problem with float currentTime = GdxAI.getTime().getTime(); |
|
New wiki page done. |
Related:
libgdx/libgdx#2793
http://www.reddit.com/r/gamedev/comments/2u8ytc/gdxai_150_released/co6b3hx
To ease using this library in other projects without bringing the whole graphic library, it'd be nice if it was split into a shared module and the core library,