Sparrow 3.0 in Swift? Hahaha...
Swift(19 posts) (11 voices)
I'd love to hear more about Swift. It looks very intriguing. I am not sure if I believe that swift has better performance than Objective-C. Maybe swift has better performance in only some areas and lacks in others? Any opinions and details would be appreciated. I love to jump on the best and newest things, but I want to make sure it's worth it.
Nice name for sure
This is the reason I'll always prefer C++. New language plus a propriety API for the GPU. I just hope OpenGL doesn't get pulled.
I had a quick look at the book on iTunes. Looks nice, although I'm not sure I understand the point of it (was obj-c really that slow?), unless you can do things which are tightly integrated with the new XCode, like for example Playgrounds (which looks great, and reminds me of Flash for some reason).
The problem I have with all of this is cross-platform, I was planning to jump to Unity after Clan Kingdom is done, this is making me re-think somewhat, but I'll need to learn more.
[Crossing "Swift" from list of potential names for Gamua frameworks.]
I just skimmed through the documentation of Swift, and boy, is it beautiful. Mark my words: soon, nobody will use Objective-C any more. Swift is modern and concise, uses ARC instead of a damned garbage collector and has a beautiful syntax.
Performance-wise, I can't anything yet, and I honestly do not trust Apple's marketing speak in that respect any longer.
In any case: exactly one year after Sprite Kit, Apple forces me again to re-evaluate what to do with Sparrow!
As far as I understand it, you can use any Objective-C API already with Swift, so at least Sparrow users should potentially be able to use it already. (I hope that's really true! Does anyone know more about this?)
But the main feature of Sparrow (compared to SK) is that it's open source; and my believe is that an OS framework should be as easy to understand as possible; and this would almost beg for it being written in Swift.
So, in the best of all worlds, I'd simply port it over. At the same time, I could maybe exchange OpenGL with "Metal", and have a super-fast open source framework that has strong USPs compared to other OS frameworks. (Well, except for Sprite Kit.)
But doing this would require some revenue model for this new version. I can't spend so much time on it without earning some money to live on! So I'm not sure if that's possible. We'd need
(1) something that makes Sparrow more interesting for developers than Sprite Kit and
(2) enough developers being willing to pay something for that.
I'm open for your thoughts on this, as always!
@BiggerPlay: I think it's not so much about the speed of execution (I'm still not convinced it's really faster than Obj-C), but more speed of development. The syntax is very concise and simplifies things that are rather tedious to do in Objective-C.
To me it looks like a mismash of all sorts, I guess you like it Daniel as most of it looks like ActionScript, the variable convention anyway, closures look more like C++, and the whole set - var things, what the...
I'm disappointed there were no C++ benchmarks but I guess they will perform the sameish, thanks mainly to LLVM else we wouldn't be seeing this at all.
Metal would potentially wipe out millions of devices, performance wise I see nothing wrong with GL, but I'd love to see the difference on a like for like basis.
As for performance over ObjC I can see that as being true as the whole messaging pump isn't needed or more the baggage that comes with it. My bet is low level it'll be the same as what C++ it's just a different front-end.
But like I said before, you takes your choice in regards to being limited to one vendor or be cross platform.
Yeah, I love Ruby and AS3, so I'm naturally fond of its syntax!
I always loved Objective-C, too, but IMHO Swift takes all the cool features I love about it (sending messages to nil, ARC instead of GC) and wraps them up in a concise syntax, so it's a good successor!
I haven't looked into Metal, I really can't say yet if Sparrow could profit from that.
Performance-wise, I'd doubt that Swift would reach C++ speed. Behind the scenes, I think it's still the same message passing, and that's just slower than C++ direct access of functions.
As for cross-platform development, I'm curious if Apportable has any chance of bringing Swift over to Android ...! But for true cross-platform coding, other languages are definitely preferable, like C/C++, AS3, Mono or Haxe.
Skimming through this thread, will read more thoroughly later, I'd be willing to pay for Sparrow Swift if it also added a native Java version (or some kind of DECENT way to port apps over to native Android*) and OS X compatibility too.
* FORGET AS3, it's a dead language, no growth opportunities, really not a selling point for me
** or at least a deal with apportable or marmalade or sumfink
I was initially sceptical about Swift, having suffered developing my app in objective c and Xcode for the past 3 years (still not finished but nearly there) Ive just been reading up on Swift and I absolutely love it ! no more header files, no need for property declarations, constants,  syntax for arrays and multi dimensional array support, modus division operator % working with floats ect ect ect, basically every major annoyance addressed. Heres hoping setting app properties and app deployment will be simplified in Xcode too.
With regards to a revenue model for a Swift version of Sparrow, may I suggest charging users a one off fee once they have passed a certain revenue benchmark, just off the top of my head say £10,000 would equal a fee of say £500, obviously you would know better with regards to competitor pricing and what would be worth your while Daniel, but I think charging an upfront fee may discourage many users and likewise an ongoing revenue share would put many people off, not least the extra accounting work
Hopefully Swift will live up to its name and any future Swift version of Sparrow would be quicker and easier to develop.
re: Swift, the only reason for me to use it would be if it gives me advantages for game development overall, I don't think there are that many speed issues with the current version of Sparrow or using Obj-c for 2D anyway, so I'm more interested in Playgrounds, and how that's going to be used. Is it something which can only be used with Swift?
If I don't migrate to Unity, I would definitely pay to use Sparrow if it was going to be converted to Swift, perhaps something on Android etc. I would prefer a monthly/annual subscription, something like $5.99 pm or $50 for the year etc.
But that's if I don't move over to Unity.
Summary: looks much more fun to work in than Obj-C, and lowers the barrier to entry for programming in an Apple environment. Downside in reduced runtime capabilities
Thanks for the summary, jdraymon!
Most of the speed improvements will come not doing messages. Functions/methods are direct memory accesses and not going through the messaging runtime.
Ah, I hadn't seen that yet! In that case, the speed improvements are definitely credible. It's a pity to lose some of the dynamic capabilities, though; I'm not sure if Sparrow's "SPTween" class could e.g. be ported over easily, since it maps a string to a property.
And am I blind or are there no private/protected member variables and methods? I didn't see any access modifiers like "public", "protected" or "private"! That would be quite cumbersome for API designers. If anybody can use any method, any library update will break a lot of code, since people are using stuff that was never supposed to be visible from the outside.
I've been playing with Swift a bit and like it so far, but it's definitely not quite there yet... Apple moves quick though, so it could shape into a great language. On one hand it's awesome they ditched the Objective-C dispatching, but on another we lost a lot of the runtime dynamism. I hope they come up with a way to make up for that.
@Daniel - I saw a dev on the Apple forums mention that access modifiers will definitely be implemented, they're just not in yet. Which is good news, because that same thing worried me =P
I'm also pretty interested in Metal, though I haven't been able to get it to run on my iPhone5 without crashing and there doesn't seem to be simulator build of the framework.
Thanks for chiming in Rob!
I totally agree with you! A very cool language, but some things are painfully lacking (like the access modifiers, and also any exception handling!), and I'll dearly miss all the dynamic features of Objective-C.
Wow, no simulator support for Metal yet? That's also a must-have.
All in all, we're going to need a little more patience, I guess.
Interesting from the point of view of peoples perceptions of Swift.
You should be-able to create flappy birds on the sinclair spectrum in a couple of hours in z80 assembler. Goes to show everything seems to showcase their wares with a clone of fb. Unreal Engine 4 as well.
You too can have so much $$$, look.
ideas for sparrow revenue model , i dont know if that is good for sparrow's long term existence since spritekit will always be free and updated by apple. however i totally understand the idea behind it , though it is preferable to have separate free and paid version of sparrow with maybe additional editor or convenience features in the paid version, or the paid version only applicable for those who sell their apps on applestore and reached certain profit number.
I could imagine that a swift sparrow could be a successful product. I would at least really love it Now that swift went open source and already runs on android/Linux a good cross platform engine is really needed! I doubt that Apple is interested in porting SpriteKit (although I actually also did not believe that they would ever develop an open source cross platform language! So who knows How about trying crowdfunding for a start?Posted 10 months ago #
That's neat that Swift is Open-Source, I don't think I noticed that. But I doubt there's a valid method for Android Development in Swift as of yet. Google still hasn't added official support for Swift in Android.
As far as cross-platform engines, there are quite a few out there that are very mature. If you are looking for something like Sparrow, check out Starling ( http://gamua.com/starling/ ), which is also made by Daniel.Posted 10 months ago #
You must log in to post.