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.

Newcomers AppGameKit Corner / CreateSprite & CloneSprite

Author
Message
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 15th Aug 2016 10:27
What are the differences between 'CreateSrpite' & 'CloneSrpites' commands?
Is there any reason not to clone a sprite but create it again?
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 15th Aug 2016 16:04
clonesprite keeps all the settings (like setspritesize etc.)
for performance it's probably better to use clone too but can't confirm it.
life\'s one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 15th Aug 2016 16:39 Edited at: 15th Aug 2016 20:28
I think someone who knows about the implementation of these functions can answer
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Aug 2016 23:35
Clone sprite references the majority of its data (properties and image) from the source sprite. It's really just like having 1 sprite in memory but drawing it a bunch of times. Create sprite will make a new sprite, each one using up a chunk of memory. Cloned sprites can still have their own rotation, position, and I think color.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 17th Aug 2016 10:23
Thanks for the info
Thugnificent
7
Years of Service
User Offline
Joined: 16th Aug 2016
Location:
Posted: 17th Aug 2016 11:21
The clone ones work sort of like a pointer and reference i think.

Login to post a reply

Server time is: 2024-04-16 23:16:05
Your offset time is: 2024-04-16 23:16:05