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 / Managing Sprites

Author
Message
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 12th Aug 2013 08:57
So, I'm wondering what's the best way to manage sprites. This new app that I'm making has a lot of sprites, and I'm trying to think of a way to automatically set sprites up (without hard-coding stuff).

Would creating a master list of "sprite templates" be a good way to do it? This list would define all sprites (animation, image id, layer, depth, animation) and then I could create a function to create a sprite off of the template, and it's good to go.

Does this sound valid?

Hi there. My name is Dug. I have just met you, and I love you.
mineturtle
11
Years of Service
User Offline
Joined: 9th Aug 2013
Location:
Posted: 12th Aug 2013 09:09
i love having lots of sprites on the page because then you can have lots more fun
mineturtle
11
Years of Service
User Offline
Joined: 9th Aug 2013
Location:
Posted: 12th Aug 2013 09:10
r u talking to me?
mineturtle
11
Years of Service
User Offline
Joined: 9th Aug 2013
Location:
Posted: 12th Aug 2013 09:11
dug ar u talking to me
mineturtle
11
Years of Service
User Offline
Joined: 9th Aug 2013
Location:
Posted: 12th Aug 2013 09:17
ily (i love you) to
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 12th Aug 2013 12:00
I believe that sounds like a good idea.

What I would do is something like this



Then when I want to create a copy of the sprite I would simply use the cloneSprite(template[1]) command. Im guessing that was something along the lines of what you want...

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 12th Aug 2013 14:16
What you would be doing is creating a "level" script. That's a good idea, because your base engine is simpler - it parses your script for this level and does the necessary. That's the kind of thing that Lua is used for.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Aug 2013 14:54
@mineturtle, as you are a new member to the forum your posts may take a while to be checked by a moderator. Please have patience as double / triple posting is frowned upon. I'm actually frowning now. Also please try to stay on topic.

That said, welcome to the forum. Your posts actually cheered me up

If GetDayOfWeek()=5 then initParty()
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 13th Aug 2013 23:49
Thank you everyone!
I created such a system and it's a breeze to assign and animate sprites now. I did the same for text objects (determining font sizes, etc.) and I think this is a very intuitive system that I'm setting up.

Hi there. My name is Dug. I have just met you, and I love you.
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 16th Aug 2013 21:53
Look like he/she were trying to answer a facebook chat, and accidentally made posts?

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.

Login to post a reply

Server time is: 2024-11-24 17:45:18
Your offset time is: 2024-11-24 17:45:18