Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spicycactuar/starship
3D Spaceship asteroid shooting game rendered with WebGL
https://github.com/spicycactuar/starship
computer-graphics graphics-pipeline javascript webgl
Last synced: 13 days ago
JSON representation
3D Spaceship asteroid shooting game rendered with WebGL
- Host: GitHub
- URL: https://github.com/spicycactuar/starship
- Owner: SpicyCactuar
- Created: 2021-07-30T21:23:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-29T21:08:17.000Z (24 days ago)
- Last Synced: 2024-11-29T22:22:18.990Z (24 days ago)
- Topics: computer-graphics, graphics-pipeline, javascript, webgl
- Language: JavaScript
- Homepage:
- Size: 1.13 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Starship
Infinite 3D Asteroids-like game. The player controls a ship that infinitely moves forward dodging & shooting asteroids. The game ends when the ship is hit.
Final project for the [Fundamentals of Computer Graphics subject](https://campus.exactas.uba.ar/course/view.php?id=2433) of the University of Buenos Aires. The game is run by a minimal ad-hoc engine written in Javascript and leveraging WebGL.
Co-developed with [Remruts](https://github.com/Remruts/).
![starship](https://user-images.githubusercontent.com/7926479/209482947-4c46be47-fd97-447e-bec6-9a0ba284c646.png)
## Project Structure
```plaintext
starship/
├── models/ # Model .obj files
├── textures/ # Texture .png files
├── style/ # Site .css file
├── README.md # Project README
├── index.html # Site home .html file
└── main.js # Javascript entry point
```## Build & Run
```python
python3 -m http.server
```Access `localhost:8000`. Alternative hosting solutions should be equivalent. This is needed to access the game's assets locally.
Game is started automatically. Restart the tab to play again.
## Controls
| Key(s) | Action |
|---------------------------|------------------------------------------------------------------|
| `↑` / `↓` / `←` / `→` | Orient ship around Z axis |
| `Spacebar` | Shoot laser |
| `Z` | Do a barrel roll |## Features
* WebGL graphics pipeline:
* Rasterizer
* Directional lightning
* .obj model renderer
* AABB collisions, visual representations of the boxes are shown
* Simple object pooling (stars)