Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-18-2010, 04:55 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 97
hodgey87 is on a distinguished road
Default Slider puzzle / jigsaw...

Hey guys,

Just finished my 2nd app, and trying to get into the games area now. I'm really interested in doing a jigsaw or slider puzzle game but not sure how to even start this.

Do I use cocos2d? I've read on google that there used to be some sample code on the apple website. Could anyone point me in the right direction at all?

I've been doing research but there isn't really much out there.

Cheers

Lee
hodgey87 is offline   Reply With Quote
Old 11-19-2010, 01:07 PM   #2 (permalink)
Registered Member
 
suksmo's Avatar
 
Join Date: Mar 2010
Location: iTunes store : Scrambleface otherwise Scotland
Posts: 262
suksmo is on a distinguished road
Default

Quote:
Originally Posted by hodgey87 View Post
Hey guys,

Just finished my 2nd app, and trying to get into the games area now. I'm really interested in doing a jigsaw or slider puzzle game but not sure how to even start this.

Do I use cocos2d? I've read on google that there used to be some sample code on the apple website. Could anyone point me in the right direction at all?

I've been doing research but there isn't really much out there.

Cheers

Lee
I wrote Scrambleface in straight objective C as it is something very different and the daddy of all sliding puzzle games (it makes a puzzle straight from the video output from the camera(s) on the device). Writing a basic non video one in cocos2d would be very similar. I know of no decent sliding puzzle tutorial available on the net.

Do remember only certain starting combinations are solvable!

If you want to make sales you have to have a hook - theres 1000s of sliding puzzles out there!
__________________
FREE live action video puzzler

download it FREE now:-
http://itunes.apple.com/us/app/scram...416999968?mt=8
suksmo is offline   Reply With Quote
Old 11-22-2010, 06:55 AM   #3 (permalink)
BdR
Registered Member
 
BdR's Avatar
 
Join Date: Mar 2009
Location: The Netherlands
Posts: 132
BdR is on a distinguished road
Default

I can't help you with cocos2d, but I can help you with this:
Quote:
Originally Posted by suksmo View Post
Do remember only certain starting combinations are solvable!
How to detect an unsolvable configuration. I've programmed Photoscramble, which is also a 15puzzle clone with grid size 3x3 up to 8x8. When you randomly scramble the tiles, a puzzle is only solvable if an even number of inversions (switches) is needed to solve it. You can count the number of pairs where a larger number is in front of a smaller one. For example in a 3x3 puzzle:
5 3 4
2 6 1
8 7
When you look at this as a 1-dimensional array it would be (5, 3, 4, 2, 6, 1, 8, 7, 9) where 9 is the empty part. Then count the pairs where a larger number is in front of a smaller one -> 53 54 52 51, 32 31, 42 41, 21, 61, 87 this equals 11 pairs, 11 inversions are needed. This is not an even number, thus this configuration is unsolvable. If this is the case you can simply switch two arbitrary tiles to make it solvable. For example the first two, in the example 5 and 3.

Also see the Photoscramble source files
http://members.home.nl/bas.de.reuver...amble2_src.zip (v2.0 in delphi)
http://members.home.nl/bas.de.reuver...toscramble.zip (v1.0 in basic)
__________________
http://www.bdrgames.nl/
Snake Slider (new puzzle game)
BdR is offline   Reply With Quote
Old 11-22-2010, 07:17 AM   #4 (permalink)
Indie Dev
 
hm50's Avatar
 
Join Date: May 2009
Location: South Bend, Indiana
Posts: 162
hm50 is on a distinguished road
Talking

Here is a pretty decent sliding puzzle game tutorial using Cocos2d.

Hope that helps!!
__________________
iPhone 3G

Support Indie Devs!! (that goes for newbs too!)

Apps:
Spell Blocks
See Read Say
iStatus
myVIP
myMVP
hm50 is offline   Reply With Quote
Old 11-23-2010, 09:24 AM   #5 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 97
hodgey87 is on a distinguished road
Default

Thanks for your replies

Ive been doing abit of research into it and not really much futher to be honest.

Quote:
Originally Posted by hm50 View Post
Here is a pretty decent sliding puzzle game tutorial using Cocos2d.

Hope that helps!!
I saw this tutorial, but couldnt get it to work at all. I download their source code and ran it but the puzzle doesnt seem to work at all.
hodgey87 is offline   Reply With Quote
Old 12-02-2010, 10:15 AM   #6 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 97
hodgey87 is on a distinguished road
Default

Hey Guys,

Quick questions, i found this slider type game on code.google:

HTML Code:
http://iphone-sliding-puzzle.googlecode.com/svn/trunk/ iphone-sliding-puzzle-read-only
Stupid question but how do i get hold of the files to see how it works? Can i download the whole lot at all?

Lee
hodgey87 is offline   Reply With Quote
Old 01-31-2011, 07:09 AM   #7 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 1
Marko V. is on a distinguished road
Default

Hey,

I want to build a Jigsaw Puzzle game as well for the iPhone, but as I'm bit inexperienced in objective-c, I'd really appreciate some help. I recently finished watching the Stanford iTunes U materials, so I know how to build simple apps, but I'd need some help with this one.

Has anybody found some great links or examples besides the ones that were previously mentioned?

Thanks.
Marko V. is offline   Reply With Quote
Old 11-07-2011, 01:15 PM   #8 (permalink)
Registered Member
 
aceiswild's Avatar
 
Join Date: Oct 2011
Location: Canada
Posts: 62
aceiswild is on a distinguished road
Default Suggestions?

Hey guys, I got the jigsaw puzzle code as well. It programmically adds everything to an XIB. When you rn the project it automatically goes to the puzzle. Now i want to show a main menu screen before the puzzle actually starts. I added a SubClass with XIB to the project. How can i get this to load first before the puzzle?

A already tried remaking the project in a ViewBased application which worked and added a button that would take you to the puzzle when you click play, but it has a EXC BAD ACCESS error. Any ideas?

Thank you in advance!!
Steve
aceiswild is offline   Reply With Quote
Old 12-07-2011, 04:45 AM   #9 (permalink)
Registered Member
 
Join Date: Dec 2011
Location: Bussolengo, Italy
Posts: 2
andreasalomoni is on a distinguished road
Default

I just developed a sliding puzzle game with cocos2d...this framework provide everything you need to develop this kind of game!
andreasalomoni is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 407
11 members and 396 guests
7twenty7, ChrisYates, djohnson, gmarro, hussain1982, Kirkout, Retouchable, skrew88, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:09 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0