SlideShare a Scribd company logo
1 of 27
About Cocos2d-JS 
Fumitoshi Ogata
Table of Contents 
01.Self Introduction 
02.Reason why I choose Cocos2d-JS 
03.Exp1 
[Think About Performance using 
ViewPortClipping] 
04.Exp2 
[Think About Saving to localStorage]
Self 
Introduction
I am a former accounting 
software engineer. 
I have developed independent 
games,and i am now involved 
in a game production to utilize 
my expertise. 
OEDO-WORLD(mixi app) / PHP + 3d-studio-max
Reason why I chose 
'Cocos2d-JS' as SDK
When I want to create games, 
the question is always ‘should I 
choose browser or native 
application?
With browser development, 
developers have too many 
choices, and the differences 
among the teams are also big.
As a Developer,I be prepared to 
be able to create both browser 
and native-app games just in 
case whichever becomes a 
mainstream.
Exp1 
Think About 
Performance.
What is stress first of all? 
Game is composed of a lot of 
elements. isn't it?(collision 
detection,score 
management,and drawing etc..)
The answer is 'draw'. 
In the case of Cocos2d-JS,a lot 
of 'setPosition' are called for 
drawing a Node.
Nodes you can use are limited! 
Using iPhone4S 
Cocos2d-x …. 1863 sprites 
Cocos2d-browser 300~500 sprites 
 http://www.slideshare.net/crooz_techblog/7- 
131112144201phpapp01
To increase the performance, 
you should use 
'ViewPortClipping'. 
'ViewPort Clipping' is a process 
that you clip outside of the 
viewport.
This is a huge world,and the 
world have 100 enemies. 
When drawing a map of a vast 
world with 100 enemies with 
60FPS, ‘set Position’ is called for 
as many as 6000 times!!
If you can draw only the enemies who exist 
inside your view,you may be able to reduce some 
stress of drawing.
You must create a function that let you decide 
whether or not your position is inside the 
viewport. 
When you set it as the value of 'setVisible',you 
can decrease the amount of 'setPosition'. 
Enemy.js 
update:function(){ 
if(this.game.isInsideOfCameraRange(this.mapX,this.mapY)){ 
this.setVisible(true); 
this.setPosition(this.mapX,this.mapY); 
}else{ 
this.setVisible(false); 
} 
}
Use case 
http://oggata.github.io/Cocos2dJSv3SampleGame/ 
iPhone4S viewPortClipOff 170 /On 500-
Exp2 
Think About saving 
to localStorage.
Game data are usually saved in the 
database on a server. 
How often game data should be 
saved in the database? 
If you save data every time you 
make a move, 
You may not able to play this game 
well at locations where the 
reception is poor such as in a train.
How about saving position data 
to browser and the final-score to 
server? 
As you know, you can use 
'HTML5 localStorage', to save 
and load game data.
Set 
Get
Use case 
http://oggata.github.io/Cocos2dJSShogiSample/publish/html5/
Be creative to improve 
performance, Let's start browser 
game development!!

More Related Content

What's hot

Blog solid works simulation performance on cad workstations
Blog   solid works simulation performance on cad workstationsBlog   solid works simulation performance on cad workstations
Blog solid works simulation performance on cad workstationsSteve Thomas
 
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGLLeaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGLgerbille
 
Stupid Canvas Tricks
Stupid Canvas TricksStupid Canvas Tricks
Stupid Canvas Tricksdeanhudson
 
Blog msi workstation vs dell vs hp vs custom final
Blog msi workstation vs dell vs hp vs custom finalBlog msi workstation vs dell vs hp vs custom final
Blog msi workstation vs dell vs hp vs custom finalSteve Thomas
 
Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"
Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"
Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"Fwdays
 
Tools for developing Android Games
 Tools for developing Android Games Tools for developing Android Games
Tools for developing Android GamesPlatty Soft
 
JS Lab2017_Юлия Пучнина_PhaserJS и что он умеет
JS Lab2017_Юлия Пучнина_PhaserJS и что он умеетJS Lab2017_Юлия Пучнина_PhaserJS и что он умеет
JS Lab2017_Юлия Пучнина_PhaserJS и что он умеетGeeksLab Odessa
 
ネイティブ開発アンチパターン
ネイティブ開発アンチパターンネイティブ開発アンチパターン
ネイティブ開発アンチパターンYuki Tamura
 
5 tips for your HTML5 games
5 tips for your HTML5 games5 tips for your HTML5 games
5 tips for your HTML5 gamesErnesto Jiménez
 
