FPS All over the place on Android

I am running the hello world example with all the gfx disabled. The only thing I am displaying is the stats.

Latest version of cocos2d-x.
Command line build.
Debug off.
Running on Samsung Galaxy s4
All other apps killed from phone and memory cleared.

The Fps goes form 60fps and jumps around between 58-60 but every few frames it will drop to 40 or even 30ish fps.

Why is this happening when basically the app itself has almost nothing there and the only thing being rendered is the stats?

What’s the engine version?

Its version 3.1.1

I only downloaded last week so I assume its the latest

Yes it is, You can also download the bleeding edge from GitHUB: https://github.com/cocos2d/cocos2d-x

ChangeLog updated all the time: https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG

And what has happened to these forums. Bloody awful now. Cannot create new posts. Cant find anything.

Its like you guys are trying to turn people away.

As I cannot create a new post I will post it in here. Where is the documentation for using local storage in c++ on android? can’t find anything anywhere and been searching for hours. Cannot access the classes in my build either.

are you trying to create a new topic or reply to a post.

This upgrade was huge and way better. Lets get over the kinks. We did this to make the forums easier!

I cannot create a new topic

ok, are you getting a specific message?

I’ll take that message and your forum id and ask the admin to make sure your permissions are ok.

Can you log out and log back in and try to create a new topic then? I just make a tweak.

Not getting anything. Can type new topic out with heading but post button won’t activate.

Could someone point me towards using local storage for android in c++ please because s=this is driving me mad

It stays greyed out until a certain number of characters is typed and multiple words.

Does the button become active if you type something like

testing testing testing

and

hello, I am testing out creating a new topic

What do you mean access local storage? Do you mean where getWritablePath() returns?

TBH the old forums worked. These don’t.

The old forums were easier to find things. These are not.

I was getting fed up with LACK of documentation for cocos and all the bugs. Now with these forums I think its time I gave up on cocos as I really am not able to get anything done anymore. I am bashing my head against the wall… I would save time now to spend a week getting used to unity and using that because I’m finding it is taking weeks to find answers to simple things in cocos.

And no. Local storage…

http://www.cocos2d-x.org/reference/native-cpp/V3.0beta2/d6/dac/_local_storage_8h.html

I could get it to work in JS ( but cannot use JS now as its impossible to get some native plugins working )

You are in the minority liking the old forums. We received a lot of complaints about them, thus prompting the upgrade. Yes, this is new and different so they might seem not as easy. It took me a bit of time this morning to get used to everything.

You need to also remember that Cocos2d-x is open-sourced and community driven. There is a huge group effort going on to provide more documentation and the development team literally works around the clock (as teams in US, China and elsewhere) to continue improving the engine. The best thing you can do is to let us know about bugs, documentation you need, etc.

It isn’t fair to slam those involved for not having what you need. We are doing a lot to make our users happier and the release schedule over the last year has been pretty fast paced. The best think you can do to help is to tell us what you need and report bugs. Those that do get them fixed.

Unity is the same way. Seriously. No slam intended. They have forums and a Wiki and people that do the best they can to answer.

Yeah I’m sorry you are right. But it is getting very frustrating for me. I have posts in the forums which never get answered. I have spent ages to search for simple information on using the local storage but cannot find anything.

All I want to do is use something simple but it is using up so much of my time trying to find the answer for and it seems I cannot find the answer.

Its when you cannot do such simple things and there is no documents to explain how to use such simple things you feel you are wasting your time.

If you post something that doesn’t get answered. PM me and I can take a look. If I can’t answer I can get in front of someone that can.

I’m not really an Android guy, so your local storage question isn’t something I can answer. So you used to do it in JS and now you are in C++ and what to know what the equivalent is?

Hi Yes.

Basically all I want is a cross platform method to save a couple of variables to the device. In JS with JSb local storage would call out to what ever the native would be. Now I have noticed in the docs there are 2 modules

localStorage
http://www.cocos2d-x.org/reference/native-cpp/V3.0beta2/dir_35c73a41342940d60c5e1e1b9246f8d5.html
userDefault
http://www.cocos2d-x.org/reference/native-cpp/V3.0beta2/db/d94/classcocos2d_1_1_user_default.html

Now user default is used in iOS ( in fact I had to use it today for my job in a native iOS app ). So basically I was to use the cocos c++ functionality that will work on all device platforms. Like I said in JSB that was just a call to local storage like so

    var localStorage = cc.sys.localStorage;
    var best = localStorage.getItem("best");
    this.parseId = localStorage.getItem("parseId");
    localStorage = null;

I just need an example or documentation that explains what is used in c++

Thanks again and sorry for my impatience :slight_smile:

oh, do you mean a key/value like UserDefaults?

http://www.cocos2d-x.org/reference/native-cpp/V3.1rc0/db/d94/classcocos2d_1_1_user_default.html

In Fact I have searched for completely different terms and might have found some info :slight_smile:

My mistake has been searching for local storage. I honestly did not think to search for other things.

Just found a post which might have given me a lead. :smile:

Thanks

Yes it is what I have been looking for :smile:

Really sorry its all my mistake for searching for local storage :slight_smile: I have found the example code in tests which use the UserDefault :smile:

I am happy again :smile:

Thanks Slackmoehrle you have been a star