Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Can someone help me understand what's going on in this co-ordinate system?

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Mar 2017 02:46 Edited at: 10th Mar 2017 02:48
i get the attached screen from this code






The big blue area is a 10x10 pixel square???? (attached)

Attachments

Login to view attachments
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Mar 2017 03:34
Please elaborate. What is the point of this code?
The coffee is lovely dark and deep,and I have code to write before I sleep.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Mar 2017 06:35
What i want to do is access the window pixel for pixel. No percentage scaling
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Mar 2017 10:02
-1,-1 did not work, it is also not in online help.
SetVirtualResolution( 1024, 768 )
AGK (Steam) V2017.02.28 : Windows 10 Pro 64 Bit : AMD (17.2.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Mar 2017 14:18
Quote: "What i want to do is access the window pixel for pixel. No percentage scaling"


Why? Elaborate.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Mar 2017 16:12
The why should not matter.

SetScissor(0, 0, 0, 0) is pointless there because all that does is turn off clipping. And since it's not been used anywhere else....

I'm not sure what you were trying to do with SetVirtualResolution( -1, -1 ) but you need an actual resolution value there. Like Markus said, try 1024x768.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Mar 2017 17:10
Quote: "The why should not matter."


Yes it does. He needs to elaborate.
The coffee is lovely dark and deep,and I have code to write before I sleep.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 10th Mar 2017 17:18
The answer is to just set your virtual resolution to the same size as your window right? If your window is 1024x768, and you want a pixel for pixel coordinate system, then set the virutal resolution to 1024x768 too. No need to elaborate.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Mar 2017 20:36
Yes, he still needs to elaborate what he is trying to do and why.
As he is already an app dev I am sure it would not be too much trouble
for him to elaborate. Obviously he knows he SetVirtualResolution to -1s.
The question is why?
The coffee is lovely dark and deep,and I have code to write before I sleep.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Mar 2017 21:57
On the setvirtualresolution() issue i have seen in another thread that they have used it


Ok so i have a tile editor. I want the user to be able to drag the window to resize it and it shows more of the level.
also in game it would be good to just show more of the level for different resolutions


like this

Start with this;



User resizes the window;
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Mar 2017 05:01
Oh, that's completely different!

Try this, it worked for me:


"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Mar 2017 21:12
Superb!!! Thanks heaps phaelax. Exactly what i want
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Mar 2017 23:00
I was actually surprised at how well it worked myself

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Mar 2017 00:03
I can even resize the window across multiple monitors which is what i was really hoping for
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 12th Mar 2017 01:54
See what happens when you explain what you were trying to do.
The coffee is lovely dark and deep,and I have code to write before I sleep.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Mar 2017 03:16
haha. too true. thanks

Login to post a reply

Server time is: 2024-11-24 18:59:56
Your offset time is: 2024-11-24 18:59:56