How to build a minecraft mod
How to build a minecraft modHow to build a minecraft mod
How to build a minecraft modArun Gupta
 

What's hot (10)

Blog solid works simulation performance on cad workstations
Blog   solid works simulation performance on cad workstationsBlog   solid works simulation performance on cad workstations
Blog solid works simulation performance on cad workstations
 
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGLLeaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGL
 
Stupid Canvas Tricks
Stupid Canvas TricksStupid Canvas Tricks
Stupid Canvas Tricks
 
Blog msi workstation vs dell vs hp vs custom final
Blog msi workstation vs dell vs hp vs custom finalBlog msi workstation vs dell vs hp vs custom final
Blog msi workstation vs dell vs hp vs custom final
 
Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"
Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"
Юлия Пучнина "PhaserJS for advertisement: игры внутри баннеров"
 
Tools for developing Android Games
 Tools for developing Android Games Tools for developing Android Games
Tools for developing Android Games
 
JS Lab2017_Юлия Пучнина_PhaserJS и что он умеет
JS Lab2017_Юлия Пучнина_PhaserJS и что он умеетJS Lab2017_Юлия Пучнина_PhaserJS и что он умеет
JS Lab2017_Юлия Пучнина_PhaserJS и что он умеет
 
ネイティブ開発アンチパターン
ネイティブ開発アンチパターンネイティブ開発アンチパターン
ネイティブ開発アンチパターン
 
5 tips for your HTML5 games
5 tips for your HTML5 games5 tips for your HTML5 games
5 tips for your HTML5 games
 
How to build a minecraft mod
How to build a minecraft modHow to build a minecraft mod
How to build a minecraft mod
 

Similar to About Cocos2djs

Strategies for refactoring and migrating a big old project to be multilingual...
Strategies for refactoring and migrating a big old project to be multilingual...Strategies for refactoring and migrating a big old project to be multilingual...
Strategies for refactoring and migrating a big old project to be multilingual...benjaoming
 
iBasket: The story of an HTML5 game
iBasket: The story of an HTML5 gameiBasket: The story of an HTML5 game
iBasket: The story of an HTML5 gameIker Jamardo
 
Android game engine
Android game engineAndroid game engine
Android game engineJulian Chu
 
Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2dVinsol
 
BSidesDelhi 2018: Headshot - Game Hacking on macOS
BSidesDelhi 2018: Headshot - Game Hacking on macOSBSidesDelhi 2018: Headshot - Game Hacking on macOS
BSidesDelhi 2018: Headshot - Game Hacking on macOSBSides Delhi
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconftutorialsruby
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconftutorialsruby
 
Java term project final report
Java term project final reportJava term project final report
Java term project final reportJiwon Han
 
Game development via_sprite_kit
Game development via_sprite_kitGame development via_sprite_kit
Game development via_sprite_kitBuşra Deniz, CSM
 
Game Development Session - 3 | Introduction to Unity
Game Development Session - 3 | Introduction to  UnityGame Development Session - 3 | Introduction to  Unity
Game Development Session - 3 | Introduction to UnityKoderunners
 
Iphone game developement - In a game things always move
Iphone game developement - In a game things always moveIphone game developement - In a game things always move
Iphone game developement - In a game things always moveSwapnil Patil
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsLuca Galli
 
Android Game Minisyonize
Android Game MinisyonizeAndroid Game Minisyonize
Android Game Minisyonizesavvy
 
Cross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-jsCross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-jsTroy Miles
 
Beginning android games
Beginning android gamesBeginning android games
Beginning android gamesMario Zechner
 
C++ game development with oxygine
C++ game development with oxygineC++ game development with oxygine
C++ game development with oxyginecorehard_by
 
Parallel Futures of a Game Engine
Parallel Futures of a Game EngineParallel Futures of a Game Engine
Parallel Futures of a Game EngineJohan Andersson
 
Create xo game in android studio
Create xo game in android studioCreate xo game in android studio
Create xo game in android studioMahmoodGhaemMaghami
 

Similar to About Cocos2djs (20)

Strategies for refactoring and migrating a big old project to be multilingual...
Strategies for refactoring and migrating a big old project to be multilingual...Strategies for refactoring and migrating a big old project to be multilingual...
Strategies for refactoring and migrating a big old project to be multilingual...
 
iBasket: The story of an HTML5 game
iBasket: The story of an HTML5 gameiBasket: The story of an HTML5 game
iBasket: The story of an HTML5 game
 
