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

Pages: 1 [2] 3 4 ... 11
16
Window / sf::Event return key pressed
« on: May 28, 2011, 11:44:38 am »
I realised I don't need scan codes, I need to get the character that the user entered.
I know about extended ASCII, I am using the extended Windows-1252 set (the most common I am told).
So I need to find out what ASCII character the user endered in. I'm not sure how european keyboards differ from ours, so I might just be able to use UTF-8 (well, the first 127 characters of UTF-32). I users to be able to use the letters with accents and thinks like that, if they need to.

17
Window / sf::Event return key pressed
« on: May 28, 2011, 06:10:29 am »
Nono, the whole point of me using ASCII was for the extended ASCII.

18
Window / sf::Event return key pressed
« on: May 28, 2011, 05:08:28 am »
Hmm, that uses unicode. I am only wanting to use ASCII (I am writing my own text methods with OpenGL).

19
Window / sf::Event return key pressed
« on: May 27, 2011, 06:07:43 pm »
Well, I want to make it so that the user can type in a text area.

20
Window / sf::Event return key pressed
« on: May 27, 2011, 05:17:44 pm »
Hi there
Is there any way to get sf::Event to return the scancode of the key that was pressed?
Thanks

21
Graphics / SFML screenshot quality
« on: May 09, 2011, 03:16:43 pm »
Yes! That fixed it!
I guess that the .jpg quality is okay, I must be hard to please  :D

22
Graphics / SFML screenshot quality
« on: May 09, 2011, 03:03:24 pm »
The screenshots I take with .jpg are not very clear.
I've tried using .PNG, but it saves the background colour (what I have set glClearColor to) as transparent. Can I tell it not to?

23
Graphics / SFML screenshot quality
« on: May 09, 2011, 02:54:27 pm »
:(
Will changing the quality be available in SFML 2?
What image format can I use that isn't as huge as .bmp?

24
Graphics / SFML screenshot quality
« on: May 09, 2011, 02:41:54 pm »
Hi there!
Is there any way to specify the quality of a .jpg screenshot when you save it using SFML? I want high-quality screenshots, but I don't want huge bitmap files being created.
Thanks in advance!

25
Graphics / sf::Text not rendering properly
« on: May 09, 2011, 08:56:59 am »
Quote from: "Laurent"

Sorry, it's not that bug. This one happens with all versions of the driver, indeed.

I hate ATI -_-

26
Window / X error on program exit
« on: May 09, 2011, 02:39:21 am »
Hmm. I'm using Arch on a netbook (the Acer Aspire One D255), and when I close my program I get the following error:
Code: [Select]

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  137 (DRI2)
  Minor opcode of failed request:  7 (DRI2GetBuffersWithFormat )
  Resource id in failed request:  0x2200006
  Serial number of failed request:  187
  Current serial number in output stream:  187

Is this the code's fault, or is it xf86-video-intel's fault?
Thanks

27
General / Delay using Clock
« on: May 08, 2011, 10:47:34 pm »
Yes, you are right that the clocks increments ITSELF after the last time it was reset.
There is a tiny problem in the way you are testing whether the correct amount of time has passed.
You code looks like this:
Code: [Select]

    // Spawn Rings
         
      time +=   ElapsedTime;
     
      if (time >= DELAY_TIME)
      {
         
         // Add ring sprite to the ringSpawn vector
         
         ringVec.push_back(Ring);
         
         // Give that ring a random y co ordiante
         
         spawnIterator->SetX(0);
         spawnIterator->SetY(rand_Y);
         
         // Increment iterator
         
         spawnIterator++;
         
         // Reset the clock
         
         Clock.Reset();
         
         
      }

The problem is that when you first start the game, the elapsed time is very very small.
Instead of that, change your code to this:
Code: [Select]

    // Spawn Rings
         
      time +=   Clock.GetElapsedTime();
     
      if (time >= DELAY_TIME)
      {
         
         // Add ring sprite to the ringSpawn vector
         
         ringVec.push_back(Ring);
         
         // Give that ring a random y co ordiante
         
         spawnIterator->SetX(0);
         spawnIterator->SetY(rand_Y);
         
         // Increment iterator
         
         spawnIterator++;
         
         // Reset the clock
         
         Clock.Reset();
         
         
      }

That way, the time between spawns will always be DELAY_TIME, even if there is lag suddenly somewhere. In the first example, you take a snapshot of the time taken for one loop at the very beginning of the game, before the main loop has started, This will always be a VERY small number.
This should fix some of the errors you are getting.
I'm not sure what you did after the first post, but what I suggested shouldn't have caused that at all.

28
General / Intercept SFML errors
« on: May 08, 2011, 04:30:08 pm »
Cool, thanks for that!

29
General / Intercept SFML errors
« on: May 08, 2011, 03:52:00 pm »
Hi there
Just wondering if there is a way of intercepting SFML error messages (I assume they are bound for stderr or sdtout).
I want to be able to display errors on the screen, rather than have them go to the console.
Thanks in advance.

30
General / Delay using Clock
« on: May 08, 2011, 03:48:28 pm »
You aren't incrementing Time anywhere, by the looks of it.
In you main loop, somewhere, you need:
Code: [Select]

   Time += Clock.GetElapsedTime();

Hope that fixes it.

Pages: 1 [2] 3 4 ... 11