Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ChristianOellers/Silent-Space
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.0
Choose a base ref
...
head repository: ChristianOellers/Silent-Space
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 6 commits
  • 9 files changed
  • 1 contributor

Commits on Jun 12, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c926864 View commit details
  2. 1
    Copy the full SHA
    d127ad7 View commit details
  3. 1
    Copy the full SHA
    6bbdedc View commit details

Commits on Jul 25, 2023

  1. Create codeql.yml (#3)

    Re-introduce CodeQL
    ChristianOellers authored Jul 25, 2023
    1
    Copy the full SHA
    02cf7fa View commit details
  2. Update codeql.yml (#4)

    Change cron running to low priority, generic value
    ChristianOellers authored Jul 25, 2023
    1
    Copy the full SHA
    4973631 View commit details

Commits on Jul 26, 2023

  1. Readme, Todo

    ChristianOellers committed Jul 26, 2023
    1
    Copy the full SHA
    88a61e4 View commit details
Showing with 192 additions and 131 deletions.
  1. +82 −0 .github/workflows/codeql.yml
  2. +3 −25 CONTRIBUTING.md
  3. +23 −95 README.md
  4. +34 −0 TODO.md
  5. +3 −3 src/css/app/backgrounds.css
  6. +5 −0 src/css/app/content.css
  7. +21 −0 src/css/page.css
  8. +15 −6 src/index.html
  9. +6 −2 src/js/obj/ship/player.js
82 changes: 82 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main", "gh-pages", "release-historical" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '0 0 * * 1'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
28 changes: 3 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
# Contributing

- [Status](#status)
- [How to contribute](#how-to-contribute)

<br>

---

<br><br>

## Status

**This project is not actively maintained.**

Due to my workload and limited capacities for Open-Source projects, I can't spend as much time on maintenance and the community as I wish I could.

<br><br>
Due to my workload and limited capacities for open-source projects, I can't spend as much time on maintenance and the community as I wish I could.

## How to contribute

### Bugs only

Besides bug fixes, any other kind of created issue or Pull Request might be ignored or closed without further notice.
<br>

### Fork
## Forking

I suggest creating a fork under your profile to adjust to your needs and build a thriving community there.

<br><br>

<hr>
<br>

Thank you for your understanding 👌
118 changes: 23 additions & 95 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,12 +5,9 @@
Atmospheric and experimental 2D game concept.

- [About](#about)
- [Examples](#examples)
- [How to use](#how-to-use)
- [Issues](#issues)
- [Setup](#setup)
- [Credits](#credits)
- [Contributors](#contributors)
- [Todo](#todo)

<br>

@@ -25,30 +22,23 @@ A proof of concept about what can be done with plain Canvas, JavaScript and a bi

It's been intended to be somewhat 'arcade-ish', but with a more decent pace and visual focus.

### Playing

There are a few implicit and random mechanics, as these have been simple to realize without too much conceptual complexity.

Besides hopefully enjoying the in-game visuals and audio, there's not much to do yet. Let it run as background animation if you like, get inspired; or challenged by the greatest enemy of all: The monstrous source code.
### Compatibility

#### Mechanics
- Browser with Canvas 2D API support
- Desktop PC with min. 800px screen width
- Decent computing/ graphics power (can be resource intense)
- Mouse, keyboard, audio output

- Every game start (or reload) generates a different background and some ship settings change slightly
- Shooting the weapon might hit something out of screen
- On every hit, there's a chance to switch weapons randomly

#### Effects
### Playing

- Background changes position over time
- Shield activation causes HUD flickering
- Being hit by space debris ...
- changes ship model to broken state
- causes screen flickering (stereo 3D effect)
- changes shield color (visible on next activation)
There are no goals or enemies yet, but a score for your numeric needs.

### Code
- Every game start (or reload) generates a different background ambiente, music, and slight ship settings
- Weapon can change randomly on hit (sth. out of screen ;)
- Difficulty increases over time and affects e.g. particle speed
- Being hit by particle is seemingly unpleasant, and a different experience with or without shield

History
### History

- 2013: Project start, concepts and mostly graphics. Received few random updates over later years.
- 2020: I decided to start rebuilding it with current technologies and skills, but it's quite a process!
@@ -59,58 +49,37 @@ History
- [Play »](https://christianoellers.github.io/Silent-Space)
- [See code »](https://github.com/ChristianOellers/Silent-Space/tree/gh-pages)

### Features & Gameplay

- On each game start the ship attributes, weapons and sounds are slightly randomized.
- You can shoot, toggle the shields and move the ship.
- Shooting might explode something mysterious out of screen and reward you with a screen shake

There are no actual enemies yet. Please use your nerdy imagination for that.

<br>

---

<br>

## How to use
## Setup

1. Choose a _Desktop_ browser that supports the Canvas API. _(The game does not support a responsive layout, mobile devices or touch gestures.)_
2. If used locally: You'll need a local web server due to cross-origin restrictions with some of the files.
If used locally: You might need a local web server due to potential cross-origin restrictions with some of the files.

- Install Node.js and the project dependencies
- Run `npm run start` to start a local webserver
- Install Node.js and the project dependencies
- Run `npm run start` to start a local webserver

<br>

---

<br>

## Issues

### Audio not playing

Browsers might block automatic playing audio. Workaround to manually trigger this: When loading the game, simultaneously click somewhere in the page (fast, one or more times).

Audio files are in `.wav` and `.ogg` format. Your browser might support something which is not available. In that case, please use another browser (like Chrome or Firefox).

### Code quality

As this has been developed as pure proof of concept, across 10+ years so far; it is considered legacy.
There's many bad practices like closely coupled code. Writing a game that involves changing feature sets and design decisions is a time consuming task.
That's why I considered to spend my spare time on developing the game itself, not making the code beautiful.

See it as technology junkyard, to pick from what you need and build your own ;)

<br>

---

<br>

## Credits

### Contributors

Thanks for all the support, help and creative feedback!

- Danny N. Grübl

### Audio files

| Type | Category | Source | License | Content ID | Author + Website |
@@ -124,44 +93,3 @@ See it as technology junkyard, to pick from what you need and build your own ;)

Some sounds have been edited.

<br>

---

<br>

## Contributors

Thanks for all the support, help and creative feedback!

- Danny N. Grübl

<br>

---

<br>

## Todo

### Priority

- Add GitHub link (if viewed via Vercel)
- Update background images to be brighter, nebula, interesting
- Add win/lose condition and end screen
- e.g. be hit max. 3x (lifes)
- Particles: Can multiple items be quickfixed hacked into?
- Implement Hotkeys for weapons - 1,2
- Implement Mouse click left/right steers like left/right (split screen)
- Fade music from A to B (dramatic sometimes, e.g. 25% chance, never at start)

### Experimental

- Foreground DOM object (display, stereo)
- Animated by JS, moves/scrolls over screen
- With SVG mask
- With Canvas blend-mode OR background-blend

### Cleanup

- Integrate event library
34 changes: 34 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Todo

## Priority

### Fixes

- Fix framerate issue on fast systems (game is too fast)
- Fix background size on XXL-large screens (visual trick?)

### Minor

- Increase engine sound slightly
- Add GitHub link (if viewed via Vercel)
- Update background images to be brighter, nebula, interesting
- Add win/lose condition and end screen
- e.g. be hit max. 3x (lives)

## Refactoring

- Integrate event library

## Future

- Implement Hotkeys for weapons - 1,2
- Implement Mouse click left/right steers like left/right (split screen)
- Fade music from A to B (dramatic sometimes, e.g. 25% chance, never at start)

## Experimental

- Particles: Can multiple items be hacked into?
- Foreground DOM object (display, stereo)
- Animated by JS, moves/scrolls over screen
- With SVG mask
- With Canvas blend-mode OR background-blend
6 changes: 3 additions & 3 deletions src/css/app/backgrounds.css
Original file line number Diff line number Diff line change
@@ -2,15 +2,15 @@
* Blending effect improvements.
*/

#Weapons {
.layer-weapons {
mix-blend-mode: lighten;
}

/**
* Blurry background + animation.
*/

#Bg-Blur {
.bg-blur {
position: fixed;
top: 0;
left: 0;
@@ -22,7 +22,7 @@
z-index: 0;
}

#Bg-Blur.-active {
.bg-blur.-active {
backdrop-filter: blur(0);
}

5 changes: 5 additions & 0 deletions src/css/app/content.css
Original file line number Diff line number Diff line change
@@ -31,6 +31,11 @@
user-select: none;
}

.details .link {
color: var(--sg-color-text);
filter: brightness(1.25);
}

/**
* Texts.
*/
21 changes: 21 additions & 0 deletions src/css/page.css
Original file line number Diff line number Diff line change
@@ -5,3 +5,24 @@ body {
/* Intentionally enforced as browser scrollbars interfere with the game controls */
overflow: hidden;
}

/* Mobile version */

.mobile-hint {
display: none;
}

@media screen and (max-width: 799px) {
main {
display: none;
}

.mobile-hint {
color: var(--sg-color-btn-text);
font-family: var(--sg-font-primary);
text-align: center;
display: inherit;
position: absolute;
margin: 5%;
}
}
Loading