Fixes for MonsterWars to run in 5S simulator for XCode 10.1

I can’t find a better place to post it that it allows me to post to so I’m posting this here:

Fixes for MonsterWars to run in 5S simulator for XCode 10.1

It won’t let me upload the amended project so I’ll just explain the changes here:

Change deployment target to iOS 9.0
Change Build Settings -> Architectures to “Standard Architectures”

Change “CGFloat __ccContentScaleFactor” “float __ccContentScaleFactor” everywhere you can find it in the project (in CCDirectorIOS.h and CCDirectorIOS.m).

In ccShader_PositionColorLengthTexture_frag.h

Delete the lines with the following text on them (lines 23, 35-37, and 39):

#extension GL_OES_standard_derivatives : enable \n\

#if defined GL_OES_standard_derivatives \n
gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n
#else \n\

#endif \n\

I was able to run the game in a 5S simulator!

Fun game and example!

Also my thoughts from my first quick read through are why not define each thing like Shooting, Movement, etc. in a separate protocol. You can test if an object implements a protocol in Objective C with ```
[someClassPointer.class conformsToProtocol:@protocol(MyProtocol)];

and in Swift with "is"

So you can have a list of all your game objects and then do each function based on if the object implements the protocol or not.  And if you need to add the Shooting protocol to the castle object later, then you can.

Does this work? Or am I missing something?

@dovo329 Thank you for sharing this - much appreciated! :]