Home Hello
This blog contains my journey into Coding.
Development Environment
Coding starts with tools, explore these tools and procedures with a click.
Game Progress
Here is my progress through game coding, click to see these online
College Articulation
Here is my preparation for college topics, click to review my blogs
#What I want to do
1.I’m trying to add background music it called ‘bloodborne Ludwig the holy blade’, and add the speed control. Use shift button to let character run.
2.I want add a character2, and let it control by the jkil. And this is his image
3.I try to add attack button to let character to attack, one use klee weapons one use gun.
4.I want add some enemies and they also can attack.
5.I want to add items fall off, if the character kill the enemies they can get some items to resume HP or increase the damage of the character.
6.I want add some envirment like snow or rain, may be the harmful one.
7..RPG game must be random so I want add some treasure box let character open it may have weapon and money inside, I also want to add treasure chest monster.
Welcome to My Site
Hello! This is the homepage of my project. Here, you can find various resources and information about what I’m working on.
About This Project
This project aims to explore the world of [Your Topic]. Here are some key points:
- Objective: Explain what you want to achieve.
- Technologies Used: List the main technologies or languages used in this project.
- Target Audience: Describe who this project is for.
Key Features
- Feature 1: Brief description of the first feature.
- Feature 2: Brief description of the second feature.
- Feature 3: Brief description of the third feature.
Get Involved
If you want to contribute to this project, please check the contributing guidelines.
Resources
Connect with Me
Feel free to reach out if you have any questions or suggestions!
Thank you for visiting my site!
layout: base title: Simple RPG Game permalink: /rpg/ —
Popcorn Hack 1 Make a code cell that show usage of compound assignment in a Data Type Operations.
%%js
/* Primitive Data Types These are data types that store a single value. */
// Number: Represents numerical values, such as health and speed let health = 100; // Integer let playerSpeed = 5.75; // Float representing the player’s speed
console.log(“Health (Number):”, health, “Type:”, typeof health); console.log(“Player Speed (Number):”, playerSpeed, “Type:”, typeof playerSpeed);
// String: Represents text, such as the user’s name or keypress let userName = “Hero123”; // User name let keyPress = ‘a’; // Keypress
console.log(“User Name (String):”, userName, “Type:”, typeof userName); console.log(“Key Press (String):”, keyPress, “Type:”, typeof keyPress);
// Compare single character to its ASCII value let asciiValue = keyPress.charCodeAt(0); console.log(“ASCII Value of Key Press:”, asciiValue, “Type:”, typeof asciiValue); console.log(“Is Key Press ‘a’ (ASCII 97)?”, asciiValue === 97);
// Boolean: Represents true/false values, such as isAlive let isAlive = true;
console.log(“Is Alive (Boolean):”, isAlive, “Type:”, typeof isAlive);
// Undefined: Represents a variable that has been declared but not yet assigned a value let questReward;
console.log(“Quest Reward (Undefined):”, questReward, “Type:”, typeof questReward);
// Null: Represents the intentional absence of any object value, such as an empty inventory slot let inventorySlot = null;
console.log(“Inventory Slot (Null):”, inventorySlot, “Type:”, typeof inventorySlot);
// Symbol: Represents a unique and immutable value, often used as unique identifiers for game objects let uniqueID = Symbol(‘playerID’);
console.log(“Unique ID (Symbol):”, uniqueID, “Type:”, typeof uniqueID);
// BigInt: Represents very large integers, such as the total time played in milliseconds let totalTimePlayed = 1234567890123456789012345678901234567890n;
console.log(“Total Time Played (BigInt):”, totalTimePlayed, “Type:”, typeof totalTimePlayed);
/* Reference Data Types These are data types that store references to memory locations. */
// Object: Represents a collection of key-value pairs, such as player attributes or game settings let playerAttributes = { name: “Hero123”, health: 100, mana: 50 };
console.log(“Player Attributes (Object):”, playerAttributes, “Type:”, typeof playerAttributes);
// Array: Represents an ordered collection of values, such as a list of high scores or inventory items let highScores = [1500, 1200, 900, 600, 300];
console.log(“High Scores (Array):”, highScores, “Type:”, typeof highScores);
// Function: Represents a block of code designed to perform a specific task, such as attacking an enemy or saving the game function attackEnemy() { console.log(“Enemy attacked!”); }
console.log(“Attack Enemy (Function):”, attackEnemy, “Type:”, typeof attackEnemy); attackEnemy();
This example uses data types, operators, and functions to scale a square block based on a user-defined width.
This example uses data types, operators, and functions to scale blocks based on a user-defined width.
Understanding For Loops
Overview
For loops can be used to iterate through a list, a range of numbers, or a string. This is particularly useful for accessing each element in these collections.
Looping Through a String
Here’s how you can use a for loop to print each letter of a string:
for (let letter of "teststring") {
console.log(letter);
}
This will output:
t
e
s
t
s
t
r
i
n
g
Practice Exercise: Print Your Name
Click the button below to print each letter of your name, "Kian," multiple times:
<!DOCTYPE html>Understanding For Loops
Overview
For loops can be used to iterate through a list, a range of numbers, or a string. This is particularly useful for accessing each element in these collections.
Looping Through a String
Here’s how you can use a for loop to print each letter of a string:
for (let letter of "teststring") {
console.log(letter);
}
This will output:
t
e
s
t
s
t
r
i
n
g
Practice Exercise: Print Your Name
Click the button below to print each letter of your name, "Kian":