Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
a39d8e7
initial commit
slackmoehrle Oct 10, 2014
f92f774
removed
slackmoehrle Oct 10, 2014
96911fc
rename for chapter3
slackmoehrle Oct 10, 2014
423f3a8
continued edits
slackmoehrle Oct 10, 2014
018e327
initial commit
slackmoehrle Oct 10, 2014
b7b1419
.
slackmoehrle Oct 10, 2014
3bf6248
removed
slackmoehrle Oct 10, 2014
3743962
deleted
slackmoehrle Oct 10, 2014
4fefbd1
now use shared font in res/
slackmoehrle Oct 10, 2014
92db405
fix project settings
zilongshanren Oct 11, 2014
a4c8564
Merge pull request #1 from andyque/master
zilongshanren Oct 11, 2014
ab58a3d
Revert "fix project settings"
slackmoehrle Oct 11, 2014
528c4db
Merge pull request #2 from chukong/revert-1-master
slackmoehrle Oct 11, 2014
a89875b
use
slackmoehrle Oct 11, 2014
546136f
use
slackmoehrle Oct 11, 2014
957dc31
edits
slackmoehrle Oct 11, 2014
bf6b87d
Merge branch 'master' of github.com:chukong/programmers-guide-samples
slackmoehrle Oct 11, 2014
85ab4b2
Change chapter10 -> chapter9
Oct 11, 2014
40c9d2a
change folder name
Oct 11, 2014
10c2444
Merge branch 'newcode'
Oct 11, 2014
659f60f
Merge pull request #3 from lvlonggame/master
slackmoehrle Oct 11, 2014
5d69178
initial commit
slackmoehrle Oct 11, 2014
8405c54
use
slackmoehrle Oct 11, 2014
f875edd
initial commit
slackmoehrle Oct 11, 2014
e16a73b
use
slackmoehrle Oct 11, 2014
95dae0a
rename chapter 10 to 9
slackmoehrle Oct 11, 2014
d98125f
added notes
slackmoehrle Oct 12, 2014
1a03912
use
slackmoehrle Oct 12, 2014
7344a6b
comment out showing display stats
slackmoehrle Oct 12, 2014
0ff9cf2
ignore xcodedate
zilongshanren Oct 13, 2014
e97a816
Merge remote-tracking branch 'refs/remotes/upstream/master'
zilongshanren Oct 13, 2014
7a7aecd
Merge pull request #4 from andyque/master
zilongshanren Oct 13, 2014
01595af
continued edits
slackmoehrle Oct 13, 2014
02e0333
why?
slackmoehrle Oct 13, 2014
c08858f
why?
slackmoehrle Oct 13, 2014
b9c4229
why?
slackmoehrle Oct 13, 2014
f4eb3f7
why?
slackmoehrle Oct 13, 2014
e6a5f2f
initial commit
slackmoehrle Oct 13, 2014
da75c97
initial commit
slackmoehrle Oct 13, 2014
0fff1cb
Merge branch 'master' of github.com:chukong/programmers-guide-samples
slackmoehrle Oct 13, 2014
73c84b9
not needed
slackmoehrle Oct 13, 2014
eb842c6
initial commit
slackmoehrle Oct 13, 2014
ed75188
continued use
slackmoehrle Oct 13, 2014
d415036
continued use
slackmoehrle Oct 13, 2014
0cf7c2e
edits
slackmoehrle Oct 13, 2014
f105e47
fixes chapter3
ricardoquesada Oct 13, 2014
d1e9ec0
reorg to fit guide
slackmoehrle Oct 13, 2014
5f2b490
edits
slackmoehrle Oct 13, 2014
3bf8dff
Merge branch 'master' of github.com:chukong/programmers-guide-samples
slackmoehrle Oct 13, 2014
0610351
nitial commit
slackmoehrle Oct 14, 2014
d69c655
continued edits
slackmoehrle Oct 14, 2014
10ce9aa
Add samples of physics chapter
WenhaiLin Oct 14, 2014
9785547
Merge branch 'master' of https://github.com/chukong/programmers-guide…
WenhaiLin Oct 14, 2014
e40a186
Merge pull request #5 from Dhilan007/master
WenhaiLin Oct 14, 2014
42b3e47
add chpater6 mac template
zilongshanren Oct 15, 2014
1e4d988
add iOS target
zilongshanren Oct 15, 2014
8bba969
add skeleton code
zilongshanren Oct 15, 2014
ac6009e
add more skeleton code
zilongshanren Oct 15, 2014
79a5461
add new configs
zilongshanren Oct 16, 2014
3f80632
finish label effect
zilongshanren Oct 16, 2014
f0c83a1
finish label section
zilongshanren Oct 16, 2014
a9733b9
add menu sample code
zilongshanren Oct 16, 2014
5ede761
use
slackmoehrle Oct 16, 2014
f05bead
added color opacity, corrected a few errors
slackmoehrle Oct 16, 2014
e3b66f8
initial commit
slackmoehrle Oct 17, 2014
0c249df
use
slackmoehrle Oct 17, 2014
8dffffb
continued edits
slackmoehrle Oct 17, 2014
916f126
add 3D light test to chapter 9
Oct 17, 2014
2826214
Merge pull request #7 from lvlonggame/master
slackmoehrle Oct 17, 2014
18d7bb4
initial commit
slackmoehrle Oct 17, 2014
ad92058
use
slackmoehrle Oct 17, 2014
898265a
initial commit
slackmoehrle Oct 17, 2014
3c6c5e9
fixed demo title
slackmoehrle Oct 21, 2014
8836a20
Merge remote-tracking branch 'upstream/master'
zilongshanren Oct 22, 2014
5954017
add chapter 6 target
zilongshanren Oct 22, 2014
248de41
Merge pull request #6 from andyque/master
zilongshanren Oct 22, 2014
5a29202
remove deprecated code
zilongshanren Oct 22, 2014
fa3d3a9
finish UIButtonDemo
zilongshanren Oct 22, 2014
87d0171
add checkbox tests
zilongshanren Oct 22, 2014
6f16323
add loadinbar tests
zilongshanren Oct 22, 2014
90fa587
add slider demo
zilongshanren Oct 22, 2014
4d2d6a1
add imageview sample
zilongshanren Oct 22, 2014
153f3bb
add text tests
zilongshanren Oct 22, 2014
dfe89d5
add richtext sample
zilongshanren Oct 22, 2014
800f3a6
add textfield demo
zilongshanren Oct 22, 2014
0a71472
Merge pull request #8 from andyque/master
zilongshanren Oct 22, 2014
f24836c
Revert "finish chapter6"
slackmoehrle Oct 22, 2014
ee2acfa
Merge pull request #9 from chukong/revert-8-master
slackmoehrle Oct 22, 2014
55063ff
fix for xcode project
ricardoquesada Oct 22, 2014
1fdf141
removed
slackmoehrle Nov 18, 2014
3a550fc
initial commit
slackmoehrle Nov 18, 2014
a0b114b
initial commit
slackmoehrle Nov 18, 2014
14b44cb
initial commit
slackmoehrle Nov 18, 2014
bb46d94
removed
slackmoehrle Nov 18, 2014
67174a1
add a plane to light sample.
Dec 15, 2014
aff4454
add plane.png and plane.obj
Dec 15, 2014
7721b32
add plane.obj
Dec 15, 2014
ad69361
Merge pull request #10 from lvlonggame/master
ricardoquesada Dec 15, 2014
e9169cf
corrected spelling error in labels
slackmoehrle Dec 19, 2014
69b8ef8
chapter9_10: the frustum clipping.
Jan 5, 2015
c5ef688
wrong word.
Jan 5, 2015
42fae03
remove DrawNode3D.h include.
Jan 5, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,9 @@ tests/cpp-tests/Resources/audio
/external/ConvertUTF/
/external/audio/
/external/xxtea/
/proj.ios_mac/Programmers Guide.xcodeproj/project.xcworkspace/xcshareddata/Programmers Guide.xccheckout
/_artwork/.DS_Store
/_artwork/PNG/.DS_Store
/proj.ios_mac/Programmers Guide.xcodeproj/project.xcworkspace/xcshareddata/Chapter 2.xccheckout
/proj.ios_mac/Programmers Guide.xcodeproj/project.xcworkspace/xcshareddata/Programmers Guide.xccheckout
/proj.ios_mac/Programmers Guide.xcodeproj/project.xcworkspace/xcshareddata/chapter2.xccheckout
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* `auto` is used for creating local variables.
* `using namespace cocos2d;` is used to shorten types.
* each chapter has a compilable source code sample to demonstrate concepts.

