Open Call for Video Tutorial Suggestions!

HI,
Would love some Swift Server side Perfect tutorials.
Thanks

3 Likes

I really like the idea of dynamic sizingā€¦ it has been difficult for me to find, for example, how to just put a snow emitter background on a view that sizes dynamicallyā€¦ iā€™m sure itā€™s simple, but Iā€™d like to see the pattern for it.

Hi,
Yeah, strategies can be difficult from a programmer perspective, unless you have a full freedom on the design part, better ask the designerā€™s vision.

For a dynamically resizing SKEmitterNode, many strategies here, but the best is to subclass it and update it somewhere where the view changes (frame, size, etc).
I made a small example (not well optimised, just extracted some patterns from a game I made): Github Link

oh cool. Iā€™ll have a look!

so basically, over those last few days, Iā€™d learned a way to do it for snow falling, which basically looked like this:

    let emitter = SKEmitterNode(fileNamed: "snow")!
    emitter.position = CGPointMake(view.center.x, view.bounds.height + 20)
    emitter.particlePositionRange = CGVector(dx: view.bounds.width, dy: 10)
    
    addChild(emitter)
    
    emitter.advanceSimulationTime(15) //when first shown, it's as if it were going 15 seconds.

so basically, I have to set the lifetime of the particles so that they keep falling until they reach the end of the rectangle they should be inā€¦ thatā€™s kind of problematic to adjust for any kind of emitters that donā€™t necessarily have moving particlesā€¦

it definitely would be cool to be able to just have a function or subclass figure out what is necessary considering things like the speed or whateverā€¦

then as i kept experimenting, I got to see a star field emitter which looks like this one:

    backgroundColor = UIColor.blackColor()
    
    starfield = SKEmitterNode(fileNamed: "Starfield")
    starfield.position = CGPointMake(view.bounds.width + 10, view.center.y)
    starfield.particlePositionRange = CGVector(dx: 0, dy: view.bounds.height)
    starfield.advanceSimulationTime(15)
    addChild(starfield)
    starfield.zPosition = -1

basically in the emitter, the stars fall from right to left. it comes from project 23 at http://hackingwithswift.com

I was wondering when I first saw this emitter, how i could ā€œchange its speedā€ as the ship moved around, but it seems that just makes a mess, because the particles all come from one side and iā€™m not sure if thereā€™s a way to ā€œchange the time flowā€ of an emitter so that it goes forward, backwards, stops, etcā€¦ but that would be cool, would it not?

not quite related, but just curiousā€¦ is there a way to have multiple physics worlds in a scene for different objects? so for example, the player can be gravitationally attracted to a finger gesture, while all the other objects are obeying normal gravity? (or do i just use a field node and categories? hm)

Iā€™d love to be able to play the videos at 1.2x, 1.5x, etc.

3 Likes

Nice to see you got a solution to your problem.
Have a look at what Iā€™ve made for you, if you use it, itā€™s possible to have the subclass take care of itself, especially managing real-time rotations and size scale.

For advanceSimulationTime, basically you want it to be equal to your lifetime duration, thatā€™s why I used the same variable for it (I hate magical numbers, so itā€™s better to have them set somewhere easy to manage).

If you use the enum, itā€™s possible to load many different particles, and have different parameters for each.

I havenā€™t tried to have multiple physical words before, just setting different physical properties to different nodes ā€¦ So I guess using a field node can work, but also a state machine with many bitmasks or using GKBehavior ā€¦ Honestly, endless possibilities and Iā€™m unsure which is the best practice, maybe we get some complex game tutorial :wink: .

For the particles speed and so, itā€™s pretty much possible to do that. The easiest way is to have a reference of your frame (aka the distance particles should cross), then do any logical work by using the particles size, speed or time to get the correct parameters.
The code I shared is already in the perfect place for that (didChangeSize:), but you can use other parameters (in a Gundam game, I used playerā€™s touches to increase particlesā€™ birthrate, speed, angle and color blending options, to give impression of an engine thrust, as well as adding a smoke effect ā€¦ Upon releasing the button, setting everything back to normal state without using advanceSimulationTime().

Hope this helps.

Side note: Maybe continuing the discussion on a separate thread would be better, to not hijack this threadā€™s main purpose.

More Metal physics tutorials!

Iā€™d especially like to see more advanced physical effects such as fluid dynamics, bobbing and floating objects in liquids, oceans, water bobbing about, flowing through thingsā€¦ sprayingā€¦ soft objects colliding and deforming, objects exploding realistically and also being torn apart. that kind of advanced stuff.

2 Likes

@rwenderlich Intermediate iOS Animations

2 Likes

preventing tap fraud webinar

Iā€™d love to see a tutotial that distills what is talked about in this webinar and helps a beginning publisher to reduce or prevent click/tap fraud.

More Scene Kit, I just finished 3D IOS games by tutorials, I second the board game suggestion in Scene Kit, or something with tile maps.

2 Likes

I like the suggestion on Instruments. Also, a PaintCode series would be good.

2 Likes

I would love to see a tutorial on building messenger bots for Facebook or another platform. Iā€™m not sure if it strays too far from the focus of the site but I think it is very interesting and relevant to mobile developers.

1 Like

Firebase video tutorials.

I think one of the most useful and already endorsed by raywenderlich previously is RESTKIT . I really find annoying that such a basic yet powerful library has no updated documentation AT ALL ā€¦ It would be nice to see how much it changed in Swift 2, the ā€œright wayā€ to install the library (due to uncounted eternal bug fights between cocoapods, restkit and xcode team) and the best practices to set up manger/services classes. Maybe im just old school and there is already something better/updated out there and I havenā€™t noticed yet. Anyways, thanks for reading this suggestion! :sunglasses:

1 Like

Swift Firebase video tutorial series can be really helpful to understand fastly in explanation way how to create database for a real world app and connected with special UI like pagination / pull to refresh topics. If It can be in raywenderlich.com thatā€™s good preference. Thanks for all. Iā€™m waiting and working with todayā€™s tutorials.

I agree with jcubed. A PaintCode series would be awesome.

How about iPad specific gotchas? So much is focused on the iPhone in the world wide web. However, there are iPad centric concerns. For exampleā€¦ As opposed to the iPhone, perhaps the iPad with multitasking can be an issue for some apps.
As you know, ā€œMultitasking in iOS 9 allows two side-by-side apps and the Picture-in-Picture windowā€¦ā€ which is from
https://developer.apple.com/videos/play/wwdc2015/212/

I would be interested in a tutorial that covers intermediate/advanced playgrounds, and how they might be tied to test driven development (if that is appropriate).

When playgrounds were introduced, there was a lot of coverage about how to use them (re:tutorials). Since their introduction, features have been added but I havenā€™t found any tutorials that have been updated to include those features.

In addition, Iā€™m wondering if (as part of that series) there could be suggestions of how to use playgrounds vis-a-vis test driven development. Meaning - if you can import your objects/class into a playground and then use the playground to test or develop it, canā€™t you reuse your playground code in your testing code?

Please offer English subtitles

Thanks for the suggestions all! We definitely read all of these when considering what video tutorials we make next.

@hafizcoder We released an Intermediate iOS Animations series, hope you enjoy! https://www.raywenderlich.com/video-tutorials#intanimations

@jeremyd @jcubed We covered PaintCode in our recent Core Graphics series - w00t! https://www.raywenderlich.com/?post_type=post&p=133675

@ys_xs Good news - we do offer English subtitles! Just click the ā€˜ccā€™ button in the lower right of the video to see them.

1 Like