Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
72d2204
make server button handler
Pechenuxa1 Mar 12, 2023
a3a9226
made an interface for connecting players to the server
Pechenuxa1 Mar 14, 2023
a0b713a
add waiting on the client and updating the list of clients on the ser…
Pechenuxa1 Mar 21, 2023
544066a
fix return button
Pechenuxa1 Mar 27, 2023
8a20ec1
not workin movement
BuDum-Tss Mar 28, 2023
050725a
working movement
BuDum-Tss Mar 28, 2023
253f20b
take/throw debug(but not working)
BuDum-Tss Mar 28, 2023
bee9ea4
fix bugs
Pechenuxa1 Mar 28, 2023
8ca3528
spawn playeers
BuDum-Tss Mar 29, 2023
5c0003e
make scrollpane
Pechenuxa1 Mar 30, 2023
564d414
JSON
BuDum-Tss Apr 1, 2023
07e40fb
JSON 2
BuDum-Tss Apr 1, 2023
59179ff
JSON 2
BuDum-Tss Apr 1, 2023
4b34967
Правки с собрания
Foxtezy Apr 3, 2023
b3daa2f
Debuged
BuDum-Tss Apr 3, 2023
7b12237
TakeWeapon Action
BuDum-Tss Apr 3, 2023
ce44cee
TakeWeapon Action fixed
BuDum-Tss Apr 3, 2023
cd15e48
Added deleting completed actions
BuDum-Tss Apr 3, 2023
fe3a190
Removing cutted
BuDum-Tss Apr 4, 2023
c1d7f49
thread problems slolwed
Foxtezy Apr 4, 2023
bcb00d3
gson problems
Foxtezy Apr 4, 2023
80f163c
completed the scrollpane style
Pechenuxa1 Apr 4, 2023
d1b262d
Update info serialization/deserialization with FlatBuffers
BuDum-Tss Apr 10, 2023
b2b74ee
Spawn info serialization/deserialization with FlatBuffers
BuDum-Tss Apr 11, 2023
7bf1f80
Sender/Receiver
BuDum-Tss Apr 11, 2023
2f36290
дичь какую-то сделал, решил закоммитить
Foxtezy Apr 12, 2023
0d2861e
Merge remote-tracking branch 'origin/bdtss-flatbuffers-and-data' into…
Foxtezy Apr 16, 2023
c978506
is and status
BuDum-Tss Apr 16, 2023
2bdca4a
Sender и Receiver
Foxtezy Apr 16, 2023
6eecc5d
spawn & id
BuDum-Tss Apr 16, 2023
e70d67f
ещё всякое
Foxtezy Apr 16, 2023
e194922
ownerID
BuDum-Tss Apr 16, 2023
fbe055e
Серверные потоки
Foxtezy Apr 17, 2023
07ca180
Сервер
Foxtezy Apr 17, 2023
a745bb1
Сервер исправления
Foxtezy Apr 17, 2023
d0c945b
ByteBuffer to byte[] conversion
BuDum-Tss Apr 18, 2023
19f3745
Теперь ошибка в spawnHero
Foxtezy Apr 18, 2023
647444d
работает, но костыль для vector(FB)
BuDum-Tss Apr 18, 2023
be706d0
выбор режима игры с помощью кнопок
BuDum-Tss Apr 18, 2023
4218a60
Нашли проблему в Update
Foxtezy Apr 18, 2023
8e4b780
исправлена сериализация + изменен ServerUpdaterThread
BuDum-Tss Apr 18, 2023
40ecc7b
исправлен хофикс c 1 элементом в vector(FB)
BuDum-Tss Apr 18, 2023
001a0b6
ОНО РАБОТАЕТ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Foxtezy Apr 19, 2023
9a29114
удалены лишние проверки + Utils.delay
BuDum-Tss Apr 19, 2023
de0710d
возвращена проверка на DataComponent
BuDum-Tss Apr 19, 2023
7d83314
123
BuDum-Tss Apr 19, 2023
67848ec
123
BuDum-Tss Apr 19, 2023
a5624e3
wait component
BuDum-Tss Apr 19, 2023
4920503
ОНО ЕЩЁ ЛУЧШЕ РАБОТАЕТ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Foxtezy Apr 21, 2023
b55f2ff
321
BuDum-Tss Apr 21, 2023
9b40dc4
movement
BuDum-Tss Apr 21, 2023
209f0ea
Merge remote-tracking branch 'origin/vladosTopFrontend' into bdtss-da…
Foxtezy Apr 24, 2023
4c0ce04
Почти работающее подключение
Foxtezy Apr 24, 2023
7ba4432
подключение без запуска игры у клиента
Foxtezy Apr 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added flatbuffers-compiler/bin/flatc.exe
Binary file not shown.
Binary file added flatbuffers-compiler/bin/linux/flatc.zip
Binary file not shown.
Binary file added flatbuffers-compiler/bin/osx/flatc.zip
Binary file not shown.
Binary file added flatbuffers-compiler/bin/windows/flatc.zip
Binary file not shown.
16 changes: 16 additions & 0 deletions flatbuffers-compiler/example/src/main/java/example/Color.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// automatically generated by the FlatBuffers compiler, do not modify

