• Advertisement

C++ Targeting Different Platforms

Recommended Posts

Don't use a fixed resolution, do it like every other PC game with a resolution setting that let's the player use whatever resolution he wants and you adapt the game to scale or to be properly playable at different resolutions.

Share this post


Link to post
Share on other sites
Advertisement
On ‎1‎/‎30‎/‎2018 at 7:35 PM, swiftcoder said:

However, keep in mind that monitor scaling only typically kicks in for exclusive fullscreen modes. If you want to be able to play in windowed mode, you typically have to take care of scaling yourself.

Well, what is this kicking in of the monitor for scaling?  I was going to scale it myself with :

sf::RenderWindow window(sf::VideoMode(1024, 768), "title", sf::style::Fullscreen);

where the resolutions would be different and possibly the style.

 

Secondly, can I use a command like above myself for fullscreen mode too?  And I haven't seen any mode for exclusive using SFML!

 

Thanks,

Josheir

Share this post


Link to post
Share on other sites
11 hours ago, Michael Aganier said:

Don't use a fixed resolution, do it like every other PC game with a resolution setting that let's the player use whatever resolution he wants and you adapt the game to scale or to be properly playable at different resolutions.

Hmm, and all the different Aspect Ratios will have a different look?

Sincerely,

Josheir

Edit:  Is this right:  and those with the same Aspect Ratios will be scaled by (multiplied with) the ratio that is the same for both width and height?

Thank you!

 

Edited by Josheir

Share this post


Link to post
Share on other sites

Okay, so as I am finally understanding it:     when a 96 x 96 image is scaled by 100 % twice with Gimp it is making a scaled up image which is like one pixel is equal to 4.  Now, the confusing part is that the "pixels are bigger" when analyzed and they really look to be the same size when zoomed.  So, when using the 4K monitor type, if I want to display this image at it's original size I would scale up the image asset so that each pixel is four pixels and because the pixels are 1/4 of regular resolution it should look the same as it did originally.

Is this right?

Josheir

Share this post


Link to post
Share on other sites
11 hours ago, wintertime said:

I think, you may want to use a sf::View to scale everything and avoid having all your drawing code scale every coordinate.

Thank you for the tip, is useful!

Share this post


Link to post
Share on other sites
On ‎1‎/‎29‎/‎2018 at 3:19 PM, Mike2343 said:

If you're going to force me to your arbitrarily picked resolution, then at least let me run it windowed. 

What are the advantages to making a game run windowed mode instead of fullscreen?

 

Sincerely,

Josheir

Share this post


Link to post
Share on other sites
4 hours ago, Josheir said:

What are the advantages to making a game run windowed mode instead of fullscreen?

 

Sincerely,

Josheir

I don't have to look at massive, stretched out pixels in windowed mode.  Why a lot of older games that have been remade for modern OS's/hardware support the feature.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Advertisement
  • Advertisement
  • Popular Tags

  • Advertisement
  • Popular Now

  • Similar Content

    • By sergio2k18
      Hi all
      this is my first post on this forum.
      First of all i want to say you that i've searched many posts on this forum about this specific argument, without success, so i write another one....
      Im a beginner.
      I want use GPU geometry clipmaps algorithm to visualize virtual inifinte terrains. 
      I already tried to use vertex texture fetch with a single sampler2D with success.
       
      Readed many papers about the argument and all speak about the fact that EVERY level of a geometry clipmap, has its own texture. What means this exactly? i have to 
      upload on graphic card a sampler2DArray?
      With a single sampler2D is conceptually simple. Creating a vbo and ibo on cpu (the vbo contains only the positions on X-Z plane, not the heights)
      and upload on GPU the texture containing the elevations. In vertex shader i sample, for every vertex, the relative height to te uv coordinate.
      But i can't imagine how can i reproduce various 2d footprint for every level of the clipmap. The only way i can imagine is follow:
      Upload the finer texture on GPU (entire heightmap). Create on CPU, and for each level of clipmap, the 2D footprints of entire clipmap.
      So in CPU i create all clipmap levels in terms of X-Z plane. In vertex shader sampling these values is simple using vertex texture fetch.
      So, how can i to sample a sampler2DArray in vertex shader, instead of upload a sampler2D of entire clipmap?
       
       
      Sorry for my VERY bad english, i hope i have been clear.
       
    • By mangine
      Hello. I am developing a civ 6 clone set in space and I have a few issues. I am using Lua for the logic and UI of the game and c++ directx 12 for the graphics. I need a way to send information between Lua and c++ occasionally and was wondering what is the best and most flexible (and hopefully fast) way to do this. Don't forget that I also need to send things from c++ back to Lua. I know of a lua extension called "LuaBridge" on github but it is a little old and I am worried that it will not work with directx 12. Has anybody done something similar and knows a good method of sending data back and forth? I am aware that Lua is used more and more in the industry and surely plenty of AAA game programmers know the answer to this. I want a good solution that will hopefully still be viable code in a couple of years...
    • By owenjr
      Hi there.
      I'm pretty new to this and I don't know if it has been asked before, but here I go.
      I'm developing a game using SFML and C++.
      I would like to use the "Tiled" tool to load maps into my game but I don't actually find any tutorial or guide on how to exaclty use it (I know that I have to read an XML file and stuff). I just step into diverse projects that make all a mess. 
      Anyone knows where can I find good information to make my map loader by myself?
      Thanks in advantage!!
    • By GhostarWhite7
      Today again I painted the next drawing. I look at him and I understand that something is wrong in him. Can problems with the prospect or with black and white or with the composition or is everything terrible? help me figure it out, help.. My english is not very well, i'm from russia and i want to draw for game

  • Advertisement