r/JavaScriptTips • u/tutorialstonight • Nov 22 '20
r/JavaScriptTips • u/[deleted] • Sep 01 '20
I need help making a remake of a game
Just a few questions about scrolling screens
I'm fairly new so keep that in mind. So I'm making a remake of Mario in Code.Org (I know it's dumb, but the animations and stuff are easier) and it trying to figure out how to make scrolling screens and stuff like that (I want it so that if you move backwards, the screen moves with you!)
If you figure out the answer then pls also tell me how pipes work to bring you to somewhere else. I plan on trying to make a giant level and the pipe teleports you to the bottom of the screen. But then, how would I make the camera not move??? Exactly, I'm new.
If I finish I will make a new post and edit this and add the link.
r/JavaScriptTips • u/buckets09 • May 01 '20
How do you read a text file and write it on a web page?
function magic(){
var text = 'a';
var fs = require("fs");
text = fs.readFile("test.txt");
document.write(text);
}
window.onload = magic;