Slick Forums

Discuss the Slick 2D Library
It is currently Sun Dec 08, 2019 6:03 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sun Jul 25, 2010 11:44 pm 
Offline

Joined: Sun Jul 25, 2010 11:34 pm
Posts: 7
Hi, my attempt is to make a game that looks dated, but keeping the resolution and aspect ratio of the screen (I want bigger pixels!!). What should I do to the engine, or what design strategies I must employ to get that effect?
I don't want to scale the screen, some extamples of what I'm trying to do can be seen in games like Owl Boy

Image

It looks like pixel art game, has subpixel antialias though. Can I achieve that effect without modifying core elements in slick?.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 26, 2010 12:20 am 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
Render small, scale.

E.g. you could draw 320x240 and scale into 640x480, pixels being 2x larger.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 26, 2010 9:38 pm 
Offline

Joined: Sun Jul 25, 2010 11:34 pm
Posts: 7
What should I do? get the rendered image, then scale? any code example of such?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 26, 2010 9:52 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
ONi wrote:
What should I do? get the rendered image, then scale? any code example of such?


Code:
   public void render(GameContainer container, StateBasedGame game, Graphics g) throws SlickException {
  g.scale(2,2)
  image.draw();
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 26, 2010 10:26 pm 
Offline

Joined: Sun Jul 25, 2010 11:34 pm
Posts: 7
got it. Now. how do I get rid of the dithering?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 26, 2010 10:35 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 585
ONi wrote:
got it. Now. how do I get rid of the dithering?


When loading an image, if you don't want it to get blurry as its scaled you load it using the Image.FILTER_NEAREST filter.

example
Code:
Image image = new Image(StringPath, false, Image.FILTER_NEAREST);


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 14, 2010 5:09 am 
Offline

Joined: Thu Oct 14, 2010 5:05 am
Posts: 1
thanks for your discussion.

i've figured it out how to do it.

i need more time.

if i finished it i will post it here.

_________________
linkchannels | auction | webhosting directory


Top
 Profile  
 
PostPosted: Fri Oct 15, 2010 8:26 pm 
Offline
Regular

Joined: Sun Oct 11, 2009 8:53 pm
Posts: 219
ONi wrote:
Hi, my attempt is to make a game that looks dated, but keeping the resolution and aspect ratio of the screen (I want bigger pixels!!). What should I do to the engine, or what design strategies I must employ to get that effect?
I don't want to scale the screen, some extamples of what I'm trying to do can be seen in games like Owl Boy

Image

It looks like pixel art game, has subpixel antialias though. Can I achieve that effect without modifying core elements in slick?.


did you have this cool game tile set?

i looked for it hours and didn't find
i need a cool good looking tile set 2d
also what tile program you use?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 04, 2011 10:05 pm 
Offline

Joined: Mon Mar 28, 2011 9:42 pm
Posts: 19
You could also consider implementing the EPX or hqnx sprite scale algorithms as shaders in OpenGL and applying them to the whole scene.

http://en.wikipedia.org/wiki/Pixel_art_ ... algorithms


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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