Updated Libgdx to a newer version to add gui to the game. This sadly broke the player sprite :/

This commit is contained in:
2020-04-11 07:55:19 -06:00
parent d6c54921d8
commit 57f806983e
80 changed files with 812 additions and 513 deletions

37
lwjgl3/build.gradle Normal file
View File

@@ -0,0 +1,37 @@
apply plugin: 'application'
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
mainClassName = 'Collector.lwjgl3.Lwjgl3Launcher'
eclipse.project.name = appName + '-lwjgl3'
sourceCompatibility = 8.0
dependencies {
api project(':core')
api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-controllers-lwjgl3:$gdxVersion"
api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
api "de.tomgrill.gdxdialogs:gdx-dialogs-desktop:$dialogsVersion"
}
import org.gradle.internal.os.OperatingSystem
run {
workingDir = rootProject.file('assets').path
setIgnoreExitValue(true)
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
// Required to run LWJGL3 Java apps on MacOS
jvmArgs += "-XstartOnFirstThread"
}
}
jar {
archiveFileName = "${appName}-${version}.jar"
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': project.mainClassName
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -0,0 +1,2 @@
cd /d %~dp0
start javaw -Xms64m -Xmx1024m -XX:+UseG1GC -XX:MinHeapFreeRatio=15 -XX:MaxHeapFreeRatio=30 -jar gdx-texturepacker.jar %*

View File

@@ -0,0 +1,3 @@
SCRIPTDIR=$(dirname "$0")
cd $SCRIPTDIR
java -Xms64m -Xmx1024m -XX:+UseG1GC -XX:MinHeapFreeRatio=15 -XX:MaxHeapFreeRatio=30 -jar ./gdx-texturepacker.jar

View File

@@ -0,0 +1,7 @@
Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c launcher.bat "
For Each arg In Wscript.Arguments
strArgs = strArgs + arg
Next
oShell.Run strArgs, 0, false

View File

@@ -0,0 +1,27 @@
Gdx Texture Packer GUI
Simple utility to help you pack and manage texture atlases for LibGDX game framework. It's mostly just visual wrapper over LibGDX TexturePacker classes and offers more convenient way of using it.
For further details visit GitHub project page:
https://github.com/crashinvaders/gdx-texture-packer-gui
Requirements:
- Java 7 JRE (or higher) (can be donwnloaded here http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- OpenGL support
How to launch:
Application is packed into JAR executable file. To launch it, issue next command
java -jar gdx-texturepacker.jar
MacOS and UNIX
You may execute launch.sh bash script to launch application
Windows
launch.bat - starts application
launcher_no_cmd.vbs - does exactly what launch.bat does, but CMD window won't appear in that case
If you got any questions or would like to share some ideas, reach me out at anton@crashinvaders.com
Hope you will enjoy it!
Anton Chekulaev

View File

@@ -0,0 +1,3 @@
You can define/override you own keyboard shortcuts for some actions.
For the details look at the default hotkey configuration file.
https://github.com/crashinvaders/gdx-texture-packer-gui/blob/master/assets/hotkeys_default.txt

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,229 @@
man.png
size: 256, 128
format: RGBA8888
filter: Nearest,Nearest
repeat: none
man_Up
rotate: false
xy: 0,0
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_Up
rotate: false
xy: 32,0
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_Up
rotate: false
xy: 64,0
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_Up
rotate: false
xy: 96,0
size: 32,32
orig: 32,32
offset: 0,0
index: 3
man_Down
rotate: false
xy: 128,0
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_Down
rotate: false
xy: 160,0
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_Down
rotate: false
xy: 192,0
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_Down
rotate: false
xy: 224,0
size: 32,32
orig: 32,32
offset: 0,0
index: 3
man_Left
rotate: false
xy: 0,32
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_Left
rotate: false
xy: 32,32
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_Left
rotate: false
xy: 64,32
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_Left
rotate: false
xy: 96,32
size: 32,32
orig: 32,32
offset: 0,0
index: 3
man_Right
rotate: false
xy: 128,32
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_Right
rotate: false
xy: 160,32
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_Right
rotate: false
xy: 192,32
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_Right
rotate: false
xy: 224,32
size: 32,32
orig: 32,32
offset: 0,0
index: 3
man_UpLeft
rotate: false
xy: 0,64
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_UpLeft
rotate: false
xy: 32,64
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_UpLeft
rotate: false
xy: 64,64
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_UpLeft
rotate: false
xy: 96,64
size: 32,32
orig: 32,32
offset: 0,0
index: 3
man_UpRight
rotate: false
xy: 128,64
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_UpRight
rotate: false
xy: 160,64
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_UpRight
rotate: false
xy: 192,64
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_UpRight
rotate: false
xy: 224,64
size: 32,32
orig: 32,32
offset: 0,0
index: 3
man_DownLeft
rotate: false
xy: 0,96
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_DownLeft
rotate: false
xy: 32,96
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_DownLeft
rotate: false
xy: 64,96
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_DownLeft
rotate: false
xy: 96,96
size: 32,32
orig: 32,32
offset: 0,0
index: 3
man_DownRight
rotate: false
xy: 128,96
size: 32,32
orig: 32,32
offset: 0,0
index: 0
man_DownRight
rotate: false
xy: 160,96
size: 32,32
orig: 32,32
offset: 0,0
index: 1
man_DownRight
rotate: false
xy: 192,96
size: 32,32
orig: 32,32
offset: 0,0
index: 2
man_DownRight
rotate: false
xy: 224,96
size: 32,32
orig: 32,32
offset: 0,0
index: 3

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,62 @@
world.png
size: 128,16
format: RGBA8888
filter: Nearest,Nearest
repeat: none
crosshair
rotate: false
xy: 48, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1
grass
rotate: false
xy: 96, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1
jungleGrass
rotate: false
xy: 112, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1
sand
rotate: false
xy: 16, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1
snow
rotate: false
xy: 0, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1
stone
rotate: false
xy: 64, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1
water
rotate: false
xy: 32, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1
wood
rotate: false
xy: 80, 0
size: 16, 16
orig: 16, 16
offset: 0, 0
index: -1

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,24 @@
package Collector.lwjgl3;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import Collector.Main;
/** Launches the desktop (LWJGL3) application. */
public class Lwjgl3Launcher {
public static void main(String[] args) {
createApplication();
}
private static Lwjgl3Application createApplication() {
return new Lwjgl3Application(new Main(), getDefaultConfiguration());
}
private static Lwjgl3ApplicationConfiguration getDefaultConfiguration() {
Lwjgl3ApplicationConfiguration configuration = new Lwjgl3ApplicationConfiguration();
configuration.setTitle("Collevtor");
configuration.setWindowedMode(640, 480);
configuration.setWindowIcon("libgdx128.png", "libgdx64.png", "libgdx32.png", "libgdx16.png");
return configuration;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB