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

Pages: 1 ... 195 196 [197] 198 199 ... 224
2941
Feature requests / Re: sf::Rect extension
« on: September 20, 2014, 07:57:41 pm »
getPositionFar() sounds horrible  :P
When I first read this, I thought that getBottomRight() would be better and then Hiura brings up that the "position" should be topLeft. I think we're onto a winner here...  ;)

2942
Feature requests / Re: small & stupid api changes: radians, vectors, colors
« on: September 20, 2014, 07:55:08 pm »
dedicated type for angles[/url], similar to sf::Time
I agree with this if only to keep consistency within SFML. sf::Time can seem a little extra work sometimes but I like the forced type thing to help reduce errors.
As for not including degrees to radians functions because they're short and easy, think about the sf::Time functions. Divided by 1000? Thanks  :P

3. I wonder whether a constructor itself is the most expressive way... an alternative is a static function (named constructor idiom). What about reverse conversion (from colors to integers)?
redColor = sf::Color(#ff0000ff);
redInt = redColor.asInteger();
Possibles?

2943
Feature requests / Re: small & stupid api changes: radians, vectors, colors
« on: September 20, 2014, 01:58:10 am »
Notice that FRex proposed an overload for sf::Uint32 which has 8 hex digits, 0xRRGGBBAA (R = Red, G = Green, B = Blue, A = Alpha).
I guess it could make things a tiny bit easier as oposed to using:
sf::Color c(0xff, 0x00, 0xee, 0xaa);
I noticed it was for 8 hex digits, and you're right that it would make it easier to use than specifying the four components separately. However, it wouldn't allow to specify only the colour components.
That said, I'd be all for the four components in one number. I'd have no trouble getting into an automatic habit of typing an extra two fs for a standard (fully opaque) colour  :)

2944
Feature requests / Re: small & stupid api changes: radians, vectors, colors
« on: September 20, 2014, 01:36:03 am »
I agree with all three of these with varying degrees (pun not intended) of strength.

1. If it's short, simple, doesn't break the API, expands its flexibility, and seems commonly wanted, I don't see why this wouldn't be included.

2. I've often found that I'm "converting" between a custom vector to an SFML one which requires manually assigning each member so I can see how this would be useful although I'm not good enough to know if this code solves everything without causing any problems.

3. This is strange because I've never even previously considered this but, now you mention it, it's something I've been missing for quite some time. Photoshop also uses hex numbers for colours; I thought I'd mention that one since you missed it off your list  ;) I must say, though, it would require still being able to assign the colours without the alpha part, and I'm not sure how that would be done here.

2945
Graphics / Re: OpenGL to Textures SFML
« on: September 19, 2014, 03:22:44 pm »
If you're doing the drawing using SFML and would like them in a texture, you can use a render texture. However, if you want to steal items from the graphic card that come from other applications, I think you should not be using SFML for that.

2946
General / Re: Tutorial Question
« on: September 18, 2014, 08:47:07 pm »
It's good to know that you now have SFML working and can enjoy its wonders!  ;)
We look forward to hearing about what you create  :)

2947
General / Re: How to only get one input per key press during a loop?
« on: September 18, 2014, 08:44:48 pm »
Yeah, it's event.key.code for the actual key, not event.type.

Also, I'm not understanding your timing code. It looks like it's doing something wrongly.
It seems to be adding the accumulated clock's currently elapsed time (up to 100 seconds) each time, so at 99 seconds, it'll be adding 99 seconds onto the previously elapsed time, rather than the elapsed time being at 99 seconds.
Not sure what the 100 seconds thing is for but it looks like you should be doing something more like:
        if(timeElapsed.asSeconds() >= 100){
            timeElapsed = sf::Time::Zero;
        }
        // ...
        timeElapsed += clock.restart();
or
        if(timeElapsed.asSeconds() >= 100){
            timeElapsed = clock.restart();
        }
        // ...
        timeElapsed = clock.getElapsedTime();

2948
SFML projects / Re: SFML apps other than games
« on: September 18, 2014, 08:33:32 pm »
I started work on a music application but keep getting side-tracked and distracted by details. Somehow, I'm currently working on bezier curves! Not very musical, you might think but it's linked indirectly. Maybe "indirectly squared"  :P
With that and actually creating music and stuff, I'm avoiding spending time on the music thingy as it's mostly just UI stuff  :(
If I ever complete it, I might let you know  ;)

2949
Audio / Re: Problems with .setPitch
« on: September 18, 2014, 04:02:10 am »
I stumbled upon the reason that I was getting this error. I'm still not sure why but it's easy enough to avoid for myself now.
I changed the sound settings for my audio interface to use 48kHz instead of 44.1kHz and it crashes on no pitches now. Fully updated the audio interface drivers beforehand to make sure of everything but it still crashes on 44.1, 16-bit and 24-bit. None of the higher frequencies cause the problem, it seems.
If you happen to get a similar problem, try changing those settings.

Hopefully, nobody will ever be using the same audio interface as me, running at 44.1kHz when trying to run something linked to openal  ;D

I've updated the original post to show that it has been solved and also included a shorter pitch testing code.

2950
General / Re: GetDC() NULL
« on: September 17, 2014, 07:38:49 pm »
I do need that many render textures.
Why?

Seriously, I'm genuinely interested to know of a situation where 200 render textures the full size of the window would be required.

2951
SFML website / Re: Misleading Forum Link
« on: September 17, 2014, 07:14:57 pm »
I always assumed it's outside of the actual forum. It's the usual area for website creators to sign and link stuff. I was just saying that it would be nice if that particular link didn't feel the need to mislead everyone. It could, at least, link to the mod that shows you can actually do that.

That said, it's not a massive problem and I'm sure it's not going to really bother anyone. Most people will be intelligent enough to know when a link doesn't take them where they expect it too, especially programmers ( 8) ).

It's not particularly intrusive or anything and seems pretty harmless. I mentioned it in more of a "possible overlooked error" way, than an "OMG! THIS PLACE AZ VIRUSESES!!!11" or something.

2952
SFML website / Misleading Forum Link
« on: September 17, 2014, 12:37:48 am »
There is a link at the very bottom of the forum page that links to a site called Create a Forum. This link's name/title, however, is displayed as "Simple Audio Video Embedder".
Surely this could just say "Create a Forum" or something.

2953
General / Re: displaying multiple sprites
« on: September 17, 2014, 12:07:21 am »
some sort of error
What sort of error?
Did just changing the <= to < also throw an error?

2954
Graphics / Re: Vsync limits entire loop to 60 cycles per second
« on: September 15, 2014, 10:48:10 pm »
If you need to run your 'game loop' more rapidly than the display rate, you'll need to "decouple the simulation and rendering framerates", as described in this article about time steps.

2955
General / Re: displaying multiple sprites
« on: September 15, 2014, 10:30:01 pm »
I'm no expert with pointers. In fact, I avoid them whenever possible, which is almost all of the time.
However, I did find that I needed to sort of know what they are  :P

This, I found quite descriptive and it might help you to resolve your issue.

Pages: 1 ... 195 196 [197] 198 199 ... 224