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

Author Topic: Gore Factor SFML  (Read 20901 times)

0 Members and 1 Guest are viewing this topic.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« on: April 13, 2011, 11:28:38 pm »
Hello everybody,

Here is a project I am currently working on that uses SFML for window handling, sound, and some rendering stuff.

It is a remake of the game "Thing Thing" by Diseased Productions (flash).

So far, all you can do is run around the map and shoot stuff with your trusty AR.

Features:
- 2D Dynamic Shadows
- Box2D physics
- Compound vector/sprite and frame independent animations
- Water
- Lua Scripting
- Quad Tree Scene Graph



Download link: https://sourceforge.net/projects/gorefactorsfml/
VS2010 Redistributable Package REQUIRED: http://www.microsoft.com/downloads/en/details.aspx?familyid=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84&displaylang=en

YouTube Video:

http://www.youtube.com/watch?v=bI2sRM_N8Xc

Controls:
- Mouse to aim, click to shoot.
- Move with WASD.
- Reload with R.
- Hold space for slow motion
- Shift + ~ to open the Lua command console
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Gore Factor SFML
« Reply #1 on: April 14, 2011, 12:32:20 am »
For dynamic shadows, have a look in the old french SFML wiki. There's some example code for a lightmanager for SFML2. I've just done a remake of it to rbSFML and it seems pretty great. There is though some optimizations that has to be done.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

WitchD0ctor

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.teleforce-blogspot.com
Gore Factor SFML
« Reply #2 on: April 14, 2011, 06:48:10 am »
awesome, im also working on a sidescrolling platformer with box2d,

how did you make it so that he can tell when its ok to jump?
John Carmack can Divide by zer0.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #3 on: April 15, 2011, 02:58:04 am »
To see whether or not he can jump, I did 2 things:

First, I used the TestPoint function to see if a point directly below the player is touching anything (by parsing all the bodies and hit testing to them). If it is, the player can jump.

Secondly, in the case that the player is somehow stuck in a way where that point is not touching anything, I made it check to see if the vertical velocity is zero and the vertical velocity the last frame was negative (not at the top of a jump). Then you can jump as well.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Gore Factor SFML
« Reply #4 on: April 19, 2011, 06:03:50 pm »
Pretty awesome :D
Is it in C++?

Also how are you doing all the physics? like is each body part a difrent entity?
I tryed something similar once but made the player one box, doing that just made him clip the floor at times

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #5 on: April 19, 2011, 11:19:06 pm »
It is written in C++ with VS2010 but also uses Lua for some stuff.

The player is a single body shaped sort of like a capsule except that the bottom is pointy and is always kept upright. The friction on the body was removed, since it would drag the crates with it when walking on them, and instead the deceleration is handled manually.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #6 on: April 24, 2011, 05:40:54 pm »
I got around to trying the SFML light manager code Groogy suggested, I had to change some stuff in order to get it to work with the newer versions of SFML 2, but it gives me a memory access violation when closing (specifically, when destroying the OpenGL context). It runs fine until I try to close it. Is this possibly related to the ATI issue? I had that as well but the newer SFML 2 versions seem to have fixed this. Also, this system only supports hard shadows like mine, so right now I don't see why I would use it. Still, I would like to know what is going on.

The only line of code I had to change was:

Code: [Select]
BlurEffect.SetTexture("texture", sf::Shader::CurrentTexture);

To:

Code: [Select]
BlurEffect.SetCurrentTexture("texture");

Which I doubt could have caused this error.

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

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #7 on: May 19, 2011, 10:50:22 pm »
Source code is now up.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Gore Factor SFML
« Reply #8 on: August 24, 2011, 03:10:01 am »
Where can the code be found?

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #9 on: August 27, 2011, 04:41:07 am »
I took the code for the old version down, new version is going up soon.

EDIT: I forgot to add, the new version will come with a map editor. The map editor is not written using SFML though, I got lazy and use Java Swing.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Gore Factor SFML
« Reply #10 on: August 27, 2011, 09:48:12 am »
Awesome :D, Any idea on what date to look out for this?

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #11 on: August 27, 2011, 04:54:02 pm »
Probably within the next 48 hours!
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

keyforge

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Gore Factor SFML
« Reply #12 on: September 07, 2011, 08:34:02 pm »
Cool game! How did you handle your maps? It's a tile system but how are you storing the collision data?
Need a place to upload your code, files or screenshots? Use SFML Uploads!

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #13 on: September 08, 2011, 02:32:42 am »
Source is up now, as well as the map editor (comes with instructions).

@ keyforge: I am using Box2D for they physics, so I just added box-shaped bodies. However, to keep the body count down, I made it stretch the boxes horizontally as long as there was a row of consecutive "solid" tiles. See the source file for Entity_TileMap for more information.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Gore Factor SFML
« Reply #14 on: September 21, 2011, 11:20:08 pm »
An update: I am working on soft shadows which are physically accurate and not just blurred. Here is a screenshot of the shadow system so far:



I also plan on speeding up the algorithm some more through region queries that take the light angle into account and shadow occlusion.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

 

anything