Slick Forums

Discuss the Slick 2D Library
It is currently Sat May 25, 2013 1:21 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Mon Jul 23, 2012 1:39 pm 
Offline
User avatar

Joined: Tue Jul 17, 2012 11:27 am
Posts: 62
Hi
At the moment I launch my game with
Code:
app.setDisplayMode(app.getScreenWidth(), app.getScreenHeight(), true);
.
My display resolution is 1920x1080. When I compare it to the game run at 1280x720 the only difference I can spot is the size of the viewport.
'Normal' games let you choose your resolution and make it fit by scaling the output without blurring. So I think I have to use ScalableGame. As far as I understand it, you render it at any size (high resolution) and then scale it to the required siz. But what is any? Is it the possible highest resolution?
Why are games running faster in a smaller resolution when smaller would mean more scaling from original? There is somewhere a logically mistake, so if you found it tell me please :)
Cheers,
Cbeed

_________________
Open source isometric engine made with slick: http://wurfelengine.net


Top
 Profile  
 
PostPosted: Tue Jul 24, 2012 12:58 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
No, You mostly have a min size. This is where you render everything (You can differ between 4:3 and 16:9 Resolution to make things look better on one of the ratios). Then when you select a higher resolution you scale the whole context up.

You can also base your game rendering on the resolution the player selected. So with higher resolutions the player sees more of the world but needs more performance of course. OR a player chooses a smaller resolution where he does not see that much but can play the game smoother. Here you should have a min size too where you can verify that the game runs good on this resolution and everything below that looks bad and you ignore it.

A good start is 800x600. Nearly every monitor supports that :D

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
PostPosted: Tue Jul 24, 2012 10:59 am 
Offline
User avatar

Joined: Tue Jul 17, 2012 11:27 am
Posts: 62
What do you (or I?) mean with scaling?
Is it scaling the image output like in this case:
pixel art games like VVVVVV (mostly neares neighbor to stay edged)

or
scaling the rendering resolution:

Lets say I have two rectangles with the size 400x600px (on 800x600 res). With 1920x1080 res each gets rendered at 960x1080px.

Can the computer automaticaly do the second one for me? Is the second one perfomed in modern 3D games?


"Higher resolution->bigger view

_________________
Open source isometric engine made with slick: http://wurfelengine.net


Top
 Profile  
 
PostPosted: Wed Jul 25, 2012 12:28 am 
Offline
Oldbie

Joined: Thu Mar 15, 2012 12:38 am
Posts: 260
Cbeed wrote:
What do you (or I?) mean with scaling?
Is it scaling the image output like in this case:
pixel art games like VVVVVV (mostly neares neighbor to stay edged)

or
scaling the rendering resolution:

Lets say I have two rectangles with the size 400x600px (on 800x600 res). With 1920x1080 res each gets rendered at 960x1080px.

Can the computer automaticaly do the second one for me? Is the second one perfomed in modern 3D games?


"Higher resolution->bigger view


Depends. Maybe you want one portion to be static, so you can not have it scale. Or you want another section to be scalable. For examples of what I'm talking about:
Wanting something to scale: Chat Box - should take up 20% of the screen (or whatever) with a min value that looks good on the lowest resolution.
Not wanting something to scale: Characters - they should always be 128x128 in size. But a bigger view port can show more of the game world, like RD said.

IMO, you won't get an answer that is 100% right for every situation. At least that has been my experience :)

I generally adopt bigger resolutions equal bigger views and don't scale. But for the UI I scale most things. There are some that I want to be static. It depends on what I'm doing.


Top
 Profile  
 
PostPosted: Thu Jul 26, 2012 6:38 pm 
Offline
User avatar

Joined: Tue Jul 17, 2012 11:27 am
Posts: 62
Thx for the answers but I still got no answer how modern 3d games work. I understood that you can do it in different ways and at the same time.

_________________
Open source isometric engine made with slick: http://wurfelengine.net


Top
 Profile  
 
PostPosted: Sun Jul 29, 2012 1:21 pm 
Offline
User avatar

Joined: Wed Jun 20, 2012 10:33 pm
Posts: 35
Location: Doncaster, South Yorkshire
In all fairness, asking a community that specialise in making 2D games with a library called Slick2D, it's not a huge shock that your question about 3D games wasn't answered perfectly.


Top
 Profile  
 
PostPosted: Sun Jul 29, 2012 1:33 pm 
Offline
User avatar

Joined: Tue Jul 17, 2012 11:27 am
Posts: 62
Yeah you are right, but I thought they do it the same way but it seems that 2d games often have only one (mobile games) or only little resolution to choose (e.g Sim City 4).

_________________
Open source isometric engine made with slick: http://wurfelengine.net


Top
 Profile  
 
PostPosted: Wed Aug 08, 2012 1:52 am 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 594
My understanding is that 3d models are like vector graphics, in that you get "scaling for free": http://en.wikipedia.org/wiki/Vector_graphics . I could be wrong though.

2d games, specially pixel art, is raster graphics which is why we have more problems with scaling : http://en.wikipedia.org/wiki/Raster_graphics


Top
 Profile  
 
PostPosted: Wed Aug 08, 2012 2:54 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1469
It really depends on the look you are going for. Some ideas:
  • Use a larger than necessary set of sprites that you then scale down with smooth (linear) scaling to fit the desired screen size. You can use mipmapping to improve the down-scaling smoothness.
  • Depending on the selected resolution, pick a sprite sheet that best matches that resolution. i.e. You will have multiple sprite sheets for different (common) resolutions.
  • Use nearest-neighbour scaling and scale up. This is good for "pixelated" type games. (You can achieve this with ScalableGame)
  • Use a single sprite sheet with no scaling and reposition elements based on resolution, i.e. around edges of screen.
  • Use vector graphics like SVG (supported in Slick). At very small sizes vector doesn't hold up very well.
  • Some combination of the above...

In OpenGL, scaling is "free" (or at least cheap/fast enough that you shouldn't worry about it).

Professional 3D games tend to use a number of the above techniques to support multiple resolutions. Most importantly, in a 3D game, scaling differences are more subtle. If you scale a 2D pixelated sprite by any amount, the scaling will be very evident (artifacts will apear). A 3D model, on the other hand, doesn't show artifacts as clearly, especially since it tends to be far away from the camera.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2012 8:30 pm 
Offline
User avatar

Joined: Tue Jul 17, 2012 11:27 am
Posts: 62
Hey, thanks for your answer. You really helped me a lot!

_________________
Open source isometric engine made with slick: http://wurfelengine.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group