From 48d58206f7f9435c7719b0fcd4a981343f1218df Mon Sep 17 00:00:00 2001 From: Jere Tuliniemi <jere.tuliniemi@qt.io> Date: Fri, 2 Mar 2018 15:08:47 +0200 Subject: [PATCH] Change tennis game resolution --- TennisGame/game.uip | 4 ++-- TennisGame/readme.md | 2 +- TennisGame/scripts/Movement.qml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TennisGame/game.uip b/TennisGame/game.uip index ae8c4c6..7cb3ccd 100644 --- a/TennisGame/game.uip +++ b/TennisGame/game.uip @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <UIP version="3" > <Project > - <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" > + <ProjectSettings author="" company="" presentationWidth="1280" presentationHeight="720" maintainAspect="False" > <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> </ProjectSettings> <Classes > @@ -56,7 +56,7 @@ </Graph> <Logic > <State name="Master Slide" component="#Scene" > - <Add ref="#Layer" aostrength="0" background="Transparent" blendtype="Normal" disabledepthprepass="False" disabledepthtest="False" height="480" heightunits="pixels" horzfields="Left/Width" left="0" leftunits="percent" progressiveaa="None" sourcepath="" temporalaa="False" width="800" widthunits="pixels" /> + <Add ref="#Layer" aostrength="0" background="Transparent" blendtype="Normal" disabledepthprepass="False" disabledepthtest="False" height="720" heightunits="pixels" horzfields="Left/Width" left="0" leftunits="percent" progressiveaa="None" sourcepath="" temporalaa="False" width="1280" widthunits="pixels" /> <Add ref="#Camera" orthographic="False" /> <Add ref="#Light" brightness="100" castshadow="True" lightambient="0.266667 0.266667 0.266667" lighttype="Point" position="0 0 -200" rotation="0 0 0" shdwfactor="73.3938" shdwfilter="15.85" shdwmapfov="90" shdwmapres="8" /> <State id="Scene-Game" name="Game" playmode="PingPong" > diff --git a/TennisGame/readme.md b/TennisGame/readme.md index ff073e6..e83b65c 100644 --- a/TennisGame/readme.md +++ b/TennisGame/readme.md @@ -10,7 +10,7 @@ Movement.qml is the most complex script used. It handles the movement of the pla It includes collision detection and handles score detection and ball serving also. Properties that can be set from the studio for Movement.qml are: -- Obstacle 1: Object that can be collided with +- Obstacle 1: An object that can be collided with - Obstacle 2: Another object that can be collided with - Has Physics: Determines if the object is handled as a ball - Has AI: Determines if the object is handled as the AI paddle diff --git a/TennisGame/scripts/Movement.qml b/TennisGame/scripts/Movement.qml index 562658e..fb9cef4 100644 --- a/TennisGame/scripts/Movement.qml +++ b/TennisGame/scripts/Movement.qml @@ -73,8 +73,8 @@ Behavior { if (mouseDown) { //Handle movement with mouse input - var perspectiveFactor = 1.4; - var halfScreenHeight = 240; + var perspectiveFactor = 1; + var halfScreenHeight = 360; var target = (halfScreenHeight - getMousePosition().y) * perspectiveFactor; if (Math.abs(position.y - target) > 6) { if (position.y > target) -- GitLab