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 / Wich data of the master do CloneSprite( spr, 1 ) take from the master?

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 27th Oct 2018 10:37
setspritecolor etc ?
I know it dont copy any SHAPEs or physics

Iam slimming my code down and wonder simply.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Oct 2018 12:44
Image reference, size, offset, animation, angle, color, and even position.
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
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Oct 2018 03:26 Edited at: 30th Oct 2018 23:00
*edit* Thought it was CloneObject(). My bad
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 30th Oct 2018 04:34
My recommendation would be to create your own CopySprite() function, where you can customize which attributes to copy. More importantly, AppGameKit notes that the CloneSprite command will always load a new copy of the image into memory instead of using the same shared image among multiple sprites. This can be a memory concern if performing many CloneSprite operations.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 30th Oct 2018 07:17
xCept wrote: "... CloneSprite command will always load a new copy of the image into memory instead of using the same shared image among multiple sprites."

This is true if the sprite was created with LoadSprite. If the original sprite was created with an image ID, then the sprite uses the image reference.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 30th Oct 2018 22:27
Thanks everyone some very usefull information
Will look at it tomorrow
I thought there where some weird stuff going on ...
Becaus emy simple tile based game uses to much resources and fps in my liking.
Have coded today for a freelance work i recently got

Login to post a reply

Server time is: 2024-04-19 04:23:52
Your offset time is: 2024-04-19 04:23:52