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 / I am very puzzled with cSprite,cImage and such class.Can anyone help me?

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 22nd Sep 2011 10:34
I find these classes today in include folder. I just wanted to write a class named cSprite. and then I found it in the AppGameKit include folder. can it replace "ago::loadImage()" and the functions like this?

give my best
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 22nd Sep 2011 10:42
how to use cSprite?

give my best
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 22nd Sep 2011 11:37
It is possible to use these classes directly, however, at the moment there isn't any documentation for them. I would suggest focusing on the commands listed within the documentation and attempting to use those.
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 22nd Sep 2011 11:53
what is the difference between them?

and if you will make the documentation for the classes ,how long will it take?

give my best
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 22nd Sep 2011 12:56
Some of the classes have functionality that is not exposed to the main commands.

Not certain when the documentation for these classes will be sorted out. It's not a priority right now.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 22nd Sep 2011 13:00
would love to get some info on these classes too, for example I load a picture from the iphone camera photos using c++, and I want to pass this photo to a cImage.
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 22nd Sep 2011 14:20
I am thinking which way I should use. the agk::loadImage() or Image image;image.load();

I really don't know which one I should chose.

for the first choice, I also need to write class for sprite. so I don't know if I should use cSprite directly.

give my best
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 23rd Sep 2011 06:36
Is there anyone use the cSprite? how to use it?

give my best
G T R
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: Dubai, UAE
Posted: 23rd Sep 2011 17:50
Here's how I used it



And by the way, I still don't understand how LoadImage works!! I mean how to store media and call it from folders.

In tier one I spent ages to discover that I should put my files inside "Media" folder and to call something like:
"Media\sprite\mySprite.png"
I use LoadImage("sprite/mySprite.png")

while in C++ I should copy it to the Final folder or it'll never get loaded

And didn't find anything about that in the docs.

I'm back
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 26th Sep 2011 09:37
I did as what you said.

now a new question: can I create cSprite object first ,not a pointer? such as following:
cSprite m_sSky;
m_sSky.setImage("sky.png");

it can't success in my project.but I wanna to know how to make it success?

give my best
G T R
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: Dubai, UAE
Posted: 26th Sep 2011 09:46
I don't know I am so new to C++ myself, maybe someone else would answer that.

What I do understand is that declaring a class like that can be done only for classes that has no pointers inside them ... maybe

but it really doesn't make much difference for me at least.

I'm back
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 26th Sep 2011 20:40
I think Mike has some really good advice. Continuing down this path is only going to continue to frustrate. I would just follow the documentation and produce a game from that and the examples. No need to complicate it more than it should be. I'm fairly certain that we will get that information eventually but at some point you have to call it a day.
I know C++ but right now I figured that I would get my game working in Tier 1 first before I move on to Tier 2 so I can get a game done.
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 27th Sep 2011 05:15
I think the official may give me some help.

give my best
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 9th Oct 2011 03:07
As Mike suggestiosn, avoid the use of the internal AppGameKit classes and stick with the agk:: calls. You will thank us for this advice as we move to new platforms and ventures

I drink tea, and in my spare time I write software.

Login to post a reply

Server time is: 2024-11-22 03:37:08
Your offset time is: 2024-11-22 03:37:08