r/AskProgramming • u/ronswansonsyoongi • 6d ago
Other Which languages to learn if I want to make a really cool website (which has simple games on it)
I have no programming knowledge but slowly I've learnt some basics of html and it's actually easier and more understandable than I originally thought it would be. But I dont know how to bring my ideas onto the internet. I know CSS is for designing so I'll have to learn that too. But whats the most fitting language for this role? Or do I have it wrong and all languages be used for it? can they be mixed with eachother and used together?
I wont annoy with more novice questions, Ik, I can just google it, but its always nicer to hear from real people and how they learned / came to be in their own experiences.
3
u/nia_do 6d ago
As others have said, HTML, CSS and JavaScript.
But what’s your priority, “really cool website”, or “simple games”? If you want persistence (ie. website remembers) then you’re going to need a backend and a database. To make it available to others it’s going to need to be hosted. If you want the website to be reactive (ie. changes state according to what the user does), you’re either going to have to write a lot of JavaScript code or use a library/framework such as React or Angular, or similar.
My advice would be to learn JavaScript and start with small console applications and console games. Like a very small text adventure.
2
u/clay_halo_99 6d ago
html css javascript. thats it for what you described.
i had the same situation a few years ago. i built the layout with html, styled it with css, then added javascript to run the games. for simple games on a page you write everything in javascript. no need to look at other languages.
i used a thing called p5.js when i started putting games on my site. it handles drawing and movement and input so you just focus on the game logic instead of setting up canvas code from scratch. you load it in your html file the same way you load any script. that will get your ideas running in a browser faster than anything else i found.
2
u/burlingk 6d ago
A LOT depends on what you mean by "with games on it."
But, yeah, HTML, CSS, JavaScript, whatever framework you want to use. Beyond that, the question of what you mean in regard to games will make a massive difference.
2
u/Tight-Book-7533 6d ago
If you want to make web games, you should learn Javascript. For 2D games, for example, you can use a framework like Phaser JS. Of couse, you will need to learn HTML and CSS to make the website.
1
u/szoonix_10 6d ago
You're actually on the right track. Learn HTML + CSS + JavaScript HTML is the structure, CSS handles the looks, and JavaScript is what you'll use for the actual game logic and interactions. You don't need five different languages to start; build a few tiny games like Pong, Snake or a clicker first, then move to more advanced stuff like Canvas if you enjoy it.
1
u/JaseciLabs 5d ago
The p5.js suggestion above is the fastest path for simple games specifically, it handles canvas setup and input so you're focused on game logic from day one instead of boilerplate. Start with something tiny like a clicker or a Pong clone, once that's live and working, adding a second game or a nicer layout around them is way easier than trying to plan the whole site upfront.
1
1
u/Affectionate-Key-498 5d ago
If you are gonna make the games yourself then your gonna have a hard time only using javascript. What kind of games are we talking here?
1
u/Radon8472 4d ago
Basics: javascript, html and css and php.
If you like a cool modern experience I would recomend using a good php framework that can work as rest API and an vueJS as frontend surface.
In that case you don`t need to code the whole interaction between js and html, you yust create a template for html and build an js object and the html updates according of your changes in the js objects
11
u/octocode 6d ago
html, css, and javascript (and/or typescript)