Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monthly Pull from Dev Branch - May 2022 #43

Merged
merged 153 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
02b9c9a
Update menu.py as per suggestion in issue #25
C0rupted Apr 16, 2022
8cc7566
Fix issue #20
C0rupted Apr 17, 2022
b48a99c
Merge branch 'dev' of https://github.com/ShadityZ/Vitrix into dev
C0rupted Apr 17, 2022
cd40778
Fix building for linux
C0rupted Apr 17, 2022
aabaab2
Merge branch 'dev' of https://github.com/ShadityZ/Vitrix into dev
C0rupted Apr 17, 2022
81d8c5d
Merge branch 'master' of https://github.com/ShadityZ/Vitrix into dev
C0rupted Apr 17, 2022
bfb985d
Follow suggestion of issue #23
C0rupted Apr 17, 2022
b8e6b59
Add VenvCTL to the requirements.txt
C0rupted Apr 17, 2022
e56c7d2
Remove unncessary requirement
C0rupted Apr 17, 2022
b2a1714
Reorganised folder structure
Apr 19, 2022
ccafb48
Added new ammo type and model
Apr 19, 2022
f8ef86b
Merge branch 'master' into dev
Apr 21, 2022
ee4df8d
Remove unnecessary imports
C0rupted Apr 21, 2022
7f5580d
First bullet in obj
davecarrijo Apr 22, 2022
f48999a
Disable multiple ammo types (for now)
C0rupted Apr 24, 2022
a539d72
Merge branch 'master' of https://github.com/ShadityZ/Vitrix into dev
C0rupted Apr 24, 2022
198d27b
Add a reload system, reload using "r" key
C0rupted Apr 24, 2022
f038d94
Added third person
Apr 22, 2022
be353ab
Added comment
Apr 22, 2022
790b13d
updated
Apr 24, 2022
2e6aa2b
anti cheat
Apr 24, 2022
c1feb0f
anti cheat
Apr 24, 2022
1010959
fixed ac again
Apr 24, 2022
af49de4
separed weapons from player.py
Apr 24, 2022
2080a0e
Added axe model and fixed ac
Apr 24, 2022
d0b55f4
Added a newline (useless commit)
Apr 24, 2022
cb684c0
AC can check health now
Apr 24, 2022
90a39d8
added aid kit
Apr 24, 2022
cd0e525
removed useless import
Apr 24, 2022
e7b849c
removed useless import
Apr 24, 2022
e6089d1
Add basic crates, (right click to open) but contents get print()ed
C0rupted Apr 25, 2022
8b84714
Make it so that Crates break themselves when opened
C0rupted Apr 25, 2022
baf2ce3
Art update, courtesy of @davecarrijo
C0rupted Apr 25, 2022
9856b23
Art update, courtesy of @davecarrijo
C0rupted Apr 25, 2022
47717ec
Merge branch 'dev' of https://github.com/ShadityZ/Vitrix into dev
C0rupted Apr 25, 2022
70324eb
Art update no. 2, again courtesy of @davecarrijo
C0rupted Apr 25, 2022
c507121
added settings.json
Apr 25, 2022
9a01c3d
Fixed pause (not completly)
Apr 25, 2022
7932063
fixed conflict
Apr 25, 2022
5438390
fixed conflict
Apr 25, 2022
d49e504
fixed conflict
Apr 25, 2022
d6d81be
put old pause back
Apr 25, 2022
a7f4a39
Merge branch 'dev' into dev
Evhann Apr 25, 2022
d8d1115
Merge pull request #2 from ShadityZ/dev
Evhann Apr 25, 2022
eea12e0
disabled input function overwriting
Apr 26, 2022
4d410b4
Just add some models and the second level.
davecarrijo Apr 26, 2022
48475e4
Merge branch 'ShadityZ:dev' into dev
davecarrijo Apr 26, 2022
ee071bb
Merge pull request #29 from davecarrijo/dev
davecarrijo Apr 26, 2022
f06094d
textures
davecarrijo Apr 26, 2022
17dafa1
Add better paths system
C0rupted Apr 26, 2022
0beedaf
Make first aid kit object look better
C0rupted Apr 26, 2022
7354415
General bug fixes and optimisation
C0rupted Apr 26, 2022
a1a1b00
Fix issue that you can't jump
C0rupted Apr 26, 2022
730a813
Add hammer, switch with "f", only hammers can open crates
C0rupted Apr 26, 2022
1824afb
Uv maps and paint change
davecarrijo Apr 27, 2022
f770ee5
Make Pistol class replace the Gun
C0rupted Apr 27, 2022
a716585
Fix import bug
C0rupted Apr 27, 2022
3ea22a2
Clean up models
C0rupted Apr 27, 2022
0a4957f
Ability to scroll between four different items using "f"
C0rupted Apr 27, 2022
b48a60e
Add FULL respawn support!
C0rupted Apr 27, 2022
66a54f4
Fix collision issue with bullets not registering
C0rupted Apr 27, 2022
116f134
Merge branch 'ShadityZ:dev' into dev
Evhann Apr 27, 2022
930b49a
Merge pull request #41 from Chateauvisionn/dev
Evhann Apr 27, 2022
4c662ec
Completly removed anticheat from singleplayer
Apr 27, 2022
4bd15a8
Optimised python-windows.zip
Apr 27, 2022
751b764
added path and removed screeninfo from requirements
Apr 27, 2022
112aa1d
Shaders
Apr 27, 2022
df1bce2
Shaders
Evhann Apr 27, 2022
3305369
Merge branch 'dev' into dev
Evhann Apr 27, 2022
b0a9325
Merge pull request #1 from ShadityZ/dev
Evhann Apr 27, 2022
59a2a6b
add inventory and key to call it
davecarrijo Apr 28, 2022
de508bd
add the batle axe
davecarrijo Apr 28, 2022
364b4a0
Fix issue with the hammer model
C0rupted Apr 28, 2022
6a524f4
Use map1.obj as default map! (shaders disabled temporarily)
C0rupted Apr 28, 2022
0dac1cf
Merge branch 'ShadityZ:dev' into dev
Evhann Apr 28, 2022
dd9f7a3
Changed the amount of health that the aid kit give
Apr 28, 2022
d7a8aab
Added aid kit to singleplayer
Apr 28, 2022
93cc0cf
removed useless variable
Apr 28, 2022
9e6eeac
Added a crate on the new map and changed health_restore in aid_kit.py
Apr 28, 2022
b8d6e52
Disable inventory until its finished
C0rupted Apr 29, 2022
2228ed0
Replace axe with battle axe
C0rupted Apr 29, 2022
89b77fe
Fix accidental deletion of singleplayer.py
C0rupted Apr 29, 2022
624d640
Update to better shader and fix map scale
C0rupted Apr 29, 2022
ad1a6da
Move majority of player code to player.py
C0rupted Apr 29, 2022
9503b8f
Disable server-side anticheat until problems can be fixed
C0rupted Apr 29, 2022
dbc28ae
Fix no reloading sound issue
C0rupted Apr 29, 2022
bef4078
Add better Zombie sounds
C0rupted Apr 29, 2022
08f1961
Merge branch 'dev' into dev
Evhann Apr 29, 2022
dd5123f
Merge pull request #2 from ShadityZ/dev
Evhann Apr 29, 2022
83de5b1
Modified settings.json and removed aid_kit collision until it works
Apr 29, 2022
c53168c
Merge pull request #44 from Chateauvisionn/dev
Evhann Apr 29, 2022
a6eb1c2
created settings.py (will be used for read and write)
Apr 29, 2022
27663a3
added settings.py
Apr 29, 2022
e857854
made the logo transparent
Apr 29, 2022
2a7a7ee
Merge branch 'master' of https://github.com/ShadityZ/Vitrix into dev
C0rupted Apr 30, 2022
981f17b
Fix first aid kit collisions
C0rupted Apr 30, 2022
7812979
Add close range damage system, still bit glitchy
C0rupted Apr 30, 2022
6db186a
Rename sound to make more sense
C0rupted Apr 30, 2022
cd4e505
Merge branch 'ShadityZ:dev' into dev
Evhann Apr 30, 2022
f80123f
Merge pull request #45 from Chateauvisionn/dev
Evhann Apr 30, 2022
d9157c1
Clean up libs folder, linke in #38
C0rupted May 1, 2022
9e38c8f
Updated multiplayer.py and changed inventory access
Evhann May 1, 2022
de400d6
Merge pull request #48 from Chateauvisionn/dev
Evhann May 1, 2022
0f0fc6a
added fov changer
Evhann May 1, 2022
22248b1
Merge branch 'ShadityZ:dev' into dev
Evhann May 1, 2022
d8d4e76
Merge pull request #49 from Chateauvisionn/dev
Evhann May 1, 2022
6881be1
changed app.run()
Evhann May 1, 2022
b8232b9
fetch
Evhann May 1, 2022
e5acfd3
added info=False
Evhann May 1, 2022
92d2f87
Check for internet connection before launching to avoid crashes
C0rupted May 2, 2022
033304b
Merge pull request #50 from Chateauvisionn/dev
Evhann May 2, 2022
c030fec
removed useless thing in notification.py
Evhann May 2, 2022
45ea0e5
removed __pycache__ folders
Evhann May 2, 2022
24c598e
Merge pull request #51 from Chateauvisionn/dev
Evhann May 2, 2022
498da4c
changed anticheat speeds list
Evhann May 2, 2022
d50179a
Game is in fullscreen by default
Evhann May 2, 2022
8a6e4a3
fixed a bug
Evhann May 2, 2022
dab2c05
Merge pull request #52 from Chateauvisionn/dev
Evhann May 2, 2022
de94030
Add button in pause menu to toggle fullscreen
C0rupted May 3, 2022
9fe653b
Make an ammo/rounds system, with round counter
C0rupted May 3, 2022
89c4b6d
Change build system for better path support
C0rupted May 3, 2022
c369982
Make it so that you can only reload with gun in hand
C0rupted May 7, 2022
8a40f1b
Modifications for Vitrix Engine!
C0rupted May 8, 2022
5bc0c64
Ported the WHOLE game to vitrix engine
Evhann May 8, 2022
d56185c
Fixes for better engine support
C0rupted May 10, 2022
0a94cc0
More engine fixes
C0rupted May 10, 2022
282dca6
BIG Engine changes, healthbar redesign
C0rupted May 12, 2022
5d8e98d
Change to requirements.txt
C0rupted May 12, 2022
4f91c04
Add vitrix engine eggs to .gitignore
C0rupted May 13, 2022
0cc783b
Merge branch 'master' into dev
C0rupted May 13, 2022
1dd27a7
Fix issues with multiplayer and .gitignore
C0rupted May 13, 2022
a277119
Merge branch 'ShadityZ:dev' into dev
Evhann May 13, 2022
7fafc95
useless thing
Evhann May 13, 2022
21fb5dd
Ported the WHOLE game to Vitrix Engine PR #53
C0rupted May 14, 2022
c7b1852
Fix for issue #54 and some performance improvements
C0rupted May 15, 2022
8bb123f
Missed bit of code for fix of #54
C0rupted May 15, 2022
245b75d
Add basic chat menu, accessible by using "t"
C0rupted May 17, 2022
cc8a180
Bug fixes
C0rupted May 20, 2022
620ea59
Fix glitchy hit/open raycasts
C0rupted May 21, 2022
a714f5a
Optimizations and bug fixes
C0rupted May 21, 2022
2bf44d2
Add crosshair images and class, melee and ranged
C0rupted May 21, 2022
589b2eb
Fix reach too short issue
C0rupted May 22, 2022
d4638de
LOTS of optimization
C0rupted May 22, 2022
2d8fdc9
Join and left the game chat messages for multiplayer
C0rupted May 22, 2022
b321a80
Fix window title not being set
C0rupted May 22, 2022
be9918b
Implement basic fall damage system
C0rupted May 22, 2022
d9a8b98
added fov in the settings
Evhann May 22, 2022
c913f2f
Merge pull request #58 from Chateauvisionn/dev
Evhann May 22, 2022
99510e4
Change default text font
C0rupted May 23, 2022
b4f05e1
Few bug fixes
C0rupted May 23, 2022
4d5fe96
Add some guns, the inventory images
davecarrijo May 25, 2022
d31c2b3
inventory
davecarrijo May 25, 2022
0b0fe38
Clean up for May PR merge
C0rupted May 25, 2022
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
vitrix/lib/__pycache__/
vitrix/__pycache__/
vitrix/lib/__pycache__/
vitrix/lib/weapons/__pycache__/
vitrix/lib/items/__pycache__/
vitrix/lib/UI/__pycache__/
vitrix/lib/entities/__pycache__/
vitrix/lib/classes/__pycache__/
vitrix/test.py
vitrix_engine.egg-info/
venvs-config/
data.txt
build/
dist/
test/
ib.cfg
65 changes: 24 additions & 41 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import platform
import subprocess

from os.path import join


def run(command, output=1):
Expand Down Expand Up @@ -32,9 +33,8 @@ def print_seperator():


dir_path = os.path.dirname(os.path.realpath(__file__))
build_path = dir_path + "/build"
build_path = join(dir_path, "build")
d = datetime.datetime.now()
vitrix_ver = d.strftime("%m-%Y")

if platform.system() == "Linux":
operating_sys = "linux"
Expand Down Expand Up @@ -64,55 +64,38 @@ def print_seperator():
start_time = time.time()
print("Building...\n\n")

with open(dir_path + "/requirements.txt") as file:
with open(join(dir_path, "requirements.txt")) as file:
packages = file.readlines()

if operating_sys == "linux":
from venvctl import VenvCtl

VenvCtl.create_venv(name="python-env", packages=packages,
output_dir=build_path)
shutil.rmtree(build_path + "/builds")
shutil.rmtree(build_path + "/reports")
shutil.copy("data/linux/vitrix.sh", "build")

shutil.copytree(dir_path + "/vitrix", build_path + "/src",
ignore=shutil.ignore_patterns("__pycache__"))
os.remove(build_path + "/src/.unbuilt")
shutil.rmtree(join(build_path, "builds"))
shutil.rmtree(join(build_path, "reports"))
shutil.copy(join("data", "linux", "vitrix.sh"), "build")
shutil.copy(join("data", "linux", "singleplayer.sh"), "build")
shutil.copy(join("data", "linux", "multiplayer.sh"), "build")


