Skip to content

Commit

Permalink
GDX Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealEmissions committed Mar 7, 2024
1 parent f7f97bb commit 6ca570d
Show file tree
Hide file tree
Showing 19 changed files with 341 additions and 122 deletions.
135 changes: 103 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,114 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
.idea/sonarlint/
## Java

*.class
*.war
*.ear
hs_err_pid*

## Robovm
/ios/robovm-build/

## GWT
/html/war/
/html/gwt-unitCache/
.apt_generated/
.gwt/
gwt-unitCache/
www-test/
.gwt-tmp/

## Android Studio and Intellij and Android in general
/android/libs/armeabi-v7a/
/android/libs/arm64-v8a/
/android/libs/x86/
/android/libs/x86_64/
/android/gen/
.idea/
*.ipr
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
/android/out/
com_crashlytics_export_strings.xml

## Eclipse

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
.metadata/
/android/bin/
/core/bin/
/desktop/bin/
/html/bin/
/ios/bin/
*.tmp
*.bak
*.swp
*~.nib
.settings/
.loadpath
.externalToolBuilders/
*.launch

## NetBeans

/nbproject/private/
/android/nbproject/private/
/core/nbproject/private/
/desktop/nbproject/private/
/html/nbproject/private/
/ios/nbproject/private/

/build/
/android/build/
/core/build/
/desktop/build/
/html/build/
/ios/build/

/nbbuild/
/android/nbbuild/
/core/nbbuild/
/desktop/nbbuild/
/html/nbbuild/
/ios/nbbuild/

/dist/
/android/dist/
/core/dist/
/desktop/dist/
/html/dist/
/ios/dist/

/nbdist/
/.nb-gradle/
/android/nbdist/
/core/nbdist/
/desktop/nbdist/
/html/nbdist/
/ios/nbdist/

nbactions.xml
nb-configuration.xml

## Gradle

/local.properties
.gradle/
gradle-app.setting
/build/
/android/build/
/core/build/
/desktop/build/
/html/build/
/ios/build/

### VS Code ###
.vscode/
## OS Specific
.DS_Store
Thumbs.db

### Mac OS ###
.DS_Store
## iOS
/ios/xcode/*.xcodeproj/*
!/ios/xcode/*.xcodeproj/xcshareddata
!/ios/xcode/*.xcodeproj/project.pbxproj
/ios/xcode/native/
/ios/IOSLauncher.app
/ios/IOSLauncher.app.dSYM
16 changes: 16 additions & 0 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ to be updated
- [Lucy](https://github.com/lc2353)
- [Tim](https://github.com/tgorst)
- [Sammy](https://github.com/sammyhori)
*please add yourself*
Binary file added assets/badlogic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
buildscript {


repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
google()
}
dependencies {


}
}

allprojects {
apply plugin: "eclipse"

version = '1.0'
ext {
appName = "ENG1"
gdxVersion = '1.12.1'
roboVMVersion = '2.3.20'
box2DLightsVersion = '1.5'
ashleyVersion = '1.7.4'
aiVersion = '1.8.2'
gdxControllersVersion = '2.2.1'
lombokVersion = '1.18.30'
}

repositories {
mavenLocal()
mavenCentral()
google()
gradlePluginPortal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://jitpack.io" }
}
}

project(":desktop") {
apply plugin: "java-library"


dependencies {
implementation 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-box2d-platform:$gdxVersion:natives-desktop"
compileOnly "org.projectlombok:lombok:$lombokVersion"

}
}

project(":core") {
apply plugin: "java-library"


dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
api "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
api "com.badlogicgames.ashley:ashley:$ashleyVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"

}
}
64 changes: 0 additions & 64 deletions build.gradle.kts

This file was deleted.

6 changes: 6 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

sourceSets.main.java.srcDirs = [ "src/" ]

eclipse.project.name = appName + "-core"
31 changes: 31 additions & 0 deletions core/src/uk/ac/york/student/GdxGame.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package uk.ac.york.student;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.ScreenUtils;

public class GdxGame extends ApplicationAdapter {
SpriteBatch batch;
Texture img;

@Override
public void create () {
batch = new SpriteBatch();
img = new Texture("badlogic.jpg");
}

@Override
public void render () {
ScreenUtils.clear(1, 0, 0, 1);
batch.begin();
batch.draw(img, 0, 0);
batch.end();
}

@Override
public void dispose () {
batch.dispose();
img.dispose();
}
}
Loading

0 comments on commit 6ca570d

Please sign in to comment.