Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Gore Factor SFML  (Read 23167 times)

0 Members and 1 Guest are viewing this topic.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #30 on: December 21, 2011, 10:20:50 pm »
I haven't posted an update in a while. Well, here it is:

The largest feature added to the game were soldiers with some pretty good AI if I do say so myself. I used A* and modified it so it would only add nodes if they were withing a certain distance from the ground. Also, I made the movement costs a sort of gradient where higher locations on the map have higher costs so that the paths would stick to the ground rather than float in the air. Finally, I coded the soldiers to recognize gaps in the floor, adjust the power of their jumps, and shoot at the player (with a reaction time delay) when he is in sight.

Furthermore, when the soldiers die, they turn into ragdolls that topple over. It looks pretty cool when you blow them up with grenades- in slow motion. Which brings me to another new feature.

I already had totally frame independent movement, but the sounds wouldn't play in slow motion when time was slowed down. So I created a system that creates copies of sound buffers at different sample rates, and creates and destroys these as needed in order to conserve memory. You can now slow and speed up time with the P and L keys, and use space to revert it to the normal speed. You can actually completely freeze time now. This will certainly become some sort of game mechanic.

Here are some screenshots:





Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

easy

  • Full Member
  • ***
  • Posts: 146
    • MSN Messenger - easy82.contact@gmail.com
    • View Profile
    • Email
Gore Factor SFML
« Reply #31 on: December 21, 2011, 11:59:15 pm »
This is supercool! I can see the tons of work you've put into it: the animations an the movements are smooth, the lights and shadows are excellent, the water effect really adds to it, and the AI is really good! Also, you have a very clean code, and I like how it was structured, though I just had a short glance at it.

What I did not like, however, is the jumping. I guess I'd just have to play more with it to get accustomed to jumping, but I really dislike that the character jumps only if I release the button. I'd rather make the character jump when the player presses the key. You can still measure how long he's pressing it (hence how large to jump), for a limited time (not to jump out the world).

The movement and the aiming also feel like it's lagging behind. Not too much, but it's noticable.

The AI had a problem jumping up to a platform at some place, so it couldn't follow me anymore.

The whole source is in the root directory, it's confusing.

Overall, I really like it! Keep it coming! :P

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #32 on: December 22, 2011, 02:14:11 pm »
Thanks for the feedback!

You are right about the jumping, it does feel a bit awkward. Others complained about it too, so I will change so that he instantly jumps and jump height is determined by how long you leave the jump key pressed. The original idea behind that charge-jumping was to make it more realistic, since the other, more common method that I will change it to forces a constant velocity on the player until the jump button is released.

The aiming lag is on purpose. The idea was to simulate the time it would take for someone to actually move the gun to a different angle. This is important when doing the slow-motion thing, since otherwise you could aim just as fast as in real time.

The AI sometimes doesn't get paths, that is why it sometimes just goes back and forth on the same spot. I am not yet sure as to what causes this. Also, you may have noticed how the AI sometimes falls into the pits on the second floor, and sometimes doesn't. This is because of the low update time for the paths. I will probably multi-thread the path finding eventually (and maybe the light system too) to get rid of this delay which currently makes it update only every third of a second.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.