Posts By :

New_bluecreazione

PHP 7.3 + MYSQL 8 CONNECTION 150 150 New_bluecreazione

PHP 7.3 + MYSQL 8 CONNECTION

PHP 7.3 + Mysql 8 Connection Issues?

The only way is the create a new MySQL user with the authentication type as “Standard” and not Caching_SHA2_Password .

Contact us for technical assistance at support@bluegamerzstudio.com.

Running PHP 7.3 with MySQL 8 150 150 New_bluecreazione

Running PHP 7.3 with MySQL 8

PHP 7.3 + Mysql 8 Connection issue?

This blog is going to be a small one. But it will definitely fix the issue which many of us are facing. First thing is you would require MySQL WorkBench. Download it for free from MySQL website. Make sure you download the workbench 8 for the MySQL 8. Once that is done, considering you already have MySQL 8 installed on your server, I will let you know how to fix the mysqliconnect.

Main issue is the Authentication type of the MySQL User. By Default when you use Root or create a user in MySQL 8 it will set your password of the type caching_sha2_password. So instead of going to change this type for the current users, we will create new Users.

Open MySQL Workbench 8. Connect your MySQL 8 with the root or already defined password. Workbench should work with the caching_sha2_password. So you can login using that. Once you are done with that.

Under the “Administration” tab look for “Users and Privileges”. This option will give you freedom to add or edit current users. However we can’t change the Authentication type of users which are already set. So we create a new User with new details. But setting the Authentication Type to Standard. That’s it then you should be able to connect using the MySqliconnect in PHP 7.3 . Other then this inside your Workbench you can give the user permissions like Schema Privileges.

That’s it. So bottom line is create a new user in Mysql 8 with authentication type “Standard” and you can connect to it. Ofcourse if you guys know the Command line approach to create user, you can do that as well.

Cheers!!

Add Custom fields into WordPress 150 150 New_bluecreazione

Add Custom fields into WordPress

Inception

Adding Custom fields into WordPress and insert/update the custom fields is even more tough task

Story

Initially when i was trying to add custom fields into wordpress,i searched alot regarding this and 
 also downloaded the ACF plugin and it is also not working and also after making so many changes in 
functions.php and single.php file in theme folder but still thats also not helpful for adding 
custom fields into wordpress and also insert/update the details inside the custom field

Solution

The easiest solution of adding custom fields into wordpress is to install "Pods" plugin by using
wordpress admin panel and after installation of plugin,activate the plugin and after that click on 
Pods admin  and after that you have to enter all the define your custom fields you want to add  and after
that there is also option of rest api when you enter the custom fields details and just allow the show and 
insert/update the custom field option through Rest-Api
Clear temp & cache files from Windows Server 150 150 New_bluecreazione

Clear temp & cache files from Windows Server

Inception

File is not sending to server because there is no space on windows 
server through source tree and the reason behind is temp and cache files.



Solution

To solve the issue,below are the steps to follow.
1.press window r
2.Type %temp% & click on OK button.
3)Then go to AppData->LocalLow->here you can see all the softwares cache, delete which you want. 



Cordova AJAX Call not working in Mobile but working normally in browser 150 150 New_bluecreazione

Cordova AJAX Call not working in Mobile but working normally in browser

After sending the cordova ajax post method it is working fine on browser but when u tested it on mobile then issue occurred and you are unable to post or get request from server

The solution of this issue is you have to install cordova whitelist plugin and the command of this plugin is below.

cordova plugin add cordova-plugin-whitelist
cordova prepare

run the above two command and after that run the  below command.

cordova run android

now u can test on mobile, it will working fine.now you are good to go.

GET and Post data from server using Cordova JQuery $.ajax() . 150 150 New_bluecreazione

GET and Post data from server using Cordova JQuery $.ajax() .

Get and post request are basically used to fetch response from server so here are the following steps to achieve this,

1.we need to add following two header files into server side Php file.

header(‘Access-Control-Allow-Origin:*’);
header(‘Access-Control-Allow-Methods: GET,POST,PATCH,PUT,DELETE,OPTIONS’);

2.we need to call jquery$.ajax() and passes all the essential detials

