Skip to content
Sign UpLog In
Profile icon

Matthew Xie

@MatthewX
  • Guess the number

    Cover page
    Made with Python
    Recent comments (0)
  • Cows and Bulls

    Cover page
    Made with Python
    Recent comments (0)
  • A firing game made by Matthew Xie

    Cover page
    Made with Pygame
    Recent comments (0)
Repls
Community
MatthewX
MatthewX
published a Repl
1 year ago
1
Front page of puzzle 2
Front page of puzzle 2A (fun) puzzle game that gets your brain going! The instructions are in the game and best played in a new tab. WARNING: DO NOT PLAY IF YOU GET TRIGGERED TOO EASILY. Hope you enjoy! :)
MatthewX
MatthewX
shared a Post
2 years ago
#html
#game
#javascript
+1
Hello everyone! I'm back to coding after the school year has passed! Today, I'm sharing with you guys a game that took me a while and that I started l
Front page of puzzle 2
HTML, CSS, JS
TheMaster7661
TheMaster7661
It's a flower! ...I think image2 years ago
FrancisPan
FrancisPan
image2 years ago
FrancisPan
FrancisPan
image I'm watching you :D > I hope this isn't spamming :D2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
Hi! I need help with saving numbers and data since repl.it for some reason doesn't let me use local storage :(. Also, I have been thinking about how m
Codeverse
Codeverse
Did I answer your question? @MatthewX2 years ago
Codeverse
Codeverse
Hello @MatthewX, here is how you can make a multiplayer game. Servers can be made in Python, Java, JavaScript, etc, but for this occasion, I would prefer to use Node.js. Here is how to do Node.js: Node.js tutorial. Next, you have to connect Node.js with Socket.io and Express or other packages. Your server show like something like this. const express = require('express'); const socket = require('socket.io'); //Uses the express function derived from your express variable. const app = express(); /2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
Hello! I would like to thank all of you for trying out my projects and giving me amazing suggestions. I would also like to celebrate my 150 cycle spec
My website (NEW)
HTML, CSS, JS
gibbsfreenergy
gibbsfreenergy
u know i have to be honest, its pretty good that u have content within it, most people here who make websites don't have any content, its just a paragraph of how they love coding...blah blah blah....but tbh the UI here is horrible, if you could make it a bit more appealing it would be fantastic good luck and tell me when u edit it2 years ago
gibbsfreenergy
gibbsfreenergy
lmao a 150 cycle special? never heard of that2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
Hello! So we did this thing in tech class where we had to make a Covid counter on micro:bit so I decided to make one using html and js! This program r
Covid Counter
HTML, CSS, JS
MatthewX
MatthewX
shared a Post
2 years ago
Hello guys! I'm back from not programming for a long time! I got this idea when my friend told me about this game called cookie clicker. It seemed fun
Study clicker
HTML, CSS, JS
potatojs
potatojs
nice2 years ago
python88
python88
cool!2 years ago
MatthewX
MatthewX
Sorry squid, I found a mistake so I fixed it now :D2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
Hi, how do use put things into a json file then access the thing u put in the json file?
Login page
HTML, CSS, JS
PattanAhmed
PattanAhmed
@MatthewX Hi, You cannot do it in Straight-forward HTML You need to have help with some Back-end Programming languages to do this... Thanks! Hope this helps2 years ago
Coder100
Coder100
Hello, you cannot do this in HTML. You will have to process things with a backend.2 years ago
SixBeeps
SixBeeps
Do you want that JSON file to be global (for something like a leaderboard)? You'll need to use a server framework for that. JS has JSON.parse() which will take in a string of JSON and turn it into an object. Likewise, you can turn an object into a JSON string with JSON.stringify(object).2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
Hello, this is another repl made my me! You use wad the move the character and earn coins to buy cool stuff! Remember to save your progress by pressin
Parkour
HTML, CSS, JS
active15
active15
The motive of providing accounts of all ranges on our platform is to give customers what they demand and what they deserve. csgo smurf cheap rust accounts buy valorant accounts1 year ago
python88
python88
thew coin doesnt work2 years ago
python88
python88
cool!2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
When you ccomplete a level then click on another level, All of a sudden the player speed becomes so fast. I tried stopping the loops once you finish a
Parkour
HTML, CSS, JS
SixBeeps
SixBeeps
Where are you doing the game loop at? I can't find a setInterval anywhere.2 years ago
DynamicSquid
DynamicSquid
Have you tried resetting the speed everytime there's a new level?2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How do I make a block the player can jump on?
Parkour
HTML, CSS, JS
mwilki7
mwilki7
You will need at least 2 blocks. 1 block is a wall, the other block is a player. You have the player, now you just need a block. I use this function to determine whether 2 blocks have collided: function checkCollision(rect1, rect2) { if (rect1.x rect2.x && rect1.y rect2.y) { return true; } return false; } and call it with if (checkCollision(playerblock, wallblock)) { // Player is colliding with the block } `2 years ago
Coder100
Coder100
Well, right now you will not be able to easily make a block because of how your level is set up. Try this tutorial.2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How do you remove a item from a list in js? Like a = "somenumberinlist" and then remove a from the list.
Front page of puzzle solver
HTML, CSS, JS
PattanAhmed
PattanAhmed
@MatthewX Hi, I think this website might help you:- Click here Thanks! Hope this helps2 years ago
Coder100
Coder100
for you: let array = [1, 2]; array.splice(0, 1); // delete first item `2 years ago
Coder100
Coder100
Array.splice(index, deleteamount) read more2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
This is crossy road in python which was made by me use wasd to move the blue character around. I made this game a long time ago(like 3-4 months ago),
Crossy road
Pygame
Bookie0
Bookie0
Screen Shot 2020-08-28 at 5.40.51 PM wheres the chicken/blue character?2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
In my code, i want too check if the number is even and if the number is odd, Im not sure how to do it in js. I tried using % but it didn't work. Pleas
[GAME] PUZZLE 2 by Matthew Xie
HTML, CSS, JS
PattanAhmed
PattanAhmed
@MatthewX Hi, Check this small article:- Use modulus: function isEven(n) { return n % 2 == 0; } function isOdd(n) { return Math.abs(n % 2) == 1; } You can check that any value in Javascript can be coerced to a number with: Number.isFinite(parseFloat(n)) This check should preferably be done outside the isEven and isOdd functions, so you don't have to duplicate error handling in both functions. That's it. > Reference:- Click here Thanks! Hope this helps2 years ago
Coder100
Coder100
Hi, what's wrong? % gets the remainder: function isEven(num) { return num % 2 == 0; } if the remainder is 0, it's divisible.2 years ago
Bookie0
Bookie0
hi there! i found this: function isOdd(num) { return num % 2;} console.log("1 is " + isOdd(1)); console.log("2 is " + isOdd(2)); console.log("3 is " + isOdd(3)); console.log("4 is " + isOdd(4)); from here: https://stackoverflow.com/questions/5016313/how-to-determine-if-a-number-is-odd-in-javascript here are some other sites that aid you: https://www.tutorialsmade.com/javascript-find-odd-even-number/ https://css-tricks.com/snippets/javascript/check-if-number-is-evenodd/ https://www.tutorial2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
Hi,this is a puzzle solver game made by me where you use your brain to solve some puzzles. I will do my best to try to add more and more puzzles to th
Front page of puzzle solver
HTML, CSS, JS
MatthewX
MatthewX
Hi guys. This post is dead...BUT I just made another puzzle solver with an entirely new puzzle! Come check it out! https://replit.com/talk/share/GAMENEW-Puzzle-Solver-2-Must-play/142180 2 years ago
Henslo
Henslo
That's a really cool puzzle2 years ago
DavidLi17
DavidLi17
in hardcore level1 i got 282 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How would I switch the colors of two rectangles? I want to be able so switch back and forth and same with the other squares. For example, I want a = b
[GAME] Puzzle Made by Matthew Xie
HTML, CSS, JS
Coder100
Coder100
oh, well, something like this: let rectAColor = getAColor(); let rectBColor = getBColor(); document.getA.color = rectBColor; document.getB.color = rectAColor; of course, that's not valid js code.2 years ago
Coder100
Coder100
excuse me what2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How come my continue button isn't showing up? Look at my code for charmander.js squirtle.js and bulbasaur.js
Pokemon
HTML, CSS, JS
PattanAhmed
PattanAhmed
@MatthewX Hi, What is continue button in the function called enemydied? Can you send how the continue button will be. Thanks!2 years ago
InvisibleOne
InvisibleOne
Uhh, I don't see a button at all for continue2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How do I assign the player move script (in my code) to like a shape? Also, how do i add something to a list in javascript? Finally, can any of you giv
Pokemon
HTML, CSS, JS
ironblockhd
ironblockhd
use yourList.push() to add something to a list2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How do you make a player move in html and javascript? I want the player to take small steps everytime u press wasd. Also how do i add an element like
Pokemon
HTML, CSS, JS
SixBeeps
SixBeeps
1.) You can take input in JS by using event listeners: var movement = { left: 0, right: 0, up: 0, down: 0 } document.addEventListener('keydown', function(event) { if (document.activeElement === document.body) { switch (event.keyCode) { case 65: // A movement.left = 1; break; case 87: // W movement.up = 1; break; case 68: // D movement.right = 1; break; case 83: // S movement.down = 1; break; 2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How do I run when a button is pressed?
Pokemon
HTML, CSS, JS
Coder100
Coder100
Hi! Classes are not the same as ids. They can be assigned to multiple elements so they can be identified as a group. Anyways, to get all elements: document.querySelectorAll('.[class name]').forEach(el => { // now, el is the element you are looking for, and you can do things accordingly el.style.background = "orange"; }) `2 years ago
PattanAhmed
PattanAhmed
@MatthewX Hi, This is an amazing website explaining about Classes (div) in HTML and JavaScript... Click here *Hope this helps Please mark my answer if this helps*2 years ago
SixBeeps
SixBeeps
Classes in HTML are different than classes in any other language. Here, they are used for grouping together common elements or groups of elements so that they can be styled or identified in bulk.2 years ago
MatthewX
MatthewX
shared a Post
2 years ago
How do I write something in html then be able to change it in java script? Also, how do I do a random choice from a list of objects? Finally, how do i
Pokemon
HTML, CSS, JS