submitted 3 months ago* (last edited 2 months ago) by to c/gamedev@programming.dev
 

This is an early experiment in demonstrating special-relativistic effects in space invaders. I forked a pygame implementation of space-invaders, and adapted in to my OpenGL program for special-relativistic drawing: jarrydac/gl_relativity.

This version is not very playable. But I already like the way that the transverse doppler shift colors the player and enemy bullets differently.

submitted 3 months ago* (last edited 3 months ago) by to c/science@lemmy.world
 

This a screenshot of an OpenGL program I wrote in my spare time during my undergraduate course to draw scenes with special-relativistic effects.

In this scene the spheres are orbiting clockwise around the centre sphere which is stationary (relative to the camera). The scene is illuminated with two black-body lights from behind the camera, and one green light from the top to show off the Doppler effect (red and blue shift).

If you are interested I have put the program on GitHub.

 

I graduated from my bachelors in December, and I'm feeling burnt-out about job hunting. This is a project I wrote during my degree, in my spare time, to try out some ideas from my lectures and to learn OpenGL.

I took this screenshot while I was testing out monochromatic lighting. The ships are rotating clockwise.

I found it interesting that the receding ships bunch more closely together, that really convinced me that I had it working right.

The code is on GitHub jarrydac/gl_relativity. It's quite rough.