Weekly 3: Network Map and Shaders

10 July 2020, Algot

This week I have worked on the network map, while Ecen has worked on web pages and the general hacking system. The nodes in the network map position themselves by pushing other nodes away, more the closer they are, and pulls on the connected lines, more the farther away they are. Thus they will find an equilibrium. Then a simulation is run until each node’s movement reaches a lower limit. Then the simulation stops and the map is displayed.

One problem with Java is that it is apparently a bit difficult to actually get to run the code on the clients computer. Ecen told me that it seems like no-one actually runs their code since there seems to be very little information on how to compile it to a runnable file. And then, when that works, all the paths seems to change when in a jar file so that has to be fixed as well.

While working on this, I discovered that we only have one shader. And that shader requires a texture to print anything. The way we used to draw lines and such was to use an image which was just a white pixel, and then set its color in the shader.

To fix this, I rewrote some of the renderer to support an extra shader. One which only takes a position and a color. This was slightly annoying since OpenGL gives no error messages when something is wrong. It just refuses to render.