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.

Newcomers AppGameKit Corner / [SOLVED] Ycoords not at top of screen

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Jan 2019 21:34
Just downloaded appgame kit . I drew a line at y0,x0, y1, screenwidth. It drew the line about a half inch down from the top of the screen instead of at the top. Why and how to fix please.
A child's dream never dies.





The author of this post has marked a post as an answer.

Go to answer

puzzler2018
User Banned
Posted: 6th Jan 2019 21:45
How do you want to draw the line. Yes that would be half the inch as you say
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Jan 2019 21:59
Well in dark basic 1,1 is the first pixel on the screen I naturally i assumed 1,1. Would be the first pixel in agk. I want the line to be at the very top
A child's dream never dies.





puzzler2018
User Banned
Posted: 6th Jan 2019 22:02
ok -

Make y0 the same as y1

drawline(0,0,screenwidth,0)

smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Jan 2019 22:10 Edited at: 6th Jan 2019 22:12
yes it draws the line about 40 pixels down on the y axis the default text from screen fps is also 40px down
A child's dream never dies.





puzzler2018
User Banned
Posted: 6th Jan 2019 22:13
Even on this example


smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Jan 2019 22:25
not sure cant copy and paste from forumsvinto andriod agk heres my code
A child's dream never dies.





Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 6th Jan 2019 22:33
This post has been marked by the post author as the answer.
That seems good to me, make sure you screen resolution and virtual resolution is set

screenwidth = getmaxdevicewidth()
screenheight = getmaxdeviceheight()

SetWindowSize( screenwidth, screenheight, fullscreen )
SetVirtualResolution( screenwidth, screenheight ) // doesn't have to match the window

smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Jan 2019 22:36
seems legit ill try that out i dont have my resolution set thank you
A child's dream never dies.





smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Jan 2019 22:43 Edited at: 7th Jan 2019 02:14
seems legit ill try that out i dont have my resolution set thank you edit: tested it works perfect thanks mate.
A child's dream never dies.





Login to post a reply

Server time is: 2024-11-23 09:38:34
Your offset time is: 2024-11-23 09:38:34