learn to code

Gooningmaster

Member
Jan 13, 2018
113
39
246
Hello everyone I hope you're doing great!
After playing many htlm game on this site I reallt want to learn how to code in htlm , is there any book I should buy or site I should check in order to learn? Or even a free course on youtube.
If you have some advice on how to start please let me know!
 

fraya

Newbie
Nov 22, 2018
16
28
194
Hello everyone I hope you're doing great!
After playing many htlm game on this site I reallt want to learn how to code in htlm , is there any book I should buy or site I should check in order to learn? Or even a free course on youtube.
If you have some advice on how to start please let me know!

html is not a language strictly speaking, it is more of a markup language for hypertext, to orhanize a web page, you will need to learn JS (javascript) or equivalent, and CSS which "dresses" the web page
 

papel

Active Member
Game Developer
Sep 2, 2018
568
780
152
Pretty much what Fraya said. HTML games are made entirely with Javascript, or almost entirely with it, with some UI being CSS, which is also part of the toolset for the modern web.

Keep in mind that what kind of game you want to do will dictate how much code you need to put in as well. My suggestion is to learn "pure" javascript, without having to use Node, npm or whatever the fuck else. For learning, all you need is windows notepad and saving the file as .html

HTML:
<html>
<head>
  <script>
  //JAVASCRIPT GOES HERE
  </script>
</head>
<body></body>
</html>
Congrats, you just created your first web page.

Keep in mind that javascript allows you to shotgun yourself on the foot in a million different ways. Most tutorials will probably not talk about good coding practice, so it's very easy for you to end up with a mess that you have no idea how/why it works, when it actually works, and how/why it's breaking when it starts throwing errors.
 
  • Like
Reactions: fraya

GNVE

Active Member
Jul 20, 2018
725
1,199
322
Most HTML games use Twine. I haven't used it myself but apparently you don't need to know coding for basic stuff.
(Though you can use CSS and Javascript for more complicated stuff).

Knowing how to code will help you though. My go to for dipping your toes into coding would be excel (its formulas use coding logic while output is generally clear and instantaneously. e.g. if you encounter this number display True else False.)

But knowing a little HTML and CSS wouldn't hurt you if you are dead set on making a HTML game. (Though I myself found Python much easier to understand as a noob. Although that would push you towards Ren'Py.)
 

fraya

Newbie
Nov 22, 2018
16
28
194
C'est à peu près ce que Fraya a dit. Les jeux HTML sont entièrement créés avec Javascript, ou presque entièrement avec celui-ci, certaines interfaces utilisateur étant en CSS, qui font également partie de l'ensemble d'outils du Web moderne.

Gardez à l'esprit que le type de jeu que vous souhaitez faire dictera également la quantité de code que vous devrez insérer. Ma suggestion est d'apprendre le javascript "pur", sans avoir à utiliser Node, npm ou quoi que ce soit d'autre. Pour apprendre, tout ce dont vous avez besoin est le bloc-notes Windows et l'enregistrement du fichier au format .html.

HTML:
<html>
<tête>
  <script>
  //JAVASCRIPT VA ICI
  </script>
</tête>
<corps></corps>
</html>
Félicitations, vous venez de créer votre première page Web.

Gardez à l'esprit que javascript vous permet de vous tirer sur le pied d'un million de façons différentes. La plupart des tutoriels ne parleront probablement pas des bonnes pratiques de codage, il est donc très facile pour vous de vous retrouver dans un désordre sans savoir comment/pourquoi cela fonctionne, quand cela fonctionne réellement et comment/pourquoi il se brise lorsqu'il commence à générer des erreurs. .
[/CITATION][/CITATION]



Je suis développeur web ;)
 
  • Like
Reactions: Gooningmaster