Skip to main content

Posts

Showing posts from March, 2019

saddleback-search-algorithm using divide a conquer

saddleback-search-algorithm using divide a conquer //https://www.geeksforgeeks.org/saddleback-search-algorithm-in-a-2d-array/ class search { static Saddleback ( arry : Array < any >, row : number , col : number , value : any ) { let bottomRowIndex : number =( row - 1 ); let bottomLeftCol : number = 0 ; while ( bottomRowIndex >= 0 && bottomLeftCol < col ) { if ( arry [ bottomRowIndex ][ bottomLeftCol ]=== value ) { return { rowindex : bottomRowIndex , colIndex : bottomLeftCol }; } else { if ( arry [ bottomRowIndex ][ bottomLeftCol ]> value ) { bottomRowIndex -= 1 ; } else { bottomLeftCol += 1 ; } } } } } let values =[[ 10 , 20 , 30 , 40 ], ...

why to choose cocos2dx c++ when its comes to 2d mobile gaming

  why i choose cocos2dx to create 2d games 1. cross-platform yes you are right while finding gaming solution you can't ignore either android or ios so that's why my choice is cocos2dx . 2. easily build for both android and ios 3. 60 fps performance on both Android and  ios even on a little slow device 4. all required things which required for a 2d game like animation using action's inbuilt tween engine easy way to configure box2d using fixed time steps 5. automatic memory management even you can use c++ 11(smart pointer's) which help you to overcome with memory management. 7. parent-child relationship where you create complex ui using grouping sprites. 8.shaders and particle support 9. easy way to implement touch events and other events 10. callback using lambda 11. inbuilt list button and other ui which normally required 12. you can mix 2d and 3d same scene 13. full tile mapping support 14. inbuilt camera which can be attached t...