Compare commits
2 Commits
92ddd42c9c
...
69c8077f0c
Author | SHA1 | Date | |
---|---|---|---|
69c8077f0c | |||
5314862da4 |
@ -1,16 +0,0 @@
|
|||||||
|
|
||||||
# Guide til at lave et Space Invaders-spil
|
|
||||||
|
|
||||||
## Hent koden
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
28
docs/setup_danish.md
Normal file
28
docs/setup_danish.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
# Guide til at sætte kode-miljøet op
|
||||||
|
|
||||||
|
## Download VS Code
|
||||||
|
|
||||||
|
https://code.visualstudio.com/
|
||||||
|
|
||||||
|
Hent *Live Server*-udvidelsen til VS Code, fra udvidelses-menuen.
|
||||||
|
|
||||||
|
## Hent koden
|
||||||
|
|
||||||
|
Gå til https://git.sfja.dk/sfja/game-in-js og download koden som ZIP-fil.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Find ZIP-mappen på computeren og udpak ZIP-mappen's filer. Vælg for eksempel at lægge filerne på Desktop/Skrivebordet.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Herefter åben den ny-udpakkede mappe i VS Code.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Start Live Server
|
||||||
|
|
||||||
|
Tryk på "Go Live" i bunden til højre i VS Code og åben http://localhost:5500/ i en web-browser som Chrome eller Firefox.
|
||||||
|
|
||||||
|
## Tegn
|
2
docs/space_invaders_danish.md
Normal file
2
docs/space_invaders_danish.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
# Guide til at lave et Space Invaders-spil
|
2
game.js
2
game.js
@ -1,4 +1,4 @@
|
|||||||
import * as lib from "./lib.js"
|
import * as lib from "./lib/lib.js"
|
||||||
|
|
||||||
const playerSprite = await lib.texture.loadImage("assets/player.png", 64, 64);
|
const playerSprite = await lib.texture.loadImage("assets/player.png", 64, 64);
|
||||||
const bulletSprite = await lib.texture.loadImage("assets/bullet1.png", 24, 24);
|
const bulletSprite = await lib.texture.loadImage("assets/bullet1.png", 24, 24);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
export * as canvas from "./lib/canvas.js"
|
export * as canvas from "./canvas.js"
|
||||||
export * as texture from "./lib/texture.js"
|
export * as texture from "./texture.js"
|
||||||
|
|
||||||
export let frameDeltaT = 0;
|
export let frameDeltaT = 0;
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user