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

Pages: [1]
1
Window / Delayed input when key is held down
« on: November 29, 2010, 10:47:15 pm »
Hi, I'm writing a game atm using SFML and I want WSAD to be the movement keys. The problem is that when they are held down to move forwards/backwards etc there is a delay. The player initially moves one iteration forward and then pauses momentarily before the repeated input kicks in and he starts moving forward smoothly. Is there a way to turn this delay off? Or some other solution? I'm used to using XNA where there isn't a delay of this sort.

Thanks!
Stephen

2
Graphics / graphics tutorial code not working - Image.LoadFromFile
« on: October 31, 2010, 10:02:09 pm »
I've downloaded the graphics-sprite tutorial source code but when I run it with an image of my own the program crashes. The only change I've made to the code is:

if (!Image.LoadFromFile("sprite.tga"))
        return EXIT_FAILURE;

if (!Image.LoadFromFile("C:\\zorg_logo.png"))
        return EXIT_FAILURE;

Replacing the sprite.tga file with one of my own. I originally put the zorg_logo image in the folder containing the project file. I also put it in all other folders I thought it might read it from, including the folder containing the solution, and the debug folder containing the executable. And as you can see I've now tried just putting the image in the C:\\ directory to try loading it from there but that doesn't work either.

When I run debug in VS2008 it points to the "if (!Image.LoadFromFile("C:\\zorg_logo.png"))" line and gives the error:

"First-chance exception at 0x72e065af in sfmlGraphicsSprite.exe: 0xC0000005: Access violation reading location 0xcccccccc.
A buffer overrun has occurred in sfmlGraphicsSprite.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program."

The strange thing is that when I run the code from the previous tutorial (graphics-window) it also gives a similar error, however this time pointing to the "App.Display();" line. This is particularly strange because in the tutorial code there is no image being loaded. So I don't know why I can successfully run the previous tutorial code in the Window section but not this code in the graphics section.

Ideas are much appreciated - thanks!

3
Window / Window tutorial code freezes when run
« on: October 30, 2010, 12:48:52 pm »
Hi all, I've just started using SFML but for some reason when I run the Window-Window.cpp tutorial code the window freezes as soon as it appear. I can't minimize it or anything and have to end it throug task manager.  I've tried running the very first SFML clock code and that runs fine inside a consol window so it seems that I've set SFML up okay.

I'm using visual studio 2008 and running on Windows 7 64bit btw.

I've tried putting the code in different types of projects, I've tried a Win32 project, and just a basic consol project. I've also put the code in a blank project of both types (window and consol) and that doesn't work. I'm linking to the sfml-window-s.lib, sfml-system-s.lib and sfml-main.lib. I've tried linking to the first two non-statically, I've tried switching between debug and release mode and adding the -d suffix accordingly.

Any ideas would be much appreciated - thanks!

Pages: [1]
anything