Skip to content

Commit

Permalink
Add virtual game controller
Browse files Browse the repository at this point in the history
  • Loading branch information
yostane committed Oct 6, 2024
1 parent 62b2409 commit bcb951e
Show file tree
Hide file tree
Showing 56 changed files with 2,767 additions and 141 deletions.
5 changes: 4 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ You can try it here: [demo](https://yostane.github.io/MangedDoom-Blazor/)

## Running the webapp locally


```sh
#prerequisites
dotnet workload install wasm-tools wasm-experimental
Expand All @@ -35,3 +34,7 @@ Get-ChildItem -Recurse -File -Name -Exclude *.br,*.gz | % { '"./' + ($_ -repla
dotnet tool install --global dotnet-serve
```

## Credits

- [html5-virtual-game-controller](https://github.com/austinhallock/html5-virtual-game-controller)
Binary file removed docs/_framework/BlazorDoom.4hkuefvfz5.wasm
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.4hkuefvfz5.wasm.br
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.4hkuefvfz5.wasm.gz
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.75fctktndg.wasm
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.75fctktndg.wasm.br
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.75fctktndg.wasm.gz
Binary file not shown.
Binary file not shown.
Binary file added docs/_framework/BlazorDoom.bobb410r6y.wasm.br
Binary file not shown.
Binary file added docs/_framework/BlazorDoom.bobb410r6y.wasm.gz
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.c7furw59de.wasm.br
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.c7furw59de.wasm.gz
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.f2vohqc73o.wasm.br
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.f2vohqc73o.wasm.gz
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.g2hwd863hb.wasm
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.g2hwd863hb.wasm.br
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.g2hwd863hb.wasm.gz
Binary file not shown.
Binary file not shown.
Binary file added docs/_framework/BlazorDoom.ghw74p3rvl.wasm.br
Binary file not shown.
Binary file added docs/_framework/BlazorDoom.ghw74p3rvl.wasm.gz
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.i8rpfweebe.wasm
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.i8rpfweebe.wasm.br
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.i8rpfweebe.wasm.gz
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.wrs9wdw20l.wasm
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.wrs9wdw20l.wasm.br
Binary file not shown.
Binary file removed docs/_framework/BlazorDoom.wrs9wdw20l.wasm.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/_framework/blazor.boot.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"mainAssemblyName": "BlazorDoom",
"resources": {
"hash": "sha256-+EbBBE5wAHotec5m+cTUdQ7bMWmXXmGaA+HfHPAk8oU=",
"hash": "sha256-/3B3hvZAcMMhkgwvkLU9lNqyrRvQDqTRSyA22bWq7Ng=",
"fingerprinting": {
"BlazorDoom.wrs9wdw20l.wasm": "BlazorDoom.wasm",
"BlazorDoom.bobb410r6y.wasm": "BlazorDoom.wasm",
"System.Collections.cw1uh27c1t.wasm": "System.Collections.wasm",
"System.Console.2fw1u0u75z.wasm": "System.Console.wasm",
"System.Diagnostics.DiagnosticSource.yhknl5dwgf.wasm": "System.Diagnostics.DiagnosticSource.wasm",
Expand Down Expand Up @@ -40,7 +40,7 @@
"System.Runtime.InteropServices.JavaScript.dbvat1dvl9.wasm": "sha256-CS7QdAuCluxbd8pFwuTF//rPxf7N2R66v7FfdyGzEYE="
},
"assembly": {
"BlazorDoom.wrs9wdw20l.wasm": "sha256-FBKI5SVFUMOFnDtHBrkVunXti/UXkQkaKhJx3/LFR2A=",
"BlazorDoom.bobb410r6y.wasm": "sha256-2/cnpBk3SbtzV47l9m2pPd9MhRWr+Vdrtb1W3nxNArw=",
"System.Collections.cw1uh27c1t.wasm": "sha256-HM5n/GsK4XtBupaFWEhvHmmcKSD9V1TN8ogqOEVMVSA=",
"System.Console.2fw1u0u75z.wasm": "sha256-Xtgq19JutXceFCuaR7XRiNW9hFsqm+LS3p8STp8iJGY=",
"System.Diagnostics.DiagnosticSource.yhknl5dwgf.wasm": "sha256-ev8HKh2i47bk7zB71AI9H/XEkMa1nNlV0qGOCssuUes=",
Expand Down
Binary file modified docs/_framework/blazor.boot.json.br
Binary file not shown.
Binary file modified docs/_framework/blazor.boot.json.gz
Binary file not shown.
30 changes: 15 additions & 15 deletions docs/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@

html,
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#install_button {
visibility: hidden;
visibility: hidden;
}

a,
.btn-link {
color: #0366d6;
color: #0366d6;
}

.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}

#fps {
position: fixed;
left: 0;
top: 0;
display: inline-block;
background-color: rgba(0, 0, 0, 0.5);
color: white;
position: fixed;
left: 0;
top: 0;
display: inline-block;
background-color: rgba(0, 0, 0, 0.5);
color: white;
}

#canvas {
width: 80%;
height: auto;
image-rendering: pixelated;
width: 80%;
height: auto;
image-rendering: pixelated;
}
Binary file modified docs/app.css.br
Binary file not shown.
Binary file modified docs/app.css.gz
Binary file not shown.
73 changes: 37 additions & 36 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/MangedDoom-Blazor/" />
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta
name="description"
content="BlazorDoom - A dotnet WASM port of ManagedDoom"
/>
<meta name="keywords" content="Blazor, Doom, Game, WebAssembly, WASM" />
<title>BlazorDoom</title>
<link href="./bootstrap.min.css" rel="stylesheet" />
<link href="./app.css" rel="stylesheet" />
<link rel="manifest" href="./manifest.json" />
<script type="text/javascript" src="./js/gamecontroller.js"></script>
<script type="module" src="./main.js"></script>
</head>

