Cocos2d-x: Resize window when running in win32 - cocos2d-x

I have searched a lot but there are no result.
i want to check my game on screen (1080x1920) it too large for my desktop.
I set this
eglView->setFrameSize(1080, 1920);
how can i use this screen solution with smaller size of window
Thanks for all your help.

Use method: eglView->setFrameZoomFactor(0.6f);

Related

iPhone message preview panel

So, at my jobb im currently tasked with creating a preview panel for a ios message.
It needs to be "as exact as possible" so i was thinking using css pixel = device pixels / device pixel ratio for width and height. Would that be a good way to go? What would the scale for the fonts be if so?
I would not recommend going that direction. Every iPhone is of a different size. And some users might enlarge the text on their iPhones so that they can read it better. I would make it as responsive as possible.
This is a tool that I use when developing for different screen sizes: http://www.responsinator.com/
If you want to copy and paste your code here I can help you accomplish this.

Best way to catch mobile css media query

I'm new to responsive css. I've learnt a lot about media queries, but I still have not figured out which is the best way to catch if the user is using a mobile or not.
The media query to identify a mobile user uses the device-width, but which is the best value to set the breakpoint?
When using my android smartphone with Google chrome, the width of the page is about 400px, even thought the real resolution is full hd, 1080px width. Does this depends form the browser, or what? I saw that someone uses the em mesure to set the breakpoint, is this more accurate? I'd like to know about the handheld property more, too.
Finally, after having read lots of different informations, can you please tell me which is the moste effective way, the best media query to catch if the client is mobile or not? Thank you.
The media query to identify a mobile user uses the device-width, but which is the best value to set the breakpoint?
There are a few theories out there on how to handle this. Some people go and find the most popular device widths and set their breakpoints at those places. This is great if you know for certain what most users on your site use. However, the downsides are that you have to mold your design to those widths and you have to continually update your code as new devices come out.
So your breakpoints would be something like:
// iPhone 6
#media only screen and (min-device-width : 375px) {
// styles go here
}
// iPhone 6+
#media only screen and (min-device-width : 414px) {
// styles go here
}
The other theory is to make it fully scalable at any size regardless of what the device is. The upside to this is that you can insure that your design looks great on all devices. The downside is that it makes your code a bit more bloated. the breakpoints here would be wherever you need them. I personally use this method but start with break points at 1200 and go to 1100, 1000, as needed. If I'm going mobile first I'll start with 320, 350, 400, 500, etc...
When using my android smartphone with Google chrome, the width of the
page is about 400px, even thought the real resolution is full hd,
1080px width. Does this depends form the browser, or what?
The device width has many factors to it. But the device width is basically the number of pixels across that the browser is displaying. There's a little more to it than this, but your best bet is to Google device widths.
I saw that someone uses the em mesure to set the breakpoint, is this
more accurate?
Nope. It's just a way of subdividing from a parent element. Until you have more time to research this, stick with pixels.
Finally, after having read lots of different informations, can you
please tell me which is the moste effective way, the best media query
to catch if the client is mobile or not? Thank you.
The best way to do this is to determine your break points. You cannot target mobile browsers specifically using CSS. You can only target the attributes of those browsers (width, height, orientation) so you can know that iPhone6's are 375 pixels across in portrait. So you can target them using that width. As Allan said, you can target devices with Javascript or server side libraries and add classes that way. But IMO it's better to stick with device widths and save those for situations where you're absolutely stuck.

chrome 38 screen size developer tools

I noticed with the new update chrome added a lot of great features for web developers however when you had the developer tools open and dragged the screen it used to tell you the screen width size in the top right corner. Now it just has the measurement up top but it's very had to determine exact pixel size because it is ruler marks. Is there any way to get back the old exact pixel number of the screen width size?
I Googled around a bit and couldn't find much on this topic. Any help would be much appreciated as it helps me quite a bit in writing precise media queries. Thanks for reading!
I can suggest you this screen ruler. It helps me a lot. With it you can measure size of any object you want.
when using chrome you can get more extensions you can use this 'https://chrome.google.com/webstore/category/extensions?hl=en-US' or normally go to "customized and controller->settings->extensions->Get more extensions" and search any extension what you want.
thank you :)

Optimising for all Screen Sizes - Flash AS3

I'm making a game that goes into fullscreen mode when started up. I want to be able to optimise my game assets for all user's screen sizes. I have some code that traces the sizes of the user's screen size, but I'm not sure how I'd use this to optimise the game assets to fit the user's screen size.
Does anybody know how I could do this?
Thanks in advance.
It depends on many factors in your game, but if you just want to know how to create resize method in your game, check out this answer:
https://stackoverflow.com/a/14681344/2009788

what is full screen mode

I know you can fake full screen by expanding a window and eliminating the title bar , status bar , and other stuff, I'm not interested in this, I want to know about "real" full screen mode (I don't know how to call it else) , like in games.
what exactly is full screen mode?
what win-api should I use to achieve this?
can this be used to play movies in full screen ? I know windows media player uses a fake full screen because I can "cut" thru it and see the desktop (using regions win-api).
can I "cut" thru "real" full screen like I thru a window (using regions win-api) ore is this directly writing to video memory and there is nothing "under" it?
Thanks!
If you want to make games on Windows in full-screen, the best option is XNA. This uses DirectX underneath, but hides a lot of the implementation details and plumbing to make it easy for the developer to start working on his game.
XNA is freely downloadable, and has good documentation.
XNA Game Studio 4.0 can be downloaded here.
...and you might want to support the "fake" fullscreen mode in addition to "real" fullscreen - it's very nice for those of us that run multi-monitor systems.
If you don't want to use DirectX, create window and call ChangeDisplaySettings with CDS_FULLSCREEN flag. OpenGL applications use this way to go fullscreen.
As far as a user is concerned, full screen is just when a window takes up the entire screen such that they no longer see any window borders or other desktop stuff.
As you know, not all full screens are created equal.
'proper' full screen is where the program takes control of the screen. When a game uses this mode, it can change the resolution of you screen. If you have ever played an old game and existed to see your icons all messed up, this is; for the duration of playing the game, your desktop was at a lower resolution.
with 'borderless full screen' the program window is striped of any borders, the title bar and frame etc., and is just a rectangle of pure rendering. If you then set this rendering context to be the same size as your desktop, you get the effect of full screen.
Doing border-less is usually the more user friendly way these days, as it is easier to 'tab out' as the other programs are still graphically around. 'proper' full screen gives you full control of the hardware, so in theory you have more power for your program, but it means you have to wait for things to reinitialise when you tab out.
what you do with your rendering context is up to you, so yes, you can use it play videos. It would not matter if you are in 'proper' full screen or not, the rendering code would be the same.
As for cutting through proper full screen windows, I am not sure, but I think there would be nothing else to see, there is only your program.
as for what win-api, there is only one windows api, but I think you mean, what windowing library; as this is getting to be a long answer already, I shall just say it depends a lot on what you want from it.
Please feel free to leave comments if you need me to clarify or expand on any points.