brandmooffin / cocos2d-mono

Continuation of Cocos2D-XNA project, with focus on MonoGame
http://cocos2d-mono.dev
MIT License
29 stars 2 forks source link

What about iOS? #1

Open uwe-neuronation opened 5 years ago

uwe-neuronation commented 5 years ago

Any plans to implement it for iOS?

brandmooffin commented 5 years ago

Great question! I've considered adding support but with Apple deprecating OpenGL this year in iOS and macOS in favor of Metal, I was a little hesitant about it. I didn't want to knowingly create a problematic situation for devs, so really until MonoGame supports Metal I've leaned towards holding on adding support. That said, SpriteKit follows a lot of the same patterns as Cocos2D and probably the best alternative in the meantime.

... actually on second thought, I can have Cocos2D-Mono wrap around SpriteKit, it just wouldn't have a dependency on MonoGame.

This might be the best course for now. What do you think?

uwe-neuronation commented 5 years ago

Sounds great! Whats also missing, from my point of view, is a possibility to develop the Game itself as library. If you would also provide a library project, containing the platform indipenend part of Cocos2D. Then we could share the Game-Code for different platforms.

Eg.: A solution containing a platform indipendent project(Game), a Windows project and an Android pordject.

brandmooffin commented 5 years ago

Do you mean the library itself without the MonoGame dependencies? I think the Metal support will be the first to do this, once I have that I can get other platforms to follow.

uwe-neuronation commented 5 years ago

Thank you for the quick response ;-) I'm not an expert in stetting that up, but it should be possible by using a partial class solution. A platform independent part and a specific part. Like here for example: https://github.com/mono/CocosSharp/blob/master/src/EmbeddableView/CCGameView.cs https://github.com/mono/CocosSharp/blob/master/src/EmbeddableView/CCGameView.Android.cs

see also: https://github.com/mono/CocosSharp/tree/master/ProjectTemplates

brandmooffin commented 5 years ago

Completely agree 💯 I think this is worth doing for sure. I'm actually working now on creating that separation :) should hopefully have the first set of changes ready soon!

reuncc commented 3 years ago

事实上 其实在真实使用场景, 多平台支持 肯定是 共享项目库+脚本库+核心代码