Page 1 of 1

ManiaLinks and resolutions

Posted: 28 Dec 2011, 18:08
by Timmeh7
Hi,
I just started to make my own ML. My resolution is 1280x1024, so 4:3 aspect ratio. Because my ML is designed for 4:3 it looks different on 16:9 resolutions, just not the way I want it to look like. I thought I could make a second version that fits a 16:9 resolution. Then, I would create a page with 2 buttons which let the player choose either 4:3 or 16:9. But that would make the players have to choose every time they enter the ML. So, is there a way I can save the players' choice, so he does not have to choose again?

Re: ManiaLinks and resolutions

Posted: 28 Dec 2011, 19:01
by w1lla
ManiaLinks go Widescreen
ManiaLinks with version 0 have a coordinate system, which is based on a 4:3 screen. The development in the last years, nevertheless, moved on to widescreen monitors, having all ManiaLinks stretched from 4:3 to the widescreen to fill the monitore.

With setting the version to 1, you enable a new coordinate system optimized for 16:9 widescreens. So the new values of the axes of the known positioning systems are as follows:
http://tutorials.mania-creative.com/tm2 ... -eng-4#e21

Re: ManiaLinks and resolutions

Posted: 30 Dec 2011, 13:25
by TomRiddle
the best way would be a php cookie.

Re: ManiaLinks and resolutions

Posted: 30 Dec 2011, 15:51
by gouxim
Simpliest way is indeed to use a php cookie: http://php.net/manual/en/features.cookies.php

It's worth noting that I had some consistency issues with cookies in ManiaLinks, so it might randomly fail to work from time to time.

If you're using PHP and ManiaConnect, you have the login of the visitor in the session, so you can also save it in a DB but it might be a bit overkill ;)