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.


Topics - ghzmdr

Pages: [1]
1
SFML projects / Enter the Unknown - Devlog
« on: March 21, 2015, 05:57:36 pm »
Hi guys from the community!

I decided to start a Devlog on my blog for the game I'm currently working on.

I't name is Enter the Unknown, you can find out why in the blog entry linked at the end of this post.

The game will be a fast paced roguelike/action RPG, with both a story mode and an endless mode. The latter will feature randomly generated levels and permadeath.

The engine will be dynamic and data-driven, restrictions posed will only be structural and really basic. Oh and there will be the prettiest pixel art graphics I can do!

Find out more on my blog, here's the link to the week 1 post (Last updated 21/03/15, 20:20 GMT+1)

If you're a newbie (like I am..) chances are you'll find useful informations, otherwise you'll inevitably see some errors.

In both cases give it a shot and tell me what you think! ;)

2
Graphics / vector<sf::Sprite> VS sf::VertexArray for Tilemaps
« on: March 19, 2015, 07:09:27 pm »
Hi there! I happen to be developing a game which is tile-based and even tough it shouldn't have enormous requirements I'm as always concerned about performance.

I had my background tiles in a vector of Sprites but today found out that when running on linux with nvidia drivers there was some tearing due to floating point view moving.

So after some searching I switched to a VertexArray, altought the problem isn't gone away (if you have any input on this that would be awesome, for now I'm just subtracting a little -- 0.0075 -- offset from the top of the tile and everythig is smooth, but that's only a workaround not a solution).

Anyway before that I was drawing tiles in a loop, only drawing those that were currently in view, plus a 2 tile offset in every direction for smoothness. Now I'm drawing the whole tilemap in a single call, but isn't there any looping involved in VertexArray drawing? If so, isn't cheaper to loop through every tile and just draw the ones I need? How can be faster to draw the whole array (even if treated as a single texture) VS drawing just the necessary tiles?

3
Graphics / Flickering issue
« on: March 16, 2015, 03:25:53 am »
Hi everyone, I'm building a game prototype and there's an issue I can't get rid of.
Basically some sprites get drawn with a delay and out of place, I don't know what's the matter with them, I mean, I draw them in a simple loop like this:

void Zone::draw()
{  
    context.window->setView(worldView);    

    for (auto &tile : bgLayer)
    {
        if (isInBounds(tile))
            context.window->draw(tile);
    }

    context.window->draw(player);
}
 
where bgLayer is a vector of sf::Sprite. These are positioned once and do not get moved.
The window is cleared once in the main loop's render()

void Application::render()
{
    window.clear(sf::Color::Black);

    stateStack.draw();

    window.setView(window.getDefaultView());
    window.display();
}

 

There is no other window manipulation or drawing.

To better describe the issue I've uploaded a screen on youtube


Basically it seems like things get drawn out of position when the view moves, causing a strange flickering.

Anyone has an Idea about how to fix this? If you need to see more code just tell, I didn't want to clutter the post and I tought this could be a simple issue for someone more experieced. Thanks in advance!

Pages: [1]
anything