When Cocos2d-x new versions release, in the release notes will have some examples which will help you to have better understanding for exactly what the new functionalities do. But there are some obstacles that you may not know how and where to run it. In this post, I will let you know how to run those demos in Visual Studio.
I use Visual Studio to run the demos as it will be easier for me to run debugger and verify codes. You can use eclipse to run that in Android or Xcode in MacOS but they will take much time for configuration things. So Visual Studio is an express way to run and build demos for testing.
I am using Cocos2d-x version 3.9 and Visual Studio 2015. The setup location for it is in "C:\Android\cocos2d-x-3.9". I noted this so that you can ease to collate with your setup location.
To run the VS project, locate to "C:\Android\cocos2d-x-3.9\build" and open "cocos2d-win32.sln" to open demo project in VS. After project is loaded, select "cpp-tests" as start-up project then build and run.
![]() |
Fig 1. Select "cpp-tests" as Start-up project. |
Then the demo game will be run and it has a lot of options to test. I think that the name of options make sense and you can find the functionality which you want to explore.
![]() |
Fig 2. Options in Menu to test. |
If you want to view the code for better understanding, go to Classes folder and all codes are in there.
![]() |
Fig 3. Example code in VS Project. |
That is all set! I think that now you are able to explore all things by yourself. This demo project is very important if you want to work with Cocos2d-x as it will show you the example code and how to work with the functions you are interesting in. Then you base on those to make your own games.
Yumiki.
No comments :
Post a Comment