Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bd55b18
added enemy hurt sound
Bullet-Not-Proof Apr 9, 2024
b74532c
Compiled Games
invalid-email-address Apr 9, 2024
4b4bd7a
ADDED: the ability for the player to cast a crude
Bullet-Not-Proof Apr 17, 2024
18a01e1
Merge branch 'main' of https://github.com/Bullet-Not-Proof/arcade-games
Bullet-Not-Proof Apr 17, 2024
8bd49b3
CastielM fixed level 3 not appearing and added constant for total num…
CastielM Apr 17, 2024
cfa4f7e
CastielM added text for controls to HUD
CastielM Apr 17, 2024
5d25791
CastielM added ability to reset current level in case of soft lock (I…
CastielM Apr 17, 2024
0ee17d5
CastielM fixed bug where you couldn't exit game while on the start sc…
CastielM Apr 17, 2024
e7522c1
CastielM changed controls to use WASD which should be consistent with…
CastielM Apr 17, 2024
3dd55dc
CastielM changed start key to be enter instead of space key, which sh…
CastielM Apr 17, 2024
4a90850
CastielM adjusted cost so that password will automatically submit whe…
CastielM Apr 19, 2024
e133c8c
CastielM added password error message. Was keen to add a sound too bu…
CastielM Apr 19, 2024
76b5bc8
adjusted code so screen just sends a check to password.h which is wha…
CastielM Apr 19, 2024
98b3cf9
CastielM fixed so error message displays for more than a split second…
CastielM Apr 19, 2024
931ab6f
CastielM made some adjustments to the way user input calculates where…
CastielM Apr 19, 2024
b66fdd0
CastielM fixed the issue with exit button not working.
CastielM Apr 19, 2024
e8f3bcb
CastielM have changed passwords. EZPZ is now EZPZY, BOSS is now BOSSY…
CastielM Apr 19, 2024
ad3b776
CastielM removed code using C++23 so default compile works
CastielM Apr 20, 2024
ede09c6
Create script to automatically download games from arcade repo
Wills2022 Apr 29, 2024
02856fb
Merge branch 'thoth-tech:main' into main
CastielM May 1, 2024
baa4307
Compiled Games
invalid-email-address May 1, 2024
2fd60e4
CastielM added .vscode to gitignore
CastielM May 1, 2024
e179183
CastielM renamed test report to remove spaces and and moved into a do…
CastielM May 1, 2024
08d7896
Move downlader script to scripts file
Wills2022 May 13, 2024
5f36245
Delete old downloader script file (moved to /scripts
Wills2022 May 13, 2024
0684540
Merge pull request #190 from Wills2022/patch-2
omckeon May 13, 2024
afa84f5
Merge branch 'thoth-tech:main' into main
CastielM May 14, 2024
21635cd
removed .vscode files, did not mean to add them
CastielM May 15, 2024
4ef336a
Merge branch 'main' of https://github.com/CastielM/capstone-games
CastielM May 15, 2024
7caacef
Merge pull request #187 from CastielM/main
AmberPotion May 15, 2024
b772a14
Update config.txt in PingPong
omckeon May 16, 2024
43b4219
Fix config.txt for validate-games workflow issue
omckeon May 16, 2024
4c6856f
Move SingleCombat out of games folder due to still being in progress
omckeon May 16, 2024
0a19808
Compiled Games
invalid-email-address May 16, 2024
e45e03c
Fix image path in SkySurge config file
omckeon May 16, 2024
5405b02
Fix SkySurge config comments/formatting
omckeon May 16, 2024
55c038f
Fix SkySurge image dimensions
omckeon May 16, 2024
ac8d3a1
Fix VentureAdventure config image path
omckeon May 16, 2024
0043d21
Add car-race config image and update config.txt file info
omckeon May 16, 2024
d495f4d
Merge pull request #206 from omckeon/main
omckeon May 16, 2024
6fcc263
Removed Compiled games
Bullet-Not-Proof May 20, 2024
1f1941d
Merge branch 'main' of https://github.com/Bullet-Not-Proof/arcade-gam…
omckeon May 20, 2024
7dda304
Merge branch 'Bullet-Not-Proof-main'
omckeon May 20, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
**/[Bb]in/
**/[Oo]bj/
# .vscode/
.DS_Store
Binary file modified compiled-games/BelowTheSurface/BelowTheSurface-assets.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified compiled-games/BelowTheSurface/BelowTheSurface-win-x86.tar.gz
Binary file not shown.
Binary file added compiled-games/Pingpong/Pingpong-assets.tar.gz
Binary file not shown.
Binary file added compiled-games/Pingpong/Pingpong-linux-arm.tar.gz
Binary file not shown.
Binary file added compiled-games/Pingpong/Pingpong-linux-x86.tar.gz
Binary file not shown.
Binary file added compiled-games/Pingpong/Pingpong-win-x86.tar.gz
Binary file not shown.
Binary file modified compiled-games/VentureAdventure/VentureAdventure-assets.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions games/BelowTheSurface/Resources/bundles/playerbundle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SOUND, Hurt, Hurt.wav
SOUND, Water, Water.wav
SOUND, Pickup, Pickup.wav
SOUND, EnemyDead, EnemyDead.wav
SOUND, EnemyHurt, EnemyHurt.flac
SOUND, Toxic, Toxic.mp3
SOUND, PickHeart, PickHeart.wav
SOUND, Jumpfall, Jumpfall.wav
Expand Down
Binary file not shown.
14 changes: 12 additions & 2 deletions games/BelowTheSurface/block.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "splashkit.h"
#include "types.h"
//#include "types.h" will not compile with this line included not sure if safe to delete

#pragma once

Expand Down Expand Up @@ -312,14 +312,24 @@ class Ladder : public Block

class PipeBlock : public Block
{
protected:
color shade;
public:
PipeBlock(bitmap cell_sheet, point_2d position, int cell) : Block(cell_sheet, position)
{
this->cell = cell;
this->opts.draw_cell = this->cell;
this->shade.r = 0;
this->shade.g = 0;
this->shade.b = 0;
this->shade.a = 0.5;
}

string test_collision(rectangle one) override { return "None"; };
string test_collision(rectangle one) override
{
fill_rectangle(shade, intersection(one, hitbox));
return "None";
}
};

class DecorativeBlock : public Block
Expand Down
86 changes: 57 additions & 29 deletions games/BelowTheSurface/collision.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ bool test_rectangle_collision(rectangle one, rectangle two)
return false;
};

void check_decoration_shadows(vector<vector<shared_ptr<Block>>> decorations, vector<shared_ptr<Player>> level_players)
{
for (int k = 0; k < level_players.size(); k++)
{
string collision = "None";
for (int j = 0; j < decorations.size(); j++)
{
for (int i = 0; i < decorations[j].size(); i++)
{
collision = decorations[j][i]->test_collision(level_players[k]->get_player_hitbox());
}
}
}
}

void check_solid_block_collisions(vector<vector<shared_ptr<Block>>> solid_blocks, vector<shared_ptr<Player>> level_players)
{
for (int k = 0; k < level_players.size(); k++)
Expand Down Expand Up @@ -63,7 +78,7 @@ void check_solid_block_collisions(vector<vector<shared_ptr<Block>>> solid_blocks
}
else if (collision == "Bottom")
{
if (level_players[k]->is_on_floor() &&!(level_players[k]->is_on_ladder()))
if (level_players[k]->is_on_floor() && !(level_players[k]->is_on_ladder()))
break;

if (!sound_effect_playing("HeadHit"))
Expand Down Expand Up @@ -94,7 +109,7 @@ void check_solid_block_collisions(vector<vector<shared_ptr<Block>>> solid_blocks
sprite_start_animation(level_players[k]->get_player_sprite(), "ClimbIdle");
break;
}

level_players[k]->set_player_dx(0);
level_players[k]->set_on_floor(false);
sprite_set_x(level_players[k]->get_player_sprite(), sprite_x(level_players[k]->get_player_sprite()) - 3);
Expand All @@ -121,10 +136,11 @@ void check_solid_block_collisions(vector<vector<shared_ptr<Block>>> solid_blocks
break;
}

if (collision == "None" && level_players[k]->is_on_ladder()==false){
if (collision == "None" && level_players[k]->is_on_ladder() == false)
{
level_players[k]->set_on_floor(false);
}

// if (collision == "None")
// level_players[k]->set_on_floor(false);
}
Expand Down Expand Up @@ -153,7 +169,7 @@ void check_ladder_collisions(vector<vector<shared_ptr<Ladder>>> ladders, unorder
for (int k = 0; k < level_players.size(); k++)
{
string collision = "None";
bool y_condi = false,x_condi;
bool y_condi = false, x_condi;
for (int j = 0; j < ladders.size(); j++)
{
for (int i = 0; i < ladders[j].size(); i++)
Expand All @@ -162,35 +178,45 @@ void check_ladder_collisions(vector<vector<shared_ptr<Ladder>>> ladders, unorder
top_side = ladders[j][i]->get_top();

x_condi = (sprite_x(level_players[k]->get_player_sprite()) > left_side - 32 && sprite_x(level_players[k]->get_player_sprite()) < left_side + 32);
for(int m = 0; m < lad_pos_top[left_side].size(); m++){
if(sprite_y(level_players[k]->get_player_sprite()) <= (lad_pos_top[left_side][m] + 2) && sprite_y(level_players[k]->get_player_sprite()) >= (lad_pos_top[left_side][m] - 1)){
for (int m = 0; m < lad_pos_top[left_side].size(); m++)
{
if (sprite_y(level_players[k]->get_player_sprite()) <= (lad_pos_top[left_side][m] + 2) && sprite_y(level_players[k]->get_player_sprite()) >= (lad_pos_top[left_side][m] - 1))
{
y_condi = true;
break;
}else{
}
else
{
continue;
}
}

collision = ladders[j][i]->test_collision(level_players[k]->get_player_hitbox());

// If player touch the top of the ladder in the exact x position
if(collision == "Top" && (x_condi && y_condi)){
if(key_typed(level_players[k]->input.attack_key))
if (collision == "Top" && (x_condi && y_condi))
{
if (key_typed(level_players[k]->input.attack_key))
level_players[k]->set_player_won(true);

if(key_down(level_players[k]->input.crouch_key)){ //Drop the player down when crouch key is pressed
if (key_down(level_players[k]->input.crouch_key))
{ // Drop the player down when crouch key is pressed
level_players[k]->set_on_floor(false);
}else{
}
else
{
level_players[k]->set_on_floor(true);
level_players[k]->set_on_ladder(true);

//this prevent the player stepping on random ladder block that's not the top of the ladder
if(level_players[k]->get_state_type() != "JumpFall" || level_players[k]->get_state_type() != "JumpRise"){
// this prevent the player stepping on random ladder block that's not the top of the ladder
if (level_players[k]->get_state_type() != "JumpFall" || level_players[k]->get_state_type() != "JumpRise")
{
sprite_set_y(level_players[k]->get_player_sprite(), top_side - 1);
}
}
break;
}else if (!(collision == "None" || collision == "Top") && (key_typed(level_players[k]->input.jump_key) || key_typed(level_players[k]->input.crouch_key)))
}
else if (!(collision == "None" || collision == "Top") && (key_typed(level_players[k]->input.jump_key) || key_typed(level_players[k]->input.crouch_key)))
{
level_players[k]->set_on_ladder(true);
sprite_set_y(level_players[k]->get_player_sprite(), sprite_y(level_players[k]->get_player_sprite()) - 10);
Expand Down Expand Up @@ -236,18 +262,18 @@ void check_enemy_solid_block_collisions(vector<vector<shared_ptr<Block>>> solid_

if (collision == "Top")
{
if(level_enemies[k]->get_ai()->get_is_flying())
if (level_enemies[k]->get_ai()->get_is_flying())
{
level_enemies[k]->get_ai()->set_flying_up(true);
}

level_enemies[k]->get_ai()->set_on_floor(true);
level_enemies[k]->get_ai()->set_y_value(solid_blocks[j][i]->get_top());
break;
}
else if (collision == "Bottom")
{
if(level_enemies[k]->get_ai()->get_is_flying())
if (level_enemies[k]->get_ai()->get_is_flying())
{
level_enemies[k]->get_ai()->set_flying_up(false);
}
Expand Down Expand Up @@ -327,7 +353,7 @@ void check_enemy_player_collisions(vector<shared_ptr<Enemy>> level_enemies, vect
string collision = "None";
for (int j = 0; j < level_players.size(); j++)
{
if(level_players[j]->get_state_type() == "Dying" || level_players[j]->get_state_type() == "Spawn")
if (level_players[j]->get_state_type() == "Dying" || level_players[j]->get_state_type() == "Spawn")
continue;

collision = level_enemies[i]->test_collision(level_players[j]->get_player_hitbox());
Expand Down Expand Up @@ -368,9 +394,11 @@ void check_enemy_player_collisions(vector<shared_ptr<Enemy>> level_enemies, vect
play_sound_effect("EnemyDead");
level_enemies[i]->set_dead(true);
}
else
else
{
if(level_enemies[i]->get_vulnerable())
if (!sound_effect_playing("EnemyHurt"))
play_sound_effect("EnemyHurt");
if (level_enemies[i]->get_vulnerable())
level_enemies[i]->take_damage(1); // By 1 hp.
}
level_players[j]->change_state(new JumpRiseState, "JumpRise");
Expand Down Expand Up @@ -434,8 +462,8 @@ void check_toxic_block_collisions(vector<vector<shared_ptr<ToxicBlock>>> toxic,
{
if (!rect_on_screen(toxic[j][i]->get_block_hitbox()))
continue;
if(level_players[k]->get_state_type() == "Dying" || level_players[k]->get_state_type() == "Spawn")

if (level_players[k]->get_state_type() == "Dying" || level_players[k]->get_state_type() == "Spawn")
continue;

collision = toxic[j][i]->test_collision(level_players[k]->get_player_hitbox());
Expand Down Expand Up @@ -485,7 +513,7 @@ void check_holdable_pipe_block_collisions(vector<vector<shared_ptr<HoldablePipeB
continue;

if (collision != "None")
{
{
// Pink and purple can interact with these pipes
if (pipes[j][i]->get_cell() < 6)
{
Expand Down Expand Up @@ -546,7 +574,7 @@ void check_turnable_pipe_block_collisions(vector<vector<shared_ptr<TurnablePipeB
{
if (!sound_effect_playing("TurnPipe"))
play_sound_effect("TurnPipe");
//write_line("Turned");
// write_line("Turned");
pipes[j][i]->set_turnable(false);
break;
}
Expand All @@ -558,7 +586,7 @@ void check_turnable_pipe_block_collisions(vector<vector<shared_ptr<TurnablePipeB
{
if (!sound_effect_playing("TurnPipe"))
play_sound_effect("TurnPipe");
//write_line("Turned");
// write_line("Turned");
pipes[j][i]->set_turnable(false);
break;
}
Expand All @@ -567,8 +595,8 @@ void check_turnable_pipe_block_collisions(vector<vector<shared_ptr<TurnablePipeB
else
{
if (!sound_effect_playing("TurnPipe"))
play_sound_effect("TurnPipe");
//write_line("Turned");
play_sound_effect("TurnPipe");
// write_line("Turned");
pipes[j][i]->set_turnable(false);
break;
}
Expand Down Expand Up @@ -625,7 +653,7 @@ void check_multi_turnable_pipe_block_collisions(vector<vector<shared_ptr<MultiTu
else
{
if (!sound_effect_playing("TurnPipe"))
play_sound_effect("TurnPipe");
play_sound_effect("TurnPipe");
if (pipes[j][i]->get_turnable())
pipes[j][i]->set_turnable(false);
else
Expand Down
5 changes: 3 additions & 2 deletions games/BelowTheSurface/level.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ class Level
check_water_empty_multi_turn_block_collisions(empty_multi_turn_pipes, water);
check_turn_multi_empty_pipes(multi_turn_pipes, empty_multi_turn_pipes);
check_collectable_collisions(level_collectables, level_players);
check_decoration_shadows(decoration, level_players);
}

string get_level_name()
Expand Down Expand Up @@ -604,7 +605,7 @@ class Easy : public Level
this->level_name = "Easy...enough";
shared_ptr<Background> backg(new GreyBackground);
this->background = backg;
this->password = "EZPZ";
this->password = "EZPZY";
this->pre_level_side_text.push_back("Climb to the top...");
this->pre_level_side_text.push_back("Watch out for snakes!");
this->pre_level_image = bitmap_named("level3");
Expand Down Expand Up @@ -643,7 +644,7 @@ class BossLevel : public Level
this->level_name = "Boss Fight";
shared_ptr<Background> backg(new GreyBackground);
this->background = backg;
this->password = "BOSS";
this->password = "BOSSY";
this->pre_level_side_text.push_back("Water Rat is angry!");
this->pre_level_side_text.push_back("...watch out!");
this->pre_level_image = bitmap_named("level9");
Expand Down
Loading