Skip to content

Repository files navigation

bitECS Asteroids v4

Table of Contents

Description

This is a game of asteroids made in React Vite with bitECS library + Three.js.

Badges

License: MIT

JavaScript GitHub HTML5 TailwindCSS ESLint React Vite React Router Node.js Three.js Vercel

Visuals

This app has been deployed to Vercel. Visit the site: bitECS Asteroids

pic1 pic2 pic4

Installation

npm install

Tech

Support

For support, users can contact me through my portfolio contact form: here

Contributing

Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/NewFeature)
  3. Commit your Changes (git commit -m 'Add some NewFeature')
  4. Push to the Branch (git push origin feature/NewFeature)
  5. Open a Pull Request

Authors and Acknowledgment

The author acknowledges and credits those who have contributed to this project, including:

  • soulwire (Justin Windle) and ArloL (Arlo O'Keeffe) for Muscular Hydrostats

License

Distributed under the MIT License. See LICENSE.txt for more information.

Project Status

This project is incomplete and requires further development.

Config Options

  • boss order in bosses.js
  • weapon order in weapons.js
  • Position of bullet emission and gun flash currently set in spawn.js const MUZZLE_OFFSET = 0.4 export const GUN_GAP = 0.45 // distance between twin guns

Make a new gun:

  1. Add the weapon definition
src/weapons/config/weapons.js
{
    name: "railgun",
    category: "bullet",
    damage: 40, maxBullets: 64, hitRadius: 0.4, fireRate: 0.6,
    speed: 30, lifetime: 1.5, projectileCount: 1, spreadAngle: 0,
    color: "#e8f0ff", glowColor: "#8899ff", haloColor: "#4455cc",
},
  1. Add gun's visual mount config
src/weapons/config/gunConfigs.js
{
    id: '11_railgun', name: 'Railgun', weaponId: WEAPON_BY_NAME.railgun.id,
    overrides: { /* frame/barrel/muzzle/coreGlow tweaks */ },
},
  1. And optionally: add a weaponAction entry for new weapon actions:
src/weapons/config/weaponActions.js
  1. Optionally: add a new weapon effect on hit
src/weapons/weaponSystems/hitTraits.js
  1. Optionally: add a new renderer and/or system if the projectiles look/act different from current
  2. Add gun to boss in bosses.js

Game Over, 3 lives lost:

Inside combat.js at end of file lives = 0

Tasks

Asteroid damages ship a little if collides with it, boss destroys player on collision

  • optimize things

  • optimize starfield renderer, make milky way

  • fix emission configs for bosses

  • fix ship cockpit glass panel lines for player and boss

  • level select screen play and back btns not showing.

  • octopus not rendering properly

PLAYER EMISSION POINTS CONFIG IN emission.js, BOSS EMISSION CONFIG IN bosses.js

Make config screen for emission point, using a dot to show emission points on ship svg, not actual bullets/exhaust

  • optimize starfield renderer

OPTIMIZE RENDERERS:

  • ArcRenderer
  • BulletRenderer
  • DeflectRenderer
  • TrailRenderer
  • effectPool
  • all Emitter files
  • SmokeRenderer
  • SparkRenderer
  • ShockwaveRenderer
  • ExplosionRenderer
  • DebrisRenderer
  • FlashRenderer

- [ ] reduce gun related renderers: weaponmount, gunmount, gunrenderer, bossmount

  • consolidate fx and renderers: debris, exhaust, explosion, fire, flash, shockwave, spark, trail
  • re-do/update pools

Priority:

  • gameloop difficulty scaling
  • optimize components

Post:

  • exhaust rendering
  • gun types/ bullet types
  • floating health packs, powerups, weapon upgrades
  • collision, damage, death
  • Enhance and Optimize Renderers
  • Enhance HUD vfx
  • Add game screens
  • Score
  • settings, mouse control support/toggling
  • modular ship parts for upgrade and modular gun parts for upgrade
  • general game progression: n asteroid waves, then boss with new gun. Defeating boss drops/awards gun. Gun can be applied. N1 asteroid wave and next boss with new gun etc.

//////

some of these boss dropped weapons, some upgrades

  • if add bosses, make one kind and swap out guns, probably after gun system

  • make one kind of boss behaviour and logic, and switch renderer (ship appearance) and gun type - [ ] also potentially later boss has satelites that orbit it and help, or shield etc

  • add in shockwave effect for explosive weapons

  • Adapt missile and lasersystem for boss use: missiles dont target player and need to not hurt boss, and laser needs to be held down not fired (boss never fires it)

  • change boss renderer to make enemy ship/ufo

  • add a leva menu to configure guns which can be applied to the ship and bosses

  • make each gun, it will look the same for boss as player

  • Verlet mesh, chain etc physics, or engine

## Move effects into GPU particle system API:

  • sparks

  • exhaust

  • explosion on entity destruction

    • explosion rendering needs improving
  • debris (asteroid, player, boss) debris upon destruction

  • smoke

  • bullets (?)

  • fire

  • flash (or glow)

  • add pool for sparks, exhaust, etc

  • trailrenderer needs to replace smoke in missile renderer

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages