Add gradle project
This commit is contained in:
parent
cf97742219
commit
b7bd35c153
69 changed files with 225 additions and 18 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
22
.classpath
22
.classpath
|
@ -1,13 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="res"/>
|
||||
<classpathentry kind="src" path="libs"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="res">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="Global-Gam-Jam-2017/target/classes" path="src/main/java"/>
|
||||
<classpathentry kind="lib" path="libs/lwjgl.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Global-Gam-Jam-2017/libs"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="out/production/Global-Gam-Jam-2017"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -18,4 +18,6 @@ bin/*
|
|||
.classpath
|
||||
|
||||
*.eml
|
||||
*.userlibraries
|
||||
*.userlibraries
|
||||
/target/
|
||||
/Global-Gam-Jam-2017/
|
||||
|
|
14
.project
14
.project
|
@ -1,15 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Global-Gam-Jam-2017</name>
|
||||
<comment/>
|
||||
<projects/>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments/>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
6
.settings/org.eclipse.jdt.core.prefs
Normal file
6
.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,6 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
4
.settings/org.eclipse.m2e.core.prefs
Normal file
4
.settings/org.eclipse.m2e.core.prefs
Normal file
|
@ -0,0 +1,4 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
15
README.md
Executable file
15
README.md
Executable file
|
@ -0,0 +1,15 @@
|
|||
# GGL 2017
|
||||
|
||||
Ce projet a été créé durant la Global Game Jam de 2016 à Limoges.
|
||||
|
||||
## Comment compiler
|
||||
|
||||
```
|
||||
$ mvn package assembly:single
|
||||
```
|
||||
|
||||
## RUN
|
||||
|
||||
```
|
||||
$ java -XstartOnFirstThread -jar target/GGL2017.jar
|
||||
```
|
BIN
libs/OpenAL.dll
BIN
libs/OpenAL.dll
Binary file not shown.
Binary file not shown.
BIN
libs/glfw.dll
BIN
libs/glfw.dll
Binary file not shown.
BIN
libs/glfw32.dll
BIN
libs/glfw32.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
libs/libglfw.so
BIN
libs/libglfw.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
libs/liblwjgl.so
BIN
libs/liblwjgl.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
libs/lwjgl.dll
BIN
libs/lwjgl.dll
Binary file not shown.
BIN
libs/lwjgl.jar
BIN
libs/lwjgl.jar
Binary file not shown.
BIN
libs/lwjgl32.dll
BIN
libs/lwjgl32.dll
Binary file not shown.
160
pom.xml
Normal file
160
pom.xml
Normal file
|
@ -0,0 +1,160 @@
|
|||
<!--
|
||||
~ Copyright (C) 2016 Team Ubercube
|
||||
~
|
||||
~ This file is part of Ubercube.
|
||||
~
|
||||
~ Ubercube is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ Ubercube is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with Ubercube. If not, see http://www.gnu.org/licenses/.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>fr.mrdev023</groupId>
|
||||
<artifactId>GGL2017</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>GGL2017</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<lwjgl.version>3.1.2</lwjgl.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>globalgamejam.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<finalName>GGL2017</finalName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>lwjgl-natives-linux</id>
|
||||
<activation>
|
||||
<os><family>unix</family></os>
|
||||
</activation>
|
||||
<properties>
|
||||
<lwjgl.natives>natives-linux</lwjgl.natives>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>lwjgl-natives-macos</id>
|
||||
<activation>
|
||||
<os><family>mac</family></os>
|
||||
</activation>
|
||||
<properties>
|
||||
<lwjgl.natives>natives-macos</lwjgl.natives>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>lwjgl-natives-windows</id>
|
||||
<activation>
|
||||
<os><family>windows</family></os>
|
||||
</activation>
|
||||
<properties>
|
||||
<lwjgl.natives>natives-windows</lwjgl.natives>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-stb</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-glfw</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-openal</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-opengl</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
<classifier>${lwjgl.natives}</classifier>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-glfw</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
<classifier>${lwjgl.natives}</classifier>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-openal</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
<classifier>${lwjgl.natives}</classifier>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-opengl</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
<classifier>${lwjgl.natives}</classifier>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
BIN
src/.DS_Store
vendored
Normal file
BIN
src/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
src/main/.DS_Store
vendored
Normal file
BIN
src/main/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
src/main/java/.DS_Store
vendored
Normal file
BIN
src/main/java/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -60,7 +60,7 @@ public class Main {
|
|||
public static boolean isDestroy = false;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.setProperty("org.lwjgl.librarypath", new File("libs").getAbsolutePath());
|
||||
// System.setProperty("org.lwjgl.librarypath", new File("libs").getAbsolutePath());
|
||||
//Creation de la fenetre
|
||||
//------------------------------------------------------------------------------------
|
||||
errorCallback = new GLFWErrorCallback() {
|
|
@ -66,7 +66,7 @@ public class PhysicalEntity {
|
|||
|
||||
public boolean collideWithSquareHitBox(PhysicalEntity entity){
|
||||
|
||||
// on teste une collision avec une hitbox carré
|
||||
// on teste une collision avec une hitbox carré
|
||||
return (this.x + this.sizeX / 2 >= entity.x - entity.sizeX / 2
|
||||
&& this.x - this.sizeX / 2 <= entity.x + entity.sizeX / 2
|
||||
&& this.y + this.sizeY / 2 >= entity.y - entity.sizeY / 2
|
||||
|
@ -90,22 +90,22 @@ public class PhysicalEntity {
|
|||
|
||||
if(entity instanceof Mur){
|
||||
|
||||
// on a touché le bas du Mur
|
||||
// on a touché le bas du Mur
|
||||
if(this.y <= entity.y - entity.sizeY / 2 && this.yVelocity > 0){
|
||||
this.yVelocity *= -1;
|
||||
}
|
||||
|
||||
// on a touché le haut du Mur
|
||||
// on a touché le haut du Mur
|
||||
if(this.y >= entity.y + entity.sizeY / 2 && this.yVelocity < 0){
|
||||
this.yVelocity *= -1;
|
||||
}
|
||||
|
||||
// on a touché le coté gauche du Mur
|
||||
// on a touché le coté gauche du Mur
|
||||
if(this.x <= entity.x - entity.sizeX / 2 && this.xVelocity > 0){
|
||||
this.xVelocity *= -1;
|
||||
}
|
||||
|
||||
// on a touché le coté droit du Mur
|
||||
// on a touché le coté droit du Mur
|
||||
if(this.x >= entity.x + entity.sizeX / 2 && this.xVelocity < 0){
|
||||
this.xVelocity *= -1;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class PhysicalEntity {
|
|||
}
|
||||
|
||||
/**
|
||||
* Déplace l'entity et actualise ça vélocité
|
||||
* Déplace l'entity et actualise ça vélocité
|
||||
*/
|
||||
public void move(){
|
||||
this.x += this.xVelocity;
|
|
@ -94,8 +94,8 @@ public class MainWorld {
|
|||
vagues.getTransform().translate(Main.WIDTH/2, -Main.HEIGHT/2, 0);
|
||||
vagues.getTransform().scale(Main.WIDTH,Main.HEIGHT, 0);
|
||||
|
||||
this.murGauche = new Mur(0,Main.HEIGHT/2+40,"res/textures/murcoté.png");
|
||||
this.murDroit = new Mur(Main.WIDTH,Main.HEIGHT/2+40,"res/textures/murcoté.png");
|
||||
this.murGauche = new Mur(0,Main.HEIGHT/2+40,"res/textures/murcoté.png");
|
||||
this.murDroit = new Mur(Main.WIDTH,Main.HEIGHT/2+40,"res/textures/murcoté.png");
|
||||
this.murHaut = new Mur(Main.WIDTH/2,Main.HEIGHT+10,"res/textures/murhauteur.png");
|
||||
this.murBas = new Mur(Main.WIDTH/2,80,"res/textures/murbas.png");
|
||||
this.mur1 = new Mur(Main.WIDTH/2,Main.HEIGHT-20,"res/textures/murmilieuhaut.png");
|
Reference in a new issue