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 04-06-2011, 06:17 PM   #1 (permalink)
Indie Developer
 
iSDK's Avatar
 
Join Date: Jul 2010
Posts: 1,346
iSDK is on a distinguished road
Send a message via AIM to iSDK
Default Create a game similar to pacman.

Hi,

I want to make a game that will be similar to pacman from scratch. I don't want to use a games engine either, just plain ol' xcode.

Basically the game would consist of a map that fits the screen, walls within the map, food, enemies and a player.

I just wanted to know what the best way forward would be. I plan on creating the map first, and then doing everything else after that. Where should I begin?

Thanks

iSDK
iSDK is offline   Reply With Quote
Old 04-07-2011, 06:00 AM   #2 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 57
PuchkoffDevelopment is on a distinguished road
Wink

Personally,
I would just use cocos2d.

Or you should draw walls and the player first using OpenGL or quartz2D.

Quote:
Originally Posted by iSDK View Post
Hi,

I want to make a game that will be similar to pacman from scratch. I don't want to use a games engine either, just plain ol' xcode.

Basically the game would consist of a map that fits the screen, walls within the map, food, enemies and a player.

I just wanted to know what the best way forward would be. I plan on creating the map first, and then doing everything else after that. Where should I begin?

Thanks

iSDK
__________________
Check out my iPad apps: SDK Tutorials for Beginners SDK Tutorials Advanced SDK Tutorials Cocos2D
My company: Puchkoff Media
PuchkoffDevelopment is offline   Reply With Quote
Old 04-07-2011, 02:09 PM   #3 (permalink)
Indie Developer
 
iSDK's Avatar
 
Join Date: Jul 2010
Posts: 1,346
iSDK is on a distinguished road
Send a message via AIM to iSDK
Default

Ok, but how could I determine when the walls were touched?

Quote:
Originally Posted by PuchkoffDevelopment View Post
Personally,
I would just use cocos2d.

Or you should draw walls and the player first using OpenGL or quartz2D.
iSDK is offline   Reply With Quote
Old 04-07-2011, 05:07 PM   #4 (permalink)
Registered Member
 
Mattonaise's Avatar
 
Join Date: Apr 2011
Posts: 12
Mattonaise is on a distinguished road
Default

I would suggest using a tilemap. A tilemap is basically an array (or at least a collection of some sort) of individual tiles that make up a level. You can use a tilmap to simplify the creation and drawing of your level. A tilemap can also be used to greatly simplify the collision detection in your game. Just search around about tilemaps and their should be a lot of resources.
__________________
A 14 year old app developer...god help me...
Mattonaise is offline   Reply With Quote
Old 04-07-2011, 05:26 PM   #5 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: South Florida, US
Posts: 357
lgehrig1 is on a distinguished road
Default

Quote:
Originally Posted by iSDK View Post
Ok, but how could I determine when the walls were touched?
Really?

PacMan is a circle. In the game, walls were either vertical (constant X) or horizontal (constant Y), and you can model them (if not, in point of fact, DRAW THEM) as rectangles.

# Case 1 - vertical wall and Xpacman < Xwall

CGPoint P2W -> CGPointMake( Xpacman + Rpacman/2, Ypacman)
if CGRectContainsPoint( rctWall, P2W) then collision

# Xpacman = X coord, center of PacMan
# Ypacman = Y coord, center of PacMan
# Rpacman = PacMan radius
# Xwall = X coord, center of wall

Won't save you if you rez PacMan __IN__ a wall deliberately, but I'll assume you won't do anything that foolish. Remaining cases left as exercise for student.

DISCLAIMER: not real code ... I get paid for real code. The functions are real, though.
lgehrig1 is offline   Reply With Quote
Old 04-07-2011, 05:54 PM   #6 (permalink)
Indie Developer
 
iSDK's Avatar
 
Join Date: Jul 2010
Posts: 1,346
iSDK is on a distinguished road
Send a message via AIM to iSDK
Default

hehe, im a developer not a game developer. This is new!!

Quote:
Originally Posted by lgehrig1 View Post
Really?

PacMan is a circle. In the game, walls were either vertical (constant X) or horizontal (constant Y), and you can model them (if not, in point of fact, DRAW THEM) as rectangles.

# Case 1 - vertical wall and Xpacman < Xwall

CGPoint P2W -> CGPointMake( Xpacman + Rpacman/2, Ypacman)
if CGRectContainsPoint( rctWall, P2W) then collision

# Xpacman = X coord, center of PacMan
# Ypacman = Y coord, center of PacMan
# Rpacman = PacMan radius
# Xwall = X coord, center of wall

Won't save you if you rez PacMan __IN__ a wall deliberately, but I'll assume you won't do anything that foolish. Remaining cases left as exercise for student.

DISCLAIMER: not real code ... I get paid for real code. The functions are real, though.
iSDK is offline   Reply With Quote
Old 12-01-2011, 10:27 PM   #7 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 2
pacphone is on a distinguished road
Smile

Quote:
Originally Posted by iSDK View Post
hehe, im a developer not a game developer. This is new!!
If it would help you there is a very realistic pacman game written in flash you can use it as a model to develop your own.
pacphone is offline   Reply With Quote
Old 12-07-2011, 11:47 AM   #8 (permalink)
Registered Member
 
Join Date: Dec 2011
Posts: 4
Mason is on a distinguished road
Default

Quote:
Originally Posted by pacphone View Post
If it would help you there is a very realistic pacman game written in flash you can use it as a model to develop your own.
I am trying to construct a same model like Pacman and this game is very realistic and i am now trying to develop it own.
Mason 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: 429
6 members and 423 guests
chemistry, Emy, hussain1982, mistergreen2011, Retouchable, skrew88
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,922
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:16 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0