Graphics command

Community Forums/Monkey Talk/Graphics command

Chroma(Posted 2011) [#1]
Mark,

Any plans to put a graphics command in Monkey? Going into the .h and/or other file and changing the resolution manually is a bit well...manual!


therevills(Posted 2011) [#2]
Maybe a precompiler command? So that most targets would get altered, for example HTML5 the actually gamecanvas is altered etc.


SLotman(Posted 2011) [#3]
No graphics command?

So on the PC/Mac target I'm unable to set the graphics resolution - or switch it on real time?


Matthew Smith(Posted 2011) [#4]
So on the PC/Mac target I'm unable to set the graphics resolution - or switch it on real time?


Currently you can set the screen size via pre-compiled settings in the code files (depends on the platform) - can't on-the-fly as yet. I would assume as the platform matures we should get settings changable from the IDE or via code and hopefully for the PC Blitz3d/Max style graphics commands.

ATM it's still lowest common denominator which is really phones and HTML5 which don't need this type of functionality.


Matty(Posted 2011) [#5]
For HTML5 you can simply change the MonkeyGame.html file to alter the canvas size after compiling - and it retains this setting each compile because that html file is not regenerated each time you build.

For Phones - I don't see why you'd want to alter the resolution?


xlsior(Posted 2011) [#6]
For Phones - I don't see why you'd want to alter the resolution?


There's huge differences in the supported native resolutions between different phone models -- Some can be 640x480, while others could be as high as 1920x1080. (they can make full 1080HD screens at 3.7" now)

Being able to account for that in your code could be a good thing.


SLotman(Posted 2011) [#7]
Yeah, I can't see why this.

It's dead simple: people should check available resolutions before using the graphics command - on phones, it should return just 1 resolution (or 2 or 3 in case of iPhone/iPad), while on PC/Mac all available ones.

This way, the command could return an error, if you set an invalid resolution.

The only thing which would be problematic would be HTML5, but then the graphics command could accept just about anything without returning an error.


*(Posted 2011) [#8]
I asked for this ages ago, a compiler directive or app options would be brilliant but was told it wasnt on the cards.


AdamRedwoods(Posted 2011) [#9]
Sounds good, when will it be added to the mojo core?

On the other hand, doesn't the DeviceWidth/Height and virtual resolution overcome these problems?