Android game engine
Android game engineAndroid game engine
Android game engine
 
Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2d
 
BSidesDelhi 2018: Headshot - Game Hacking on macOS
BSidesDelhi 2018: Headshot - Game Hacking on macOSBSidesDelhi 2018: Headshot - Game Hacking on macOS
BSidesDelhi 2018: Headshot - Game Hacking on macOS
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
Java term project final report
Java term project final reportJava term project final report
Java term project final report
 
Game development via_sprite_kit
Game development via_sprite_kitGame development via_sprite_kit
Game development via_sprite_kit
 
Game Development Session - 3 | Introduction to Unity
Game Development Session - 3 | Introduction to  UnityGame Development Session - 3 | Introduction to  Unity
Game Development Session - 3 | Introduction to Unity
 
Iphone game developement - In a game things always move
Iphone game developement - In a game things always moveIphone game developement - In a game things always move
Iphone game developement - In a game things always move
 
Unity workshop
Unity workshopUnity workshop
Unity workshop
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
Android Game Minisyonize
Android Game MinisyonizeAndroid Game Minisyonize
Android Game Minisyonize
 
Cross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-jsCross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-js
 
Pc54
Pc54Pc54
Pc54
 
Beginning android games
Beginning android gamesBeginning android games
Beginning android games
 
C++ game development with oxygine
C++ game development with oxygineC++ game development with oxygine
C++ game development with oxygine
 
Parallel Futures of a Game Engine
Parallel Futures of a Game EngineParallel Futures of a Game Engine
Parallel Futures of a Game Engine
 
Create xo game in android studio
Create xo game in android studioCreate xo game in android studio
Create xo game in android studio
 

Recently uploaded

WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 

Recently uploaded (20)

WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

About Cocos2djs

  • 2. Table of Contents 01.Self Introduction 02.Reason why I choose Cocos2d-JS 03.Exp1 [Think About Performance using ViewPortClipping] 04.Exp2 [Think About Saving to localStorage]
  • 4. I am a former accounting software engineer. I have developed independent games,and i am now involved in a game production to utilize my expertise. OEDO-WORLD(mixi app) / PHP + 3d-studio-max
  • 5.
  • 6.
  • 7.
  • 8. Reason why I chose 'Cocos2d-JS' as SDK
  • 9. When I want to create games, the question is always ‘should I choose browser or native application?
  • 10. With browser development, developers have too many choices, and the differences among the teams are also big.
  • 11. As a Developer,I be prepared to be able to create both browser and native-app games just in case whichever becomes a mainstream.
  • 12.
  • 13. Exp1 Think About Performance.
  • 14. What is stress first of all? Game is composed of a lot of elements. isn't it?(collision detection,score management,and drawing etc..)
  • 15. The answer is 'draw'. In the case of Cocos2d-JS,a lot of 'setPosition' are called for drawing a Node.
  • 16. Nodes you can use are limited! Using iPhone4S Cocos2d-x …. 1863 sprites Cocos2d-browser 300~500 sprites  http://www.slideshare.net/crooz_techblog/7- 131112144201phpapp01
  • 17. To increase the performance, you should use 'ViewPortClipping'. 'ViewPort Clipping' is a process that you clip outside of the viewport.
  • 18. This is a huge world,and the world have 100 enemies. When drawing a map of a vast world with 100 enemies with 60FPS, ‘set Position’ is called for as many as 6000 times!!
  • 19. If you can draw only the enemies who exist inside your view,you may be able to reduce some stress of drawing.
  • 20. You must create a function that let you decide whether or not your position is inside the viewport. When you set it as the value of 'setVisible',you can decrease the amount of 'setPosition'. Enemy.js update:function(){ if(this.game.isInsideOfCameraRange(this.mapX,this.mapY)){ this.setVisible(true); this.setPosition(this.mapX,this.mapY); }else{ this.setVisible(false); } }
  • 21. Use case http://oggata.github.io/Cocos2dJSv3SampleGame/ iPhone4S viewPortClipOff 170 /On 500-
  • 22. Exp2 Think About saving to localStorage.
  • 23. Game data are usually saved in the database on a server. How often game data should be saved in the database? If you save data every time you make a move, You may not able to play this game well at locations where the reception is poor such as in a train.
  • 24. How about saving position data to browser and the final-score to server? As you know, you can use 'HTML5 localStorage', to save and load game data.
  • 27. Be creative to improve performance, Let's start browser game development!!