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

Pages: [1]
1
Window / Re: View -> Fullscreen Window. How to apply empty margin?
« on: October 27, 2017, 09:54:51 pm »
Thank you very much, this resource helped a ton.

Now, is there a way to get the rotation of the display resolution through sfml or would that have to be something that needs to be retrieved through another resource?

2
General / Re: Collision between circle and rect
« on: October 26, 2017, 09:12:50 pm »
Doing multiple rectangles rotated around a common point would not be ideal however, would definitely be the easiest way to get a circular (relatively) boundary to check against a rectangles boundary. you could perhaps figure out a clever way to use pixel checking for collision in comparison for colors.  This also inst a great way to do it, but you would need to put your frame to a sf::Image and use getPixel(x, y); and use some fancy equations to create coordinates to check for a circular boundary. The downfall is that you would have to check collision with color.

3
Window / View -> Fullscreen Window. How to apply empty margin?
« on: October 26, 2017, 08:40:42 pm »
I have a view defined as
sf::View view(sf::Rect<float>(0, 0, 310, 248));

I am then applying it to a window defined as
 sf::RenderWindow window(sf::Videomode::getFullscreenModes().at(0), "Space Invaders", sf::Style::Fullscreen);

I am trying to apply the view to any monitor of any aspect ratio and would like to keep the dimensions of the view and add void space around the view as needed. it works for any monitor with the aspect ratio of 5:4, which isnt even too common anymore. I am unable to figure out how to use view.setViewport(...); correctly to apply this empty space to fill the screen to keep the appropriate aspect ratio of the view. What would be the best way to center the view onto the window while blowing up the view as large as possible using whatever void space necessary?

Pages: [1]
anything