Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411576 Posts in 69386 Topics- by 58444 Members - Latest Member: darkcitien

May 04, 2024, 10:16:26 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsTerra: New Beginnings
Pages: [1]
Print
Author Topic: Terra: New Beginnings  (Read 315 times)
CodeCracked
TIGBaby
*


View Profile
« on: March 26, 2016, 04:13:19 PM »

A Game of Regrowth
Made with LWJGL
-----

To start with, this is my first DevLog I have made. I have been programming for over four years now, and have made a few small games. However, this is my first large scale 3D game. I have been working on this game for several weeks now to make sure I was up to the task and that I was able to do the programming required, since I am making this with Java, not with a game engine.  It has gone rather smoothly and has been a very fun and exciting few weeks for me. I feel confident in my abilities, so let's get started talking about Terra: New Beginnings.

Terra is going to be a game that is a cross between a First Person Shooter and Real Time Strategy Game, with some elements of City Builders added in. You will be tasked with using these tools to bring the citizens of Earth to a newly discovered planet, Planet 10, or as the people call it, New Earth. People are leaving Earth due to a large pandemic caused by overpopulation. However, some do not want to leave Earth, as they are the few that were immune to the pandemic. It is your job to convince them to come to New Earth to rebuild our civilization.

A First Person Shooter? So it's a COD clone? No. Although Terra will have some FPS mechanics, it is not heavily based on FPS mechanics. You must keep a balance between going into a battle yourself and commanding your troops in said battle.
A Real Time Strategy? So it's a Starcraft clone? Once again, no. One very important aspect of Terra will be that you must build cities and facilities to generate resources, and build them in a way to make them easily defended.
A City Builder? So it's a Sim City clone? Surprisingly, yet again, no. You cannot be to focused on just one aspect of this game. You will place plants and other objects to terraform the planet to spread biomes with their own resources. You must then build towns and cities around these resources to gather and process them. As you do this, your threat level will rise and the planet's sentient natives will start to attack you to protect their planet, so you must build armies and defend your cities.

Those are the basic mechanics that I want to implement. I also plan on adding different camera modes like a tactical camera to highlight buildings, enemies, and your troops showing their efficiency, threat, and strength, as well as other things. This camera would only be accessible from your Tactical HQ. If you have any questions or ideas, please reply to this post or email me at [email protected].

Here is a list of the things I have gotten done so far. Keep in mind all textures and models are temporary.

First, I added a .obj file loader to load a model file into a VAO for OpenGL to render. I also added in a GLSL shader to handle lighting. It can handle both diffuse lighting and spectral(reflective) lighting. Finally, I made an OpenGL method to render to VAO created from the .obj file. I then tested this on a Stanford Dragon model.



Next, I make a quick terrain system that generates a flat plane of vertices and loads them into a VAO to be rendered. I also added in a quick fog system by blending the colors into the background color based on their distance from you.



I then worked on adding in multitexturing by specifying multiple textures, and in a GLSL shader mixing the colors together based on the RGB channels of a blend map. The result was a terrain that has a path and other textures mixed into it.



After this, I went into the Terrain class and made the terrain load a height map to make shaped terrain. I also made it so that the terrain's lighting normals were calculated when constructed based on the locations of other vertices. Finally I added terrain collision by using barycentric interpolation to find what height the terrain is at.



Now that I had a nice terrain system, I decided to start work on point lights by using a simple attenuation calculation to decay the light over distance. I also added colored light support.



Finally, I added in a skybox. This proved rather difficult, as I had to load a cube texture into OpenGL. But once I was able to load a cube texture, I then just made a large cube model with the cube texture applied to it. After this I just set the position change of the transformation matrix for the cube to zeros and it was done. You can notice, however, that the fog does not work anymore because it is fading to grey instead of the texture color. I will work on fixing this next.



Next I plan on fixing the fog issue as well as working on a day/night cycle, mouse picking, procedural terrain generation, and more. Once again, if you have any questions, comments, or ideas please post them as a reply or email me at [email protected].
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic