'Elroids' Developer Notes.
Source access
There is a, currently private, github repository here.
Alternatly it's all just script. You can 'inspect'/download the code from your browser.
There is also a facebook discussion group here. If
you want github access please join this and post a request to be added.
Known bugs
- If game has not been run for a while can get "...has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." on firat load. Seems to clear if page refreshed.
- Missiles are created too far in front of ship (see 'quantization' issue below). Sometimes miss very close
targets ... fix
- Sometimes control keys seem to get stuck (keyboard.js) ... Think this is when the debugger is used and it
consumes some of the event..
- First key click gets ignored.
- If going fast enough can fly through station. Hit it but get kicked out the far side.
- Menu system/cursors only just works. Requies carefully 'tuned' menu pages.
- Labels are in the foreground. If something passes between the viewer and a labeled object label will be infront.
The 'Test Universe'
If the game is launched with parameter 'rockCount="0"' a 'Test Universe' is generated.
This contains a populated Universe and Ship with test versions of most things. Can be used for code testing.
"'Someone else' can add unittests later." ... as idiots, who have no place in any comptent development environment, like to say.
For notes on code operation/stucture see the Developer Code notes..
ToDos (In some sort of priority order)
V8.0 Extend economy.
Implemnt penalty for illeagal sales.
Ballance trade.
V9.x Improve opposition.
add multiple hull meshes.
Add smart enemy ships.
V10.x Fix game launch problems.
Add 'loading' screen.
Investigate why loading appears to have become slow.
Look into 'CORS' bug. (I think this is due to the library host initially refusing our domain but immediatly 'learning'. Possible soloution copy the lib to a local file.)
V11.x Add extra ship components.
- 'Elite style' (over heating) beam weapon.
- Thrusters (directional control)
- Electronics ... including:
- radar
- HUD
- Docking computer. Then make docking more difficult.
- Range finder
- Mineral detector
- Missile lock.
- Homing missile
- Proximity missiles (mainly for use by the bad guys).
- Shields.
- Separate warp drive.
- Improved terminal (but keep VT100 as default).
Documentation.
Add screen shot with various display panels labled.
Add images (screen shots) of Items in place of game logo.
General 'good stuff' ... Post V12.0
- Game mechanics:
- Improve 'vision through' wrap to take account of camera direction (i.e. dont just use
Universe.handleWrap()). i.e. allow rocks to be seen at full universe width not half.
- Improve 'collision detection' mechanism (Item.detectCollision()). Although, for now, the 'cylinder
Vs sphere' bounding check seems to be doing good service.
- For ship/station interaction, once an rough aproximation to a collision is detected, it is confirmed using ray tracing (Item.isPointInside()). Maybe extend to ray trace all the corners of the Items bounding box.
- Carve the universe into 'regions'. So don't have the square law issue of checking collisions
between everything and 'everthing else'.
- Limited number of missiles in flight (like Asteroids).
Do something about saucer 'seeking' target location behaviour ... or maybe just leave it since it looks like
defensive manouvering.
Componentize sacucer
Sort out menu system:
- Current code for buttons and scripts is ugly. Works in the context of MenuSystem, where it is evaled,
rather than it's own. Good enough for a 'minimum feature set' but needs a re-work.
- Currently buttons won't work on nested tables
- Re-work menu system as real HTML with style sheets to control look and feel. Back end to communicating
via HTTP with a, localy implemeneted in the client, 'HTML server'.
Add 'crafting' Components/Goods out of minerals.
Try it with really big rocks.
Code:
Prettiness:
- Create 'exploding ship' animation. (Exploding Mesh? Then it could also do rocks/saucers etc.)
- Add surface texture to ship.
- Make saucers more 'shiny'. Probably involves MeshPhongMaterial ... but for me that just comes out white.
- Add extra vt100 features (e.g. block graphics) to ship control terminal.
- Fix audio to use THREE.PositionalAudio (Item.js.playSound()). I tried but cant get the listener to stay
stuck to the camera in all cases. Maybe add it to the Ship instead. Fell back on manually reducing volume
wih distance (and living without correct stereo).
- Make crater textures proceduraly generated (less download).
- Add 'tunnel' graphics when going through wormholes.
Additional features:
- Implement mother ships spawning more mother ships?
- Implement saucers spawning multiple loot packeges.
UI improvements:
Abstract keyboard controls to Events (Roll left, Pause, etc.) rather than characters. Makes switch to other
UIs easier.
- Add mouse controls.
- Make radar zoomable.
- Add joystick/tablet controls (maybe via on screen buttons reproducing keyboard keys). Maybe use tilt sensor for movement.
Extensions:
- Test on platforms other than PC/Chrome
- Make it multi-player (AJAX?).
- Add optional gravity effects (like Gravitar).
- Add on line high score table?
- Maybe collision damage should be proportional to mass and relative speed of colliding object. Common for all items apart from 'rock on rock' impacts.
- Revisit inline 'ToDos'.
- Add 'toxic' crates. Triibles, bombs, xenomorphs.