if operating_sys == "windows":
run("python -m ursina.build")

folders_to_remove = [
"/src/data",
"/src/server",
"/src/test",
"/src/.github"
]

files_to_remove = [
"/src/build.pyc",
"/src/LICENSE",
"/src/logo.png",
"/src/requirements.txt",
"/src/SECURITY.md",
"/src/README.md",
"/src/vitrix/.unbuilt",
"/Vitrix.bat"
]


for item in folders_to_remove:
shutil.rmtree(build_path + item)

for item in files_to_remove:
os.remove(build_path + item)
from zipfile import ZipFile

with ZipFile(join(dir_path, "data", "windows", "python-windows.zip"), "r") as zip:
zip.extractall(build_path)

shutil.copy(dir_path + "/data/windows/vitrix.bat", build_path)
shutil.copy(dir_path + "/data/windows/singleplayer.bat", build_path)
shutil.copy(dir_path + "/data/windows/multiplayer.bat", build_path)

pkg_name = "Vitrix_" + vitrix_ver + "_" + operating_sys
shutil.copy(join("data", "windows", "vitrix.bat"), "build")
shutil.copy(join("data", "windows", "singleplayer.bat"), "build")
shutil.copy(join("data", "windows", "multiplayer.bat"), "build")


shutil.copytree(join(dir_path, "vitrix"), join(build_path, "vitrix"),
ignore=shutil.ignore_patterns("__pycache__"))
os.remove(f"{build_path}/src/.unbuilt")

