Jump to content

  • Log In with Google      Sign In   
  • Create Account


Best way to create full screen, 320x240 surface, no anti-aliasing?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 GradualGames   Members   -  Reputation: 108

Like
0Likes
Like

Posted 08 March 2013 - 08:24 AM

I'm hoping to develop a game engine that essentially can simulate a full screen, tile based graphics system similar to old video game consoles (NES, SNES, etc.). I would like to do this with all open source software that is likely to be maintained well into the future. No proprietary, heavy game engines.

 

From initial research, it sounds like my best bet would be a combination of SDL and OpenGL, where SDL would just be for window management and getting my game full screen, and then I would use OpenGL to scale all my low-res textures to full-screen size, to emulate a 320x240 mode. Is it possible to do this with absolutely all anti aliasing off? I want it to look pixel-sharp.



Sponsor:

#2 MrDaaark   Members   -  Reputation: 3535

Like
4Likes
Like

Posted 08 March 2013 - 08:35 AM

Draw onto a 320x240 texture, then draw that texture as your screen. The only way to keep it sharp is to scale it at an even ratio (2x,4x, etc..), and use the NEAREST/POINT filtering mode.

But we don't have square screens anymore. You'd have to center it over a background image, or use a 16:9 or 16:10 resolution in the original image. Such as 320x180 (16:9).

#3 Ravyne   Crossbones+   -  Reputation: 5695

Like
0Likes
Like

Posted 08 March 2013 - 01:36 PM

Honestly, to mimic consoles of yor, you don't even really need anything as complex as OpenGL (though its certainly an option).

 

The straight-forward approach you describe will also only be good for simple tile-based games, and won't really recreate the console experience. Alot of that console magic had to do with the use of palettes, and with manipulating the hardware between raster lines. You'll have to emulate those things too if you really want that olde time experience. Most of that stuff is easy enough with a software renderer, but utilising GL or D3D draw calls complicates things like per-scanline effects (still doable, of course).

 

Still more of the console feel is around hardware limitations, so you'll have to decide whether you want a truly realistic approach, or something that's more like an old console with unlimited but largely static resources.



#4 Sik_the_hedgehog   Crossbones+   -  Reputation: 1411

Like
0Likes
Like

Posted 08 March 2013 - 09:39 PM

But we don't have square screens anymore. You'd have to center it over a background image, or use a 16:9 or 16:10 resolution in the original image. Such as 320x180 (16:9).

I found 384×240 (16:10) and 384×216 (16:9) to be better options.


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#5 GradualGames   Members   -  Reputation: 108

Like
0Likes
Like

Posted 09 March 2013 - 12:32 PM

It occurred to me perhaps I can up-scale all the low res graphics I have for this project and then just use normal SDL blitting. If I make sure this always is up-scaled using powers of 2 I should get perfect sharpness correct? I don't really care if it fits the screen perfectly (just that it doesn't get clipped by the screen...). Does that sound like a viable option?


Edited by GradualGames, 09 March 2013 - 12:33 PM.


#6 Sik_the_hedgehog   Crossbones+   -  Reputation: 1411

Like
0Likes
Like

Posted 09 March 2013 - 04:46 PM

You probably mean integer multiples instead of powers of two (e.g. 3 is OK, 2.75 is not). And SDL defaults to no texture filtering, for the record. (EDIT: wait, I think you mean upscaling the textures - upscaling the coordinates of the triangles should be enough, no need to change the textures)

 

The problem is that then you risk the coordinates to not be aligned to the fake (scaled) pixels, which completely ruins it (this is probably the biggest issue with pixelart on modern games). You'll need to take this into account and modify the coordinates to make sure they always end up aligned to the scaled grid.

 

Note the above workaround only works if you're drawing the sprite as-is and you limit special effects to just flipping (things like coloring aside). If you add scaling or rotation, you're pretty much guaranteed to break the alignment (though those effects on pixelart don't look very good anyway, faking them with hand-drawn sprites is usually better).


Edited by Sik_the_hedgehog, 09 March 2013 - 04:51 PM.

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS