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 - gamepopper

Pages: 1 [2] 3
16
General discussions / Re: SFML 2.4.0 released
« on: August 10, 2016, 05:53:51 pm »
Text Outlines? Neat, I don't have to render two or four slightly offset black coloured strings underneath my text to get the same effect.

Not to mention geometry shader support sounds really promising! Maybe we'll get some more smoother shapes, or even do effects such as waves without dealing with the pixel shader!

17
I can proudly confirm that Gemstone Keeper has been Greenlit! Thank you everyone who has supported me so far! :D


18
Well the link you originally posted was neither HTTP nor HTTPS. ;)
I think the link was supposed to open a page in Steam, not a web-page in a browser.

That's correct, it was supposed to open the page within Steam's browser. Was kind of a recommended tip as not all Steam users are logged in on the website.

19
Good luck with your Greenlighting!

This link doesn't work, by the way:
you can go directly into your steam app to the Greenlight page here!

Thanks for letting me know, it seems the forum automatically formats all links to http even if you don't want to. I've removed the link since it's kind of a hit-or-miss feature... :/

20
The game is currently on Steam Greenlight, so I've added the links to the Greenlight page. :D

21
Here are some examples of the level effects currently in the game:

Adrenaline - Everything appears to move faster and shakier


Lights Out - Much Darker, plus you don't have your info to help you...


Tripping - Everything feels slower and wavier...

22
SFML projects / Re: "Our Dear Paper Fighters" - Top down shooter
« on: May 06, 2016, 10:01:37 pm »
I really like the pencil and paper artstyle, it looks like you've done a lot on this in a short amount of time. Hopefully I'll see more updates soon!

23
SFML projects / Gemstone Keeper - An ASCII based Roguelike Shooter
« on: May 06, 2016, 10:00:13 pm »
Hello everyone!

I'm surprised I didn't post here earlier, considering I made posts on other threads about it. This is Gemstone Keeper, a combination of twin-stick shooter and roguelike. The player explores multiple layers of procedurally generated caverns, and while you defend yourself from the creatures within, you also break rocks to find gemstones and minerals. The deeper down you go, the more valuable gemstones you can find, but the creatures get stronger.



I moved engines from Allegro to SFML in July 2015, the long reason why I wrote about a while back but the short version is that SFML was being kept stable, more up-to-date and had features I was more keen in such as shader support.



Features the game currently has:
  • Procedurally Generated Levels
  • Procedurally Rendered 3D Gemstones
  • Modular Weapons System (Choose the Weapon, Choose the Bullet, each interchangeable)
  • Randomized Characters + Stats
  • Permadeath
  • Level Visual Effects





As you can also tell, this game heavily uses ASCII graphics. I render the glyphs onto RenderTextures and have them rendered as Sprites so more complex designs such as the tilemap can be rendered much more easily.

The game was Greenlit on Steam Greenlight on June 11th 2016, you can find the Greenlight page here here!

The game will be was released on Steam on March 31st of 2017 at around 6pm GMT. Check out the game's official website and Steam page!

WANTED: Linux users to test run port.
I have been working on a Linux port for a while and I've got a demo build available for download. If anyone who uses a Linux machine run the game and tell me if it works, how well it functions, and if not, specifically what is wrong.

24
Graphics / Re: Motion Blur GLSL
« on: March 30, 2016, 05:43:17 pm »

What I was trying to accomplish was a trailing effect like the image bellow:


However I didn't know where to start. I thought learning per object motion blur with GLSL would be a good start, but not knowing the language is a barrier. Could anyone guide me on how to achieve this?

Also, some examples suggest acquiring the previous framebuffer or the previous view-projection matrix. How could I do this with or without SFML? I hope this isn't a stupid question...

There's two ways you could do this without the use of a shader, and it depends on whether you only want one or many objects to have a trail effect at the same time.

You can either use grok's method of keeping a list of previous render data, and have them render behind the main graphic while gradually fading out over time, starting from full alpha at the start and going to zero alpha, when it becomes ready to use again. This is a straightforward method that can be easy to adjust, although it can be overkill if you want multiple objects to trail since you'll be increasing the draw call amount for each trailing object.

The alternative method (and one that I'm using for my game project) is to have a trail area instead of trail object. How it works (or at least how I implement it) is you render the objects you want to trail onto a RenderTexture, and then you render that texture onto another RenderTexture, but with a bit of transparency and swap the textures. This one allows you to render multiple trailing objects with fewer draw calls, so it's better on performance. Plus it's also an area, so you can have parts where there are no trails. However depending on the amount you set that transparency, you can get some visual artefacts from trails that haven't fully disappeared, so it's a bit more of a case of experimentation.

25
Graphics / Re: AW: Fullscreen Rendering between Game States
« on: March 14, 2016, 12:58:12 am »
If this is really an issue with SFML and not your own code then you should be able to reproduce it without your entire code base (less than 200 lines).

I have tried to write a project that just contained a basic game loop, my game state management and how I handle resolution, all in a single cpp file, but it'll exceeds 200 lines.

So instead I figure I try it out on one of the SFML example projects. I got the Shader example project and changed the RenderWindow parameter to open in sf::Style::Fullscreen. It's the only change I did to the Shader.cpp file.

////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Shader",
                            sf::Style::Fullscreen);
    window.setVerticalSyncEnabled(true);

   

