GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Best way to simulate movement -- Moving everything BUT the Player?

Hey everyone, I've been doing some extensive searching of the forums and Google but couldn't seem to find an answer to this, so if it's already out there in detail, please forgive me!

I'm making a game similar to agar.io where the player moves around and absorbs objects to grow in size, and I'd like to "simulate" movement by moving everything in the scene (background, other actors, etc.) at varying speeds (depending on their own speed/perceived distance to the camera) based on the point where the player clicks.

The end goal is to have the player feel like they are moving toward the point they clicked on.

If I was doing just basic moving toward X/Y while Mouse Down it would be trivial, but I also need the player to be affected by gravity and so I'm using Accelerate Toward to adjust the player's Linear Velocity.

I initially tried Camera Control as a solution, but I need the player to be able to move over a (nearly) infinite, procedurally generated surface, so creating a large enough Scene for the player to move around in with Camera Control is untenable.

Anyway, I feel like I did not adequately explain the situation, but if anyone can make sense of what I'm asking, any help would be greatly appreciated.

(TL;DR: I want the player to remain static in the center of the screen and move everything else on the screen relative to the player to simulate movement while preserving physics/acceleration, but don't know the best way to tackle it)

Best Answer

Answers

  • General.AnubisGeneral.Anubis Posts: 3Member

    Yeah that sounds awesome! Haven't used Skype in quite some time though, since Discord seems to pretty much cover all the same bases but better.

    Either way will work for me though, whenever you're available

  • Simple Gamer ArtsSimple Gamer Arts Posts: 273Member, PRO

    Ok, add me!

    skype name: jukvox

  • General.AnubisGeneral.Anubis Posts: 3Member

    Oops, well accepted the answer too soon :| dunno how to un-accept lol.

    Anyway @Simple Gamer Arts suggested that I seek out @Armelline for help with this one, as it is a fairly complex (and likely math-heavy) setup!

Sign In or Register to comment.