i am developing an application where i want to do some smoke effect like animation and interact with that smoke.
Do i need to implement it OpenGLES or any simple solution?
Is there any sample application for it?
You could just write a simple particle emitter for that. Is it for a Game ? or for another kind of Application ?
It also depends on the level of realism that you're looking for. A guy got down voted for mentioning fluid dynamics, but if you really want realism, that's the best way to go.
Having said that, you can really get decent smoke using a regular particle emitter (you could even try to code it on Core Animation and not in OpenGL ES).
Also, if you're targeting iOS 5.0+, UIKit now includes several Particle FX that you could use, you just have to play with the parameters... checkout this tutorial
Cheers!
Yes, its possible with simple solution. You just need to use UIKit particle system.
Have a look that sample https://github.com/lichtschlag/Dazzle, you just need to check fire and smoke sample.
Good luck
Hmmm... i have no knowledge about OpenGLES, but there an alternative called iProcessing is designed to create native interactive apps for iOS, actually there no iOS version 5, actually are iOS 4 and iOS 3, maybe we can wait when they release new version of iOS 5.
You need a mac to use Xcode, iProcessing package includes sample projects for Xcode.
http://luckybite.com/iprocessing/
Honestly, i haven't tried it, but you can compare this code of the interactive smoke http://processing.org/learning/topics/smoke.html.
Processing is awesome because you can use same codes for Processing.js and iProcessing, but it depends like importing libraries like OpenGL, etc.
Related
All is in the question, I've worked enough with cocos2d to say it's a great library but today I only wanna use particle system in a total UIKit project. As long as I know, unfortunately, I have to implement one with OpenGL.
Any suggestions ?
You can use Core Animation and CAReplicatorLayer to generate particle systems without having to drop down to OpenGL ES. Joe Ricioppo's "To 1e100f And Beyond with CAReplicatorLayer" gives an introduction to how to use this class. Also, Apple has their ReplicatorDemo sample application, which I ported to the iPad.
On the Mac, there's also the CAEmitterLayer, which became available in iOS as of 5.0. Apple's sample applications for this include Fire, which shows off fire and smoke effects, and Fireworks, which simulates a fireworks display.
For a UIKit-only project you could use Particle Playground (Mac App Store Link) to configure your emitter on your mac in a simulator and the export it as code ready for integration in your project. PP is quite similar to Particle Designer as mentioned by matt.
If you don't want to use a helper so you can dive deeper into the CAEmitter(Layer/Cell) then I would recommend reading this tutorial on Ray Wenderlich's site or this article on Arg! Team's blog. They have helped me a lot in configuring my own emitters.
Full disclosure: I am the developer of Particle Playground. I grew tired of the whole tweak-recompile-observe-loop and developed PP in my spare time.
Note that CAEmitterLayer was added in iOS 5. That makes particle effects much easier.
I haven't used it yet, but I have seen examples that do. I'm not sure how hard Apple's fire sample would be to port to iOS 5. I might just give it a try
I too, find designing particles in UIKit a challenge so I created an app for it. Used it to create various particles in my games now. So easy! It is a iDevice app so you can play with particles while in a bus or at a mall and immediately export out the codes.
If anybody is interested:
http://iapps.emirbytes.com/particlex/index.html
In UIKit you build particle systems by using the QuartzCore framework. For a complete example read this post:
http://www.raywenderlich.com/6063/uikit-particle-systems-in-ios-5-tutorial
You should use CAEmitterLayer
Here are some tutorials
https://www.hackingwithswift.com/read/37/5/creating-a-particle-system-using-caemitterlayer
https://medium.com/call-voicy/comets-animating-particles-in-swift-3431a7f1b250
Here are some ways to playground it
Here is how to playground using SpriteKit http://www.techotopia.com/index.php/An_iOS_8_Sprite_Kit_Particle_Emitter_Tutorial
Xcode 8+ also includes Playground, you can create a Playground to play around with it https://github.com/onmyway133/ParticlePlayground
You should also consider Particle Emitter (http://particledesigner.71squared.com/) which was designed to be used as a cocos2d plug-in.
A tutorial is provided here:
http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/
Have looked so long for a library specialized in dealing with iPhone Accelerometer but couldn't find anything.
I have made some few sample apps, but none reaches a level of accuracy as in Labyrinth games for example, so any idea about a library for that? Or maybe an open source app?
Would be better if it's integrated in a Physics library
UPDATE: I didn't mention it, but i don't want to use game engines. Specially now, that their future is still unknown. ObjC libraries or tutorials would be better.
I highly recommend looking at tweejump. It's basically an open source version of games like Doodle Jump. It really helped me learn how to use the accelerometer to control an object on the screen.
Although you said you didn't want any game engines, this is powered by the Cocos2D library. However, Cocos2D is written in Objective-C, so there shouldn't be any issue getting anything powered by Cocos2D passed Apple.
Best of luck!
It seems that it may just be easier for you to use a game engine that works with iPhone if you are looking to make a game. Here are 2 engines that export to iPhone GameSalad or Unity 3D
Are there any engines that allow me to develop for pc and iphone at the same time? My preferred language would be c#, but that probably won't happen, so I probably will learn c++ or java.
I want a 2d engine, by the way.
No experience with it but...
http://www.torquepowered.com/products/torque-2D/
C# and Java aren't allowed on the iPhone, so a C or C++ engine would be your best bet. I'm guessing you're doing a game--if so, you'll probably want to use OpenGL. I don't know any specifically, but here's a full list.
Working with pure Core Animation layers can yield cross-platform 2-D drawing and animation between iPhone, iPad, and Mac. As an example of this, the Core Plot framework runs on Mac and iPhone from the same codebase. Core Animation lets you do some pretty complex animations and layout in 2-D.
It is against the rules in OS 4 to write an iPhone app in something other than Apple's dev tools. However, IANAL but I'd expect that it is in theory ok to take the app you made there and then try to run it on an emulation layer etc.. on the /other/ platform(s). Not sure about direct solutions, but check out the GNU Objective-C runtime / GNUStep, they might be a helpful starting point.
How hard would it be to port a flash game to the iPhone. Obviously Flash CS5 is no longer an options, I still would like to know if there's anything that can be reused? or do I have to write everything from scratch (Is Obj-C that different than ActionScript?) Is there any other shortcuts?
Also, if anyone has done this before please share your experience.
Flash is a very different platform, not only is the language change going to be an issue you're going to be going from Flash's renderer to presumably your own using OpenGL:ES.
Although another method may be to port your app to JavaScript. Both ActionScript and JavaScript are EMCAScript dialects, so very similar in that area, the APIs will be completely different though.
http://paulirish.com/work/gordon/demos/ interesting and slightly related, this is a implementation of Flash in JavaScript.
Note the new Apple T.O.S may affect you, but as far as I'm aware it's still a beta and I'm not Apple or a lawyer so I won't try and decipher it for you.
I am doing the same thing. I am using Cocos2d for iPhone. This is a pretty good 2d game engine. Actually, two apps created with it are in the current top 25. You are going to have to get down and dirty in Objective-C though. Objective-C is different from ActionScript but if you are use to object oriented programming you should be able to make the switch. Programming a Flash game is different than typical game programming done in Objective-C/C/C++. So, if you are familiar with how to do things in the Objective-C/C/C++ game programming world (render loop, capturing inputs, etc), you'll really be ok. If not, you'll have to get use to not having the Flash timeline, dealing with frames, etc. Good luck! You can do it!
read the statements from apple, no its not possible.
For my game Hudriks I used flash to build levels and some animations. For this an animation engine has been developed that supports motion tween, and then wrote JSFL scripts that goes through Flash objects and export to a format that can be parsed in my game.
For writing the JSFL - look for document called Extending Flash.
The rest was developed from scratch using Objective C with OpenGL. Do not see option of 'one-click' compilation or converting from Flash to iPhone (not considering CS5), but with developing extensions for Flash you could reuse some work.
It is hard, but it is possible. I am working on a automatic code converter now.
I think some of you have seen the "cartoon wars" game. does anybody know how to create GUI like that? Does it need OpenGL? or it can be done with iPhone sdk's libs?
thanx in advance
I believe Cartoon Wars was written using the Cocos2d game library.
Yes. The trick with the iPhone is, the more you program, the more cool GUI tricks you can come up with to make your app more exciting. I suggest you write a couple of apps to do simple things, using as many API's as you can cram in. Start with Apple's samples. Maybe combine a few of the samples into one, as a learning experience.