Some progress today
Today there was not much time for PyWeek but I did spend some time thinking about how to make a 320x240 game playable on a modern computer. Pixels have to be magnified!
I experimented with cocos2d but scaling pixels up in that is tricky thanks to OpenGL artifacts. Also, sadly, 64-bit Windows users wouldn't be able to play the game :(
So I settled on the brute-force pygame.transform.scale approach seen in today's screenshot on the right. It works OK and a 800x600 window is playable - it also works in fullscreen on a lot of computers (most, I imagine), allowing even more scaling for free. I think I'll stick with that and get more content into the game tomorrow night.
Also tweaked some of the graphics, reducing them down to 16x16 tiles and sprites (from 32x32). I still have to settle on a colour palette though I think I'm leaning towards the Commodore 64 palette... but then this more modern 16-colour palette is quite an improvement...
Edit: I've just noticed that the screenshot is huge ... I think because I captured it on a retina display so it's 4x the resolution it should be :-(
(log in to comment)
You can use the viewport to scale with pyglet, I think we chatted about that in twitter (?).
What's wrong with 64-bit Windows users? It is because issue #664? That's unfortunate, I though it was only related to win32fots :(
@Hugoagogo: I might give it a try, but I usually run into tile seam issues when doing tile mapping and using OpenGL with a non 1-1 pixel mapping (and then there's non-integer pixel positioning issues as well - it just becomes so yuck). The tile implementation in cocos2d handles all that stuff unless the viewport is scaled IIRC.
@reidrac: Oh, I recalled that pyglet was a complete no-go on Win64... Happy to be mistaken!
Maybe I should just give it another go and see. It'd mean I could use more fancy effects, which would be nice.
Hugoagogo on 2014/05/12 13:01:When using pyglet I would usually just base some code of the "fixed_resolution.py" example code and that works out pretty well and lets the user change it to anything they want without breaking the game. http://pyglet.googlecode.com/svn/trunk/examples/fixed_resolution.py