News:

FOR INFORMATION ON DONATIONS, AND HOW TO OBTAIN ACCESS TO THE GAME, PLEASE VIEW THE FOLLOWING TOPIC: http://stick-online.com/boards/index.php?topic=2.0

Main Menu

Stick Online HotKeyz - v1.03, Full Screen Support!

Started by Cactuscat222, February 24, 2010, 03:02:03 AM

Previous topic - Next topic

ARTgames

Well i was wrong. But i would need tools i don't have now to test stuff that might work. Some one here im sure can help.

Lingus

Quote from: Cactuscat222 on February 24, 2010, 09:15:00 PM
Okay, so I figured out the Delay problem Lucy - an error was making it so only Slot1 hotkeys would be affected by the delay. That has now been fixed, and I'll upload that with the next version.

Art, you got me alot closer, but its still not working. This is what I'm working with
SO is 950 x 600. Respectively, the mouse coordinates for the Inventory Icon are (545, 63). As such, the equation appears as:

(545 - (950/$_size[0] * 545) + 545) for X
(63 - (600/$_size[1] * 63) + 63) for Y

Where $_size[0] is the Full Screen Width, and $_size[1] is the Full Screen Height. So, when SO is not full screen, it works fine, just as the hotkeys always have.

However, putting in my resolution of 1280 x 1024, the numbers come out off

(545 - (950/1280 * 545) + 545) = 685.5
(63 - (600/1024 * 63) + 63) = 89.08

From my own investigation though, the numbers should be around 720 - 730, and 190 - 200. As I try other resolutions, the numbers are further off... so I'm not sure what to do.
Just a quick thought: Try the equation as more of a percentage of the screen size. So you'd look at 545/950 and 63/600. Now apply that percentage to the actual screen size.

ARTgames

can you explain more ling?


Also i fingered out what was wrong with mine. I just found out that stick online maintains aspect ratio when full screen. I assumed it just made it 100% full screen. I need to work that into my math to make it work right. (i hope)

Cactuscat222

Just released v1.02. As mentioned in the original post, fixes the delay function so that is now properly works. Re-download if you want to make use of this new function.

Full-Screen support is still being worked on...


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

Forbidden


Lingus

Quote from: ARTgames on February 24, 2010, 09:46:09 PM
can you explain more ling?


Also i fingered out what was wrong with mine. I just found out that stick online maintains aspect ratio when full screen. I assumed it just made it 100% full screen. I need to work that into my math to make it work right. (i hope)
Sorry, I just made a quick post cuz I was rushed. But your comment changes things anyways so it doesn't matter. So basically what you're saying is that the width of the game screen extends to the size of the monitor, but the height does not? So you just see black bars? What about if the monitor is wide screen? I think the SO game screen is still wider in aspect ratio than a wide screen monitor so it would probably still have black bars (can anyone confirm?)

Anyways, I think my comment about using percentage of game screen size still holds (although it might be slightly altered for the y axis). Basically, if you look at the standard screen width, which is supposedly 950. You take the X coordinate that you want (in the example it was 545). Now take the percentage of the screen width (545/950 = approx 57%). Now you can use that percentage to get the equivilant X coordinate for any screen width. For example, if the screen width is 1024 you'd do: 1024 x 57% = approx. 583.68.

For height, it's probably different since the screen size would encompass the whole monitor, but the actual game window only uses a portion of that (the rest being black bars). For this, I think I would take the game window ratio (950/600 = approx. 1.58). Now you can use that to get the game window height based on the full screen monitor width (If you're monitor resolution width is 1024 the height of the game window at full screen would be approx. 648). Now you can do the same thing you did above with the X axis, take the desired Y coordinate (in the example 63) and divide by the original screen size to get a percentage (63/600 = 10.5%) now multiply that by the new screen height which was calculated earlier (648 x 10.5% = approx. 68.04).

Someone could check my math, but it seems accurate. There's also some assumtions in there about how the screen size works and whether the black area is included or not. And to be sure, the numbers I was using were rounded so there might be some significant rounding errors by the end of the calculations. If you could rig the variables being used to hold more decimal places it would help reduce or eliminate those errors.

Seifer

I've got a 22' widescreen running at 1680 by 1050 and i get no black bars. The SO screen completly consumes the monitor.

Lingus

Looks like the SO screen ratio and your monitor ratio are very similar 1.583~ and 1.6.

Oh, well, I guess your monitor resolution is actually shorter than the SO game screen. In otherwords, if you use the same ratio 1.58, instead of having black bars, the game screen would extend taller than your monitor by around 13 pixels. It's a very minor amount, but the result is that there's probably some minor skewing of the pixels in order for it to fit exactly on your screen. Because of that, using my method above may not work exactly right. It may because of how small a difference it would cause, but there's a chance it would throw the numbers off enough to have the button clicks hit the wrong thing.

