Search the Community
Showing results for tags 'Built from Ruins'.
-
So, I'm creating a blog to show how I'm approaching certain things (maybe this will be helpful to some people?). Stealth: This is a set of features that I wanted to go all out on, so that's what I'm doing right now. Shadows: Someone asked about how to implement shadows, and Josh gave a simple answer (kind of made me feel dumb lol). Anyway, the implementation for my game works for directional lights (the sun) right now, but it should be easy to extend to other lights if I choose to. Anyway, the way I calculated whether a point is in a shadow is by performing a raycast to the a vector generated by the light's rotation and scaled so that there would virtually be no building tall enough to evade the raycast. Crouch: This was pretty simple. The character controller needs to be changed using SetInput(), and the camera height needs to be changed while in crouch mode. That's it. Cover (Bushes): This was simple as well. I just performed a distance calculation to check if the player is near the center of the bush. Distractions (Rock): The AI doesn't actually "hear" the sound. Basically, each time the rock makes a sound, the rock the location of that sound is recorded and if it's close to enemy, the enemy will follow it. Buildings: I'm not sure how exactly I want to handle navigation due to building placement. I saw that there are recast commands accessible via C++, but I like to use Lua so hopefully these will be exposed through Lua in the future . But for now, these buildings have physics attached to them that scale as the building is constructed. Sounds: I sort of organized this like how a radio plays. When one ambient track finishes, another picks up. The way a randomly select the next track is by using the player's position data, but I found a way to change this in the future by using the system's milliseconds instead, but I don't know what to use! Day/Night: I wrote my own Day/Night script (I tried to use Shadmar's implementation, which is much better than mine, but I my weird lighting preferences made the colors of everything mess up). Anyway, it's simply a directional light that changes as time changes. Also, the ambient light changes as well so that the night becomes VERY dark! So, you must use your flashlight or find light!
- 2 comments
-
- 4
-
- Built from Ruins
- stealth
-
(and 1 more)
Tagged with: