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 / Does Moving Sprite Completely Off Screen Stop Sprite From Drawing?

Author
Message
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 10th Dec 2017 23:01
Hi,

Have another question:
If I move a sprite completely off of the screen does AGK2 stop drawing the sprite?
(I ask in terms of overall game performance)

Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Dec 2017 23:11 Edited at: 10th Dec 2017 23:14
i think the drawing buffer is only the visible part, means outside there is nothing where it can set pixels.
but collision handling should be also off screen.
Benchmarking:
https://www.appgamekit.com/documentation/Reference/Benchmarking.htm
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.4) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Dec 2017 00:10
I'm with Markus, I think once it's off screen it's not longer drawn. But it's probably still included in the collision operations (if you're using that).

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 11th Dec 2017 03:24
Hi,

Ok, thanks for the verification.
Project is a puzzle game so there are no collision operations being used...
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 11th Dec 2017 16:19
Hi,

This is not correct.
On the [How To Play] animated screen if I let it run for 20 minutes on Android the Frames Per Second slowly goes down.
There are alot of sprites active, but only about 15% of them are on the screen at a time(while others are completely off of the screen).

Let me hit this with a hammer and if I can't fix it I'll come back and ask for help.
Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Dec 2017 16:44
It could be for a number of reasons.
If you're running for 20 mins, adding sprites and never deleting sprites that are not used, you'll have problems irrespective of if they are being drawn.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th Dec 2017 17:31
see my link with benchmark commands and print them at screen.
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.11.4) Radeon R7 265 : Mac mini OS High Sierra (10.13)
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 11th Dec 2017 17:48
Hi,

I think we are OK now.
Deleting the colored box sprites after use seems to have stopped the performance drain on Android.
(I have a Frames Per Second display to see performance)

Thanks!
JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Dec 2017 18:10 Edited at: 11th Dec 2017 18:51
If it was a slowdown due to drawing, you'd notice it immediately not over time. Sounds like you were slowly consuming memory. How often were those colored boxes being created?

Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 11th Dec 2017 21:15
Hi,

Everything is ok...
The screen which had the performance issue is below.
It was the [How To Play] animated screen which shows player how the game works.
(the colored boxes would change every 5 seconds and then matches of 3 would disappear)

Thanks!

JeZxLee
16BitSoft
Video Game Design Studio
http://www.16BitSoft.com
Open-Source AppGameKit Project!

Login to post a reply

Server time is: 2024-11-24 06:52:13
Your offset time is: 2024-11-24 06:52:13