- Visual Studio tested with both 2015 and 2017
- cocos2d-x version 3.11 LH2 has memory issues with newer versions of cocos2d
- LevelHelper2-API
- Download just the folder using something like GitZip
- Install Visual Studio
- Install cocos2d-x and run the setup.py script
- Use cocos command to create a new game project (ex: cocos new NewGame -l cpp)
- Copy LevelHelper2-API folder into new game project folder
- Open VS solution in proj.win32 folder (launches VS2015)
- In the main project in your solution (NewGame) right click and go to Properties
- Under C/C++ -> General -> Additional Include Directories
- Add ..\LevelHelper2-API;$(EngineRoot);$(EngineRoot)cocos\ui;
- Under C/C++ -> Preprocessor -> Preprocessor Definitions
- Add
LH_USE_BOX2D=1
- (Optionally) set
CC_ENABLE_CHIPMUNK_INTEGRATION=0
- Do the same for Release as for Debug
- Right click main project again and Add->New Filter named LevelHelper2-API
- From file manager, drag LevelHelper2-API folder into the LevelHelper2-API filter you just made
- Make the following changes to LevelHelper2-API files
- LHUtils.cpp surround
float fmin()
andfloat fmax()
with#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
- LHUtils.cpp surround
- If you are using Chipmunk instead of Box2D you might instead want to do the following
- LHJointsProtocol.cpp comment out removeJoint()'s
_joint->removeFormWorld();
causes bad mem access - LHRopeJointNode.cpp add
if (cutJointA)
abovecutJointA->removeFormWorld();
and do same for cutJointB
- LHJointsProtocol.cpp comment out removeJoint()'s
That should get you to the point where you can #include "LevelHelper2API.h"
, compile, and run!