package example;

@SuppressWarnings("unused")
public final class Color {
private Color() { }
public static final byte Red = 0;
public static final byte Green = 1;
public static final byte Blue = 2;

public static final String[] names = { "Red", "Green", "Blue", };

public static String name(int e) { return names[e]; }
}

15 changes: 15 additions & 0 deletions flatbuffers-compiler/example/src/main/java/example/Equipment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// automatically generated by the FlatBuffers compiler, do not modify

package example;

@SuppressWarnings("unused")
public final class Equipment {
private Equipment() { }
public static final byte NONE = 0;
public static final byte Weapon = 1;

public static final String[] names = { "NONE", "Weapon", };

public static String name(int e) { return names[e]; }
}

69 changes: 69 additions & 0 deletions flatbuffers-compiler/example/src/main/java/example/Monster.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// automatically generated by the FlatBuffers compiler, do not modify

package example;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class Monster extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); }
public static Monster getRootAsMonster(ByteBuffer _bb) { return getRootAsMonster(_bb, new Monster()); }
public static Monster getRootAsMonster(ByteBuffer _bb, Monster obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public Monster __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public example.Vec3 pos() { return pos(new example.Vec3()); }
public example.Vec3 pos(example.Vec3 obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; }
public short mana() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) : 150; }
public short hp() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) : 100; }
public String name() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; }
public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(10, 1); }
public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); }
public int inventory(int j) { int o = __offset(14); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
public int inventoryLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; }
public ByteVector inventoryVector() { return inventoryVector(new ByteVector()); }
public ByteVector inventoryVector(ByteVector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
public ByteBuffer inventoryAsByteBuffer() { return __vector_as_bytebuffer(14, 1); }
public ByteBuffer inventoryInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); }
public byte color() { int o = __offset(16); return o != 0 ? bb.get(o + bb_pos) : 2; }
public example.Weapon weapons(int j) { return weapons(new example.Weapon(), j); }
public example.Weapon weapons(example.Weapon obj, int j) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
public int weaponsLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; }
public example.Weapon.Vector weaponsVector() { return weaponsVector(new example.Weapon.Vector()); }
public example.Weapon.Vector weaponsVector(example.Weapon.Vector obj) { int o = __offset(18); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
public byte equippedType() { int o = __offset(20); return o != 0 ? bb.get(o + bb_pos) : 0; }
public Table equipped(Table obj) { int o = __offset(22); return o != 0 ? __union(obj, o + bb_pos) : null; }

public static void startMonster(FlatBufferBuilder builder) { builder.startTable(10); }
public static void addPos(FlatBufferBuilder builder, int posOffset) { builder.addStruct(0, posOffset, 0); }
public static void addMana(FlatBufferBuilder builder, short mana) { builder.addShort(1, mana, 150); }
public static void addHp(FlatBufferBuilder builder, short hp) { builder.addShort(2, hp, 100); }
public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(3, nameOffset, 0); }
public static void addInventory(FlatBufferBuilder builder, int inventoryOffset) { builder.addOffset(5, inventoryOffset, 0); }
public static int createInventoryVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); }
public static int createInventoryVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); }
public static void startInventoryVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static void addColor(FlatBufferBuilder builder, byte color) { builder.addByte(6, color, 2); }
public static void addWeapons(FlatBufferBuilder builder, int weaponsOffset) { builder.addOffset(7, weaponsOffset, 0); }
public static int createWeaponsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); }
public static void startWeaponsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static void addEquippedType(FlatBufferBuilder builder, byte equippedType) { builder.addByte(8, equippedType, 0); }
public static void addEquipped(FlatBufferBuilder builder, int equippedOffset) { builder.addOffset(9, equippedOffset, 0); }
public static int endMonster(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}
public static void finishMonsterBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); }
public static void finishSizePrefixedMonsterBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); }

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public Monster get(int j) { return get(new Monster(), j); }
public Monster get(Monster obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
}