pkg_name = f"Vitrix-vX.X.X-{operating_sys}"


shutil.make_archive(pkg_name, "zip", build_path)
Expand All @@ -124,4 +107,4 @@ def print_seperator():
print_seperator()
print("Build Successfully Completed!")
print("Finished On: " + d.strftime("%I:%M %p %A %B %Y"))
print("\nTotal Build Time: " + str(time.time() - start_time) + " seconds")
print(f"\nTotal Build Time: {str(time.time() - start_time)} seconds")
2 changes: 1 addition & 1 deletion data/linux/multiplayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

DIR=$(dirname "$0")

$DIR/python-env/bin/python3 $DIR/vitrix/multiplayer.py
$DIR/python-env/bin/python3 $DIR/src/multiplayer.py
2 changes: 1 addition & 1 deletion data/linux/singleplayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

DIR=$(dirname "$0")

$DIR/python-env/bin/python3 $DIR/vitrix/singleplayer.py
$DIR/python-env/bin/python3 $DIR/src/singleplayer.py
2 changes: 1 addition & 1 deletion data/linux/vitrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

DIR=$(dirname "$0")

$DIR/python-env/bin/python3 $DIR/vitrix/menu.py > log.txt
$DIR/python-env/bin/python3 $DIR/src/menu.py > log.txt
2 changes: 1 addition & 1 deletion data/windows/multiplayer.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
chcp 65001
set PYTHONIOENCODING=utf-8

