Jump to content
  • Advertisement
Josheir

C++ Targeting Different Platforms

Recommended Posts

3 hours ago, Mike2343 said:

You can also scale non-uniformly your 2D art assets to make them look better at whatever resolution too 

I am confused : say we are scaling the images up for a bigger monitor with a higher resolution.  What we're discussing is that we make these images bigger because there is more space on the display.  But, I don't think I necessarily want my artwork very huge.  Maybe I am misunderstanding this exactly, what were discussing?

Confused,

Josheir

Share this post


Link to post
Share on other sites
Advertisement
29 minutes ago, Josheir said:

what is the resolution that your 4k is running this at?

4K is 3840 × 2160 pixels.  A 24 inch monitor running at 4K is great.  Two is even better.

You might want to consider the most common aspect ratio of displays these days is 16:9 because that's what most TV broadcasts are, so your display media (TVs, computers, tablets, phones) tend to be made to fit that.  That means 1080p and now at twice the dot-pitch, 2160p AKA 4K.

Gone are the days when you'd have an old bottle monitor showing 1024x768 with 96 PPI standing in for 72.27 points over a smaller value of an inch.  I think it's been over a decade since I've used one of those.

Share this post


Link to post
Share on other sites

Why even use a fixed resolution these days?

The one thing mobile development has given the gaming world is scalable graphics that fit any screen size.

Just use the same rules used for mobile UI. Design your art as high as you can and scale it down from there. Scaling up should be done with a "Box" scale to keep pixel perfection (1 pixel ->4 pixels ->16 pixels etc.).

Share this post


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

Swiftcoder, what is the size of this monitor in inches (high and wide,)  and what is the resolution that your 4k is running this at?   Also, what type of device is it for?

4k is a standard TV resolution, i.e. 2x 1080p in each direction, or 3840x2016.

My home monitor is 40" diagonal, but that's unusually large for a PC monitor. At work I use a 32" diagonal at the same resolution. Up until 2 years ago, I used a pair of 27" displays at 2560x1440 each.

These are all off-the-shelf PC monitors, and most standard PC monitors these days are similar, either 16:9 or 16:10 aspect ratio - 4:3 is only found on specialty pro displays at this point.

If you are planning to ship on Android or iOS, the mobile world is far more varied, not just in terms of resolutions and aspect ratios, but also in strange shape displays (such as the iPhone X "notch"). You'll have to deal with scaling your game, but also moving UI elements out of the way of mobile operating system affordances.

Share this post


Link to post
Share on other sites
4 minutes ago, swiftcoder said:

My home monitor is 40" diagonal, but that's unusually large for a PC monitor. At work I use a 32" diagonal at the same resolution. Up until 2 years ago, I used a pair of 27" displays at 2560x1440 each.

Hmm...if the monitor is that big I don't understand why the 1024 x 768 would be so small?

 

4 hours ago, swiftcoder said:

At the very least you need to scale that 1024x768 up to the height of the monitor.

And do you mean the entire height of 2160 pixels, why exactly?

 

Thanks once again,

Josheir

Share this post


Link to post
Share on other sites
36 minutes ago, Josheir said:

Hmm...if the monitor is that big I don't understand why the 1024 x 768 would be so small?

With a monitor that big you have to sit very far away in order to see the entire monitor (think about watching TV from a couch on the other side of the room). Text, for example, isn't going to be readable from that distance on such a small segment of the screen.

But more than that, it just isn't very enjoyable to play a game that makes the arbitrary decision that I should be using a monitor resolution from the 90's :)

39 minutes ago, Josheir said:

And do you mean the entire height of 2160 pixels, why exactly?

So that it fills as much of the display as possible. Everyone will still have black bars on 2 sides (since most monitors are widescreen), but at least I won't have black bars on all 4 sides that account for 87.5% of my pixels...

Share this post


Link to post
Share on other sites

No one want's 87% of their monitor to be black for your game at it's non-standard aspect ratio is what we're basically saying.  I only have a 1080p monitor (2x27") and your game would only use ~75% of my screen.  Again, for someone like me running your game in a windowed mode, not full screen might be do-able.  But for swiftcoder it would be difficult to make anything out.  Think about it, his work monitor is only 32" which is only 5" larger than mine but he has basically 2x the pixel density.  You screen and art assets would be tiny.  You're most likely going to have to scale them up or redo them for modern displays or expect poor reviews.

Share this post


Link to post
Share on other sites

I think scaling up with whole numbers and blacking the rest is the proper way to go. Then you'd have good looking graphics and use as much as possible of the monitors area.

I prefer having black bars to skewed graphics.

 

 

Share this post


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

Hmm...if the monitor is that big I don't understand why the 1024 x 768 would be so small?

What you may be missing is that not all pixels are of equal size.

4K monitors have more dense pixels, ie each pixel is smaller so you get more pixels/inch. To get the same size images displayed (in inches of used screen size), the images must use more pixels, ie be bigger in x and y size.

 

