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 Studio Chat / Does SetObjectUVOffset behave differently in Studio

Author
Message
EdzUp
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 17th Dec 2023 20:21

This texture


This is how it looks (and should do) in Classic


This is how it looks in Studio

No changes to the code at all all I am doing is using SetObjectUVOffset to a position in the texture above to simulate a broken screen, in classic it displays as expected but in studio I get what looks like a one pixel slice stretched over the whole screen, FYI the width is set to one eighth of the texture above (128x128) pixels.

Anyone have any ideas on why the exact same code behaves differently in different AppGameKit versions?



The frame count is eight frames.
-EdzUp
Patreon: https://www.patreon.com/EdzUp

Attachments

Login to view attachments
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 17th Dec 2023 21:02 Edited at: 17th Dec 2023 21:03
The UV offset didn't behave how I expected.
I found help on the forum to make this...



BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Dec 2023 21:03
Does GetVDUImageFrameCount return an integer or a float?
It might be that the older version assumes all floats but the newer version assumes all integers (Because one parameter is an integer)

And is the object an AppGameKit plane or a model?
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 17th Dec 2023 21:29
Looks like its clamped which is the default setting(0). Try changing the texture mode to wrap(1) using setimagewrapu and setimagewrapv after loading the image.
Win 10 Home 64, Intel(R) Core(TM) i5-10300H, 8GB DDR4, NVidia GeForce GTX 1650 4GB GDDR6
EdzUp
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 17th Dec 2023 22:06
@blink0k: it returns an integer in all cases, the reason I asked is the 'exact' same code compiled on different versions of AppGameKit have such drastically different results.

@ando: will have a look

@James H: will try that as well

Thanks everyone will let you know what happens.
-EdzUp
Patreon: https://www.patreon.com/EdzUp
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 17th Dec 2023 22:25 Edited at: 17th Dec 2023 22:27
side: no idea how my code was included in the help example where it's not using the command but

isn't my format (while the code itself is)

back on topic: it's prolly a vulkan thing. if you don't need vulkan, then #Renderer "basic"
i never really use studio but have seen similar differences/issues pointed out by others while the help for both Classic and Studio is identical.
EdzUp
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 17th Dec 2023 22:37 Edited at: 18th Dec 2023 07:44
Thanks Virtual Nomad I was already using the basic renderer, wrapping the UV's suggested by James H seems to have fixed it for now. Maybe AppGameKit Classic is more forgiving of certain programming styles than studio. I do remember that some variables had to be implicitly declared before it compiled on studio where it worked fine on Classic when first compiled.

Thanks everyone for your help it's another head scratching issue thats now solved
-EdzUp
Patreon: https://www.patreon.com/EdzUp

Login to post a reply

Server time is: 2024-05-02 16:56:33
Your offset time is: 2024-05-02 16:56:33