mirror of
https://github.com/FullScreenShenanigans/EightBittr.git
synced 2026-08-12 02:18:15 -07:00
Added first example: FullScreenSaver
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": ["./packages/*/tsconfig.json"]
|
||||
"project": ["./examples/*/tsconfig.json", "./packages/*/tsconfig.json"]
|
||||
},
|
||||
"plugins": ["@typescript-eslint", "simple-import-sort"],
|
||||
"rules": {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Dist
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/prepare
|
||||
- run: yarn compile
|
||||
- run: yarn dist
|
||||
@@ -33,6 +33,7 @@ cd EightBittr
|
||||
yarn
|
||||
yarn lerna bootstrap
|
||||
yarn run hydrate
|
||||
yarn lerna run dist
|
||||
```
|
||||
|
||||
### Local Development
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
This page will guide you through the steps to create a new game using the EightBittr game engine.
|
||||
The game will feature a player avoiding boxes bouncing around a screen like an old screensaver and include a basic suite of tests.
|
||||
|
||||
> Make sure you've read through the other documentation pages listed in the [EightBittr README.md](../../README.md) before reading this one!
|
||||
> Make sure you've read through the other documentation pages listed in the [README.md](./README.md) before reading this one!
|
||||
|
||||
## Preface
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
node_modules/
|
||||
test/
|
||||
*.test.*
|
||||
npm-debug.log
|
||||
*.ts
|
||||
!*.d.ts
|
||||
@@ -0,0 +1,39 @@
|
||||
<!-- Top -->
|
||||
|
||||
# FullScreenSaver
|
||||
|
||||
[](https://prettier.io)
|
||||

|
||||
[](http://badge.fury.io/js/fullscreensaver)
|
||||
[](https://gitter.im/FullScreenShenanigans/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Example game with EightBittr tooling.
|
||||
|
||||
<!-- /Top -->
|
||||
|
||||
## Usage
|
||||
|
||||
Documentation coming soon™️!
|
||||
|
||||
<!-- Development -->
|
||||
|
||||
## Development
|
||||
|
||||
This repository is a portion of the [EightBittr monorepo](https://raw.githubusercontent.com/FullScreenShenanigans/EightBittr).
|
||||
See its [docs/Development.md](../../docs/Development.md) for details on how to get started. 💖
|
||||
|
||||
### Running Tests
|
||||
|
||||
```shell
|
||||
yarn run test
|
||||
```
|
||||
|
||||
Tests are written in [Mocha](https://github.com/mochajs/mocha) and [Chai](https://github.com/chaijs/chai).
|
||||
Their files are written using alongside source files under `src/` and named `*.test.ts?`.
|
||||
Whenever you add, remove, or rename a `*.test.t*` file under `src/`, `watch` will re-run `yarn run test:setup` to regenerate the list of static test files in `test/index.html`.
|
||||
You can open that file in a browser to debug through the tests, or run `yarn test:run` to run them in headless Chrome.
|
||||
|
||||
<!-- Maps -->
|
||||
<!-- /Maps -->
|
||||
|
||||
<!-- /Development -->
|
||||
@@ -0,0 +1,88 @@
|
||||
/* General elements */
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background: black;
|
||||
color: #fafafa;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
header {
|
||||
font-family: "Press Start";
|
||||
padding: 0.5rem;
|
||||
overflow: hidden;
|
||||
-ms-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
section {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
padding-bottom: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* General animations */
|
||||
|
||||
.hoverable {
|
||||
opacity: 0.84;
|
||||
transition: 140ms opacity;
|
||||
}
|
||||
|
||||
.hoverable:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Game section */
|
||||
|
||||
section#game {
|
||||
min-height: 210px;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
/* Text sections */
|
||||
|
||||
section.section-text {
|
||||
margin: auto;
|
||||
padding: 21px 70px;
|
||||
max-width: 910px;
|
||||
font-size: 1.4em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.link-github {
|
||||
color: #cfc;
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
section.section-text {
|
||||
padding: 14px 7px;
|
||||
}
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Press Start";
|
||||
src: url("theme/fonts/pressstart2p-webfont.eot?#iefix") format("embedded-opentype"),
|
||||
url("theme/fonts/pressstart2p-webfont.woff") format("woff"),
|
||||
url("theme/fonts/pressstart2p-webfont.ttf") format("truetype"),
|
||||
url("theme/fonts/pressstart2p-webfont.svg") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>FullScreenSaver</title>
|
||||
<meta
|
||||
name="keywords"
|
||||
content="FullScreenSaver, full, screen, typescript, javascript, html5, gaming, online, online game, fun, distraction"
|
||||
/>
|
||||
<meta name="description" content="" />
|
||||
|
||||
<link href="./index.css" rel="stylesheet" />
|
||||
|
||||
<link rel="shortcut icon" href="theme/Icon.gif" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>FullScreenSaver</h1>
|
||||
</header>
|
||||
|
||||
<section id="game"></section>
|
||||
|
||||
<section id="explanation" class="section-text"></section>
|
||||
|
||||
<section id="social" class="section-text">
|
||||
You may
|
||||
<a
|
||||
class="link-github"
|
||||
href="http://www.github.com/FullScreenShenanigans/FullScreenSaver"
|
||||
>download the game for yourself</a
|
||||
>
|
||||
from GitHub, the location of FullScreenSaver's open source project.
|
||||
</section>
|
||||
|
||||
<section id="credits" class="section-text"></section>
|
||||
|
||||
<section id="legal" class="section-text">
|
||||
<small><em></em></small>
|
||||
</section>
|
||||
|
||||
<script
|
||||
data-main="main.js"
|
||||
src="../../../node_modules/requirejs/require.js"
|
||||
type="text/javascript"
|
||||
></script>
|
||||
|
||||
<script>
|
||||
var dependencyNames = [
|
||||
"eightbittr",
|
||||
"menugraphr",
|
||||
"userwrappr",
|
||||
"actorhittr",
|
||||
"areaspawnr",
|
||||
"autofieldr",
|
||||
"fpsanalyzr",
|
||||
"frametickr",
|
||||
"groupholdr",
|
||||
"inputwritr",
|
||||
"itemsholdr",
|
||||
"mapscreatr",
|
||||
"mapscreenr",
|
||||
"objectmakr",
|
||||
"pixeldrawr",
|
||||
"pixelrendr",
|
||||
"quadskeepr",
|
||||
"stringfilr",
|
||||
"timehandlr",
|
||||
];
|
||||
var externals = [
|
||||
{
|
||||
js: {
|
||||
dev: "react/umd/react.development",
|
||||
prod: "react/lib/react.production",
|
||||
},
|
||||
name: "react",
|
||||
},
|
||||
{
|
||||
js: {
|
||||
dev: "react-dom/umd/react-dom.development",
|
||||
prod: "react-dom/lib/react-dom.production",
|
||||
},
|
||||
name: "react-dom",
|
||||
},
|
||||
{
|
||||
js: {
|
||||
dev: "userwrappr/dist/UserWrappr-Delayed",
|
||||
},
|
||||
name: "UserWrappr-Delayed",
|
||||
shenanigansPackage: true,
|
||||
},
|
||||
];
|
||||
|
||||
var config = {
|
||||
packages: [],
|
||||
paths: {},
|
||||
};
|
||||
|
||||
for (let i = 0; i < dependencyNames.length; i += 1) {
|
||||
var dependencyName = dependencyNames[i].toLowerCase();
|
||||
|
||||
config.packages.push({
|
||||
main: "index",
|
||||
name: dependencyName,
|
||||
});
|
||||
config.paths[dependencyName] = "../../../node_modules/" + dependencyName + "/lib";
|
||||
}
|
||||
|
||||
for (var i = 0; i < externals.length; i += 1) {
|
||||
var external = externals[i];
|
||||
if (!external.js.dev) {
|
||||
continue;
|
||||
}
|
||||
|
||||
config.paths[external.name] = external.shenanigansPackage
|
||||
? "../../../packages/" + external.js.dev
|
||||
: "../../../node_modules/" + external.js.dev;
|
||||
}
|
||||
|
||||
requirejs.config(config);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 281 B |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user