need help with control camera

-Timo--Timo- Member Posts: 2,313
I'm trying to make a game where the player stays in the middle but can walk.
I also want to scene to be infinite.
so I want to make something where the player stays in the middle but when you press <- you move to the left but also stays in the middle (background moves to ->)

Comments

  • BoomshackBarryBoomshackBarry Member Posts: 712
    Want you want to make is called an endless runner. There is no control camera behaviour needed as like you said the character isn't moving, you're simply moving the background, and when it gets off screen you're placing it back on the other side of the screen to create an infinite effect. The will be loads of tutorials and forum posts about endless runners so check some of them out to get a better idea of how it's done. I know the guys at Deep Blue Apps have some examples on their site too.
  • WingmanappsWingmanapps Member Posts: 458
    edited June 2013
    Just put a Camera Control behavior on your moving actor

    It sound like you are trying to create an endless runner.
    There is a demo here you might learn from
    http://www.deepblueapps.com/gs-taptap-runner/ although it costs 1,30$
    But i think you can swing that :)
  • -Timo--Timo- Member Posts: 2,313
    no this is not what I want I want the actor be movable in all directions so up down left and right (if -> is pressed move right, if <- is pressed move left, if \/ is pressed move down, if /\ is pressed move up) but then I want the player to stay in the middle of the screen and infinite moving to all sides
  • WingmanappsWingmanapps Member Posts: 458
    Wrap scene


    Move actor
  • -Timo--Timo- Member Posts: 2,313
    thanks but this is still not what im looking for
    because now the player does move but I want the player to stay in the middle
  • WingmanappsWingmanapps Member Posts: 458
    just what the video says - and put in a control camera behavior
  • -Timo--Timo- Member Posts: 2,313
    ok thanks :)
  • -Timo--Timo- Member Posts: 2,313
    I want to make a game like this
    http://www.spelert.nl/denk/Ontsnappen/Fiets-Ontsnapping/
    but I still dont know how to keep the player in the middle of the screen.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited June 2013
    Something like this?

    Use the arrow keys to move the white block around.
  • -Timo--Timo- Member Posts: 2,313
    yes like that :D but I still dont know what I am doing wrong because I did exactly what you did... how can I post my project?
  • -Timo--Timo- Member Posts: 2,313
    ooh -.- why does this only work on Ipod landscape on not on Ipad landscape? because I did exactly what you did but then in Ipad landscape...
  • -Timo--Timo- Member Posts: 2,313
    no, this is not the problem...
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited June 2013
    Did you adjust your camera so it is constrained all the way to center of the screen like I did? Unless you selected the camera to adjust it you may not have noticed that detail.

    I have a little camera control tutorial at my site that covers this same subject:

    http://www.jamie-cross.net/?portfolio=gamesalad-recipe-005-making-your-platform-game-level-scroll-camera-scrolling

    It's in the context of a platform game, but the camera adjustment concepts are the same regardless of game type.
  • -Timo--Timo- Member Posts: 2,313
    oh I see :) thx, this was the problem
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Cool! :)
  • -Timo--Timo- Member Posts: 2,313
    is it also possible to walk infinite to the right (or any other direction)
  • WingmanappsWingmanapps Member Posts: 458
    I already gave you the answer dude
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    It's possible yes, but I think you'd likely need to handle the whole movement routine in a different way to make it seem infinite.

    Instead of moving your player, like I did, you'd need to move all your other elements, background, enemies, obstacles, etc. and spawn them as they are too appear on screen. This is how a lot of endless runners work.
  • -Timo--Timo- Member Posts: 2,313
    not really... check wrap x and wrap y doesn't work because I also have other actors and I only need the background to be infinite
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Are you sure that game is really infinite? I get caught to quickly to find out really. Just use the technique you have and make it a large world but not infinite....
  • -Timo--Timo- Member Posts: 2,313
    I also think thats the best solution, thanks :)
Sign In or Register to comment.