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

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 

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!!