<head>
<base href="/MangedDoom-Blazor/" />
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="description" content="BlazorDoom - A dotnet WASM port of ManagedDoom" />
<meta name="keywords" content="Blazor, Doom, Game, WebAssembly, WASM" />
<title>BlazorDoom</title>
<link href="./bootstrap.min.css" rel="stylesheet" />
<link href="./app.css" rel="stylesheet" />
<link rel="manifest" href="./manifest.json" />
<script type="module" src="./main.js"></script>
<script>
import { loadWad } from './main.js';
</script>
</head>

<body>
<div id="install_button"></div>
<div id="config_buttons">
<button onclick="console.log('clicked sound button');">
Click to enable sound APIs
</button>
<select name="wad_selection" id="wad_selection">
<option value="doom1">Doom 1 shareware</option>
<option value="freedoom1">FreeDoom 1</option>
<option value="freedoom2">FreeDoom 2</option>
</select>
<button id="load_wad">Load WAD</button>
<button id="toggle_fps">Toggle max FPS</button>
</div>
<div id="fps"></div>
<canvas id="canvas" width="320" height="200"></canvas>
</body>

</html>
<body>
<div id="install_button"></div>
<div id="config_buttons">
<button onclick="console.log('clicked sound button');">
Click to enable sound APIs
</button>
<select name="wad_selection" id="wad_selection">
<option value="doom1">Doom 1 shareware</option>
<option value="freedoom1">FreeDoom 1</option>
<option value="freedoom2">FreeDoom 2</option>
</select>
<button id="load_wad">Load WAD</button>
<button id="toggle_fps">Toggle max FPS</button>
</div>
<div id="fps"></div>
<canvas id="canvas" width="320" height="200"></canvas>
</body>
</html>
Binary file modified docs/index.html.br
Binary file not shown.
Binary file modified docs/index.html.gz
Binary file not shown.
Loading

0 comments on commit bcb951e

Please sign in to comment.