I'm trying to learn iOS programming and I decided to make a game like Connect 4, or some may know it as Four in a row.
I've done the grid and dropping the tiles. However, I haven't been able to stack the tiles on top of each other. I havent tried that much because I have no idea on how i could do something like that as i have never tried making a game like this, I have also searched online but I dont know if it's my choice of wording that it never shows anything or if there isnt anything like it.
I have 7 column on the top, with a hairline where you touch in order to drop the tile to the grid. Right now the tiles just stack on each other.
Not sure if my response is worth to be an answer but what the heck...
If you are set on not getting into Sprite Kit right now, you could probably use UIButton to make this happen. Divide your screen into a grid of UIButtons. You can set the button images according to empty and played (red or blue). Each button code would have to check for things like if the hole (button) was already played, what color chip to display, is this a winning move, etc... There is of course an easier way to do this instead of copying the same code into each button but I'll let you try to figure that one out for now.
Related
I'm looking for some suggestions to on how to approach an animation/functionality in an iPad app.
My client has tasked me with rebuilding an old app of theirs. They don't have the original code, only the app installed on a simulator on their Mac. The video below was made using the old app on a simulator.
The best way to describe what I'm trying to do is to simply show you a short clip, here: https://youtu.be/odft0pNGdvg
Basically, I need to slide the background/scene/sprite/whatever it may be, over to reveal another panel. Then move tiles over from the new panel onto the main panel. The main panel, while moved somewhat over, can also still be interacted with.
I have a good portion of the app built with SpriteKit already, this last big features alludes me though, lol. Any ideas on how to approach this? One idea I had was stacked SKViews or SKScenes, but I can't really figure that out.
Thanks in advance for any ideas!
Speaking about UIKit structures, I can see a "slide menu" where the left view have a double animation of scaling and fading. Speaking about sprite-kit, if you want to realize something similar to that video, you can make an SKScene with two SKNode, a couple of buttons on the top of the first SKNode to change its behaviour, each node should have a "background" sprite where the left node should have 55% or 60% of the full scene size width, the second node should have the full size of the scene.
The first situation will be: the left node hided and zoomed out and the right node covering the full screen with a zPosition greater than the left node.
Then you should implement the swiping gestures and animating the nodes following your demonstration video, so the left node should move to the right with a right swipe and in the same time left node should appear , scaling and fading to the left part of the screen. It should simple to making.
I am currently working on a new project and I need to detect whether my SpriteNode has been touched or not. That is not the problem [yet]. But my SpriteNode includes an Png-Image and due to this it also includes an translucent part. And what I want to do is to "delete"/ignore this non-visible part and only detect whether the visible part has been touched. I tried it on several ways but nothing really worked. I need an reliable way to do that (Swift 4 or 3). I already read other posts but they did not help.
Or maybe you have other ways to determine an touchable area from Png-Image than using a SpriteNode.
ok guys im not to shure where to start with this one its a first for me but i have a floor plan that i would like to show in my IOS7 App and i know i want the user to shrink and grow the image so he or she can zoom in to areas of the map. it would be nice if they could click on the an area of the image and it would be linked to data in my parse database. but i think thats a long way off for me.....
but for now just to let the user shrink and grow and rotate the image would be nice.
anyone got any tutorials they can point me to?
Have a look at Apple's PhotoScroller example. Here an ARC-ready version.
This will not cover rotating the image, but you can easily get this by following this tutorial.
I want to know if is possible simulate the little movement of icons in iPhone springboard when I do a long press in one of them. Can you help me?
LOL!
I was at a conference last year and one of the talkers was an ex Apple employee around at the time of creating that icon wobble.
When they were creating it they used a combination of animation of scale, rotation and translation (both up, down and left, right).
When showing it to Steve Jobs he couldn't be satisfied by any of the wobbles that he was shown.
In the end they created some custom sliders (behind the home screen) that he was able to access so that he could customise the animation himself and get it "just right".
I know this doesn't help at all but thought it might be interesting.
Anyway, it looks like the link that Robotic Cat provided in the comments might give you something worth looking at.
I need to create a list of words then have the words cycle through in a slot machine effect when swiped from top to bottom.
the only issues I'm having problems figuring out is the scrolling text part. UIPICKERVIEW doesn't cycle around (plus I need to only show one option at a time). I've hunted for examples and/or tutorials regarding this but haven't found anything that points me in the right direct.
Anyone know of a tutorial or have suggestions where I can get started or further my research? thanks.
You could use iCarousel for this:
https://github.com/nicklockwood/iCarousel
Run the Basic iOS Demo and select the Cylinder carousel type in vertical orientation with wrap on. If that looks like what you want, the documentation will explain how you can set it up in your project.