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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lolz123

Pages: 1 ... 12 13 [14] 15 16 ... 18
196
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 31, 2011, 03:00:01 am »
I am posting the light system as a separate project.

197
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 26, 2011, 05:58:13 pm »
It is all cross platform. I only compiled the test application in VS2010.

198
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 26, 2011, 05:47:29 am »
Alright, I uploaded a test application for the lighting system with the source. I can write a little manual if you like.

Here it is: https://sourceforge.net/projects/letthebelight/
As always, you need the VS2010 runtime environment to run the test app.

199
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 26, 2011, 03:37:54 am »
Is it OK if the lights are limited to a certain region (were you can still receive the benefits of the quad tree) that cannot be changed during run time? This is the same problem encountered by physics libraries like Box2D: the spatial partitioning system has boundaries. I am currently writing a self-expanding quad tree to solve this problem, but it is still very buggy (and also ever so slightly slower). I have used the older version for a long time now, and I haven't encountered any bugs yet. If you are not doing stuff like procedural terrain generation, it isn't needed anyways.

200
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 26, 2011, 02:06:49 am »
Thanks for the info!

If I had more time to write the game, I would have probably spent it balancing and debugging the game some more. But, my 48 hours went by way to quickly :).

You want to use the light system? Go right ahead! I will give it a simpler interface and clean up the code a little, and then upload it separately. I will notify you when it is done, it shouldn't take long :).

201
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 25, 2011, 11:25:15 pm »
I heard from others that they had the same problem. I think is has something to do with the slightly messed up compilation settings. This game is very glitchy, despite it using a lot of the base code from my other game "Gore Factor", from which I have never heard a single complaint. Lesson learned for LD23: Test your games!

202
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 25, 2011, 04:00:25 am »
Thanks for the feedback!

I showed this game to some of my friends, and they noticed many of the same issues. This is the most glitchy game I have made so far. Since the timers still run even while the rest of the game is frozen, you can go through a wall by hugging up against one and then dragging the window. Since the movement is frame-independent, the player will tunnel through the walls with a large enough time step.

The super fast enemy definitely needs to be nerfed! Its collision box is actually smaller than the distance at which the player holds the gun away from his body, so you cannot hit if it is too close. A bit of a problem.

Oh, and the pixelation shader was my attempt to hide my horrible art :).

The lighting was done with OpenGL directly, but not with any built in lighting or lighting used for 3D. It is the same system I use in Gore Factor. The lighting system actually comprises about 90% of the effort put in the game :wink:. Here is an explanation of how it works:

There are lights, emissive lights, and convex hulls. The lights come in 2 variations: purely dynamic and semi-static. The former means that the shadow geometry is regenerated every frame, and the later only updates when a hull it affects moves. Otherwise, it re-uses the previous geometry that is stored on a render texture.

Lights, emissive lights, and convex hulls are all stored in their own quad trees. With this, I can query which lights are visible on-screen and then rapidly query which hulls each of the lights affects. I then use an intermediate render texture to render a light with all of its shadow geometry.

The shadow geometry is generated in 2 steps: First the umbra portion, and then the penumbra. The umbra is generated by cycling through all the points in a convex hull and taking the dot product with the normals of all the sides and a vector to the midpoint of a side. This is then used to determine which sides are back-facing. After that, the shadow boundaries can be determined. The shadow geometry isn't rendered by color, but rather replaces the stencil test by using the depth buffer to create regions where the light won't draw. After that, the light is drawn.

After the light is drawn, the soft regions are computed by offsetting the original light-to-hull vertex vector origins by the radius of the light source. 2 vectors are calculated, which can then be used to render the soft shadows texture, which is just a gradient. This is applied to the light edges with multiplicative alpha blending, causing it to fade into darkness.

When the light is finally composed, it is rendered to the lighting render texture. This lighting render texture is rendered to the scene after all lights have been rendered using multiplicative blending.

All the maths are based off of what is presented in this article: http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/dynamic-2d-soft-shadows-r2032

203
SFML projects / Alone in the Shadows: Ludum Dare #22 Entry
« on: December 24, 2011, 11:18:55 pm »
Here is a link to my entry to the Ludum Dare #22. It uses SFML for windowing, render textures, text, and sound.

Download link: https://sourceforge.net/projects/aloneshadows/

As always, you will need the VS2010 runtime environment, linked in the readme.

Here is a screenshot:


204
SFML projects / Gore Factor SFML
« 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.

205
SFML projects / Gore Factor SFML
« 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:






206
SFML projects / Gore Factor SFML
« on: December 06, 2011, 12:19:47 am »
Thanks for the feedback. I think I allow players to choose weapons with the number keys as well. In addition, the weapons list will be shown at the top of the screen in a fashion similar to Half-Life 2. This should make weapon selection a lot easier.

207
SFML projects / Gore Factor SFML
« on: December 04, 2011, 09:37:49 pm »
Update: Add new items. Swap weapons with the scroll wheel. The game now has HE grenades which show off the physics and particles, and a Glock-19, my favorite weapon in the game now (the animations worked out better for me this time!).
Right now, I am using some A* pathfinding instead of neural nets. My training method has only had limited success. Unless I get the neural nets to work, I will stick to A*.




208
Graphics / Maximum Render Texture Size
« on: November 05, 2011, 10:51:20 pm »
Woops, never mind, I figured it out. It was a stupid mistake. I set the view port for the texture incorrectly.

Sorry about that, I shouldn't have posted before first looking deeper into the problem.

209
Graphics / Maximum Render Texture Size
« on: November 05, 2011, 06:02:08 pm »
Hello,

I have created a 2D lighting system that pre-calculates the lights and stores them in render images. However, for very large lights, the image is clipped, even though I am well below the sf::Image GetMaximumSize() (texture size) limit. Do render images (render textures in the latest version of SFML2) have a limit of their own? If so, how can I find it? Splitting it into lots of smaller textures isn't and option considering it takes like 1 second to create just one render image (see topic: http://www.sfml-dev.org/forum/viewtopic.php?t=4832&sid=a0b8815426b72f69f077c9bde2dda9cd)

Here is a picture of the clipping:



Thank you for any help you can offer.

210
SFML projects / Gore Factor SFML
« on: November 02, 2011, 10:32:58 pm »
Ah, I just couldn't resist adding more tech. This time, it has to do with AI.

Most side scrollers have either very simple AI or some scripted stuff. However, I am trying to use neural nets instead. I already wrote a training program, but discovered that back propagation is too slow, and will therefore switch to genetic algorithms. I should have a demo soon. I am using simple feed forward neural networks, whose input is the direction it must travel as well as a sort of picture of the tile map around it. I hope they will learn to jump over platforms and other obstacles, something you cannot do with just path finding.

Pages: 1 ... 12 13 [14] 15 16 ... 18