Good thing is that it worked, ran fullscreen at a low resolution, but when I cycled through the effects I noticed that when it entered into the Post Edge Effect screen it went black briefly with a white box at the corner (I have as proof of this as well  :P), in this case, the difference in what happens is that the issue only occurs once while running, if I switch back it doesn't happen again.

I also tried running the example in fullscreen on my laptop, however I do not get this issue. The laptop uses Intel's HD Graphics while my desktop uses an AMD HD Radeon.


26
Graphics / Re: AW: Fullscreen Rendering between Game States
« on: March 08, 2016, 08:10:49 pm »
Could it be that the rectangle shape's color fading wraps around?
To make sure it's not your code you should try a minimal example.

Well to test it out, I made sure that the maximum value for the alpha of the rectangle is 255. I set the colour using the sf::Color variable fadeColour and I use a linear interpolation function:

float fadePercentage = fadeFlashTimer / fadeTime;
fadePercentage = fadePercentage > 1.0f ? 1.0f : fadePercentage;

if (fadeIn)
{
        fadeColour.a = static_cast<unsigned int>(VInterpolate::Float(255, 0, fadePercentage));
}
else
{
        fadeColour.a = static_cast<unsigned int>(VInterpolate::Float(0, 255, fadePercentage));
}

Despite adding this, the issue above still occurs in fullscreen mode. It doesn't occur when I use Windowed mode (I've even tried maximising the window, so the graphics are scaled up, however that didn't make a difference).

Fortunately I do have a much more simpler example that I use to test out the framework that I've built. It has very few graphic objects per states (although you get to see the post process effects I've done :P).

This is how it should look, windowed mode (albeit with GIF quality dithering :P):


Now I couldn't capture what;s occuring on fullscreen at all for this, and I have no external capture devices so instead here's a video recording of what happens:


Considering that the Gemstone Keeper game above doesn't use the post process shaders when transitioning from the title screen, I don't think it's a cause. Once again this only occurs in fullscreen mode.

This thread has frozen my browser on two occasions.
I assume it's the animations but I can't understand why they freeze the browser. Did you hide some sort of mind-altering substance into the post?  ;D

Might be because of the gifs, I don't think they have any browser-freezing stuff unless that's hidden in GifCam or Photoshop.

27
Graphics / Re: Fullscreen Rendering between Game States
« on: March 07, 2016, 07:47:07 pm »
How do you create fading to black effect? Do you at some point break the rendering cycle, i.e. don't update the screen for a second or so?

The fade to black is done using an overlay, an sf::RectangleShape object, rendered in the camera object (hence why there is a render call in the camera object).

CurrentState()->Cameras[currentView]->Render(RenderTarget);

Once the fade is completed, I use a callback function (an std::function<T> pointer) to change the state, this callback function is passed in when I want the camera to fade.

//Called once in an event handled input
Cameras[0]->Fade(sf::Color::Black, 1.0f, false, std::bind(&TitleState::ToMenu, this));

//Some code later...
void TitleState::ToMenu()
{
        VGame::ChangeState(new CharacterSelectState());
}
 

To answer the second question, I do break the rendering cycle for one frame in the game loop, before successfully changing the state. This is what the IfChangedState and IfPushedState variables are for, they only are set true if the ChangeState or PushedState functions are called with a new game state class passed in.

Again, sorry for the large amount of code. It was either this or provide a download link to the files, and the latter option had the issue of not being sure which files to include.

28
Graphics / Fullscreen Rendering between Game States
« on: March 05, 2016, 01:41:25 am »
Short Version: Changing from one state to another on fullscreen has unusual rendering behaviour, while the same action in window mode does not show the same behaviour.

So I'm using SFML 2.3 in my framework and I've come across an issue that's mainly specific to when I'm rendering in fullscreen mode. I use a Game State Manager class so I can render different screens in separate classes, as well as store multiple states that I can push and pop out of in a stack:

VState* VStateManager::CurrentState()
{
        return states.back();
}

void VStateManager::ChangeState(VState* state)
{
        if (states.size())
        {
                states.back()->Cleanup();
                delete states.back();
                states.pop_back();
        }

        state->Initialise();
        states.push_back(state);
}

void VStateManager::PushState(VState* state)
{
        if (states.size())
        {
                states.back()->Pause();
        }

        state->Initialise();
        states.push_back(state);
}

