English | 简体中文
- Game - games in resource directory which considered as a static file
- Platform - we call the whole system running on extension as platform
- a new game
- fix current existing game issues
- add a new feature to current existing game
- fix platform issue
- adda new feature to platform
currently we support version upper than 1.84, but we are working to support lower version.
This column instructs you to build and debug vsc-gameboy extension locally and directory structure.
- Clone app
https://github.com/hp-potion/vsc-gameboy.git
- Run
npm install
ornpm i
- Press
F5
or clickRun > Start Debugging
-
Debug Platform features
- You can debug using
console.log
or any other console method and it reveals on VSC debug console.
- You can debug using
-
Debug games(Or any other webview content)
- docs - where files for document are in
- resource - static files are treated here
- game - game files(html, js, mp3, etc...)
- icon - icon images for VSC sideBar and activityBar.
- src
- game
- meta-data.ts - handle meta data of executable games.
- game
- util - utils needed on extension build
- test - where test codes are in
- extension.ts - the file where our extension activates
- game-provider.ts - select game and convert html here
- Get your game folder ready.
- Put them under
resource > game > your-game-identifier
directory.
- Important rules
- your game should contain only one html file.
- need to write all local file
src
orhref
path in relative path. (path starts with https doesn't need to be changed)
you should declare your file meta data in src > game > meta-data.ts
{
id: "my-game", // identifier to locate resource path
title: "MyGame", // How your game's name reveals
description: "My fancy js game", // description
author: "Junman Choi", // author
root: "index.html", // root html file located in your game resource directory(recommend to position on root of your game dir)
icon: { // icon will appear on side bar
light: "image-light.svg", // put images in icon > dark/light
dark: "image-dark.svg",
},
}
Adding Scoreboard Functionality
Update your game HTML: Add the sendScore('player', 'score') function to your game's HTML file. This function should be called whenever you want to send score data to the scoreboard.
function gameOver() {
//GameOver Logic
sendScore('player',account.score);
}
- If you contribute on adding new game, please submit your github repository of html,js game.
- All mp4 or gif animated videos are welcomed to describe your work.
- Fork our repository and start developing.
- Do not try to create a new branch in vsc-gameboy repository!
- See : fork-a-repo
- feel free to report issues on issue tab
Thank you for your support and love of vsc-extension.