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

Pages: 1 ... 4 5 [6] 7 8 ... 12
76
Graphics / Collision Class
« on: July 31, 2011, 03:20:45 am »
SFML offers some function that might help you managing collisions. sf::Rect::Intersects() and sf::Rect::Contains(), for example.
But as said before, it's not a game engine.

77
Graphics / Drawing int or double with sf::String
« on: July 29, 2011, 08:54:33 pm »
For future reference I think this topic is one of the best for this subject:
http://www.sfml-dev.org/forum/viewtopic.php?t=5154

78
Graphics / Movement Issue
« on: July 29, 2011, 08:46:32 pm »
Hi,
Since you're dealing with real-time input be sure to leave that part of the code out of the GetEvent() loop.
Don't know if that's the case here but here's an example if it is:

Code: [Select]
while(App.IsOpened())
{
               
sf::Event eventUI;

// THIS IS THE EVENT LOOP:
while(App.GetEvent(eventUI))
{
if(eventUI.Type == sf::Event::Closed)
App.Close();

if(eventUI.Type == sf::Event::MouseButtonPressed && eventUI.MouseButton.Button == sf::Mouse::Left)
Fire();
}

// THIS IS A REAL-TIME INPUT:
if(App.GetInput().IsKeyDown(sf::Key::Up))
GoUP();
}

79
General / Simple operator overloading question
« on: July 29, 2011, 07:51:26 am »
I think that's exactly it.
Thank you!

80
General / Simple operator overloading question
« on: July 29, 2011, 06:18:00 am »
Hello, I was reading the following page from the wiki:
http://www.sfml-dev.org/wiki/en/sources/richtext

On the following function:
Code: [Select]
RichText & RichText::operator << (const sf::Color &color)
{
myCurrentColor = color;
return *this;
}

What is the "return *this" doing here exactly? Isn't the first line "myCurrentColor = color;" enough to set a new color value?

I know this is probably a simple matter but I came from a C programming background and I haven't mastered Operator Overloading too well yet.

Thanks in advance for the help,
Regards,
Alex.

81
Graphics / Sprite boundaries
« on: July 26, 2011, 02:59:40 pm »
Understood, Thank you!

82
Graphics / Sprite boundaries
« on: July 25, 2011, 05:18:56 pm »
Probably a silly question but what are the differences between local and global coordinates of a sprite?

83
General / Loading Resource
« on: July 22, 2011, 08:54:17 pm »
Yes, link to a static compilation of SFML (sfml-system-s.lib for example).
It will result in a bigger .exe file but that's pretty much it.

Don't forget the SFML_STATIC preprocessor in your project proprieties if you're using SFML 2.0.

84
General discussions / List of modifications from SFML 1.6 to 2.0
« on: July 16, 2011, 10:06:38 pm »
On SFML 1.6 sf::Image::SetSmooth() was set to true by default, on SFML 2.0 is set to false, right?
Is it worth adding it to the list?

85
General discussions / Can somebody help me understand this code?
« on: July 16, 2011, 05:25:20 am »
Hey there. It would be more simple if you pointed out which parts you don't understand.
Just copy-pasting a code makes it too vague and difficult to answer.

Also, warp your source codes with the code button on your post as it makes it easier to understand.
Like so:
Code: [Select]
struct WindowSettings
{
sf::VideoMode videomode;
};

86
Window / [Solved] How to adjust the delays involved in KeyRepeat?
« on: July 15, 2011, 01:00:32 am »
Maybe you're using SFML 2.0 and that's why you're having trouble understanding what's sf::Input. Read the following doc, it should help you:
http://www.sfml-dev.org/documentation/2.0/classsf_1_1Keyboard.php#details

If you're using SFML 1.6 read the "Getting real-time inputs" section here:
http://www.sfml-dev.org/tutorials/1.6/window-events.php

87
General discussions / New global inputs in SFML 2
« on: July 12, 2011, 09:09:19 pm »
Ah I understand now. Thank you.

88
General discussions / New global inputs in SFML 2
« on: July 12, 2011, 08:36:06 pm »
I'm a bit embarrassed to ask because it's probably really simple but,
What replaced the real-time input function GetInput()?

89
Regarding threads, what can be said about them?
Should they be used often? For example, to separate a physics manager from a resource loader.

I usually keep my programming very linear (no threading), especially because I've never learnt much about thread programming.
But for for advanced situations, where for example I have to deal with a lot of objects, should I start considering that?

By the way I don't mean to thread hi-jack. I tend to take these tips to heart and get pretty interested.

(Excuse my English)

90
Audio / Loading .ogg Issue
« on: July 01, 2011, 05:27:08 pm »
Are you linking with "sfml-audio.lib" on the additional dependencies?
Did you compile the correct configuration? Example: Compile SFML for "release" and use the "release" configuration when compiling your code.


If nothing works, try to replicate the problem with a minimal code programme.

Pages: 1 ... 4 5 [6] 7 8 ... 12
anything