Folks,
I posted this in another thread but I felt it wasn't appropriate there so I'll repost it here...
Back at the end of last year, I think we'd just been told by
@atilim that a port of Gideros to Windows 8 Phone wasn't likely to happen anytime soon. So I got to thinking, how difficult would it be to write a Gideros compatible Lua SDK for W8P. The idea would be to use Gideros for iOS and Android and then take the same code and run it under W8P. So, over the course of a two week period I did this.
What I decided to do was to take the Cocos2d-x (C++) framework stick a Lua interface on top of this and then write a set of Gideros compatibility classes in Lua. The point is that Cocos2d-x is available for IOS/Android and W8P (the latter thanks to an investment from Microsoft, I think).
This is how far I got (see below). The demo is under IOS because it was easy to do and I wanted to use ZeroBrane Studio as the IDE (also I didn't have a W8 phone at the time). But the idea was that the same code would run directly under W8P. Some of you might remember a demo of a game I was working on at the time that used my daughter's doodlings. Here is a sample of it working in this compatibility framework:
Note also that this is actually also running under OpenGL ES 2 (look at the startup messages in the console in the video) because that is what Cocos2d-x v2 supports. So in two weeks I had managed to get 90% of a Gideros compatible framework running that would support three mobile platforms and OGL2!! The SceneManager is in there and the GTweens all work. The hardest thing was getting Shapes to work (
@atilim has done some fine work in there, I can tell you). As an aside (because it is using Dropbox to synch assets with the device) it also has a rather neat live coding feature.
Now this isn't meant to put the willies up Team Gideros. I've no intention of using this to compete with The Real Thing (i.e Gideros itself). I definitely think you have the best mobile framework out there. It was purely done as an experiment to see if W8P could possibly be supported with an existing Gideros codebase. Also, it wasn't complete and it wasn't fast enough but as a tech preview I thought it worked okay.
Why didn't I go any further with it? Well, I thought I'd better get back to actually completing the games I was meant to be writing before putting the effort in to get them to run under Windows Phone. This is still ongoing.
Before anyone asks me for the code, I'm afraid it's not in a state to give out (and also I don't want to give any idea that one could use this rather than stump up subscriptions for Gideros). I do think it was an interesting diversion though. If I ever get anything running on a real W8P then I'll let you know.
best regards
Comments
Update: I believe you have answered that, you are not giving away the source just as yet.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
https://github.com/dualface/quick-cocos2d-x
https://github.com/marmalade/OpenQuick
But I think they are very lack of resource likes detail document, community,..
@OZApps, as I said above, I'm not going to make the source available; I don't want to supply a route to challenge Gideros' business. Possibly (depending on the likelihood of WP8 support appearing in Gideros in future) I might tidy things up and supply a binary library just for WP8 (if I can think of a way to do that).
best regards
Likes: vitalitymobile
While moving to OpenGL ES 2.0, I was also thinking about dropping my 2d engine and use cocos2d-iphone or cocos2d-x. Finally, I've decided to not to use them to have more control in the future.
And for shapes, I'm using GLU tesselator internally. You can look at it here: https://github.com/blackberry/Skia/tree/master/third_party/glu/libtess
Likes: fxone, phongtt, hgvyas123, gorkem
I think it's probably a good idea to stick to your own design in the long run (providing you can get it done in a reasonable time). The insides of cocos2d-x seemed like a bit of a nightmare to me; I came away feeling all unclean.
I wondered how you'd done shapes. I ended up with a half-baked homegrown thing.
best regards
@atilim, it is nice to see you on the forums again.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Openquick is he open source version of marmalade quick, though it's stuck at 1.0 (marmalade is at 1.11).
A wrapper to a more simple api is something I considered myself, especially with the cocos builder availability, but I'm going to still wait a little bit more to see Gideros evolution
Likes: vitalitymobile
I personally love Gideros for 3 things:
- Lua it's simply fantastic. Everything else seems too cluttered, at least for my artist mind and Gideros API reflects this clearly
- Workflow is amazing in Gideros and the engine speed is high!
- Entry price is great!
Now, building something on top of Cocos2d-x with the ease of use and workflow of Gideros would have been a very positive thing. There are a lot of other products that are using Cocos2d-x as a backend (marmalade, loom engine) and this would have given a big jump forward to the development of the engine feature wise (opengl es2, particles, isometric, cocos builder for interfaces and bone animation, audio engine, multiplatform), leaving more time to concentrate on the strength of Gideros (livecoding!, api, workflow). Don't forget that cocos2d-x is open source and is evolving at an incredible pace.
I know it's probably too late for this as you have invested quite a bit of time and money in the engine itself, and I'm really looking forward to what you have come up with, but this is obviously food for thought as the pace at which development is moving these days is insane, especially for a one man band
There you go. I'm going back to finish my first iOS game with Gideros (after my 12 hours/day job) now. Hope to show it soon
Gianmichele
A good example is Apple who originally used gcc but then ended up writing their own compiler (LLVM). gcc was quick to get started but a devil to alter, maintain or add new features.
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
I think Lua is a most productive and better language for 2d mobile games, so to give a jump to Gideros will be a good idea that someone could provide us some tips on how port existing cocos2d games to Gideros lua code.
For example http://www.iuridium.com/?p=436 provides some games developed with cocos2d, and I am sure someone with good Objetive-C knowledge can write some good tutorial on porting these games to Gideros.