when release the next API???

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

when release the next API???

Postby bqlf1907 » 23 May 2013, 15:29

i use API 0.9.5 in win32 & cocos2d-x.
Once I use SFS2X,my project have many Random errors,Most are pointer & vector. and UI display is not normal too(For example the word don't display and Image display is not normal)。
but i do not use SFS2X, local operation。UI display is normal ,and No Random errors。
too many Random errors i can't debug;

so How long will the next version release?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: when release the next API???

Postby Lapo » 23 May 2013, 21:12

Sorry this is not very clear.
Can you please provide the specific details of the errors you have found?

As regards the UI display I don't get it either. The API don't use any graphics/UI libraries of any type, ever. So I am not sure why you are correlating our API with those problems. More details are necessary, if you need us to help you.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

Re: when release the next API???

Postby bqlf1907 » 24 May 2013, 01:30

Or cause the thread?
balder
Posts: 13
Joined: 10 Nov 2012, 03:36

Re: when release the next API???

Postby balder » 24 May 2013, 01:41

I meet the same problem. this is because the smartfox client api is dispatch events in background thread by default. you can't send the command to the cocos2d in the event handler,instead, you can make a command queue,that cocos2d can process in the main thread. Or you can make the smartfox client api in the threadsafe on, (g_pSmartFox->ThreadSafeMode(true);) and make a cocos2d shcheduler update. in the update, call the smartfox api's g_pSmartFox->ProcessEvents()
balder
Posts: 13
Joined: 10 Nov 2012, 03:36

Re: when release the next API???

Postby balder » 24 May 2013, 01:43

about the pointers in the apis:
why using the pointers. Using the value parameter is a good idea. i think the smartfox client api can make a copy of data from the client,not using the pointers from the client side,then the api side can using the memory pool to speed memory allocation! The speed penalty is very small,or can saved by using the memory pool.
bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

Re: when release the next API???

Postby bqlf1907 » 24 May 2013, 06:54

why i turn on ThreadSafeMode,SFS2X Client is not work!!!

Code: Select all

m_ptrSmartFox->ThreadSafeMode(true);
balder
Posts: 13
Joined: 10 Nov 2012, 03:36

Re: when release the next API???

Postby balder » 24 May 2013, 09:30

you should call ProcessEvents() function in a update function. the smart fox dispatch the net messages in the ProcessEvents function
MBagnati
Posts: 126
Joined: 12 Feb 2013, 10:57

Re: when release the next API???

Postby MBagnati » 27 May 2013, 08:25

Currently we are working on API to improve usability (pointers usage) as required from users and to solve the risk of memory leaks.
To complete this review of API software we need of a little time, I think that the new version will be released in a couple of weeks.
It is not clear to me if you have found critical mistakes invoking the API into your project. If it is, please give me some details about the questions so I can try to investigate them.
bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

Re: when release the next API???

Postby bqlf1907 » 27 May 2013, 14:30

Problem has been solved.
thanks balder!

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 10 guests