void VStateManager::PopState()
{
        if (states.size())
        {
                states.back()->Cleanup();
                delete states.back();
                states.pop_back();
        }

        if (!states.empty())
        {
                states.back()->Resume();
        }
}

When you want to change a state from either the ChangeState or PushState functions, the switch doesn't occur straight away to avoid any errors from continuing a state function after it has been destroyed. Instead the new state is saved until the start next game loop iteration, I do this by calling the function and passing in NULL.

//Start of loop
if (stateManager->IfChangedState)
{
        stateManager->ChangeState(NULL);
}

if (stateManager->IfPushedState)
{
        stateManager->PushState(NULL);
}

HandleEvents();
if (focused)
{
        Update(dt * timeScale);
}

if (focused && !stateManager->IfChangedState && !stateManager->IfPushedState)
{
        PreRender();
        for (unsigned int c = 0; c < CurrentState()->Cameras.size(); c++)
        {
                currentView = c;
                Render();
        }
        PostRender();
}

Now onto the SFML specific stuff.  :P

So when I run my game in Windowed mode, and change the state, the screen might pause for a short amount of time, but it'll render the next scene without any problems like below:


However, if I try running the same scene again in fullscreen mode, for some reason it renders the last state for a short amount of time before starting the next state. It was very difficult for me to capture (neither FRAPS or GifCam could capture the fullscreen rendering, but OBS could capture this), what you don't see below is the very short lasting white screen going to black.


This is the code I use to switch between window mode and fullscreen. I initially thought it might be because the previous sf::RenderWindow (App) wasn't being destroyed, but I think that's already handled in create.

void VGame::SetFullscreen(bool set)
{
        if (set && !fullscreen)
        {
                App.create(sf::VideoMode::getDesktopMode(), Title, sf::Style::Fullscreen);
                App.setMouseCursorVisible(set);
                fullscreen = true;
        }
        else if (!set && fullscreen)
        {
                App.create(sf::VideoMode(WindowWidth, WindowHeight), Title, WindowStyle);
                App.setMouseCursorVisible(set);
                fullscreen = false;
        }
}

As for rendering, I use an sf::RenderTexture (called RenderTarget) to render the scene, and then I could apply post process effects before setting the texture to a sf::Sprite, which is positioned, scaled and then rendered to the sf::RenderWindow. I separated it into three functions so I could organise each part of the rendering.

void VGame::PreRender()
{
        RenderTarget.clear(BackgroundColor);
}

void VGame::Render()
{
        RenderTarget.setView(CurrentState()->Cameras[currentView]->GetView());

        if (CurrentState()->visible)
                CurrentState()->Draw(RenderTarget);

        if (CurrentState()->SubState)
        {
                CurrentState()->SubState->Draw(RenderTarget);
        }

        CurrentState()->Cameras[currentView]->Render(RenderTarget);
}

void VGame::PostRender()
{
        RenderTarget.display();
        if (RenderTarget.isSmooth() != Antialiasing)
        {
                RenderTarget.setSmooth(Antialiasing);
        }
        App.setVerticalSyncEnabled(VSync);

        App.clear();

        if (PostProcess == NULL || !VPostEffectBase::isSupported())
        {
                RenderSprite.setTexture(RenderTarget.getTexture());
                App.draw(RenderSprite, RenderState);
        }
        else
        {
                PostProcess->Apply(RenderTarget, App);
        }

        App.display();
}
 

All I could gather from debugging was that after the ChangeState function is called, the rendering functions are skipped for one frame, the states are changed and then the next render is called, and the window outputs what you see above.

Sorry about this being very long-winded. I've tried my best to cut out some parts of the code that might not be relevant, however I'm not sure if I could reproduce this issue with something much smaller.

29
SFML projects / Re: Screenshot Thread
« on: November 28, 2015, 01:13:02 am »
Not much games in SFML but cool little graphic things made in SFML.

First here is some fire, done using my own custom particle effects and an alpha threshold shader.


Secondly here is a 3D spinning cube, however this isn't some 3D rendered cube done in OpenGL, this is an actual graphic rendered using SFML Vertex Arrays, along with Vector3fs and some custom 3D math functions.


It's a bit limited to be fair, as I haven't got depth testing (although I do have back-face culling) nor any matrix transformations for 3D vector classes, so I can only render this head on with an orthographic view, but for being able to render something pseudo 3D without OpenGL or DirectX, I'm pretty happy with this.  ;D

30
Small update:
So I did what you've guys have suggested an added renderTex.clear(sf::Color::Transparent) after every create function call.



It appears to be working, aside from the floor but that's just one graphic that I can check on.

I've also reduced the amount of texture copies in my Content Manager class as well.  :P

Pages: 1 [2] 3
anything