34 changes: 34 additions & 0 deletions flatbuffers-compiler/example/src/main/java/example/Vec3.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// automatically generated by the FlatBuffers compiler, do not modify

package example;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class Vec3 extends Struct {
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public Vec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public float x() { return bb.getFloat(bb_pos + 0); }
public float y() { return bb.getFloat(bb_pos + 4); }
public float z() { return bb.getFloat(bb_pos + 8); }

public static int createVec3(FlatBufferBuilder builder, float x, float y, float z) {
builder.prep(4, 12);
builder.putFloat(z);
builder.putFloat(y);
builder.putFloat(x);
return builder.offset();
}

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public Vec3 get(int j) { return get(new Vec3(), j); }
public Vec3 get(Vec3 obj, int j) { return obj.__assign(__element(j), bb); }
}
}

47 changes: 47 additions & 0 deletions flatbuffers-compiler/example/src/main/java/example/Weapon.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// automatically generated by the FlatBuffers compiler, do not modify

package example;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class Weapon extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); }
public static Weapon getRootAsWeapon(ByteBuffer _bb) { return getRootAsWeapon(_bb, new Weapon()); }
public static Weapon getRootAsWeapon(ByteBuffer _bb, Weapon obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public Weapon __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }
public short damage() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) : 0; }

public static int createWeapon(FlatBufferBuilder builder,
int nameOffset,
short damage) {
builder.startTable(2);
Weapon.addName(builder, nameOffset);
Weapon.addDamage(builder, damage);
return Weapon.endWeapon(builder);
}

public static void startWeapon(FlatBufferBuilder builder) { builder.startTable(2); }
public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); }
public static void addDamage(FlatBufferBuilder builder, short damage) { builder.addShort(1, damage, 0); }
public static int endWeapon(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public Weapon get(int j) { return get(new Weapon(), j); }
public Weapon get(Weapon obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
}

59 changes: 59 additions & 0 deletions flatbuffers-compiler/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.davidmoten</groupId>
<artifactId>flatbuffers-parent</artifactId>
<version>2.0.9-SNAPSHOT</version>
</parent>
<artifactId>flatbuffers-compiler</artifactId>
<packaging>pom</packaging>
<description>Compressed archive of binaries for flatbuffers particularly flatc for generating classes. Multiple platforms supported vi different classifications.</description>

<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<target>
<echo message="unzipping linux binary for inclusion by assembly" />
<unzip src="bin/linux/flatc.zip" dest="${project.build.directory}/linux/" />
<unzip src="bin/osx/flatc.zip" dest="${project.build.directory}/osx/" />
<unzip src="bin/windows/flatc.zip" dest="${project.build.directory}/windows/" />
<chmod file="${project.build.directory}/linux/flatc" perm="+x" />
<chmod file="${project.build.directory}/osx/flatc" perm="+x" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<descriptors>
<descriptor>src/assembly/linux.xml</descriptor>
<descriptor>src/assembly/osx.xml</descriptor>
<descriptor>src/assembly/windows.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
16 changes: 16 additions & 0 deletions flatbuffers-compiler/src/assembly/linux.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>distribution-linux</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}/linux</directory>
<outputDirectory>/bin</outputDirectory>
</fileSet>
</fileSets>
</assembly>
16 changes: 16 additions & 0 deletions flatbuffers-compiler/src/assembly/osx.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>distribution-osx</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}/osx</directory>
<outputDirectory>/bin</outputDirectory>
</fileSet>
</fileSets>
</assembly>
16 changes: 16 additions & 0 deletions flatbuffers-compiler/src/assembly/windows.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>distribution-windows</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}/windows</directory>
<outputDirectory>/bin</outputDirectory>
</fileSet>
</fileSets>
</assembly>
Loading