The idea is that more pixels/inch means you can show more smaller details, eg anti-aliasing of text becomes better.

Share this post


Link to post
Share on other sites
2 hours ago, Alberth said:

4K monitors have more dense pixels, ie each pixel is smaller so you get more pixels/inch

Yes, this.

Consider that a standard 1080p monitor at 24 inches has less than 100 PPI (pixels per inch). A MacBook has ~220 PPI. An iPhone X has 450 PPI. The Galaxy S6 has nearly 600 PPI.

That makes your 768 pixel tall game nearly 8 inches tall on the 1080p display, but only 1.2 inches tall on a the Galaxy S6.

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

  • Popular Now

  • Advertisement
  • Similar Content

    • By xDanix
      Hi guys, so im developing a game using GMS2, following shaun spalding tutorials from youtube, my problem is that he explains only the basics on the mechanics, and since i have almost 0 knowledge in code, i cannot derail far from what he writes.. the main issue that i have now is developing the character animation; i want to make a jump, something like: impulse, ascending, descending, landing and also some smooth transition between ascencion and descent. now, in the way he wrote the code i get as follows:
      // animation
      if (!place_meeting(x,y+1,oWall))
      {
          sprite_index = sPlayerA;
          image_speed = 0;
          if (sign(vsp) > 0) image_index = 1; else image_index = 0;
      }
      oWall is my collision object, sPlayerA is my jump sprite with two frames on it.
      that gives me a basic and solid jump, but i feel like its too static.... Any ideas on how to write something to get a nice smooth jump with more than just two frames? i'm aiming at four or five frames total.
      thanks in advance, here's a screenshot of the work in progress:

    • By Aggrojag
      Hello!
      I'm working on a game that is a narrative driven dark comedy with some small aspects of platforming and puzzle solving. The project is rather small as well. It touches on topics such as suicide, mental illness, family, corruption, free-will, and redemption.
      This project is exercise in polish, this means some experimentation will be needed along with some reworking of assets as they're provided.
      This will be a revshare model.
      First, I'm looking for a 2D sprite artist, not pixelated, that can compliment the style of the attached images, and be similar to the temporary character.
      We are looking to bring on a SFX designer at this time. Full list of required SFX will be available upon request, as well as a build with all elements related to sound implemented in some form (many SFXs pulled from the web for now). Will likely require some field recording, and some pretty strange SFX for when things get weird. I imagine a good portion of these will be quite fun to create.
      Lastly, I'm looking for a male voice actor, English should be your primary language. There will be at minimum two characters that will need to be brought to life through vocals. The first voice is similar to Marvin from Hitchhiker's Guide to the Galaxy. A reference for the second voice would be a mix of Ren (Ren & Stimpy), and Android 21 (DragonBallFighterZ). Due to formatting, I'm not including YouTube links in the post, sorry.
       
      WIP Scene with our custom shaders attached (platforms are lazily placed, as this was an asset test):

      A scene with dynamic lighting and temp character:

       
      Unshaded asset:

      If you made it to the bottom, thank you, and I look forward to hearing from you.
    • By BearishSun
      bs::framework is a newly released, free and open-source C++ game development framework. It aims to provide a modern C++14 API & codebase, focus on high-end technologies comparable to commercial engine offerings and a highly optimized core capable of running demanding projects. Additionally it aims to offer a clean, simple architecture with lightweight implementations that allow the framework to be easily enhanced with new features and therefore be ready for future growth.
      Some of the currently available features include a physically based renderer based on Vulkan, DirectX and OpenGL, unified shading language, systems for animation, audio, GUI, physics, scripting, heavily multi-threaded core, full API documentation + user manuals, support for Windows, Linux and macOS and more.
      The next few updates are focusing on adding support for scripting languages like C#, Python and Lua, further enhancing the rendering fidelity and adding sub-systems for particle and terrain rendering.
      A complete editor based on the framework is also in development, currently available in pre-alpha stage.
      You can find out more information on www.bsframework.io.

      View full story
    • By BearishSun
      bs::framework is a newly released, free and open-source C++ game development framework. It aims to provide a modern C++14 API & codebase, focus on high-end technologies comparable to commercial engine offerings and a highly optimized core capable of running demanding projects. Additionally it aims to offer a clean, simple architecture with lightweight implementations that allow the framework to be easily enhanced with new features and therefore be ready for future growth.
      Some of the currently available features include a physically based renderer based on Vulkan, DirectX and OpenGL, unified shading language, systems for animation, audio, GUI, physics, scripting, heavily multi-threaded core, full API documentation + user manuals, support for Windows, Linux and macOS and more.
      The next few updates are focusing on adding support for scripting languages like C#, Python and Lua, further enhancing the rendering fidelity and adding sub-systems for particle and terrain rendering.
      A complete editor based on the framework is also in development, currently available in pre-alpha stage.
      You can find out more information on www.bsframework.io.
    • By lucky6969b
      like this?

      const D3DXMATRIX robertx = D3DXMATRIX(1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!