czyzby / gdx-setup

:octocat: Alternative gdx-setup application - create your LibGDX projects with ease!
https://github.com/czyzby/gdx-setup/releases
The Unlicense
125 stars 14 forks source link

KTX templates #38

Open czyzby opened 7 years ago

czyzby commented 7 years ago

See KTX.

czyzby commented 7 years ago

@kotcrab Would you like to add a ktx-vis template to gdx-setup?

kotcrab commented 7 years ago

Yeah I can add it or if you are going to make scene2d template you can also make vis template so they would be more or less consistent. Whatever you prefer.

czyzby commented 7 years ago

If you want to showcase some VisUI widgets, you can go ahead and prepare a custom project template, but if we're going with simple templates (kind of like the existing one-window-only basic Scene2D templates), switching from ktx-scene2d to ktx-vis should be a matter of switching the import.

czyzby commented 7 years ago

Somewhat blocked by https://github.com/czyzby/ktx/issues/21.

DavidPartouche commented 6 years ago

@czyzby I've created a Ktx boilerplate code, using kotlin-dsl, that could be used as a start of a template for gdx-setup. There's still some work to do on the gradle side, but for the code, it creates a Lwjgl3Application, and uses KtxGame and KtxScreen. If you want to have a look at it, and give any input/suggestions: https://github.com/DavidPartouche/ktx-boilerplate

czyzby commented 6 years ago

gdx-setup templates usually render an image, at the very least. KtxGame without any overloaded methods and without setting the first screen would be somewhat hard to use for a beginner. Check the basic ("classic") templates that render LibGDX logo - converting that to Kotlin with some basic KTX features would be enough as far as the first KTX template goes.

DavidPartouche commented 6 years ago

Ok, the classic boilerplate is done. I'm gonna start to add the template to gdx-setup.

DavidPartouche commented 6 years ago

I've created a new classic template, the feature branch is here: https://github.com/DavidPartouche/gdx-setup/tree/feature/ktx-classic I'm not pushing it yet, because some things are missing:

Also maybe we could create a new project (ktx-setup) where only Ktx projects could be created. What do you think?

czyzby commented 6 years ago

KTX_VERSION hard-coded

KTX_VERSION only determines the default version for the dependencies. If the user changes that in the third-party extension menu, it will affect dependencies required by your template.

The gradle files are not in Kotlin DSL yet.

Groovy DSL is fine for now, until Kotlin matures and becomes the standard.

Also maybe we could create a new project (ktx-setup) where only Ktx projects could be created. What do you think?

I actually thought about this for a while, but I just don't have as much time for open source as I did when I was still the the university. This is also a chance to correct the mistakes of gdx-setup:


As for your commit, you should not modify CoreGradleFile or addJvmLanguagesSupport. isKtxTemplate marker should be unnecessary. See how other templates include their dependencies.

DavidPartouche commented 6 years ago

Ok, I've made the change. I still have to use fun addKotlin() in languages.kt so that the project can launch. I don't know if there's a better way to do it, just let me know.

Writing a new tool from scratch would take a lot of time indeed. What framework would you recommend using? I'm pretty new to Kotlin, so I don't know the ecosystem yet (and I'm an android and game developer, so I don't know much about web apps....)

czyzby commented 6 years ago

I wouldn't ask you to write the application from scratch, knowing I might not have enough time to contribute. I think the work you started on ktx-tools and the KTX template is already great. I feel like there are more important thing we can do for KTX, like actual game examples and some simple tutorials. KTX is pretty easy to add to an existing LibGDX project as it is.

DavidPartouche commented 6 years ago

Ok, I'll jump back to ktx-tools. If there are other Ktx templates you'd like to have, just let me know, now that I've done one, creating other templates will be quick.

czyzby commented 6 years ago

Thanks @DavidPartouche. I'll release the next beta version this week.

DavidPartouche commented 6 years ago

I've created a new sample, taken from gamesfromwithin, and changed to use Ktx https://github.com/DavidPartouche/KtxGraphicDemo As it uses KtxApplicationAdapter and AssetManager to load the texture, would you like to have it also implemented as a template? It's quite basic though, so I don't know about the value of it.

czyzby commented 6 years ago

I don't think we need much more templates, except some advanced KTX usage.

@DavidPartouche If you add a screenshot and improve the README a bit (how to run, how to compile, etc.), I can link your repo in the official KTX documentation. Maybe a separate repository for KTX examples would also be nice.

DavidPartouche commented 6 years ago

Yeah I was thinking about doing this, going through the LibGDX tutorial on Games from Scratch, and adding a repo for all the examples converted to KTX.

the-sauce commented 5 years ago

@DavidPartouche What happened to the KtxGraphicDemo? The link is dead.

bajabob commented 5 years ago

@DavidPartouche taking some time learning libGdx from scratch and wanted to get off on the right foot with a KTX example since I prefer Kotlin. Do you have a good place to start? I was thinking about following these guides from with a bare working KTX example : https://libgdx.info/basic_image/