Skip to content

Instantly share code, notes, and snippets.

View Bolloxim's full-sized avatar

Andi Smithers Bolloxim

View GitHub Profile

Starfield old school style

The illusion of movement without moving (although I move the stars if cameraTrick==0, basically we wrap the starfield around without ever changing the dataset).

versions

0.6 added WARP speed on the left click

0.5 added sparcity, focalpoint, fixed sort bug

Particle system .. step 1

step 1 in creating a nice particle system for exploding spaceships and plasma balls.

firs stage. get tons of transforms running second create groups third build effect emitters

forth.. err fix bugs. somethings seriously wrong with the photon torp emitter.

@Bolloxim
Bolloxim / Zylon-Fighter,-Fake-3d.markdown
Created July 22, 2014 19:44
A Pen by Andi Smithers.

Zylon Fighter, Fake 3d

using angles we can fake sorting order of our zylon fighter. Using ellipse rendering for the cockpit we can get a very nice 3d effect. Wings are made of simple hexagons with some line rendering. Its modular.

render a few hundred in a bizarre sin/cos pattern field.

step 3. fragment the ship as though destroyed .. fun stuff

A Pen by Andi Smithers on CodePen.

@Bolloxim
Bolloxim / index.html
Created July 22, 2014 19:45
A Pen by Andi Smithers.
<body>
<canvas id="texteffect"></canvas>
</body>
@Bolloxim
Bolloxim / index.html
Created July 24, 2014 16:25
A Pen by Andi Smithers.
j<body>
<canvas id='test'></canvas>
</body>

Star-Raiders : homage to old school

This is the frame work game for star-raiders remake in pure html 5 canvas. Oh yes we could make this in webGL but whats the fun of that. More interesting to see what we can render in 3D without using a 3D rendering api.

controls are based on touch screen as well for ipads etc, keyboard short cuts will be available however mapping to the originals.

version 0.1 Forked Galactic Scanner and added buttons hud items. This means that AI works for tokens on scanner and we can populate locals with enemys now.

version 0.2 Long Range Scanner. This gives enemies in local space and a means to align and target those enemies

Icosahedron - rendered in 2D

Old School 3D convex hull rendering using cross product in screenspace for backface culling removal and subsequent shading.

version 0.1 basic hedron rotating

version 0.2 true reason ... 3d shield effect

version 0.3 touch of shiny blue neon to the icosahedron

@Bolloxim
Bolloxim / index.html
Created August 1, 2014 09:04
A Pen by Andi Smithers.
j<body>
<canvas id='test'></canvas>
</body>
@Bolloxim
Bolloxim / Asteriod-Field.markdown
Created August 3, 2014 06:25
A Pen by Andi Smithers.

Asteriod Field

Taking the icosahedron we deform the vertices randomly for each asteriod giving a unique shape to each one. We then give it some rotational component and then collide them with each other to create a nice bouncing action.

version 0.2 allow morphing greater a safe value which now can cause concave issues.

version 0.3 timer to spawn a new random field. Tied into the same structures as the long range scanner.

A Pen by Andi Smithers on CodePen.

Cutaway hemisphere - js canvas 2D

Started off as something else but now its a marble earth kind of thing. will be my star-raiders starbase

can do a lot more with the hemisphere rendering. If I have time can show gold ring, shadows and moons etc.. all cool stuff.

might make a solar system flyby once star-raiders is finished

version 0.2 added canvas rotate / translate to rotate around the y axis