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 / Sprite image bug? Or am I just stupid?

Author
Message
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 19th Apr 2020 23:09
This is embarrassing...

I recently decided to get back to game design after several years away.
I purchased AppGameKit Studio last week.
Today I start a new project... and *facepalm*

The first sprite is supposed to be a circle with a star
The second sprite is supposed to be a 2x2 box

Why is the first sprite incorrect?

*see attached*

If you read the code, there's a "comment this line" and "uncomment this line" that uses the 'default' blank image.
That works for some reason.

It's hard to believe I'm THAT rusty, but it's harder to believe this is a bug.

Thanks for looking.
|,,|, ,|,,|

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Apr 2020 02:32 Edited at: 20th Apr 2020 02:33
the Star with a circle in it works fine its positioned at 0,0
the other one don't show well because the size you made it and it was obscured by the first one


fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 20th Apr 2020 03:16 Edited at: 20th Apr 2020 03:16
Thank you for your time.

I took 2 screenshots to better illustrate what I'm seeing.

I'm having trouble figuring out why the 'Circled Star' sprite is using the 'Blue Square Image'

...but...

When I don't load the blue square image (using a default 'blank' image) the 'Circled Star' uses the correct image

|,,|, ,|,,|

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Apr 2020 05:18
Delete the folder;
C:\Users\your_id\AppData\Local\AGKApps\1_1_1_SpaceGame
Retry running your game
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 20th Apr 2020 06:31 Edited at: 20th Apr 2020 06:52
I followed your tip, but it didn't change the results.

I noticed that if I 'comment out' all instances that reference the 'square' image or sprite, the 'star' sprite behaves as expected.

This is really confusing...



... and when I simply switch the order at which the two sprites are created, I get different (undesirable) behavior...



... Not even hard coding the image/sprite ID's is fixing the issue

|,,|, ,|,,|
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th Apr 2020 08:01
In your first post, you were mixing Image_Square and Sprite_Square and it was that which caused the issues.
I see that you have changed that in your last post so it should work, and indeed, it does work for me as you can see from the screenshot. If it's still not working for you then I suggest re-deleting the file that BlinkOK directed you to and trying again.
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 20th Apr 2020 08:02
can you try and use star = loadImage("star.png") and not star = loadImage("star.png",0)
and you may want to try and put a "Sync()" just after screen resolution settings, i do not know why but i did see this in another thread somewhere about load images (might not be correct for this situation but might work)
also.
try and building a new project from 0 copy those 2 files (images) into the new media folder of the new project, and just rebuild these lines again.
This is a very weird problem. I wonder whats happening there... all the zeros and ones might be going crazy, you are not connected to Morpheus or Neo right?
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 20th Apr 2020 15:13 Edited at: 20th Apr 2020 15:25
I've uninstalled/reinstalled AGK2 Studio (through Steam if that makes a difference),
deleted the folders under 'AppData/Local/AGKApps' as discussed,
created a brand new project, even using new saves of the same media,
and tried sync() in multiple locations to test if that helped.

... and I'm still having problems...
... but the KICKER is that it broadcasts to phone with the expected results

... would it make a difference somehow if my previous copy of AGK2 (pre "Studio" ) was through TGC, but I'm now using AGK2 Studio through steam?



|,,|, ,|,,|

Attachments

Login to view attachments
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 20th Apr 2020 15:41
that is really wierd.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th Apr 2020 18:26 Edited at: 20th Apr 2020 18:49
I just tried your latest attachment but I didn't compile the code. I just ran the exe that you created and it works perfectly.
JosephB
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 20th Apr 2020 18:29
I used your original code and made changes as mentioned by Scraggle, because you were calling the square image when you were trying to call the square sprite. I ensured no other projects were loaded by closing all projects before loading this project. All worked fine. Here is the code I used:

MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 20th Apr 2020 21:02
Thank you guys for taking the time to look at this!

@JosephB

I recognize the initial error in my code. I copied your code, and the problem persists when compiled on my system.

@Scraggle

This is so weird! I ran the .exe outside of AppGameKit and the problem persists.


