small fix
@@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.11 (m320-lu02-a02-bottle-IM23a-spirgif)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<Languages>
|
||||||
|
<language minSize="47" name="Python" />
|
||||||
|
<language minSize="67" name="JavaScript" />
|
||||||
|
</Languages>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PyCallingNonCallableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredPackages">
|
||||||
|
<value>
|
||||||
|
<list size="1">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="pytest" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredErrors">
|
||||||
|
<list>
|
||||||
|
<option value="E501" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PyStatementEffectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredIdentifiers">
|
||||||
|
<list>
|
||||||
|
<option value="tuple.append" />
|
||||||
|
<option value="str.get_width" />
|
||||||
|
<option value="rental.return_date" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Black">
|
||||||
|
<option name="sdkName" value="Python 3.11 (m320-lu02-a02-bottle-IM23a-spirgif)" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (m320-lu02-a02-bottle-IM23a-spirgif)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/PortfolioWebsite.iml" filepath="$PROJECT_DIR$/.idea/PortfolioWebsite.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 425 B |
|
After Width: | Height: | Size: 507 B |
|
After Width: | Height: | Size: 763 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 650 B |
|
After Width: | Height: | Size: 754 B |
|
After Width: | Height: | Size: 571 B |
|
After Width: | Height: | Size: 956 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 488 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 580 KiB |
|
After Width: | Height: | Size: 410 KiB |
|
Before Width: | Height: | Size: 956 KiB After Width: | Height: | Size: 956 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -42,7 +42,7 @@
|
|||||||
<h3 class="project-name">TRLStats</h3>
|
<h3 class="project-name">TRLStats</h3>
|
||||||
<p class="project-description">An online javascript & python application that helps calculate damage stats for the
|
<p class="project-description">An online javascript & python application that helps calculate damage stats for the
|
||||||
Game 'The Red Lake'!</p>
|
Game 'The Red Lake'!</p>
|
||||||
<img src="Project_TrlStats.png" alt="TRLStats">
|
<img src="img/Project_TrlStats.png" alt="TRLStats">
|
||||||
<p class="long-description" data-project-name="TRLStats">TRLStats was my first project ever made, a damage
|
<p class="long-description" data-project-name="TRLStats">TRLStats was my first project ever made, a damage
|
||||||
calculator for the Roblox Game 'The Red Lake'. The Project is based on a python file, using the python library
|
calculator for the Roblox Game 'The Red Lake'. The Project is based on a python file, using the python library
|
||||||
"Flask" to grab the data from JSON files, and then Javascript to display it.</p>
|
"Flask" to grab the data from JSON files, and then Javascript to display it.</p>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const detailsScrollStep = 30;
|
|||||||
let detailsMaxScroll = 0;
|
let detailsMaxScroll = 0;
|
||||||
let gameState = "outside";
|
let gameState = "outside";
|
||||||
const interiorBackground = new Image();
|
const interiorBackground = new Image();
|
||||||
interiorBackground.src = "house-interior.png";
|
interiorBackground.src = "img/house-interior.png";
|
||||||
let lastInputTime = performance.now();
|
let lastInputTime = performance.now();
|
||||||
let isPaused = false;
|
let isPaused = false;
|
||||||
const MAP_WIDTH = 3000;
|
const MAP_WIDTH = 3000;
|
||||||
@@ -26,7 +26,7 @@ const dialogOption1 = document.getElementById("dialog-option-1");
|
|||||||
const dialogOption2 = document.getElementById("dialog-option-2");
|
const dialogOption2 = document.getElementById("dialog-option-2");
|
||||||
const dialogOption3 = document.getElementById("dialog-option-3");
|
const dialogOption3 = document.getElementById("dialog-option-3");
|
||||||
const menuBackground = new Image();
|
const menuBackground = new Image();
|
||||||
menuBackground.src = "menu-background-projects-1.png";
|
menuBackground.src = "img/menu-background-projects-1.png";
|
||||||
let menuVisible = false;
|
let menuVisible = false;
|
||||||
const message = {
|
const message = {
|
||||||
x: 0,
|
x: 0,
|
||||||
@@ -137,7 +137,7 @@ let camera = {
|
|||||||
|
|
||||||
//Trees
|
//Trees
|
||||||
const treeImage = new Image();
|
const treeImage = new Image();
|
||||||
treeImage.src = "image-tree-1.png";
|
treeImage.src = "./img/image-tree-1.png";
|
||||||
const treeCount = 10;
|
const treeCount = 10;
|
||||||
const treeWidth = 200;
|
const treeWidth = 200;
|
||||||
const treeHeight = 300;
|
const treeHeight = 300;
|
||||||
@@ -289,15 +289,11 @@ function drawCharacterBig() {
|
|||||||
function handlePhysics(deltaTime) {
|
function handlePhysics(deltaTime) {
|
||||||
character.dy += gravity * (deltaTime / frameDuration);
|
character.dy += gravity * (deltaTime / frameDuration);
|
||||||
character.y += character.dy * (deltaTime / frameDuration);
|
character.y += character.dy * (deltaTime / frameDuration);
|
||||||
|
|
||||||
// Handle floor collision
|
|
||||||
if (character.y + character.height > floorHeight) {
|
if (character.y + character.height > floorHeight) {
|
||||||
character.y = floorHeight - character.height;
|
character.y = floorHeight - character.height;
|
||||||
character.dy = 0;
|
character.dy = 0;
|
||||||
isJumping = false;
|
isJumping = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update horizontal movement based on keyState
|
|
||||||
if (keyState.ArrowRight) character.dx = character.speed * (deltaTime / frameDuration);
|
if (keyState.ArrowRight) character.dx = character.speed * (deltaTime / frameDuration);
|
||||||
if (keyState.ArrowLeft) character.dx = -character.speed * (deltaTime / frameDuration);
|
if (keyState.ArrowLeft) character.dx = -character.speed * (deltaTime / frameDuration);
|
||||||
if (keyState.d) character.dx = character.speed * (deltaTime / frameDuration);
|
if (keyState.d) character.dx = character.speed * (deltaTime / frameDuration);
|
||||||
@@ -311,10 +307,7 @@ function moveCharacter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateCamera() {
|
function updateCamera() {
|
||||||
// Center the camera on the character if you like:
|
|
||||||
camera.x = character.x - camera.width / 2;
|
camera.x = character.x - camera.width / 2;
|
||||||
|
|
||||||
// Clamp the camera so it doesn't go outside the world:
|
|
||||||
if (camera.x < 0) camera.x = 0;
|
if (camera.x < 0) camera.x = 0;
|
||||||
if (camera.x + camera.width > MAP_WIDTH) {
|
if (camera.x + camera.width > MAP_WIDTH) {
|
||||||
camera.x = MAP_WIDTH - camera.width;
|
camera.x = MAP_WIDTH - camera.width;
|
||||||
@@ -331,7 +324,6 @@ function handleInteractions() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//draw trees
|
|
||||||
function drawSections() {
|
function drawSections() {
|
||||||
trees.forEach((tree) => {
|
trees.forEach((tree) => {
|
||||||
ctx.drawImage(
|
ctx.drawImage(
|
||||||
@@ -621,18 +613,18 @@ const house = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const NPCImage = new Image();
|
const NPCImage = new Image();
|
||||||
NPCImage.src = 'me.png';
|
NPCImage.src = 'img/me.png';
|
||||||
NPC.texture = NPCImage
|
NPC.texture = NPCImage
|
||||||
const houseImage = new Image();
|
const houseImage = new Image();
|
||||||
houseImage.src = 'House.png';
|
houseImage.src = 'img/House.png';
|
||||||
house.texture = houseImage;
|
house.texture = houseImage;
|
||||||
const inactiveImage = new Image();
|
const inactiveImage = new Image();
|
||||||
inactiveImage.src = 'info-box-1-inactive.png';
|
inactiveImage.src = 'img/info-box-1-inactive.png';
|
||||||
const activeImage = new Image();
|
const activeImage = new Image();
|
||||||
activeImage.src = 'info-box-1-active.png';
|
activeImage.src = 'img/info-box-1-active.png';
|
||||||
questionBlock.texture = inactiveImage;
|
questionBlock.texture = inactiveImage;
|
||||||
const questBoardImage = new Image();
|
const questBoardImage = new Image();
|
||||||
questBoardImage.src = 'quest-board-1.png'
|
questBoardImage.src = 'img/quest-board-1.png'
|
||||||
questBoard.texture = questBoardImage
|
questBoard.texture = questBoardImage
|
||||||
let particles = [];
|
let particles = [];
|
||||||
|
|
||||||
|
|||||||