Avancerede eksempler
Indholdsfortegnelse
Her kan du se eksempler på nogle mere avancerede programmer man kan lave. To af eksemplerne er lavet både med brug af objekt orienteret programmering og uden brug af objekt orienteret programmering. Det er for at vise hvordan man kan strukturere sin kode på forskellige måder. Hvis man laver kompleks kode kan det være en fordel at bruge objekt orienteret programmering. Prøv at se om du kan forstå begge varianter af koden.
Multiplayer game:
- With use of object oriented programming (code)
- Without use of object oriented programming (code)
Note: Move using the keys TFGH and shoot by clicking the mouse. The different browser tabs must not be attached to the same browser window
Multiplayer game with canon towers using shared data:
Multiplayer game with shooting canon towers - POC (code)
Note: Move using the keys TFGH and shoot by clicking the mouse. The different browser tabs must not be attached to the same browser window
Brug af billeder og effekter
Start side til et spil (code)
Note: Prøv at hover billederne og se om de er interaktive. Prøv at klikke på billederne og se hvad der sker.
Spilbart multiplayer spil med grafik
Start side til et spil (code)
Note: Skriv dit navn, vælg et hold og læse reglerne. Man kan godt prøve spillet af ved at åbne det i flere browser vinduer. Disse browser vinduer må ikke være tabs i det samme browser vindue.
Advanced Examples
Table of Contents
Here you can see examples of more advanced programs you can create. Two of the examples are made both with and without the use of object-oriented programming. This is to show how you can structure your code in different ways. If you are creating complex code, it can be an advantage to use object-oriented programming. Try to see if you can understand both versions of the code.
Multiplayer game:
- With use of object oriented programming (code)
- Without use of object oriented programming (code)
Note: Move using the keys TFGH and shoot by clicking the mouse. The different browser tabs must not be attached to the same browser window
Multiplayer game with canon towers using shared data:
Multiplayer game with shooting canon towers - POC (code)
Note: Move using the keys TFGH and shoot by clicking the mouse. The different browser tabs must not be attached to the same browser window
Use of images and effects
Start page for a game (code)
Note: Try hovering over the images to see if they are interactive. Try clicking on the images to see what happens.
Playable multiplayer game with graphics
Start page for a game (code)
Note: Enter your name, choose a team, and read the rules. You can try the game by opening it in multiple browser windows. These browser windows must not be tabs in the same browser window.