It appears that AppGameKit is ignoring the different ID's (as shown in the PC portion of my last screenshot)
Somehow, the problem appears to be isolated to my system, but I have no idea how to proceed...
|,,|, ,|,,|
JosephB
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 20th Apr 2020 21:39
What happens when you try some a different code with sprites. I took the attached zip file from the newcomers board by Qugurun at this link:https://forum.thegamecreators.com/thread/226076 Try to compile it and see if the same problem occurs with these sprites.

Attachments

Login to view attachments
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 20th Apr 2020 22:31 Edited at: 20th Apr 2020 23:04
... Insanity. Insanity is the answer

I think I'm going to revert back to the non-studio version of AppGameKit and see what happens...

... Well, reverting to AGK2 2019.12.16 did the trick. I guess I'll RE-reinstall AppGameKit Studio and see if the gremlins are gone.

|,,|, ,|,,|
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Apr 2020 22:39
Add a line at the top
#renderer "Basic"
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 21st Apr 2020 13:46
@blink0k

Thanks for the suggestion. Adding #renderer "Basic" did not change the behavior.
|,,|, ,|,,|
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 21st Apr 2020 19:14 Edited at: 21st Apr 2020 19:18
I hope what I'm seeing now is user error...
I was testing out some memblock stuff and found a new issue
I ran this code several times, with and expected outcome of creating a 32x32 solid white box



and here are the files my system was generating







if you run this code, i'd imagine you'll create a .png image of a white box called "test_img_func_1.png" in your 'media' folder,
and this is another weird issue isolated to my machine.
|,,|, ,|,,|
JosephB
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 21st Apr 2020 19:44
I believe you are not obtaining the full number of bytes for the raw image.

You use this code in line 13:

I think it should be:
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 21st Apr 2020 20:21
@ JosephB

Awesome! Thank you. That was it. I feel silly haha

... Now I just need to figure out the weird sprite thing.
|,,|, ,|,,|
JosephB
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 22nd Apr 2020 00:58
It seems everyone that has tried the code that you provided have noted no issues, so not sure what the problem might be. It seems that whatever you do, it runs the original code, that had some mistakes. I took your code and compiled with some name changes and zipped to the attachment. Please unzip and then run the exe file to see what happens. Don't load the agk file into the editor, just try running the exe. Also try creating some other code with sprites and other images and see what happens with that code.

Attachments

Login to view attachments
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 22nd Apr 2020 15:33
Due to the unusual behavior I have been experiencing, I've switched back to using AGK2 2019.12.16 for the time being (the issue doesn't surface in this version)

I downloaded the attachment, created a folder on the desktop, extracted the contents into the folder, then ran the .exe without messing with the other files in any way.
This is what I see:



... now, after seeing that, and capturing the screenshot, I opened the project from the attachment in AGK2 2019.12.16. I then compiled and ran the program with this result:



... So, it works for me when compiled with AGK2 2019.12.16, and the .exe that was compiled with AGK-S on a different system remained faulty on my system.

