"InstaRailed" is a fast paced Multiplayer First Person Shooter that aims to bring back the magic of old school FPS games like Quake or Unreal Tournament. Combining the Movement Mechanics of old shooters with character abilities more commonly observed in RPGs or RPG-Shooter hybrids (like Overwatch, Battlerborn or LawBreakers), InstaRailed aims to inject new life into an otherwise stagnating genre. The game features an intuitive ability system combined with “Risk-Reward” based gameplay mechanics to create a fun and exciting gameplay experience for every demographic (Hardcore gamer, Casual gamer etc.).
The theme is steampunk-esque where several mercenaries fight to the death in an arena sponsored by the organisation known only as L.O.A. to reward the world’s most ruthless killer with riches and the title of ‘The God of Death’.
Secondary Mechanics which complement the Core Mechanics are:
The first step that we performed was setting up the window. We called a set of functions from GLFW to initialize the window and called GLContext.createFromCurrent to initialize the context. After the initialization, we started to load the raw data into texture. Texture is a structure like BITMAP. And there are some functions provided to manipulate a structure.
The main steps involved in using a texture are:
Once the data is loaded into the texture, the actual dimension is no longer needed because the texture coordinates are always specified by 0-1. Whatever may be the size of the texture, it is 1. The advantage is that we just have to map the coordinates and OpenGL will take care of all the scaling needed. We created as number of 3d textures as many frames each raw data has. After that we applied alpha to our code. OpenGL has a feature called alpha test. That means, we can specify an alpha value and alpha criteria. The alpha value for each vertex is set to same as the RGB value for the vertex. Then the alpha value is used when rendering. The vertex will only be rendered if its alpha value is greater than or equal to 0.05f which means the dark part of the frames will not be rendered. After we applied blending which is another feature of OpenGL so as to composite the vertices along the ray according to the alpha value. In this way we applied the transparency to the object. The next step was to apply some transformations to the image. We added rotation which was basically using glRotated in OpenGL. Then we added other features to our output like zooming via glScalef, slicing via changing the number of input frames.
Rotating Head Image Credits: Wikipedia
We faced quite a lot of challenges while implementing our volume renderer. The major challenge was understanding and getting used to OpenGL since it was new for all of us. It was time consuming and hard. We first had to understand the basics and then decide on how to use it to implement our volume renderer. The second challenge we faced was to understand the steps involved in building a volume renderer using the texture based approach. We needed to understand the basic framework of volume rendering - what to be given as input, how to render it, how to add transformations to it. The other challenge we faced was to add features to our rendered image. The zoom in feature we added where you can actually go inside the rendered image and see what it contains inside was the toughest part to implement.
Implementing volume rendering was a big challenge but fun at the same time. We got to learn a lot from our project. We understood how volume rendering works and how much importance it has in real life. We learnt a lot about OpenGL. It is so powerful and once you know it properly it makes life so easy. Instead of defining so many functions and writing 100s of lines of code it already has predefined functions that do all of the work. We also got familiar with lwjgl . It is a great way to implement OpenGL in Java. Finally, it was a great experience developing the project and it was real fun doing graphics.
Normal Image Output of a Teapot, it can be rotated.
Zooming in, you can get a much clearer picture of what is inside!
Slicing a specific portion of the image.
Tune the transparency.