List of Frameworks
BlitzMax Forums/BlitzMax Programming/List of Frameworks
| ||
Hallo forum :-) Can you help me build up a list of open-source BlitzMax frameworks that provide "virtual resolution" functionality, please? (or other non-BlitzMax frameworks if you think they would be easy enough to integrate with BlitzMax) The idea will be to borrow the best bits and use it to facilitate working on the plethora of different screen resolutions out in the wild - on things like desktop, to mobile, etc. On mobile specifically, you cannot change the screen resolution to fit your game, and instead must adapt your game screen around this fixed dimension (which may vary considerably depending on the device you are running on). Thanks ! |
| ||
https://code.google.com/p/sdl-gpu/ http://www.discussiongenerator.com/2014/01/16/resolution-independent-2d-rendering-in-sdl2/ -> which refers to "SDL_RenderSetLogicalSize()" I wrote an Email to you 2 minutes before your post ... maybe some ideas will get rid of the need for an external library. The "SDL_RenderSetLogicalSize()" adds letterbox, which might not be intended (or must be "avoidable" using the method I described in the "goes mobile" thread). bye Ron |
| ||
Well, I was actually thinking more specifically of BlitzMax frameworks... (I shall add that word to the original post to avoid too much confusion later!) :-) |
| ||
@ SDL_RenderSetLogicalSize Alas, we are not using the "Renderer" on SDL, we are banging the hardware directly via OpenGL. |
| ||
Ahh ok ... sorry :p Maybe this could be a start: http://www.blitzbasic.com/codearcs/codearcs.php?code=2879 bye Ron |
| ||
There is |
| ||
As I use BlitzSupports code too (SuperStrict, singleton: https://github.com/GWRon/Dig/blob/master/base.util.virtualgraphics.bmx) I would extend it to have support for multiple stretching options (fullscreen, keep aspect ratio, extend, ...). @Odd2D According to this post it is "[...] Public Domain, so you can use it for whatever purpose you want." Dunno if the tighter integration as "driver" fits more to bruceys ideals. bye Ron |
| ||
I use this http://www.blitzmax.com/codearcs/codearcs.php?code=2879 |
| ||
Doh! Just posted mine in the Mobile thread! Another option might be to run AutoFit through Monkey on GLFW with the GLES2 option (unless I'm hallucinating the existence of that option), as I assume that'd give a lower level OpenGL take on things... might be a bit hard to comprehend/integrate, though. [EDIT: You want higher-level, anyway, so n/m.] |
| ||
My framework uses James Boyd's code as well. Works perfectly. https://github.com/wiebow/game2d.mod |
| ||
Ok... So I created a new "framework file". TSurfaceCamera is a base class which could get more tightly integrated into "NG". By default it does nothing but returning the same values a "unscaled" graphics areal would return. But you could switch other cameras - or even provide new ones (other "scaling/offset" strategies). I already included 2 other "SurfaceCameras": TStretchableSurfaceCamera, which stretches/scales while keeping the aspect-ratio. The code includes some portions of BlitzSupports code (the "flickering"-bugfix - which clears the screen before limiting the viewport again) and Odd2D (the setclscolor part to "black" out the letterbox). The code also uses "shorter formulas" (rearranging sometimes isnt effortless). TExtendedSurfaceCamera limits the virtual resolution to the given 2 resolutions ... so it does not matter what "graphics" you have - you will end up having something between "w,h - w2,h2" (might be handy for android as you just have to calculate things for these resolutions). But somehow I am not that satisfied with the current implementation of this camera. (Edit: for now the ExtendedSurfaceCamera should react similar to the approach explained @ blog.gemserk.com) Ok... the system tries to create a default camera upon "import" of the source file. Of course this is then the "simple" camera. Hmm, more could be seen when you try out the "demo file": source: https://github.com/GWRon/Dig/blob/master/base.util.surfacecamera.bmx demo: https://github.com/GWRon/Dig/blob/master/samples/surfacecamera/surfacecamera.bmx demo image: cameraareas.png Hope it is somehow useful. bye Ron |