@JosephB
I'm scratching my head trying to figure out the link between
- your AGK-S compiled .exe (where there is no issue on anyone else's system)
- and my system (that doesn't currently have AGK-S installed) running the same .exe (first screenshot)

|,,|, ,|,,|
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Apr 2020 16:03 Edited at: 22nd Apr 2020 16:04
renaming the files should work just like running an older version
the prob is the files are cached but I thought blinks solution would've fixed it
but im sure there are two paths that need clearing maybe im wrong

or create a whole new project in a different folder etc and copy the code and media accross

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Apr 2020 16:31
Ive added a request for a clear all cache option for studio
https://github.com/TheGameCreators/AGK-Studio/issues/652

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 22nd Apr 2020 17:03
@ furbarpk

Thank you for that.

I'd be interested to know all the locations that AGK-S stores data (that I could manually clean out).

I wonder if there are any notable differences in behavior between a 'TGC product download' and a 'Steam download'.
I have the Steam version. When I uninstalled AGK-S, my project '.agk' files still opened with (AGK-S's) Ide.exe (which had to be manually removed)
|,,|, ,|,,|
JosephB
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 22nd Apr 2020 17:08
It seems , just as fubarpk suggests, that whenever you run something on your system that is associated with AGKS, it might be running the former exe file. I compiled the card array in AGKS and attached the zipped file below. Try running the exe file without loading any AppGameKit IDEs and see what happens.

Attachments

Login to view attachments
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 22nd Apr 2020 19:08 Edited at: 22nd Apr 2020 19:12
I dragged the contents of the attachment into a new folder then ran the exe with these results



As an experiment, I dragged the exe to another area to isolate it from all other files. I ran it with these results



I don't know if it's relevant, but I found it interesting that the exe's title was AppGameKit Player instead of Card Array 2

Does that suggest that a different computer without any form of AppGameKit couldn't run the exe because "AppGameKit Player" wouldn't be there?
|,,|, ,|,,|
JosephB
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 22nd Apr 2020 20:49 Edited at: 22nd Apr 2020 21:00
It does not seem to work for you. If you click card one, it should look like this:

Attachments

Login to view attachments
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 22nd Apr 2020 21:42
I see 'random' flashes of the face of cards, but nothing behaves like I'd expect.
It really seems like there's some kind of error that's causing different sprite ID's to not be honored
|,,|, ,|,,|
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 23rd Apr 2020 03:09
i haven't seen any mention of hardware or drivers, etc.. ie, do you have multiple monitors, updated drivers, and care to your system stats?
MASTER OF PUPPETS
19
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 23rd Apr 2020 13:36
Thank you. That's a good point.

I'm not sure which drivers would be relevant. AppGameKit Studio compiled code seems to ignore unique sprite IDs on desktop, but when I broadcast the same code to my phone it works. The December release of AppGameKit 2 (pre Studio) works perfectly.

Win 7 Ultimate
Intel i7 - (8?) Core
32GB Ram
Single monitor (52" tv) via hdmi
Asus z87-plus motherboard w/ itegrated graphics
C: 256GB SSD
E: 1TB SSD

AGK2 2019.12.16 (currently due to no problems)

AGK Studio via Steam (has been uninstalled while this issue gets figured out)
|,,|, ,|,,|
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 23rd Apr 2020 14:48
hmm forgot about specs.
Can you try and update your drivers?
the Asus mother board and the integrated graphic card probably an Intel of some sort... everyone needs to do it anyways.. try and update it. Graphic card Drivers.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 23rd Apr 2020 18:09 Edited at: 23rd Apr 2020 18:50
Quote: " the exe's title was AppGameKit Player"

someone correct me if i'm wrong but, as i understand it, the .exe is just a player. without the bytecode (.byc) there won't be anything to "play" (ie, SetWindowTitle( "space_game" ) would not be executed). so, i would expect your results if the exe was truly isolated from the .byc and other files.

and, i'm no guru, but:
Quote: "'random' flashes of the face of cards"

says "drivers" or "video issues", to me (especially when it runs fine via broadcast). with that, the 52" tv has my attention. do you happen to have a "more standard" monitor available to test on?

finally, i got lost a bit in the above where you reverted to a previous version but the bottom line in the "AGK Player" screenshot shows "Built Apr 15 2020 (OpenGL 2)" which is the exe/player build version which is the latest version of AGKS. Was this expected to be a previous version?

add:
Quote: "It really seems like there's some kind of error that's causing different sprite ID's to not be honored"

that's doubtful but easy enough to test with GetSpriteExist, GetSprite??? (other property checks). same with the images which, i doubt this matters, but your "Blue_Box" image is a 24 bit .png while the Star_1 is 32 bit.

i've never had issue mixing image depths but i have a pretty basic system. again, and i'm ignorant when it comes to tech stuff, but the 52" tv is demanding my attention, here.

even more
:
try dropping the resolution on your tv to see if that matters? and, is the firmware, there, updated?

Login to post a reply

Server time is: 2024-04-24 00:43:24
Your offset time is: 2024-04-24 00:43:24