ManiaLinks and resolutions

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
Timmeh7
Posts: 242
Joined: 09 Oct 2010, 23:56

ManiaLinks and resolutions

Post 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?
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: ManiaLinks and resolutions

Post 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
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
TomRiddle
Posts: 250
Joined: 14 Jul 2011, 16:16

Re: ManiaLinks and resolutions

Post by TomRiddle »

the best way would be a php cookie.
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: ManiaLinks and resolutions

Post 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 ;)
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 4 guests