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

Pages: [1]
1
Graphics / SF::Font - somehow a glyph getting corrupted.
« on: July 04, 2018, 03:13:27 am »
So first off the direct issue can be seen in the following image:



The issue is that the letter K is instead just jumbled. This happens rarely and maybe once every 20 game launches.

The game has a font manager singleton that holds an sf::Font currentFont and is loaded via loadFromFile from the options singleton that I have in the game. So reloading the font fixes this issue. Each state's SF::Text's loads the font once, on their construction.

So is it possible for like the glyph in memory to move and thus for this to happen because a glyph is pointed at garbage?

Thanks

2
Yeah I also noticed you call Tell twice in one loop. The top of the while loop and at 290/289. Maybe just caching the tell result might be enough to cut this issue in half?

Edit: Uhh NVM github was showing me that page weirdly. Ignore that. XD

3
https://github.com/SFML/SFML/commit/698bbccd6a0e2bb3971b052996a78b39272c8b3c looks like it introduced it although didn't seem to attempt to fix anything? Was this a feature added?

4
Yeah I know what a profiler is but I load symbols and get this: https://imgur.com/a/aV64OyG

Stops at loadfromfile soundbuffer class in sf. Also check out the memory usage. It's fairly low.

5
They are all wav files.

Does SFML have any profiling tools for this? I'm only calling sf::SoundBuffer::LoadFromFile() on several (11) wav files. How would you recommend digging into this? I could watch my disks but they are all SSD and am not noticing the same thing with textures and etc.

It still happens on release builds as well as debug.

I'm focusing on 2.5.0 as it seems best to do that but wanted to ensure I got the introduction version correctly for this behavior.

6
SFML projects / Re: The Away Team - Sci-fi Interactive Fiction
« on: June 07, 2018, 08:34:41 pm »
yeah for sure the game kind of feels bare min right now. The mechanics to hold you over from planet to planet was actually pushed out, recommendation from my publisher. Looking back though I feel like there a lot of little mechanics I am missing and this patch in about a month should push this into a more chained adventure where, yes you still must eat your crew to survive but hopefully not every run simply results in that same thing. But yeah I will probably toss a few steam keys out here for our re-release. Stay tuned :D

7
Yeah, same results with 2.5.0. I first noticed this on 2.5.0 Also this seems to only happen on windows as well.

8
SFML projects / Re: The Away Team - Sci-fi Interactive Fiction
« on: June 07, 2018, 10:51:39 am »
Hey all,

Sorry I didn't reply for so long. Yeah I posted this and it didn't get any replies and I figured it was kind of dead to this sort of niche game or such. Anyways I have a large patch in the works for this for anyone looking at it.

Thanks for your interest :D

9
I load all of my small sound effects on start and it's only 11 files totaling about 40 mb. Before in 2.3.2 the load time for this was smaller than a second. Currently it can take up to 30 seconds. A far longer delay in sound loading.

I basically do this:

void AudioManager::loadSound(std::string directoryPath, std::string soundFile)
{
   if (!soundBufferManager[soundFile])
   {
      soundBufferManager[soundFile] = new sf::SoundBuffer();
      soundBufferManager[soundFile]->loadFromFile(directoryPath + soundFile);
   }
}

Where audiomanager has this in it's constructor:

   std::vector<std::string> soundFiles = AWT::getWavFiles(AWT::getAssetFolder() + "sounds/effects");

   for (auto filename : soundFiles)
   {
      loadSound(AWT::getAssetFolder() + "sounds/effects/", filename);
   }

So basically I just load them all up and play them whenever and the sit in memory cause they are small.

The sounds themselves haven't changed and if I go back to 2.3.2 the sounds load much faster.

Any ideas? Should I just attempt to disperse the loading? even then each sound file can take up to 2-3 seconds.

10
So I recently upgraded to 2.5.0 and noticed that closing my game now ends with this: https://i.imgur.com/7RewYmi.png

Rolling back to 2.4.2 I notice other issues and I am upgrading from 2.3.2. Additionally this is of course windows only it seems.

I believe the core of it is the steam overlay calling the disconnection of a controller but. I don't even have a controller plugged in during these tests. Additionally and slightly unrelated but isn't directinput a bit old? Does SFML also have support for Xinput?

11
SFML projects / The Away Team - Sci-fi Interactive Fiction
« on: July 07, 2016, 03:31:52 am »

Genre: Sci-fi Interactive Fiction
Target platforms: Windows on release. Linux and Mac OS depending on demand.
What is used: C++11, SFML, LuaBind, JsonCPP, RichText (https://github.com/Skyrpex/RichText)

Steam: http://store.steampowered.com/app/426290/
Website: www.awayteam.space

12
SFML projects / Re: 'Tiled' Tile-map Loader
« on: June 09, 2014, 11:28:27 pm »
Just a shot in the dark but couldn't you store all the vertices in an object and when the visibility flag is set you can then calculate to draw only the visible objects? Somehow taking advantage of https://www.opengl.org/sdk/docs/man/docbook4/xhtml/glDrawRangeElements.xml this function?

13
SFML projects / Re: 'Tiled' Tile-map Loader
« on: June 05, 2014, 08:16:54 am »
I'm currently having issues with the TMX loader and setting object's visablity to false to have them not drawn.

if (handleEvent.type == sf::Event::EventType::KeyPressed && sf::Keyboard::isKeyPressed(sf::Keyboard::E))
                for(auto layer = ml.GetLayers().begin(); layer != ml.GetLayers().end(); ++layer)
                {
                        if(layer->name == "Interactables")
                        {
                                for(auto object = layer->objects.begin(); object != layer->objects.end(); ++object)
                                {
                                        if (object->Contains(sf::Vector2f(tankSprite.getPosition().x, tankSprite.getPosition().y)))
                                        {
                                                if (object->GetType() == "Computer")
                                                {
                                                        for(auto object2 = layer->objects.begin(); object2 != layer->objects.end(); ++object2)
                                                        {
                                                                if (object2->GetType() == "Laser")
                                                                        if (object2->GetName() == object->GetName())
                                                                        {
                                                                                object2->SetVisible(false);
                                                                                object2->SetProperty("State", "Off");
                                                                        }
                                                        }
                                                }
                                        }
                                }
                        }
                }
That's how I am doing it but when I look at the map the object is still being drawn. I've checked to make sure the objects I want are not being set to visable when drawn with
for(auto layer = ml.GetLayers().begin(); layer != ml.GetLayers().end(); ++layer)
        {
                if(layer->name == "Interactables")
                {
                        for(auto object = layer->objects.begin(); object != layer->objects.end(); ++object)
                        {
                                if (object->Visible())
                                        std::cout << "STILL THERE! " << object->GetType() << std::endl;
                        }
                }
        }

Sorry if this code is rather sloppy, I've been quickly writing it as a proof of concept for tmx loader. Any insight to what I am doing wrong and why the objects are still being drawn on the screen would be greatly appreciated.

Thanks,
MJBrune

Pages: [1]
anything