* each chapter should subclass `Ref`
* each chapter should do as much work in the constructor. no need for `::init()`
* model the code design after chapter 2's example code. Follow these same conventions.

## How to compile the samples

Expand Down
Binary file removed _artwork/.DS_Store
Binary file not shown.
Binary file removed _artwork/PNG/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string>Icon</string>
<key>CFBundleIdentifier</key>
<string>org.cocos2dx.chapter2</string>
<string>org.cocos2dx.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -27,7 +27,7 @@
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2013. All rights reserved.</string>
<string>Copyright © 2014. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand Down
3,542 changes: 3,198 additions & 344 deletions proj.ios_mac/Programmers Guide.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<string>Icon-144.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>org.cocos2dx.chapter2</string>
<string>org.cocos2dx.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
87 changes: 87 additions & 0 deletions proj.ios_mac/sprites.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>frames</key>
<dict>
<key>Blue_Front1.png</key>
<dict>
<key>frame</key>
<string>{{2,2},{65,81}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{65,81}}</string>
<key>sourceSize</key>
<string>{65,81}</string>
</dict>
<key>LightBlue_Front1.png</key>
<dict>
<key>frame</key>
<string>{{2,168},{65,79}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{65,79}}</string>
<key>sourceSize</key>
<string>{65,79}</string>
</dict>
<key>White_Front1.png</key>
<dict>
<key>frame</key>
<string>{{2,85},{65,81}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{65,81}}</string>
<key>sourceSize</key>
<string>{65,81}</string>
</dict>
<key>ZigzagForest_Square.png</key>
<dict>
<key>frame</key>
<string>{{2,249},{64,64}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{64,64}}</string>
<key>sourceSize</key>
<string>{64,64}</string>
</dict>
<key>ZigzagGrass_Mud_Round.png</key>
<dict>
<key>frame</key>
<string>{{2,315},{64,64}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{64,64}}</string>
<key>sourceSize</key>
<string>{64,64}</string>
</dict>
</dict>
<key>metadata</key>
<dict>
<key>format</key>
<integer>2</integer>
<key>realTextureFileName</key>
<string>sprites.pvr.ccz</string>
<key>size</key>
<string>{69,382}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:2e01155d20cb55cd5bbd4eb50d43ff39:7b8b6ec505808c571e2013b70cd6adf9:65190eda994a633aa977088176b54359$</string>
<key>textureFileName</key>
<string>sprites.pvr.ccz</string>
</dict>
</dict>
</plist>
Binary file added proj.ios_mac/sprites.pvr.ccz
Binary file not shown.
Binary file added res/chapter12/LightBlueSprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/blueSprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/fonts/arial.ttf
Binary file not shown.
Binary file added res/chapter12/leftNormal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/leftSelected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/restartNormal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/restartSelected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/rightNormal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/rightSelected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter12/whiteSprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter13/alert.mp3
Binary file not shown.
Binary file added res/chapter13/music.mp3
Binary file not shown.
Binary file removed res/chapter2/CloseNormal.png
Binary file not shown.
Binary file removed res/chapter2/CloseSelected.png
Binary file not shown.
Binary file removed res/chapter2/HelloWorld.png
Binary file not shown.
Binary file removed res/chapter2/clouds_1.png
Binary file not shown.
Binary file removed res/chapter2/fonts/Marker Felt.ttf
Binary file not shown.
87 changes: 87 additions & 0 deletions res/chapter3/sprites.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>frames</key>
<dict>
<key>Blue_Front1.png</key>
<dict>
<key>frame</key>
<string>{{2,2},{65,81}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{65,81}}</string>
<key>sourceSize</key>
<string>{65,81}</string>
</dict>
<key>LightBlue_Front1.png</key>
<dict>
<key>frame</key>
<string>{{2,168},{65,79}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{65,79}}</string>
<key>sourceSize</key>
<string>{65,79}</string>
</dict>
<key>White_Front1.png</key>
<dict>
<key>frame</key>
<string>{{2,85},{65,81}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{65,81}}</string>
<key>sourceSize</key>
<string>{65,81}</string>
</dict>
<key>ZigzagForest_Square.png</key>
<dict>
<key>frame</key>
<string>{{2,249},{64,64}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{64,64}}</string>
<key>sourceSize</key>
<string>{64,64}</string>
</dict>
<key>ZigzagGrass_Mud_Round.png</key>
<dict>
<key>frame</key>
<string>{{2,315},{64,64}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{64,64}}</string>
<key>sourceSize</key>
<string>{64,64}</string>
</dict>
</dict>
<key>metadata</key>
<dict>
<key>format</key>
<integer>2</integer>
<key>realTextureFileName</key>
<string>sprites.pvr.ccz</string>
<key>size</key>
<string>{69,382}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:2e01155d20cb55cd5bbd4eb50d43ff39:7b8b6ec505808c571e2013b70cd6adf9:65190eda994a633aa977088176b54359$</string>
<key>textureFileName</key>
<string>sprites.pvr.ccz</string>
</dict>
</dict>
</plist>
Binary file added res/chapter3/sprites.pvr.ccz
Binary file not shown.
Binary file added res/chapter4/Blue_Back1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Back2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Back3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Front1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Front2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Front3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Left1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Left2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Left3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Right1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Right2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter4/Blue_Right3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/chapter6/fonts/arial.ttf
Binary file not shown.
Loading