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

  • Simple Gamer ArtsSimple Gamer Arts Posts: 305
    edited September 2018 Accepted Answer

    I feel like I can totally help you on this... it would be easiest via SKYPE shared screen, I can build it for you... it shouldn't take long, probably 10 mins. The basics... I can share my screen and you watch and sort of guide me in what you want and learn as well... or I can guide you while you share your screen (will take longer).

    I've been making games with large screen sizes (endless runners) with widths and height of over 200,000 pixels... and have tackled through loads of trial and error/tutorials/ect on how to create smooth-zero-lag game play.

    It's quite simple, it's just the trial and error that took an eternity.

    Free of charge, my pleasure.

Answers

  • General.AnubisGeneral.Anubis Member Posts: 3

    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 Member, PRO Posts: 305

    Ok, add me!

    skype name: jukvox

  • General.AnubisGeneral.Anubis Member Posts: 3

    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.