Meh, I tried.

Cactuscat222

Quote from: Lingus on March 01, 2010, 07:30:38 PM
Looks like the SO screen ratio and your monitor ratio are very similar 1.583~ and 1.6.

Oh, well, I guess your monitor resolution is actually shorter than the SO game screen. In otherwords, if you use the same ratio 1.58, instead of having black bars, the game screen would extend taller than your monitor by around 13 pixels. It's a very minor amount, but the result is that there's probably some minor skewing of the pixels in order for it to fit exactly on your screen. Because of that, using my method above may not work exactly right. It may because of how small a difference it would cause, but there's a chance it would throw the numbers off enough to have the button clicks hit the wrong thing.

Meh, I tried.

A worthy attempt, and I'll test it all out to see if it works. Still, as you can see, its complicated because of how it adjusts to different resolutions/monitors.


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

ARTgames

Quote from: Seifer on March 01, 2010, 07:19:36 PM
I've got a 22' widescreen running at 1680 by 1050 and i get no black bars. The SO screen completly consumes the monitor.
look at the left and right side of your screen. there it is on both sides about 5 pixels big.

Seifer


ARTgames

#26
sorry i said i was going to help and have not. iv been lazy.

All you need to do is find out that when your scaling the monitor will the height or the width hit the sides of the screen first.

so do this:
screen_width / screen_height = screen_aspect
so_width / so_height  = so_aspect
(you know that already)

If screen_aspect > so_aspect {
/* the users screen is wider then stick online's window, so the game will rez the window till its height fits the screen */

so_height = screen_height
so_width = so_height * so_aspect
}

If screen_aspect < so_aspect { /* if the screen is taller than so's*/

so_width = screen_width
so_height = so_width / so_aspect
/*note "so_aspect" is stick online's original aspect ratio. 1.583 something according to lingus*/
}

if screen_aspect = so_aspect {

so_width = screen_width
so_height = screen_height
/*no dir :P */
}
So now you have stick online's new dimensions. Now run that threw my old post.

stick online window NEW (its so_width from above) width = SoW
stick online window NEW (its so_height from above) height = SoH

screen width = SW
screen height = SH

click placement for windows x (the x the mouse clicks on your so hot keys) = x
click placement for windows Y (you get the idea) = y

edit:
X = X - (SoW/SW * X) + X
Y = Y - (SoH/SH * Y) + Y

wrong, im working on it.

now that should work. But i could have left something out.

Lingus

Well done Art.

But I don't understand your formula at the end. I understand why you're doing (SoW/SW * X). That's so you can figure out where the coordinate is even if the game width is less than the full screen width. But why are you doing X - (that) + X?

Also, I think you have to bring in the original game window width somewhere.

You need to get the ratio of where the X coordinate is on the original window, and then translate that to the full screen game window width. Then bring in the difference between the game window width and the actual screen width (in case they're different).

Let's see if I can do the formula:

fullX = (originalX / originalSoWidth) x fullSoWidth

screenX = (fullX / fullSoWidth) x screenWidth

Something like that... fullSoWidth is what Art calculated in his post which I believe he was calling SoW. I guess I'm just more descriptive with my variable names. Based on this formula, if fullSoWidth = screenWidth then screenX and fullX will end up equal as well, which is as it should be.

ARTgames

Quote from: Lingus on March 02, 2010, 05:01:11 PM
Well done Art.

But I don't understand your formula at the end. I understand why you're doing (SoW/SW * X). That's so you can figure out where the coordinate is even if the game width is less than the full screen width. But why are you doing X - (that) + X?
I would need to rethink about it. I forgot why.

Quote from: Lingus on March 02, 2010, 05:01:11 PM
Also, I think you have to bring in the original game window width somewhere.

well "so_width / so_height  = so_aspect" or the so_width/height is its original window height and width of stick online. sorry if that was not clear.


Quote from: Lingus on March 02, 2010, 05:01:11 PM
You need to get the ratio of where the X coordinate is on the original window, and then translate that to the full screen game window width. Then bring in the difference between the game window width and the actual screen width (in case they're different).

Let's see if I can do the formula:

fullX = (originalX / originalSoWidth) x fullSoWidth

screenX = (fullX / fullSoWidth) x screenWidth

Something like that... fullSoWidth is what Art calculated in his post which I believe he was calling SoW. I guess I'm just more descriptive with my variable names. Based on this formula, if fullSoWidth = screenWidth then screenX and fullX will end up equal as well, which is as it should be.
thats what the last part of my post is suppose to cover. not saying i did it right tho.  ;D

Lingus

Just to be clear, I was only referring to the last part of your post. The first part of your post was the "Well done Art." Everything up to the formulas right at the end looks good. So yea.