call "python\python.exe" "src\vitrix\multiplayer.pyc"
call "python\python.exe" "src\multiplayer.py"
Binary file added data/windows/python-windows.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion data/windows/singleplayer.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
chcp 65001
set PYTHONIOENCODING=utf-8

call "python\python.exe" "src\vitrix\singleplayer.pyc"
call "python\python.exe" "src\singleplayer.py"
3 changes: 2 additions & 1 deletion data/windows/vitrix.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
chcp 65001
set PYTHONIOENCODING=utf-8
title Vitrix

call "python\python.exe" "src\vitrix\menu.pyc" > "log.txt" 2>&1
call "python\python.exe" "src\menu.py" > "log.txt" 2>&1
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
notify2==0.3.1
panda3d==1.10.11
panda3d-gltf==0.13
panda3d-simplepbr==0.10
Pillow==9.1.0
screeninfo==0.8
ursina==4.1.1
git+https://github.com/ShadityZ/Vitrix-Engine.git@v1.0#egg=vitrix_engine
venvctl==1.4.12
13 changes: 11 additions & 2 deletions server/server.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
"""
Server script for hosting games
Server version: v1.0.0
"""

import os
import sys
import socket
import json
import time
import random
import threading

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from vitrix.lib.classes.anticheat import *
#from vitrix.lib.player import Player

ADDR = "0.0.0.0"
PORT = 26822
Expand Down Expand Up @@ -108,7 +114,7 @@ def main():
new_id = generate_id(players, MAX_PLAYERS)
conn.send(new_id.encode("utf8"))
username = conn.recv(MSG_SIZE).decode("utf8")
new_player_info = {"socket": conn, "username": username, "position": (0, 1, 0), "rotation": 0, "health": 100}
new_player_info = {"socket": conn, "username": username, "position": (0, 1, 0), "rotation": 0, "health": 150}


for player_id in players:
Expand Down Expand Up @@ -152,6 +158,9 @@ def main():

print(f"New connection from {addr}, assigned ID: {new_id}...")

#check_speed(Player.speed)
#check_jump_height(Player.jump_height, 2.5)


if __name__ == "__main__":
try:
Expand Down
Binary file removed vitrix/assets/floor.png
Binary file not shown.
10 changes: 10 additions & 0 deletions vitrix/assets/models/K47.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Blender MTL File: 'None'
# Material Count: 1

newmtl None
Ns 500
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
Loading