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

Pages: [1]
1
General / Make collision detection run more frequently than drawing
« on: February 13, 2012, 05:00:39 pm »
I have seen quite a few game developers (including some from here) claim that they make the collision detection/logic run faster than the draw loop (ie: collision detection at 1000hz and drawing at 60hz or whatever).  What are the ways of achieving this?

I'm guessing threads are pretty much the only option (someone correct me if I'm wrong), but what do I want to have in consideration when programming this? Does anyone have some article as reference or anything?

Thank you very much

2
Window / sf::View isn't updated
« on: January 21, 2012, 04:21:02 am »
I have a piece of code where I change the Window's View to a new one. According to the documentation, sfml copies the view and it's not necessary to keep the sf::View object alive. That's ok, but how can I update the view later on? If I wanted to scroll it, for example, I should create a new view, move it, and then pass it on to the window?
If I try to get the view via Window::GetCurrentView() I can't update it because it's const.

Using SFML 2.

3
Graphics / Depth information
« on: January 20, 2012, 05:37:22 am »
Is there any reason for SFML not to include support for depth buffering? (ie does it alter performance?). Or is it simply based on another way of rendering or something like that.

4
General / Debug assertion fail!
« on: September 13, 2011, 08:19:00 pm »
When exiting an application made with SFML 2.0 in VS 2010, I get this error

Quote
'UntitledSpirit.exe': Loaded 'B:\FacepalmAssociation\UntitledSpirit.exe', Symbols loaded.
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'B:\FacepalmAssociation\UntitledSpirit\Debug\sfml-system-d-2.dll', Symbols loaded.
'UntitledSpirit.exe': Loaded 'B:\FacepalmAssociation\UntitledSpirit\Debug\sfml-window-d-2.dll', Symbols loaded.
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'B:\FacepalmAssociation\UntitledSpirit\Debug\sfml-graphics-d-2.dll', Symbols loaded.
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\AppPatch\AcLayers.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\mpr.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\atiglpxx.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\atioglxx.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\atiadlxy.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\wtsapi32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\hid.dll', Cannot find or open the PDB file
'UntitledSpirit.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
Windows has triggered a breakpoint in UntitledSpirit.exe.

This may be due to a corruption of the heap, which indicates a bug in UntitledSpirit.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while UntitledSpirit.exe has focus.

The output window may have more diagnostic information.
The program '[4372] UntitledSpirit.exe: Native' has exited with code 0 (0x0).


It happens only when I close the window created by SFML, and happens when doing 'return EXIT_SUCCESS' (Especifically when it is going through a destructor method of a class called TtfText I made. The method is empty and does not contain any instructions). I guess it's important to mention that this didn't happen with SFML 1.6. This is the header of the class, without the methods I implemented:

Code: [Select]

class TtfText :
public Entity
{
public:
static sf::Font* currentFont;  //By the way this is allocated with 'new' in TtfText.cpp

TtfText(void);
~TtfText(void);
TtfText(sf::String,int size,int,int);

private:
sf::Text text;
float duration;
float fade;
int startTime;
float fadeSpeed;
};


VS2010 takes me to dbgheap.c, line 2036, in CrtIsValidHeapPointer:
Code: [Select]
extern "C" _CRTIMP int __cdecl _CrtIsValidHeapPointer(
        const void * pUserData
        )
{
        if (!pUserData)
            return FALSE;

        if (!_CrtIsValidPointer(pHdr(pUserData), sizeof(_CrtMemBlockHeader), FALSE))
            return FALSE;

        return HeapValidate( _crtheap, 0, pHdr(pUserData) );
} //This is line 2036


If I don't create any objects of the class TtfText, the error doesn't happen. Does anyone have ANY idea why this could be happening?

5
General / General questions about SFML 2.0
« on: September 12, 2011, 09:47:29 pm »
First, I want to ask about performance. I've ported the little I had of my 1.6 code to 2.0, and it seems that the performance decreased significantly. It worked at about 2000 FPS with 1.6, but about 700 FPS with 2.0. The only difference is that 1.6 was statically linked, whereas 2 isn't. Is it normal? (maybe the performance increase is found while rendering many objects at a time?)

Also, FPS measurement is now much more imprecise. Since GetFrameTime() and sf::Clocks both use Uint32, the minimum time that we can find is 1 ms, which gives us a top of 1000 FPS when measuring with 1/GetFrameTime(). This also affects the fact that the FPS that we get when we try to lock it or when we use vsync only varies between 2 or 3 values (when using vsync on a 60hz monitor, GetFrameTime mostly returns 16 ms or 17 ms, which results in FPS measurement of 62.5 or 58.8, etc)

Lastly I want to congratulate you and thank you for the constant support that you give and for continuing developing this awesome library.

6
Graphics / Font smoothing in SFML 1.6
« on: September 11, 2011, 07:53:27 pm »
Hey, I've been having troubles with fonts in SFML lately. I can't seem to properly disable the smoothing that SFML does by default.

There's nothing weird with my code. First I do this:

Code: [Select]

currentFont->LoadFromFile("test.ttf");
((sf::Image&)currentFont->GetImage()).SetSmooth(false);


and then I add some test text so I can try it out. No matter what the size of the font (and the text) is, most (and only one font worked correctly) of the fonts look ugly with smoothed edges. I want them to be pixelated since I'm going for that pixely-retro look.

Thanks a lot for reading.

Pages: [1]