mirror of
https://github.com/damouse/Drop64.git
synced 2024-05-16 11:00:52 -04:00
final cleanup
This commit is contained in:
parent
78f18a0b3b
commit
e1863cdb05
19
README.md
19
README.md
|
@ -1,14 +1,14 @@
|
|||
# Drop64
|
||||
|
||||
Nintendo N64 displayed in a browser window and controlled by a smartphone. Emscripten compiled mupen64plus, ionic app, and socket.io proxy of input.
|
||||
Nintendo N64 displayed in a browser window and controlled by a smartphone. Emscripten compiled mupen64plus, ionic app, socket.io input proxying, and a paradrop chute wrapper.
|
||||
|
||||
You need to bring your own ROM to play, games are not hosted here.
|
||||
You need to bring your own ROM to play, games are not hosted here. Nintendo wouldn't be happy about that.
|
||||
|
||||
Note that the controller portion of this app comes in a smartphone flavor too. See damouse/Drop64_App for that version.
|
||||
Chrome has issues rendering the display. Please use firefox if you encounter problems.
|
||||
|
||||
## Running
|
||||
|
||||
To run on a local computer:
|
||||
Running locally:
|
||||
|
||||
```
|
||||
npm install
|
||||
|
@ -24,8 +24,17 @@ To run on a paradrop router:
|
|||
- Go to [192.168.1.1:3000](http://192.168.1.1:3000) in your browser
|
||||
- Go to [192.168.1.1:3000/controller](http://192.168.1.1:3000/controller) on your smartphone
|
||||
|
||||
## In Progress
|
||||
## To Do
|
||||
|
||||
- Multiplayer
|
||||
- Canvas Streaming
|
||||
- Lobbies
|
||||
|
||||
|
||||
## References
|
||||
|
||||
Credit where credit is due-- almost all of this is taken off-the-shelf. These repos made up most of the code found here:
|
||||
|
||||
- [mupen64plus](https://github.com/mupen64plus)
|
||||
- [jquesnelle's emscripten project](https://github.com/jquesnelle/mupen64plus-ui-console/tree/emscripten)
|
||||
- [webvr polyfill](https://github.com/googlevr/webvr-polyfill)
|
|
@ -14,7 +14,8 @@ angular.module('controller', [])
|
|||
});
|
||||
});
|
||||
};
|
||||
}]).directive('myTouchend', [function() {
|
||||
}])
|
||||
.directive('myTouchend', [function() {
|
||||
return function(scope, element, attr) {
|
||||
|
||||
element.on('touchend', function(event) {
|
||||
|
@ -30,27 +31,18 @@ angular.module('controller', [])
|
|||
});
|
||||
};
|
||||
}])
|
||||
.controller('RootController', function($scope, $location) {
|
||||
var socket = io.connect($location.$$host + ':' + $location.$$port);
|
||||
|
||||
socket.on('connect', function() {
|
||||
socket.emit('command', 'Controller Connected');
|
||||
});
|
||||
|
||||
.controller('RootController', function($scope, $location) {
|
||||
var socket = io.connect($location.$$host + ':' + $location.$$port);
|
||||
$scope.counter = 0;
|
||||
$scope.press = function(b, k) {
|
||||
socket.emit("controller", { event: 'keydown', button: b, code: k });
|
||||
};
|
||||
|
||||
console.log("HELLO")
|
||||
|
||||
socket.on('connect', function() {
|
||||
socket.emit('command', 'Controller Connected');
|
||||
});
|
||||
|
||||
|
||||
$scope.press = function(b, k) {
|
||||
$scope.counter++;
|
||||
socket.emit("controller", { event: 'keydown', button: b, code: k });
|
||||
};
|
||||
|
||||
// Touch stopped
|
||||
$scope.release = function(b, k) {
|
||||
$scope.counter++;
|
||||
socket.emit("controller", { event: 'keyup', button: b, code: k });
|
||||
};
|
||||
})
|
||||
$scope.release = function(b, k) {
|
||||
socket.emit("controller", { event: 'keyup', button: b, code: k });
|
||||
};
|
||||
})
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
|
||||
<!-- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular-touch.js"></script> -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
|
||||
<script src="assets/three.min.js"></script>
|
||||
|
@ -22,11 +21,9 @@
|
|||
<script src='assets/ngTouchStart.min.js'></script>
|
||||
|
||||
<script type='text/javascript' src='assets/controller.js'></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body ng-app="controller" ng-controller='RootController' id='main-content-wrap'>
|
||||
{{counter}}
|
||||
<figure id="nespad">
|
||||
<div class="cord"></div>
|
||||
<section class="dpad-pane">
|
||||
|
@ -67,32 +64,7 @@
|
|||
<!-- <script src="assets/util.js"></script> -->
|
||||
<!-- <script src="assets/complementary-filter.js"></script> -->
|
||||
<!-- <script src="assets/plot-sensors.js"></script> -->
|
||||
<!--
|
||||
|
||||
<div class='container'>
|
||||
<div class='row main-row'> </div>
|
||||
<div class='row main-row'>
|
||||
<div class='controls left-controls text-center'>
|
||||
<div class='row'>
|
||||
<button id='aaa' type='button' class='gamepad-button' my-touchstart='press("ArrowUp", 38)' my-touchend='release("ArrowUp", 38)'>Up</button>
|
||||
</div>
|
||||
<button class='gamepad-button' my-touchstart='press("ArrowLeft", 37)' my-touchend='release("ArrowLeft", 37)'>Left</button>
|
||||
<button class='gamepad-button' my-touchstart='press("ArrowDown", 40)' my-touchend='release("ArrowDown", 40)'>Down</button>
|
||||
<button class='gamepad-button' my-touchstart='press("ArrowRight", 39)' my-touchend='release("ArrowRight", 39)'>Right</button>
|
||||
</div>
|
||||
<div class='controls mid-controls text-center'>
|
||||
{{ counter }}
|
||||
<button class='gamepad-button' my-touchstart='press("Enter", 13)' my-touchend='release("Enter", 13)'>Start</button>
|
||||
<button class='gamepad-button' my-touchstart='press("z", 90)' my-touchend='release("z", 90)'>Z</button>
|
||||
</div>
|
||||
<div class='controls right-controls text-center'>
|
||||
<button class='gamepad-button' my-touchstart='press("g", 71)' my-touchend='release("g", 71)'>A</button>
|
||||
<button class='gamepad-button' my-touchstart='press("f", 70)' my-touchend='release("f", 70)'>B</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row main-row'></div> -->
|
||||
<script type='text/javascript' src='assets/nes.js'></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>Drop64</title>
|
||||
<meta charset='utf-8' />
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="assets/display.css">
|
||||
|
||||
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
<title>Drop64</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
Loading…
Reference in a new issue