Make the terrain move with the character

Member
Posts: 43
Joined: 2009.04
Post: #1
ok what i want to do is a mario style game. Where when the character is moving forward the background and bricks are going towards him and when he tries to go backwards it won't let him.
I have the basics down like running and jumping and enemies. I know that i have to create an image for the background, but do i make them individual images or just one big long one? and how would i go about making the image look like it is moving because he is running? What kind of code would i use? I am not using open GL ES or anything i am just using the basic frameworks that start out on the view based template.
Thanks
Chris
Quote this message in a reply
Moderator
Posts: 449
Joined: 2003.08
Post: #2
Just curious, are you using Cocos 2D? Or did you forgo that method? I know you were asking about it before.
Alex
Quote this message in a reply
Member
Posts: 43
Joined: 2009.04
Post: #3
No i havn't started to use that yet or chipmunk physics. Would it be better for me to learn those first?
Quote this message in a reply
Member
Posts: 43
Joined: 2009.04
Post: #4
Someone has got to knowAnnoyed can you please help me? Is a UIScrollView the best to use, it seems like it should work?
Quote this message in a reply
Moderator
Posts: 3,572
Joined: 2003.06
Post: #5
Most of us around here are using OpenGL for stuff like that so most of us aren't thinking in terms of how to do it with Quartz or perhaps Core Animation.

That said, I would suggest that you use "tiles" for the background, not just one big image.
Quote this message in a reply
Moderator
Posts: 3,572
Joined: 2003.06
Post: #6
AnotherJake Wrote:That said, I would suggest that you use "tiles" for the background, not just one big image.

A new member just reminded me of a site which has a video tutorial on this which you might be interested in: http://www.71squared.co.uk/2009/05/iphon...map-class/

Probably not exactly what you were looking for, but I'm sure you'll find some interesting discussion which might be helpful.
Quote this message in a reply
Member
Posts: 43
Joined: 2009.04
Post: #7
If thats the case then how do i get started with openGL
Quote this message in a reply
Moderator
Posts: 3,572
Joined: 2003.06
Post: #8
I don't know. For iPhone, you can try this thread and let us know if it helps. There doesn't seem to be any standard path to learning OpenGL nowadays.
Quote this message in a reply
Member
Posts: 86
Joined: 2008.04
Post: #9
Just ran across this link you might like:
http://web.me.com/smaurice/AppleCoder/iP...penGL.html
Quote this message in a reply
Member
Posts: 43
Joined: 2009.04
Post: #10
hello today i was reasing through an article and i think a simple way to make it move is to make a uiscroll view move when i press the forward button. the only problem is the only thing i know how to do with a uiscroll view is make it so when i pinch or slide my finger it moves. Does anyone know any code that will let me move the uiscrollview image by pressing a button?
Thanks
Chris
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Move in direction of camera MikeD 3 4,600 Aug 18, 2010 07:33 AM
Last Post: MikeD
  glTranslate or glOrtho to move camera on a 2D game? riruilo 6 6,826 Sep 22, 2009 12:59 PM
Last Post: riruilo
  png to pvrtc move kendric 8 6,067 Jul 1, 2009 04:49 AM
Last Post: arekkusu
  how can I move out this bar please ? imaumac 5 3,502 Oct 12, 2008 08:14 PM
Last Post: imaumac