Skip to content

Mini Milestone 2 #83

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

Merged
merged 408 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
408 commits
Select commit Hold shift + click to select a range
a883a1d
pulled in dev changes
EddieJ03 Apr 20, 2024
4f3c151
added session field back to Client
EddieJ03 Apr 20, 2024
002b29f
Refactored GAME case in doTick to reflect image above
EddieJ03 Apr 20, 2024
790a518
remove extra sleepsso the cube moves smoothly
Tyler-Lentz Apr 20, 2024
c924a5d
libxinerama-dev
atar13 Apr 20, 2024
e71a0ea
libxcursor-dev
atar13 Apr 20, 2024
86e1cc4
Merge branch 'feat/server-tick' into feat/handle-network-errors
Tyler-Lentz Apr 20, 2024
54c7ed7
libxi-dev
atar13 Apr 20, 2024
7ebd0f3
libgl1-mesa-dev
atar13 Apr 20, 2024
7f7e916
xvfb
atar13 Apr 20, 2024
5121dba
bring other linux actions up to speed
atar13 Apr 20, 2024
f36fece
add opengl deps to client unit tests
atar13 Apr 20, 2024
3674fc6
Merge pull request #40 from ucsd-cse125-sp24/chore/unit-tests-opengl
atar13 Apr 20, 2024
48e721e
Merge pull request #39 from ucsd-cse125-sp24/feat/server-tick
EddieJ03 Apr 20, 2024
6470d74
Merge pull request #37 from ucsd-cse125-sp24/ci-opengl
atar13 Apr 20, 2024
c38797a
refactor Server::doAccept
Tyler-Lentz Apr 20, 2024
7346d89
Server now starts in LOBBY phase, transitions to GAME when enough pla…
EddieJ03 Apr 20, 2024
cfb8648
In client, only draw if the game phase is in GAME
EddieJ03 Apr 21, 2024
e8eeb04
Merge pull request #41 from ucsd-cse125-sp24/feat/lobby-events
EddieJ03 Apr 21, 2024
b744ba9
merge w/ dev for lobby changes
Tyler-Lentz Apr 21, 2024
494966e
fix bug where using destroyed socket var
Tyler-Lentz Apr 21, 2024
7b5e95e
New ServerGameState + SharedGameState implementation.
gilkeidar Apr 21, 2024
e32b135
FIGHTING DEMONS
Tyler-Lentz Apr 21, 2024
6deb1e4
slayed the demons (fixed the seg fault)
Tyler-Lentz Apr 21, 2024
d820d94
Merged dev into client_refactoring
dmin12 Apr 22, 2024
e64fa95
Merge remote-tracking branch 'origin/dev' into cppcheck
atar13 Apr 22, 2024
2fe7563
cleaned some lint from merge
atar13 Apr 22, 2024
195527b
forgot to change header
atar13 Apr 22, 2024
b81dc2e
Updated Debugger for new ServerGameState implementation (currently th…
gilkeidar Apr 22, 2024
3f8aaaa
install opengl for lint action
atar13 Apr 23, 2024
c041146
cppcheck-suppress unused eids
atar13 Apr 23, 2024
a2af0fa
Merge pull request #29 from ucsd-cse125-sp24/cppcheck
atar13 Apr 23, 2024
ebf5264
Removed old gaemstate files and updated `debugger.cpp` to remove a re…
gilkeidar Apr 23, 2024
c45d2a9
delete extra files
jhparkt Apr 23, 2024
029b172
start many -> one refactor
Tyler-Lentz Apr 23, 2024
62c5714
Merge branch 'refactor/ServerGameState' of github.com:ucsd-cse125-sp2…
Tyler-Lentz Apr 23, 2024
15495b9
Fun file moving around
Tyler-Lentz Apr 23, 2024
8ae0714
refactored client render logic
dmin12 Apr 23, 2024
ee191ee
Possibly buggy commit (odd build errors when building server.exe)
gilkeidar Apr 23, 2024
8c8617b
Possibly buggy commit
gilkeidar Apr 23, 2024
18dbece
server compiling
Tyler-Lentz Apr 24, 2024
ee7d660
Initial implementation of redesign with ObjectManager class
gilkeidar Apr 24, 2024
4e45e50
Fixed debugger and removed vector size asserts from `SmartVector` imp…
gilkeidar Apr 24, 2024
df8653c
Applied CMake fixes to shared tests
gilkeidar Apr 24, 2024
dc18e9c
don't load cube shaders from relative path
atar13 Apr 24, 2024
7f2f776
merge w/ main & remove commented out code
Tyler-Lentz Apr 24, 2024
7eeb61e
change shader loading to take std::string
atar13 Apr 24, 2024
9e5ebef
pass line & minor refactor for shared object & SmartVector
Tyler-Lentz Apr 24, 2024
68494f9
Merge pull request #45 from ucsd-cse125-sp24/refactor/ServerGameState
Tyler-Lentz Apr 24, 2024
14375c4
Merged dev into client_refactoring
dmin12 Apr 25, 2024
62dea71
remove unused classes
jhparkt Apr 25, 2024
344d7cd
update w/ dev
Tyler-Lentz Apr 25, 2024
678f85b
Modified display callback to use std::optional for movement and clean…
dmin12 Apr 25, 2024
1b99e56
push initial item management ideas
jhparkt Apr 25, 2024
190ce66
fix lint
Tyler-Lentz Apr 25, 2024
362a9e6
fix server not building
Tyler-Lentz Apr 25, 2024
8ddeda6
Added Enemy and Player hpp/cpp files
EddieJ03 Apr 25, 2024
17d3422
Merge pull request #38 from ucsd-cse125-sp24/feat/handle-network-errors
Tyler-Lentz Apr 25, 2024
81945bf
Merge branch 'dev' of https://github.com/ucsd-cse125-sp24/group3 into…
EddieJ03 Apr 25, 2024
b0f831c
Removed main.cpp from game_client_lib in CMakeLists.txt
dmin12 Apr 25, 2024
c73a157
Merge pull request #53 from ucsd-cse125-sp24/client_refactoring
dmin12 Apr 25, 2024
84c981f
Merge branch 'dev' of https://github.com/ucsd-cse125-sp24/group3 into…
EddieJ03 Apr 25, 2024
57bf1fa
Merge branch 'dev' into feat/items
jhparkt Apr 25, 2024
e4a613c
Implemented interactive camera logic
dmin12 Apr 25, 2024
e866412
Merge remote-tracking branch 'origin/dev' into chore/improve-shader-l…
atar13 Apr 25, 2024
ad62fce
remove commented out INFO_LOG_LENGTH checks
atar13 Apr 25, 2024
7570f5b
imgui attempt 1
Tyler-Lentz Apr 25, 2024
5a9900a
satisfy cppcheck gods
atar13 Apr 25, 2024
5de3aee
updated creature, player, enemy .hpp/.cpp
EddieJ03 Apr 25, 2024
d4b7ceb
Merge pull request #55 from ucsd-cse125-sp24/chore/improve-shader-loa…
EddieJ03 Apr 25, 2024
94579bf
basic server and servergamestate integration
jhparkt Apr 25, 2024
b90a3a6
Cleaned some code and refactored camera movement
dmin12 Apr 25, 2024
85cd764
start custom gui
Tyler-Lentz Apr 25, 2024
fb455ed
start laying out widgets
Tyler-Lentz Apr 25, 2024
a9d1762
Added `EventList` instance to debugger method to build debugger (curr…
gilkeidar Apr 25, 2024
c964ba3
Merge pull request #58 from ucsd-cse125-sp24/feat/items
jhparkt Apr 26, 2024
49c1f47
more gui setup
Tyler-Lentz Apr 26, 2024
0230929
add untested font loading code
Tyler-Lentz Apr 26, 2024
c4a51a4
add zlib to nix shell
atar13 Apr 27, 2024
a9bc44c
add assimp and stb
atar13 Apr 28, 2024
470f26f
model loading
atar13 Apr 28, 2024
744c7aa
make target to automate model downloads
atar13 Apr 28, 2024
c05bc2f
attempt to implement keydown/up movement
jhparkt Apr 28, 2024
883e3b0
fix cube not moving bug
jhparkt Apr 28, 2024
87e5ddb
successfully running font loading code
Tyler-Lentz Apr 28, 2024
a4dc0be
theoretically this should be rendering fonts
Tyler-Lentz Apr 28, 2024
777fa9a
random location rendering for debuggin
Tyler-Lentz Apr 28, 2024
84e8506
seperated vertical and horizontal events / issues with double pressin…
jhparkt Apr 28, 2024
f025ef7
pulled in dev changes and updated creature, player, and enemy constru…
EddieJ03 Apr 28, 2024
86fcd5f
In ObjectManager createObjects: added a Player object creation and a …
EddieJ03 Apr 28, 2024
69942bc
fixed double key pressing issues (pressing both left/right or up/down)
jhparkt Apr 28, 2024
95b0fd7
Added initial SolidSurface implementation with a room example in serv…
gilkeidar Apr 29, 2024
b32bb92
wrote todo
jhparkt Apr 29, 2024
675bcef
docs and cleanup
atar13 Apr 29, 2024
c8b3efe
was able to get SDL in
EddieJ03 Apr 29, 2024
592aca9
Implemented 3d movement (jumping) / need to optimize jump event sending
jhparkt Apr 29, 2024
758ef8e
pass std::string to shader constructor
atar13 Apr 30, 2024
42c1888
rendering... something
Tyler-Lentz Apr 30, 2024
476cfbd
fix incorrect defaults for dyntext options
Tyler-Lentz Apr 30, 2024
3337619
Enabled polygon fill for text drawing, removed imgui from CMakeLists
dmin12 Apr 30, 2024
192c8e7
click handling logic
Tyler-Lentz Apr 30, 2024
9fb8ec2
add constant for speed
jhparkt Apr 30, 2024
95564c2
integrate w/ david's text fixing code
Tyler-Lentz Apr 30, 2024
9a93035
merge w/ camera branch
Tyler-Lentz Apr 30, 2024
aaa056c
Refactored all movements to use StartAction/StopAction Event. Added s…
jhparkt Apr 30, 2024
b046c5f
Refactored all movements to use StartAction/StopAction Event. Added s…
jhparkt Apr 30, 2024
c1e0a31
have some audio code in place, but currently running into a "Unsuppor…
EddieJ03 Apr 30, 2024
ddce9b7
first click handling attmept
Tyler-Lentz Apr 30, 2024
b3da435
Got a sound playing!
EddieJ03 Apr 30, 2024
0bc2cfd
fix click hitbox for gui
Tyler-Lentz Apr 30, 2024
e5f06dd
load sound file from relative path!
EddieJ03 Apr 30, 2024
efedc9c
remove sfml from root CMakeList
EddieJ03 Apr 30, 2024
bcd43b7
updated build & test .yml files (let's see if CI works now)
EddieJ03 Apr 30, 2024
98e5c64
added right ubuntu packeges to.yml files (hopefully)
EddieJ03 Apr 30, 2024
9137288
change flac to libflac-dev
EddieJ03 Apr 30, 2024
8485398
Merged feat/creature-player-enemy-tree into feat/camera
dmin12 Apr 30, 2024
bc98ab5
Created event for changing entity direction, connected camera to serv…
dmin12 Apr 30, 2024
21be6f5
update lint.yml with sfml
EddieJ03 Apr 30, 2024
48b6390
in progress: flexbox horrors
Tyler-Lentz Apr 30, 2024
f91aab5
have music playing in a loop in the background
EddieJ03 Apr 30, 2024
1aa3c49
fix constantly moving bug
jhparkt Apr 30, 2024
c334467
Downgraded back to Boost 1.82.0 to avoid odd error and replaced `std:…
gilkeidar Apr 30, 2024
9e6119f
fix lint errors
jhparkt Apr 30, 2024
2286c73
in progress
Tyler-Lentz Apr 30, 2024
7f9d9c1
fix compile issue
Tyler-Lentz Apr 30, 2024
591e33b
working flexbox!
Tyler-Lentz May 1, 2024
1328df8
add center alignment to flexbox
Tyler-Lentz May 1, 2024
fe7aa88
Resolved lint issues for client.cpp and camera.cpp
dmin12 May 1, 2024
cebcc2a
start image loading
Tyler-Lentz May 1, 2024
09250f8
Merge pull request #65 from ucsd-cse125-sp24/feat/environment
gilkeidar May 1, 2024
8ea2d34
Initial implementation of reading the maze layout from a file (files …
gilkeidar May 1, 2024
150eb6b
Merge branch 'dev' into feat/movement
jhparkt May 1, 2024
17042ec
Merged dev into feat/camera
dmin12 May 1, 2024
642e87b
Merge pull request #64 from ucsd-cse125-sp24/feat/camera
dmin12 May 1, 2024
d226c60
add ubuntu apt packages I needed to install to README
Tyler-Lentz May 1, 2024
c73f6d1
broken img loading
Tyler-Lentz May 1, 2024
718e861
fix center and add way to center in entire screen
Tyler-Lentz May 1, 2024
ef164ab
attempt to render lobby menu BUT NOTHING IS F---- WORKING RIGHT!!!
Tyler-Lentz May 1, 2024
fb1c093
Pulled in most recent dev commits
EddieJ03 May 1, 2024
f003797
Merge branch 'feat/audio' of https://github.com/ucsd-cse125-sp24/grou…
EddieJ03 May 1, 2024
91609c3
Merge branch 'dev' into feat/movement / Need to integrate properly
jhparkt May 1, 2024
3035dd0
merge dev into feat/movement
jhparkt May 1, 2024
22df0d6
fixed movement and hardcoded room, but need to implement movement int…
jhparkt May 1, 2024
bf72365
render lobby screen, but it seg faults with more than 1
Tyler-Lentz May 1, 2024
d5db5ee
Merge branch 'feat/movement' of github.com:ucsd-cse125-sp24/group3 in…
jhparkt May 1, 2024
087bd3d
render hardcoded room and integrate cam movement
jhparkt May 1, 2024
ef701b8
Removed a few debug printouts
gilkeidar May 1, 2024
3f86eae
working lobby screen with dummy data
Tyler-Lentz May 1, 2024
5c0a54e
add hover handling
Tyler-Lentz May 1, 2024
798896b
change borrow to template function
Tyler-Lentz May 1, 2024
d04c739
create CenterText macro widget for easier use
Tyler-Lentz May 1, 2024
f7948cc
add text input widget
Tyler-Lentz May 2, 2024
27c91f1
scuffed caret behavior for text input :alien:
Tyler-Lentz May 2, 2024
6fc94e9
allow holding backspace for deletions
Tyler-Lentz May 2, 2024
f97c2d8
remove lato because it doesn't fit fantasy theme
Tyler-Lentz May 2, 2024
606498a
fix minor bugs
jhparkt May 2, 2024
b36f1f8
add sfml deps to shel.nix
atar13 May 2, 2024
bfadf52
made assets folder and put sounds in
EddieJ03 May 2, 2024
bb75a30
update .gitignore so we have assets
EddieJ03 May 2, 2024
accfee0
Merge branch 'feat/audio' of https://github.com/ucsd-cse125-sp24/grou…
EddieJ03 May 2, 2024
0eb4db3
Merge pull request #63 from ucsd-cse125-sp24/feat/audio
Tyler-Lentz May 2, 2024
604ff24
Merge pull request #62 from ucsd-cse125-sp24/feat/movement
Tyler-Lentz May 2, 2024
de17489
Merged `dev` into feat/environment, swapped y and z coordinates, and …
gilkeidar May 2, 2024
2478d26
merge with dev
Tyler-Lentz May 2, 2024
6eb9371
fix lobby still broadcasting after server start
Tyler-Lentz May 2, 2024
cc0372d
in progress refactor
Tyler-Lentz May 2, 2024
7141e4a
refactor gui layout to be more in the gui class
Tyler-Lentz May 2, 2024
f815dfd
Fixed odd rendering bug (cube size is now 1x1x1 by default instead of…
gilkeidar May 2, 2024
6c40d5a
make lobby name serializable and sent to player
Tyler-Lentz May 2, 2024
3b3684a
small change to floor height position
gilkeidar May 2, 2024
e65a9f5
make lobby broadcast say accurate player info
Tyler-Lentz May 2, 2024
53ccd2d
minor refactor for lobby broadcast continued
Tyler-Lentz May 2, 2024
0c7adf7
add keyboard input for player name
Tyler-Lentz May 2, 2024
93bbd14
add message in lobby browser if no lobby found
Tyler-Lentz May 2, 2024
61b1574
start documentation
Tyler-Lentz May 2, 2024
9939ad3
continue documenting
Tyler-Lentz May 2, 2024
4ac4431
fix networking related buffer size error
Tyler-Lentz May 3, 2024
4cfc2ab
continue documentation
Tyler-Lentz May 3, 2024
b7e3b4d
move assets to assets folder, and continue documentation
Tyler-Lentz May 3, 2024
a02ccc3
refactor how shaders are passed around in the gui land
Tyler-Lentz May 3, 2024
227eb53
finish documentation and make unit tests compile
Tyler-Lentz May 3, 2024
32b84f2
attempt to fix windows compile
Tyler-Lentz May 3, 2024
d287fc6
load and render model materials
atar13 May 3, 2024
1698639
refactor sprite loading but it still doesn't work...
Tyler-Lentz May 3, 2024
0552cc9
fix frag and vert shaders being swapped, but still doesn't work
Tyler-Lentz May 3, 2024
a2faa76
messing around w/ stuff and it still doesn't work
Tyler-Lentz May 3, 2024
24d4f20
merge dev and can walk around textured warren bear
atar13 May 4, 2024
f263d92
move graphics models/materials/textures to assets/graphics
atar13 May 4, 2024
f8b35f2
update make pull_models to pull entire drive folder
atar13 May 4, 2024
46072c7
update collider classes
jhparkt May 4, 2024
01e14b8
implemented collision detection before moving
jhparkt May 5, 2024
070d07d
add renderable class
atar13 May 5, 2024
914415c
populated objectTypeToString
atar13 May 5, 2024
4bd91e2
clean up client draw function
atar13 May 5, 2024
29d6826
renamed solid color shaders to cube shader
atar13 May 5, 2024
07dfe93
lint
atar13 May 5, 2024
481bcf4
Modified existing texture code using LearnOpenGL tutorial
dmin12 May 6, 2024
1ad3754
Client main using LearnOpenGL texture code
dmin12 May 6, 2024
7fe6abd
Resolved texture rendering from cull_face
dmin12 May 6, 2024
f784d70
add TODO comments to remind myself what I need to do
Tyler-Lentz May 6, 2024
3685968
Moved maps directory and maze filename to `config.json` so that maze …
gilkeidar May 6, 2024
91b18df
Small fix for client shared object debug printouts
gilkeidar May 6, 2024
77c98f6
refactor font loading to only load one size and then scale, but text …
Tyler-Lentz May 6, 2024
8745871
messing around with stuff
Tyler-Lentz May 6, 2024
ff8d4ba
more fiddling around...
Tyler-Lentz May 6, 2024
8f80a52
JESUS CHRIST HOW WAS THIS CAUSING THE FLICKERING
Tyler-Lentz May 6, 2024
670b6e9
switch font render to not load in separate textures for different sizes
Tyler-Lentz May 6, 2024
8de1426
Merge pull request #66 from ucsd-cse125-sp24/feat/environment
gilkeidar May 6, 2024
58d0fe0
Initial `ObjectManager` refactoring: Added type-specific object gette…
gilkeidar May 6, 2024
c3db96e
Renamed `ItemInfo` and `Stats` structs to reflect their shared nature…
gilkeidar May 6, 2024
168aa89
Fixing lint errors
gilkeidar May 6, 2024
db1725c
Renamed `Physics` struct field `acceleration` to `velocityMultiplier`…
gilkeidar May 6, 2024
54d21ba
Removed problematic call to glUniform in StaticImg::render()
dmin12 May 7, 2024
389d6c3
quick fix for collision detecting with objects without a collider. Wo…
jhparkt May 7, 2024
442f36e
merge dev
jhparkt May 7, 2024
5c1891b
Divide collision into x/z axis for wall sliding
jhparkt May 7, 2024
bc4734c
fixed movements when looking up/down + added checker for boundary
jhparkt May 7, 2024
70a9903
add player to camera pos
atar13 May 7, 2024
ca99983
windows fixes
atar13 May 7, 2024
1d6d90c
working variable screen size with config
Tyler-Lentz May 7, 2024
b502ae9
refactor gui shader loading
Tyler-Lentz May 7, 2024
5cc7345
see other players and don't render yourself
atar13 May 7, 2024
5c48cbd
remove old code
Tyler-Lentz May 7, 2024
69bcdd7
add colliders to maze loader / spawn within maze (hardcoded pos)
jhparkt May 7, 2024
0499734
add maze
jhparkt May 7, 2024
8ef42f9
rendering other players works?!
atar13 May 7, 2024
bdce782
Merge pull request #80 from ucsd-cse125-sp24/refactor/objects
Tyler-Lentz May 7, 2024
90a9bb9
merge w/ dev
Tyler-Lentz May 7, 2024
e4d44b8
Merge remote-tracking branch 'origin/dev' into feat/obj-loading
atar13 May 7, 2024
2b092c7
merge with anthony's model code w/o solving all conflicts
Tyler-Lentz May 7, 2024
d0dc02d
Changed grid cell size and player speed + jump speed
gilkeidar May 7, 2024
ed0d322
Merge branch 'dev' into feat/collision
jhparkt May 7, 2024
894aeee
Initial player spawning logic from maze spawn points list
gilkeidar May 7, 2024
275da44
Merge branch 'feat/collision' of https://github.com/ucsd-cse125-sp24/…
gilkeidar May 7, 2024
3b6dec1
Updated object creation code to use SpecificID + sending correct Play…
gilkeidar May 7, 2024
46df6c5
Small update - added # of spawn points printout
gilkeidar May 7, 2024
5e6ef07
resolve merge
Tyler-Lentz May 7, 2024
a16c2ee
fix serialize test f'ing up
Tyler-Lentz May 7, 2024
f4bbadd
attempt to fix actions & compiling
Tyler-Lentz May 7, 2024
4ad15bd
add loading screen
Tyler-Lentz May 7, 2024
136b00c
Merge pull request #81 from ucsd-cse125-sp24/feat/collision
Tyler-Lentz May 7, 2024
6b70a20
exit button calls glfwShouldClose instead of glfwDestroyWindow
atar13 May 7, 2024
ce716a7
fix cube min/max
Tyler-Lentz May 7, 2024
58dfed8
merge w/ dev
Tyler-Lentz May 7, 2024
1b9f9c1
fix lint
Tyler-Lentz May 7, 2024
4cb9cbd
make player eye level a constant
Tyler-Lentz May 7, 2024
439ab1c
add warren bear spawning
Tyler-Lentz May 7, 2024
ff7caca
add spawnpoint to default maze so hopefully it works in shared test a…
Tyler-Lentz May 8, 2024
8e29da6
fix troll speedrun sound for meme
Tyler-Lentz May 8, 2024
7262d3b
Merge pull request #56 from ucsd-cse125-sp24/feat/ui2
Tyler-Lentz May 8, 2024
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
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

on:
push:
branches:
- dev
pull_request:

jobs:
client-windows:
name: Client on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake -G "Ninja" -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl ..
- name: Build
run: cd build && ninja client
client-linux:
name: Client on Linux (Ubuntu)
runs-on: ubuntu-latest
steps:
- name: Install OpenGL
run: sudo apt-get update && sudo apt-get install --fix-missing cmake pkg-config mesa-utils libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev libao-dev libmpg123-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev xvfb
- name: Install SFML
run: sudo apt-get update && sudo apt-get install libudev-dev libopenal-dev libvorbis-dev libflac-dev libfreetype-dev
- uses: actions/checkout@v4
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake ..
- name: Build
run: cd build && make client
server-windows:
name: Server on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake -G "Ninja" -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl ..
- name: Build
run: cd build && ninja server
server-linux:
name: Server on Linux (Ubuntu)
runs-on: ubuntu-latest
steps:
- name: Install OpenGL
run: sudo apt-get update && sudo apt-get install --fix-missing cmake pkg-config mesa-utils libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev libao-dev libmpg123-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev xvfb
- name: Install SFML
run: sudo apt-get update && sudo apt-get install libudev-dev libopenal-dev libvorbis-dev libflac-dev libfreetype-dev
- uses: actions/checkout@v4
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake ..
- name: Build
run: cd build && make server
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docs

on:
push:
branches:
- dev

jobs:
build-and-deploy-docs:
name: Build and Deploy Documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build docs with Doxygen
uses: mattnotmitt/doxygen-action@v1.9.5
- name: Deploy to server
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SITE_HOST }}
username: ${{ secrets.SITE_USER }}
key: ${{ secrets.SITE_KEY }}
port: ${{ secrets.SITE_PORT }}
source: docs/*
target: /var/www/html/class/cse125/www/cse125/2024/cse125g3/site/docs/
rm: true
strip_components: 1
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint

on:
push:
branches:
- dev
pull_request:

jobs:
cppcheck:
name: cppcheck
runs-on: ubuntu-latest
steps:
- name: Install CppCheck
run: sudo apt-get update && sudo apt-get install cppcheck
- name: CppCheck version
run: cppcheck --version
- name: Install OpenGL
run: sudo apt-get update && sudo apt-get install --fix-missing cmake pkg-config mesa-utils libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev libao-dev libmpg123-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev xvfb
- name: Install SFML
run: sudo apt-get update && sudo apt-get install libudev-dev libopenal-dev libvorbis-dev libflac-dev libfreetype-dev
- uses: actions/checkout@v4
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake ..
- name: Lint
run: cd build && make lint
90 changes: 90 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Test

on:
push:
branches:
- dev
pull_request:

jobs:
client-windows:
name: Client on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake -G "Ninja" -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl ..
- name: Test
run: cd build && ninja run_client_tests
client-linux:
name: Client on Linux (Ubuntu)
runs-on: ubuntu-latest
steps:
- name: Install OpenGL
run: sudo apt-get update && sudo apt-get install --fix-missing cmake pkg-config mesa-utils libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev libao-dev libmpg123-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev xvfb
- name: Install SFML
run: sudo apt-get update && sudo apt-get install libudev-dev libopenal-dev libvorbis-dev libflac-dev libfreetype-dev
- uses: actions/checkout@v4
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake ..
- name: Test
run: cd build && make run_client_tests
server-windows:
name: Server on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake -G "Ninja" -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl ..
- name: Test
run: cd build && ninja run_server_tests
server-linux:
name: Server on Linux (Ubuntu)
runs-on: ubuntu-latest
steps:
- name: Install OpenGL
run: sudo apt-get update && sudo apt-get install --fix-missing cmake pkg-config mesa-utils libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev libao-dev libmpg123-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev xvfb
- name: Install SFML
run: sudo apt-get update && sudo apt-get install libudev-dev libopenal-dev libvorbis-dev libflac-dev libfreetype-dev
- uses: actions/checkout@v4
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake ..
- name: Test
run: cd build && make run_server_tests
shared-windows:
name: Shared on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake -G "Ninja" -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl ..
- name: Test
run: cd build && ninja run_server_tests
shared-linux:
name: Shared on Linux (Ubuntu)
runs-on: ubuntu-latest
steps:
- name: Install OpenGL
run: sudo apt-get update && sudo apt-get install --fix-missing cmake pkg-config mesa-utils libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev libao-dev libmpg123-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev xvfb
- name: Install SFML
run: sudo apt-get update && sudo apt-get install libudev-dev libopenal-dev libvorbis-dev libflac-dev libfreetype-dev
- uses: actions/checkout@v4
- name: Create build dir
run: mkdir -p build
- name: Run CMake
run: cd build && cmake ..
- name: Test
run: cd build && make run_shared_tests
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
build/
assets/*
.vscode/
.vs/
.vs/
.cache/

docs/*
!docs/.gitkeep
53 changes: 52 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build/bin)

# Generate a "compile_commands.json" file for VScode to use
set(CMAKE_EXPORT_COMPILE_COMMANDS True)

# Tell CMake to ignore warnings from stuff in our dependencies. Surely GLM
# knows what it is doing... https://7tv.app/emotes/61e8fae862858c6406126ced
IF (NOT WIN32)
set_property(
DIRECTORY build
PROPERTY COMPILE_OPTIONS "-w"
)
ENDIF()

# Add google test to CMake
add_subdirectory(dependencies/google-test)

# If we need any compiler / linker flags, add them here
SET(GCC_COMPILE_FLAGS "")
SET(GCC_LINK_FLAGS "")
Expand All @@ -26,6 +41,42 @@ project(game VERSION 1.0)
# Custom Variables
SET(INCLUDE_DIRECTORY ${PROJECT_SOURCE_DIR}/include)

# Dependencies

# For some reason I had to add this in two places to make it work on certain lab computers???

add_subdirectory(dependencies/boost) # include boost libraries that we use
add_subdirectory(dependencies/json) # include boost libraries that we use
add_subdirectory(dependencies/glm) # include glm library

add_subdirectory(src/shared) # define game_shared_lib
add_subdirectory(src/client) # create client executable
add_subdirectory(src/server) # create server executable
add_subdirectory(src/server) # create server executable
add_subdirectory(src/debugger) # create debugger executable

find_program(CPPCHECK "cppcheck")
add_custom_target(lint
COMMAND ${CPPCHECK}
# checks to enable
--enable=warning,style,performance,portability
# allow us to suppress individual lines with // cppcheck-suppress <check-name>
--inline-suppr
# return error exit code 1 on failures
--error-exitcode=1
# ignore certain warnings that are annoying
--suppress=unusedVariable
# tell it about our include directory
-I ${CMAKE_SOURCE_DIR}/include
# only check include and src
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/src
# ignore test directories
-i${CMAKE_SOURCE_DIR}/src/client/tests
-i${CMAKE_SOURCE_DIR}/src/server/tests
-i${CMAKE_SOURCE_DIR}/src/shared/tests
)

add_custom_target(pull_models
COMMAND
gdown 1N7a5cDgMcXbPO0RtgznnEo-1XUfdMScM -O ${CMAKE_SOURCE_DIR}/assets/graphics --folder
)
Loading