example of sending POST request type are as follow. functionregisterEvent(){alert(“reached here 1”); varemail = $(“#username1”).val();varpassword = $(“#password1”).val();varfirst_name = $(“#f_name”).val();varlast_name = $(“#l_name”).val();alert(“reached here 2”);varformData = “first_name=”+first_name+”&last_name=”+last_name+”&email=”+ email+”&password=”+password;  $.ajax({url: “http://www.example.com”,type: “POST”,data:formData,cache:false,success: function(response) {alert(“Success “+response);},error: function(response) {alert(“Err “+response);}});// window.location.href = “homepage.html”;}

WordPress fix rest_cannot_create 150 150 New_bluecreazione

WordPress fix rest_cannot_create

Inception

I have been working on App Development project for a client. We use Authorization Access token
to validate our users and inputs. Suddenly the Rest API of WordPress started returning an error,
 "{"code":"rest_cannot_create","message":"Sorry, you are not allowed to create posts as this ".
And all our APIs stopped working. After spending some time over the internet we found out a solution,
and thought to share it will you all.

Story

This issue arises when some automatically modifications are done in .htaccess file just because of installation of new wordpress plugin.
Due to this issue you are not allowed to create any post and you are not authorized to update the 
details related to specific post and due to this issue Authorization bearer token is also not accessible.

Solution

The solution of this issue is simple,we only have to make some changes in .htaccess file which are 
as follows
after the RewriteEngine On
you have to add two lines which are as follows
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] that's it now you are good to go.
How to reduce Model size in Unity 150 150 New_bluecreazione

How to reduce Model size in Unity

OVERVIEW

This is great one. Writing this blog for people to know how they can reduce their FBX file size in the final APK built or IPA built.

So all of us are pretty much aware that developing 3d game could cost your app great amount of assets and finally a huge app size. Big app size means people will not download your game till they have Wifi connection! Which is a big problem in the app industry.

STORY

Getting down to the tip which I used to squeeze my characters in Dragon Kombat game. So our Dragon Kombat game is a 1v1 player arcade game. Which has great models designed in Fuse and Character Creator. All these models are so cool that we just didn’t want to reduce their polygon count. But at the same time have many devices run them at good fps. So firstly I am talking about RAM consumption, when we tested our models on devices they were all near around 20 mb each. And when played the game they occupied good amount of RAM. Our game ultimately started lagging. But then we also saw that our main APK size was huge too. Near around 250-300 MB. So ultimately we checked the Editor Log and found out the culprits. Sure textures were issue but not as much as the Models we used. Then we tried to use Mesh Compression which unity offered in their settings. We found out that size of the models didnt reduce. Only thing reduced was the quality of models in game. Shame!

SOLUTION

Then we played with all the setting in the Model settings. And to our surprise we found only 1 setting which affected the Size of Model. BLEND SHAPES!!

As soon as we turned off importing of Blend Shapes we got astonishing 80% reduce in Models size. I mean this was great. Our game went from being 250MB to under 100 MB!
Then we reduced textures a bit more and came down to 85 MB! Very cool!

But then yeah Blend Shapes are great! One of our character is Dr. SYkoo! Which has this mouth opening animation when he was idle and fighting. So we only decided to keep that model have Blend shapes. So finally we ended up having 10 Fighters of high quality and 1 model among them had Blend Shapes. And Game size went up to 92MB.

CONCLUSION

So in short if you don’t read the whole story! Dont import Blend Shapes if your character doesn’t speak or use expressions at all. Cheers! I will keep updated for more tips as I find more time.

Unity is great because it gives such options! Maybe a little less documented about these things.

Dragon Kombat

Google Play: https://play.google.com/store/apps/details?id=com.BlueCreazione.DragonKombat

IOS: https://itunes.apple.com/us/app/dragon-kombat/id1450303983

Quick Reminder on fixing Humanoid issues in Unity 150 150 New_bluecreazione

Quick Reminder on fixing Humanoid issues in Unity

Its a big deal when it comes to fixing issues related to animations. Most of the indie developers use Mixamo for animations. And most of the developers now a days are used to work with Animators and animations in Unity3d. Here is a thing which I find very interesting about Humanoids in Unity, Unity says Humanoids are mostly used to adapt animations. So you can use a girl’s animation on top of a boy or any boy animation on a monkey. But most of the times in my development life cycle I have been going back and forth trying to achieve that and found below things which you should consider when you are doing cross animations with Humanoid.

Its a big deal when it comes to fixing issues related to animations. Most of the indie developers use Mixamo for animations. And most of the developers now a days are used to work with Animators and animations in Unity3d. Here is a thing which I find very interesting about Humanoids in Unity, Unity says Humanoids are mostly used to adapt animations. So you can use a girl’s animation on top of a boy or any boy animation on a monkey. But most of the times in my development life cycle I have been going back and forth trying to achieve that and found below things which you should consider when you are doing cross animations with Humanoid.

  • Your character should be a perfect T Pose and have all the required bones with proper naming. Like Hips, Spine,Head,Neck etc. Only then Unity will recognise your character as Humanoid. And if Unity couldn’t find the bones it needs then it will give you error message which would describe the issue.
  • This one is very important, People everywhere will tell you not to scale your models in the game, or directly from Hierarchy. And rather would ask you to do that in the Model settings of the selected model in project window. Well this is not true. If you do this then your Humanoid animations linked to this model will not work with any other models. There are more issues related to this which i will continue below.
  • If you set the scale property to anywhere more then 1 in the Model settings then any new animations you add to unity will give you issues of bones position mismatch. Which will big time screw things up for you.
  • Make sure your all your animations are set on 1 model and not multiple models if you plan to re use the animations on multiple models. For Example, if you have a fight game to make and you got a punch and a kick animations which you want to use on same characters like Ryu and Ken then its smart you set the humanoid animation to only 1 Avatar and not different every time. So Kick and Punch animation should be linked to only 1 Avatar and not different.
  • Place your Animations where your main Model is. Trust me you will be fixing lot of issues if you did this.

That’s it, for more tips on Animator and Animation, we will be having more blogs coming up.